void registerInFactoryMyPlugin()
this function creates a MyPluginFactory and register it in the QGlobalRWFactory.
When at run time an application ask to LoadPlugin("MyPlugin") the QDll system
open the library that contains registerMyPlugin and executes it so that the MyPluginFactory
is automatically created and registered into the QGlobalRWFactory.
Once a plugin is registered other applications can call the CreatePluginType("MyPlugin") that
in turns call the MyPluginFactory and return a pointer to the newly created MyPlugin instance.
Reference: http://www.nuclex.org/articles/building-a-better-plugin-architecture (Option 1)
Public Member Functions | |
void | LoadPlugin (const std::string &name) |
void | RegisterGlobalReader (QGlobalReaderFactory *GRF) |
std::list< const QGlobalReaderFactory * > | GetListOfGlobalReaders () const |
QGlobalReader * | CreateGlobalReader (const std::string &name) |
void | RegisterGlobalWriter (QGlobalWriterFactory *GRF) |
std::list< const QGlobalWriterFactory * > | GetListOfGlobalWriters () const |
QGlobalWriter * | CreateGlobalWriter (const std::string &name) |
Static Public Member Functions | |
static QGlobalRWFactory & | GetInstance () |
Private Attributes | |
QDLLLoader * | fDLLLoader |
std::map< std::string, QGlobalReaderFactory * > | fGlobalReaders |
std::map< std::string, QGlobalWriterFactory * > | fGlobalWriters |