Re the dll Abstract Factory.
let's call it:
class GMPI_Plugin_Factory { void GetMetaData( int index, gmpi_descriptor *gd ); GMPI_Plugin *Instantiate( int index ); };
..where gmpi_descriptor describes the plugin...
struct gmpi_descriptor { char *unique_identifier; char *name; //etc };
..So the dll has a single exported function..
extern "C" { __declspec (dllexport)
IGMPI_Plugin_Factory *GetPluginFactory(void) { static GMPI_Plugin_Factory factory; return &factory; } }
and finally,
class IGMPI_Plugin { virtual void placeholder1(void) = 0; virtual void placeholder2(void) = 0; };
...and the 'real' concrete plugin base class that we base our plugins on..
class GMPI_Plugin : public IGMPI_Plugin { virtual void placeholder1(void){}; virtual void placeholder2(void){}; };
Notes: IGMPI_Plugin should probably include the standard 'COM stuff' too..
have at it...
Jeff
---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission.
Archive: //www.freelists.org/archives/gmpi Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe