I wrote a template class hierarchy which is able to wrap most plugin classes.
These three lines result in a basic generic plugin:
Code:
#include "genericplugin_adaptor.h"
#include "genericpluginpanel.h"
GenericPlugin_Adaptor<GenericPluginPanel> MyGenericPlugin("Empty panel");
The GenericPlugin_Adaptor will register a generic plugin named "Empty panel"
GenericPluginPanel is a specialization of my Panel class,
which is very simple to use, similar to ceej's class description.
I am using a generic Observer pattern base class to be able to
concentrate controls into more complex ones and notify Observers.
It is very convenient when developing user interfaces.
For the creation of a custom object the code is similar:
Code:
#include "customobject_adaptor"
#include "genericcustomobject.h"
CustomObject_Adaptor<GenericCustomObject> MyCustomObject( "does nothing" );
This woud register a custom object plugin named "does nothing".
To put funcionality into the plugin you would have to specialize GenericCustomObject and use that class as the template parameter.
Maybe we could put our efforts together and create an open source project on one of those sites who provide a free source control environment?
- David