SystemCore Class Reference

#include <SystemCore.h>

Collaboration diagram for SystemCore:

List of all members.


Classes

class  ModuleConverterToV1_0a4
class  ModuleLoadAccessor
struct  ModulesConfigData
class  SystemCoreConverterToV1_0a4

Static Public Member Functions

static void init ()
static bool configure (std::string systemCoreConfigFile)
static bool configure (std::string systemCoreConfigFile, std::string outputInterfaceConfigFile)
static bool configure (std::string systemCoreConfigFile, std::string outputInterfaceConfigFile, std::string inputInterfaceConfigFile, std::string modulesConfigFile)
static void cleanup ()
static bool registerModuleInterface (ModuleInterface *modIntf)
static bool unregisterModuleInterface (ModuleInterface *modIntf)
static void registerModuleInitCallback (moduleInitCallback function)
static void registerCoreComponentInitCallback (coreComponentInitCallback function)
static void synchronize ()
static void step ()
static const std::map
< std::string, ModuleInterface * > & 
getModuleMap ()
static ModuleInterfacegetModuleByName (std::string name, std::string fileName="")
static bool isModuleLoaded (std::string name)

Static Private Member Functions

static bool initModules (std::string modulesConfigFile, std::vector< ModulesConfigData > &modulesConfigurations)
static bool configureCoreComponents (std::string configFile)
static bool loadPlugin (std::string filename)
static std::string getLibraryFileName (std::string libraryName)
static bool parseModuleConfig (std::string path, std::vector< ModulesConfigData > &modulesConfigurations)
static bool initializeModules (std::vector< ModulesConfigData > &modulesConfigurations)
static bool configureModules (std::vector< ModulesConfigData > &modulesConfigurations, ModuleInterface::CONFIGURATION_ORDER configurationOrder)
static void sendCoreComponentCallback (CoreComponents component)
static void cleanupPlugins ()

Static Private Attributes

static SceneGraphInterfacesgInt = NULL
static std::list< plugin_tpluginlist
static std::map< std::string,
ModuleInterface * > 
moduleMap
static std::vector
< moduleInitCallback
moduleCallbacks
static std::vector
< coreComponentInitCallback
coreComponentCallbacks
static EventPipeeventPipe
static bool initialized = false
static XmlConfigurationLoader systemCoreXmlConfigLoader
static XmlConfigurationLoader moduleXmlConfigLoader

Member Function Documentation

SystemCore::cleanup (  )  [static]

Unregister all currently loaded modules, and close the associated plugins. If you use any module, i.e. if you called SystemCore::configure() before, you should call this method during cleanup. Call this method before WorldDatabase::cleanup() and UserDatabase::cleanup().

See also:
WorldDatabase::cleanup(), UserDatabase::cleanup()

void SystemCore::cleanupPlugins (  )  [static, private]

Frees the memory for the loaded plugins

bool SystemCore::configure ( std::string  systemCoreConfigFile,
std::string  outputInterfaceConfigFile,
std::string  inputInterfaceConfigFile,
std::string  modulesConfigFile 
) [static]

Parse the user configuration file which assigns a configuration file to each module. For each registered module, loadConfig() will be invoked.

Parameters:
systemCoreConfigFile the path to the systemCore configuration file.
outputInterfaceConfigFile the path to the output interface configuration file.
inputInterfaceConfigFile the path to the input interface configuration file.
modulesConfigFile the path to the modules configuration file.
This method may be called only once.

Note: The user configuration file also holds information unrelated to the modules (e.g. User and Avatar information).

See also:
User::loadConfig(std::string)

bool SystemCore::configure ( std::string  systemCoreConfigFile,
std::string  outputInterfaceConfigFile 
) [static]

Parse the SystemCoreConfiguration file.

Parameters:
systemCoreConfigFile the path to the systemCore configuration file.
outputInterfaceConfigFile the path to the output interface configuration file.
This method may be called only once.

bool SystemCore::configure ( std::string  systemCoreConfigFile  )  [static]

Parse the SystemCoreConfiguration file.

Parameters:
systemCoreConfigFile the path to the systemCore configuration file.
This method may be called only once.

bool SystemCore::configureCoreComponents ( std::string  configFile  )  [static, private]

bool SystemCore::configureModules ( std::vector< ModulesConfigData > &  modulesConfigurations,
ModuleInterface::CONFIGURATION_ORDER  configurationOrder 
) [static, private]

: write doxygen documentation

std::string SystemCore::getLibraryFileName ( std::string  libraryName  )  [static, private]

: write doxygen documentation

ModuleInterface * SystemCore::getModuleByName ( std::string  name,
std::string  fileName = "" 
) [static]

Returns the module with the specified name. If the module is not loaded yet the method tries to load a suitable plugin.

Parameters:
name name of the module
fileName optional path of the plugin file
Returns:
pointer to the module with the name name or NULL in case of failure
Note: The file name is completed using the function getFullPath() (in file UtilityFunctions.h)

const std::map< std::string, ModuleInterface * > & SystemCore::getModuleMap (  )  [static]

Sets the SceneGraphInterface. This method can be called only once. Also invokes init() of the SceneGraphInterface. At the moment there is no way to remove the SceneGraphInterface (as there is no need for that). Simply call delete on it when everything else has been released.

Parameters:
sgInt SceneGraphInterface singelton Returns a reference to a list of all registered modules. The content of the list might change (whenever another module is added or removed (which is not supported at the moment)).
Returns:
reference to list of all registered modules.

void SystemCore::init (  )  [static]

Initializes all classes from the inVRs system core. This method initializes the WorldDatabase, UserDatabase, EventManager, RequestListener and TransformationManager in the written order. Only call this method if you want to use all features of the inVRs system core. Otherwise you can call the init- methods of those classes by yourself.

bool SystemCore::initializeModules ( std::vector< ModulesConfigData > &  modulesConfigurations  )  [static, private]

: write doxygen documentation

bool SystemCore::initModules ( std::string  modulesConfigFile,
std::vector< ModulesConfigData > &  modulesConfigurations 
) [static, private]

bool SystemCore::isModuleLoaded ( std::string  name  )  [static]

Method for getting access to the SceneGraphInterface singelton.

Returns:
returns the SceneGraphInterface singelton Query, wether a module has already been loaded.
Parameters:
name The name of the module.
Returns:
True, if the module is loaded; false otherwise.

bool SystemCore::loadPlugin ( std::string  filename  )  [static, private]

The method returns a pointer to the vector of all registered Modules. WARNING: The method returns a pointer to the list so every change also changes the data of the SystemCore! Also take care when working multithreaded!

Returns:
pointer to the vector of registered Modules

bool SystemCore::parseModuleConfig ( std::string  path,
std::vector< ModulesConfigData > &  modulesConfigurations 
) [static, private]

: write doxygen documentation

void SystemCore::registerCoreComponentInitCallback ( coreComponentInitCallback  function  )  [static]

Register a function to be called on initialisation of a CoreComponent. The callback function will be called after a new components has been loaded (i.e. it has been registered with the SystemCore), but before the components loadConfig method has been called. The callback function has to take one argument of type CoreComponents, and have a return type of void. All registered callbacks are called on each new component.

Parameters:
function the callback function.

void SystemCore::registerModuleInitCallback ( moduleInitCallback  function  )  [static]

Register a function to be called on initialisation of a module. The callback function will be called after a new module has been loaded (i.e. it has been registered with the SystemCore), but before the module's loadConfig method has been called. The callback function has to take one argument of type ModuleInterface *, and have a return type of void. All registered callbacks are called on each new module.

Parameters:
function the callback function.

bool SystemCore::registerModuleInterface ( ModuleInterface modIntf  )  [static]

Registers a ModuleInterface. All registered modules will be configured through loadConfigs() Typically a module calls this method in their constructor.

Parameters:
modIntf module which will be registered

void SystemCore::sendCoreComponentCallback ( CoreComponents  component  )  [static, private]

: write doxygen documentation

SystemCore::step (  )  [static]

: write doxygen documentation

SystemCore::synchronize (  )  [static]

: write doxygen documentation

bool SystemCore::unregisterModuleInterface ( ModuleInterface modIntf  )  [static]

Unregisters a ModuleInterface. Typically a module calls this method in their destructor.

Parameters:
modIntf module which will be registered


Member Data Documentation

EventPipe * SystemCore::eventPipe [static, private]

bool SystemCore::initialized = false [static, private]

std::vector< moduleInitCallback > SystemCore::moduleCallbacks [static, private]

std::map< std::string, ModuleInterface * > SystemCore::moduleMap [static, private]

std::list< plugin_t > SystemCore::pluginlist [static, private]

SceneGraphInterface * SystemCore::sgInt = NULL [static, private]


The documentation for this class was generated from the following files:

Generated on Wed Oct 20 16:12:01 2010 for inVRs by doxygen 1.5.8