API Guides > ConceptRT 3.x
PluginClassManager Class Reference

Manager of plugIn of classes. More...

Detailed Description

Manager of plugIn of classes.

Gives the ability to manage static plugins (.lib / .a) or dynamic plugins (.dll / .so) that brings new classes into the business model. Based on ConceptRTModel Layer and its factory mechanism.

Note
Works currently only for loading once.

There are two use cases:

Load dynamic factories from plugins (need to have ConceptRT in dynamic library)
  • 1) Load the configuration
  • 2) LoadPlugins
  • 3) GetFactories
Use PluginClassManager as a static repository to connect static library plugins. (need to have ConceptRT in static library - Common use)
+ Inheritance diagram for PluginClassManager:

Public Member Methods

void LoadConfiguration (IDataStore &dataStore)
 Load the plugin configuration files More...
 
void LoadConfiguration (PCChar8 filename)
 Load the plugin configuration files More...
 
bool LoadPlugins (IMessageCollector *messageCollector=NULL)
 Load the plugins binaries into the current software. More...
 
const BaseConceptFactoriesGetConceptFactories () const
 Gets the factories. More...
 
void GetConceptFactories (BaseConceptFactories &factories)
 Retrieves the factories More...
 
void RegisterFactory (BaseConceptFactory &factory)
 Register a factory More...
 
void RegisterFactories (BaseConceptFactories &factories)
 Register factories More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Singleton< PluginClassManager >
static PluginClassManagerGetInstancePointer ()
 Gets the instance pointer. More...
 
static PluginClassManagerGetInstance ()
 Gets the instance. More...
 
static void DeleteInstance (bool allowNewCreation=false)
 Deletes the instance. More...
 
static bool IsCreated ()
 Query if the singleton instance has already been created. More...
 

Methods Documentation

const BaseConceptFactories& GetConceptFactories ( ) const

Gets the factories.

Returns
the factories list.
void GetConceptFactories ( BaseConceptFactories factories)

Retrieves the factories

Parameters
factories[in, out] The factory list to populate.
void LoadConfiguration ( IDataStore dataStore)

Load the plugin configuration files

Parameters
dataStoreThe dataStore source.

Structure expected DataList of String.

void LoadConfiguration ( PCChar8  filename)

Load the plugin configuration files

Parameters
filenamethe file name.

Structure expected DataList of String.

bool LoadPlugins ( IMessageCollector messageCollector = NULL)

Load the plugins binaries into the current software.

Parameters
messageCollector(Optional) a message collector. Default = NULL.
Returns
true if success, false if not. See messageCollector for diagnostic.
RT Exceptions:

RT_ERROR_PLUGINS_LOAD_NOT_AVAILABLE

RT_ERROR_PLUGINS_BAD_ENTRY_POINT

RT_ERROR_PLUGINS_LOAD_ERROR

Warning
Non-Deterministic. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
Note
RT_ERROR_PLUGINS_LOAD_ERROR and RT_ERROR_PLUGINS_LOAD_ERROR will be shown only by the IMessageCollector.
void RegisterFactories ( BaseConceptFactories factories)

Register factories

Parameters
factoriesThe factories to register.
void RegisterFactory ( BaseConceptFactory factory)

Register a factory

Parameters
factoryThe factory to register.