News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Masking the private methods from classes?

Started by rickg22, May 31, 2005, 01:13:11 AM

Previous topic - Next topic

rickg22

Guys, I was compiling CB the other day when I realized that everytime I wanted to add a new event handling method to C::B, the *WHOLE* SDK had to be recompiled. AND the plugins. :x

So I thought about this: What if we subclass say, EditorManager (as an example) this way:

class EditorManager:public wxEvtHandler
{
  public:
    ...
 (no private stuff here)
}

And in the .cpp file:

class myEditorManager:public EditorManager
{
  (insert your event handling methods here)
}


This way, we could tamper with it and add/remove private methods as we please, without having to recompile dependent files! :D (This would also bring stability to 3rd-party plugins, since they wouldn't have to be recompiled everytime we make an internal change in the SDK).

Pros/cons, everyone? Or is there an easier way?