LRAUV  revA
ModuleLoader Class Reference

Loads modules (either compiled c++ or scripted). More...

#include <ModuleLoader.h>

Collaboration diagram for ModuleLoader:

Public Member Functions

 ModuleLoader (ListOfLoadedModulePtrs &loadedModules)
 Constructor. More...
 
virtual ~ModuleLoader ()
 Destructor. More...
 
void loadModules (const Str &path)
 Loads the modules in the indicated path by file name, adds the components to the list of components and component map registers their contained components' dataElements. More...
 
LoadedModuleloadModule (Str path)
 Loads the indicated module by file name, adds the components to the list of components and component map registers its contained components' dataElements. More...
 
LoadedModuleloadLibraryModule (Str path)
 Loads the indicated compiled libray module. More...
 
void run (void)
 Run doesn't do anything. More...
 

Static Public Member Functions

static bool PathExists (const Str &filePath)
 Returns true if the indicated file exists. More...
 

Private Attributes

Logger logger_
 Logger. More...
 
ListOfLoadedModulePtrsloadedModules_
 List of modules supplied (and owned) by Supervisor. More...
 

Detailed Description

Loads modules (either compiled c++ or scripted).

Todo:
Eventually, will handle module unloading and reloading.

Constructor & Destructor Documentation

ModuleLoader::ModuleLoader ( ListOfLoadedModulePtrs loadedModules)

Constructor.

ModuleLoader::~ModuleLoader ( )
virtual

Destructor.

Member Function Documentation

LoadedModule * ModuleLoader::loadLibraryModule ( Str  path)

Loads the indicated compiled libray module.

Loads the indicated compiled library module.

References create_module(), Str::cStr(), destroy_module(), Syslog::ERROR, logger_, and Logger::syslog().

Referenced by loadModule().

LoadedModule * ModuleLoader::loadModule ( Str  path)

Loads the indicated module by file name, adds the components to the list of components and component map registers its contained components' dataElements.

Loads the indicated module by file name root, adds the components to the list of components and component map registers its contained components' dataElements.

References Syslog::ERROR, Str::find(), Module::getDescription(), LoadedModule::getModule(), Module::getName(), Module::loadComponents(), loadedModules_, loadLibraryModule(), logger_, PathExists(), FlexArray< T >::push(), Str::size(), and Logger::syslog().

Referenced by loadModules().

void ModuleLoader::loadModules ( const Str path)

Loads the modules in the indicated path by file name, adds the components to the list of components and component map registers their contained components' dataElements.

References Str::cStr(), Syslog::ERROR, loadModule(), logger_, and Logger::syslog().

Referenced by Supervisor::initialize().

bool ModuleLoader::PathExists ( const Str filePath)
static

Returns true if the indicated file exists.

References Str::cStr().

Referenced by loadModule().

void ModuleLoader::run ( void  )
inline

Run doesn't do anything.

Member Data Documentation

ListOfLoadedModulePtrs& ModuleLoader::loadedModules_
private

List of modules supplied (and owned) by Supervisor.

Referenced by loadModule().

Logger ModuleLoader::logger_
private

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