Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Masking the private methods from classes?

(1/1)

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:

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

--- End code ---

And in the .cpp file:


--- Code: ---class myEditorManager:public EditorManager
{
   (insert your event handling methods here)
}
--- End code ---


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?

Navigation

[0] Message Index

Go to full version