Wolframe, 0.0.3

_Wolframe::module::ModulesDirectory Class Reference

The modules directory used by the constructors of the providers to build themselves. More...

#include <moduleDirectory.hpp>

Public Types

typedef std::list
< SimpleBuilder * >
::const_iterator 
simpleBuilder_iterator
 
typedef std::list
< ConfiguredBuilder * >
::const_iterator 
configuredBuilder_iterator
 

Public Member Functions

 ModulesDirectory (const std::string &confDir_)
 Constructor. More...
 
 ~ModulesDirectory ()
 
bool addBuilder (ConfiguredBuilder *builder)
 Add a configured builder to the directory. More...
 
bool addBuilder (SimpleBuilder *builder)
 Add a simple builder (builder for objects without configuration) to the directory. More...
 
ConfiguredBuildergetBuilder (const std::string &section, const std::string &keyword) const
 Get the builder for the configuration section, keyword pair. More...
 
ConfiguredBuildergetBuilder (const std::string &objectClassName) const
 Get the builder for the specified object class name. More...
 
simpleBuilder_iterator simpleBuilderObjectsBegin () const
 
simpleBuilder_iterator simpleBuilderObjectsEnd () const
 
configuredBuilder_iterator configuredBuilderObjectsBegin () const
 
configuredBuilder_iterator configuredBuilderObjectsEnd () const
 
std::vector< std::pair
< std::string, std::string > > 
getConfigurableSectionKeywords (ObjectConstructorBase::ObjectType objtype) const
 Get a selected list of configurable objects loaded as tuple (section,keyword) More...
 
std::string getAbsoluteModulePath (const std::string &moduleName, const std::string &configuredDirectory, bool useDefaultModuleDir=true) const
 Get the absolute path of a module. More...
 
bool loadModules (const std::list< std::string > &modFiles)
 Load the list of modules specified by their absolute path. More...
 

Private Attributes

std::string m_confDir
 configuration directory needed as base for calculating the absolute path of a module More...
 
std::list< ConfiguredBuilder * > m_cfgdBuilder
 list of configurable builders More...
 
std::list< SimpleBuilder * > m_simpleBuilder
 list of simple builders More...
 

Detailed Description

The modules directory used by the constructors of the providers to build themselves.

Member Typedef Documentation

Constructor & Destructor Documentation

_Wolframe::module::ModulesDirectory::ModulesDirectory ( const std::string &  confDir_)
inlineexplicit

Constructor.

Parameters
[in]confDir_Configuration directory that specifies the relative path where to load the modules from if not specified by the system or explicitely
_Wolframe::module::ModulesDirectory::~ModulesDirectory ( )

Member Function Documentation

bool _Wolframe::module::ModulesDirectory::addBuilder ( ConfiguredBuilder builder)

Add a configured builder to the directory.

bool _Wolframe::module::ModulesDirectory::addBuilder ( SimpleBuilder builder)

Add a simple builder (builder for objects without configuration) to the directory.

configuredBuilder_iterator _Wolframe::module::ModulesDirectory::configuredBuilderObjectsBegin ( ) const
inline
configuredBuilder_iterator _Wolframe::module::ModulesDirectory::configuredBuilderObjectsEnd ( ) const
inline
std::string _Wolframe::module::ModulesDirectory::getAbsoluteModulePath ( const std::string &  moduleName,
const std::string &  configuredDirectory,
bool  useDefaultModuleDir = true 
) const

Get the absolute path of a module.

param[in] moduleName name of the module to resolve param[in] configuredDirectory not expanded name of directory configured as "directory" in the "LoadModules" section of the configuration param[in] useDefaultModuleDir wheter to load modules from the default system module dir (only test programs may not do so)

ConfiguredBuilder* _Wolframe::module::ModulesDirectory::getBuilder ( const std::string &  section,
const std::string &  keyword 
) const

Get the builder for the configuration section, keyword pair.

Parameters
[in]sectionthe section (parent) of the configuration
[in]keywordthe keyword in the section
ConfiguredBuilder* _Wolframe::module::ModulesDirectory::getBuilder ( const std::string &  objectClassName) const

Get the builder for the specified object class name.

std::vector<std::pair<std::string,std::string> > _Wolframe::module::ModulesDirectory::getConfigurableSectionKeywords ( ObjectConstructorBase::ObjectType  objtype) const

Get a selected list of configurable objects loaded as tuple (section,keyword)

Remarks
This function solves a henn and egg problem for the wolfilter program.
Parameters
[in]objtypetype of the configurable objects to select
Returns
The list of section,keyword tuples of configurable objects with the selected type
bool _Wolframe::module::ModulesDirectory::loadModules ( const std::list< std::string > &  modFiles)

Load the list of modules specified by their absolute path.

param[in] modFiles list of modules to load into this structure

simpleBuilder_iterator _Wolframe::module::ModulesDirectory::simpleBuilderObjectsBegin ( ) const
inline
simpleBuilder_iterator _Wolframe::module::ModulesDirectory::simpleBuilderObjectsEnd ( ) const
inline

Member Data Documentation

std::list< ConfiguredBuilder* > _Wolframe::module::ModulesDirectory::m_cfgdBuilder
private

list of configurable builders

std::string _Wolframe::module::ModulesDirectory::m_confDir
private

configuration directory needed as base for calculating the absolute path of a module

std::list< SimpleBuilder* > _Wolframe::module::ModulesDirectory::m_simpleBuilder
private

list of simple builders


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