Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

RTC::ModuleManager Class Reference

#include <ModuleManager.h>

List of all members.

Public Types

typedef void(* ModuleInitFunc )(Manager *)

Public Member Functions

 ModuleManager (Properties &prop)
 ~ModuleManager ()
std::string load (const std::string &file_name)
 Load module.
std::string load (const std::string &file_name, const std::string &init_func)
void unload (const std::string &file_name)
 Unload module.
void unloadAll ()
 Unload all modules.
void * symbol (const std::string &file_name, const std::string &func_name) throw (ModuleNotFound, SymbolNotFound)
 Look up a named symbol in the module.
void setLoadpath (const std::vector< std::string > &load_path)
 Set default module load path.
std::vector< std::string > getLoadPath ()
void addLoadpath (const std::vector< std::string > &load_path)
 Add module load path.
std::vector< std::string > getLoadedModules ()
 Get loaded module names.
std::vector< std::string > getLoadableModules ()
 Get loadable module names.
void allowAbsolutePath ()
 Allow absolute load path.
void disallowAbsolutePath ()
 Forbid absolute load path.
void allowModuleDownload ()
 Allow module download.
void disallowModuleDownload ()
 Forbid module download.
std::string findFile (const std::string &fname, const std::vector< std::string > &load_path)
 Search file from load path.
bool fileExist (const std::string &filename)
 Check file existance.
std::string getInitFuncName (const std::string &file_path)
 Create initialize function symbol.

Protected Types

typedef std::vector< std::string > StringVector
typedef StringVector::iterator StringVectorItr
typedef StringVector::const_iterator StringVectorConstItr
typedef std::map< std::string,
DLL
DllMap
typedef DllMap::iterator DllMapItr
typedef DllMap::const_iterator DllMapConstItr

Protected Attributes

Propertiesm_properties
DllMap m_modules
StringVector m_loadPath
StringVector m_configPath
bool m_downloadAllowed
bool m_absoluteAllowed
std::string m_initFuncSuffix
std::string m_initFuncPrefix

Classes

struct  DLL
struct  Error
struct  FileNotFound
struct  InvalidArguments
struct  InvalidOperation
struct  ModuleNotFound
struct  NotAllowedOperation
struct  NotFound
struct  SymbolNotFound


Detailed Description

ModuleManager class


Member Typedef Documentation

typedef std::map<std::string, DLL> RTC::ModuleManager::DllMap [protected]
 

typedef DllMap::const_iterator RTC::ModuleManager::DllMapConstItr [protected]
 

typedef DllMap::iterator RTC::ModuleManager::DllMapItr [protected]
 

typedef void(* RTC::ModuleManager::ModuleInitFunc)(Manager *)
 

typedef std::vector<std::string> RTC::ModuleManager::StringVector [protected]
 

typedef StringVector::const_iterator RTC::ModuleManager::StringVectorConstItr [protected]
 

typedef StringVector::iterator RTC::ModuleManager::StringVectorItr [protected]
 


Constructor & Destructor Documentation

RTC::ModuleManager::ModuleManager Properties prop  ) 
 

RTC::ModuleManager::~ModuleManager  ) 
 


Member Function Documentation

void RTC::ModuleManager::addLoadpath const std::vector< std::string > &  load_path  ) 
 

Add module load path.

void RTC::ModuleManager::allowAbsolutePath  )  [inline]
 

Allow absolute load path.

void RTC::ModuleManager::allowModuleDownload  )  [inline]
 

Allow module download.

void RTC::ModuleManager::disallowAbsolutePath  )  [inline]
 

Forbid absolute load path.

void RTC::ModuleManager::disallowModuleDownload  )  [inline]
 

Forbid module download.

bool RTC::ModuleManager::fileExist const std::string &  filename  ) 
 

Check file existance.

std::string RTC::ModuleManager::findFile const std::string &  fname,
const std::vector< std::string > &  load_path
 

Search file from load path.

std::string RTC::ModuleManager::getInitFuncName const std::string &  file_path  ) 
 

Create initialize function symbol.

std::vector<std::string> RTC::ModuleManager::getLoadableModules  ) 
 

Get loadable module names.

std::vector<std::string> RTC::ModuleManager::getLoadedModules  ) 
 

Get loaded module names.

std::vector<std::string> RTC::ModuleManager::getLoadPath  )  [inline]
 

std::string RTC::ModuleManager::load const std::string &  file_name,
const std::string &  init_func
 

std::string RTC::ModuleManager::load const std::string &  file_name  ) 
 

Load module.

void RTC::ModuleManager::setLoadpath const std::vector< std::string > &  load_path  ) 
 

Set default module load path.

void* RTC::ModuleManager::symbol const std::string &  file_name,
const std::string &  func_name
throw (ModuleNotFound, SymbolNotFound)
 

Look up a named symbol in the module.

void RTC::ModuleManager::unload const std::string &  file_name  ) 
 

Unload module.

void RTC::ModuleManager::unloadAll  ) 
 

Unload all modules.


Member Data Documentation

bool RTC::ModuleManager::m_absoluteAllowed [protected]
 

StringVector RTC::ModuleManager::m_configPath [protected]
 

bool RTC::ModuleManager::m_downloadAllowed [protected]
 

std::string RTC::ModuleManager::m_initFuncPrefix [protected]
 

std::string RTC::ModuleManager::m_initFuncSuffix [protected]
 

StringVector RTC::ModuleManager::m_loadPath [protected]
 

DllMap RTC::ModuleManager::m_modules [protected]
 

Properties& RTC::ModuleManager::m_properties [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Oct 5 05:16:04 2007 for OpenRTM by  doxygen 1.4.1