Make KaleidoscopePlugin.begin protected by default

Make `Kaleidoscope_` a friend class, so that it can access `.begin`. The reason
behind this is that `.begin` is an interface towards `Kaleidoscope.use()`, and
that function should be the only user. To discourage its use, make it protected.

This does not break any existing - and valid - code, but allows us to slowly
migrate the plugins to a protected `begin()` method.

Fixes #177.

Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
pull/196/head
Gergely Nagy 7 years ago
parent 54771ad718
commit 9182537fcf

@ -37,8 +37,11 @@ extern HARDWARE_IMPLEMENTATION KeyboardHardware;
#define USE_PLUGINS(plugins...) Kaleidoscope.use(plugins)
class Kaleidoscope_;
class KaleidoscopePlugin {
public:
friend Kaleidoscope_;
protected:
virtual void begin(void) = 0;
};

Loading…
Cancel
Save