strusModule  0.17
Public Member Functions | List of all members
strus::ModuleLoaderInterface Class Referenceabstract

Interface providing a mechanism to load modules and to create the objects defined in the modules. More...

#include <moduleLoaderInterface.hpp>

Public Member Functions

virtual ~ModuleLoaderInterface ()
 Destructor. More...
 
virtual void addSystemModulePath ()=0
 Add the path defined by the system depending on the platform where to seek modules to load. More...
 
virtual void addModulePath (const std::string &path)=0
 Add a new path where to seek modules to load. More...
 
virtual bool loadModule (const std::string &name)=0
 Load a module with name 'name' seeking in all module paths defined in the order of their definition. More...
 
virtual std::vector< std::string > moduleLoadTryPaths (const std::string &name)=0
 Get the list of files tried to load for module with a given name. More...
 
virtual void addResourcePath (const std::string &path)=0
 Declare a path for analyzer components to find resource files. More...
 
virtual void defineWorkingDirectory (const std::string &path)=0
 Declare the root path for all data created and written by strus modules. More...
 
virtual std::vector< std::string > modulePaths () const =0
 Get the paths where to seek modules to load. More...
 
virtual std::vector< std::string > modules () const =0
 Get the names of loaded modules. More...
 
virtual std::vector< std::string > resourcePaths () const =0
 Get the paths for resource files. More...
 
virtual std::string workingDirectory () const =0
 Get the root path for all data created and written by strus modules. More...
 
virtual
StorageObjectBuilderInterface * 
createStorageObjectBuilder () const =0
 Create a builder for storage objects build from components loaded from module or the defaults defined. More...
 
virtual
AnalyzerObjectBuilderInterface * 
createAnalyzerObjectBuilder () const =0
 Create a builder for analyzer objects build from components loaded from module or the defaults defined. More...
 
virtual
TraceObjectBuilderInterface * 
createTraceObjectBuilder (const std::string &config) const =0
 Get the builder for call trace proxy objects for analyzer or storage. The returned builder is built from components loaded from module or the standard builders defined by name. More...
 
virtual std::vector< std::string > get3rdPartyLicenseTexts () const =0
 Get the license texts of loaded 3rdParty components, that need to be visible. More...
 
virtual std::vector< std::string > get3rdPartyVersionTexts () const =0
 Get the version info of loaded 3rdParty components, if of any interest. More...
 

Detailed Description

Interface providing a mechanism to load modules and to create the objects defined in the modules.

Constructor & Destructor Documentation

virtual strus::ModuleLoaderInterface::~ModuleLoaderInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void strus::ModuleLoaderInterface::addModulePath ( const std::string &  path)
pure virtual

Add a new path where to seek modules to load.

Parameters
[in]pathfull path of the modules
virtual void strus::ModuleLoaderInterface::addResourcePath ( const std::string &  path)
pure virtual

Declare a path for analyzer components to find resource files.

Parameters
[in]pathpath to add
virtual void strus::ModuleLoaderInterface::addSystemModulePath ( )
pure virtual

Add the path defined by the system depending on the platform where to seek modules to load.

Note
If you do not define any path with 'addSystemModulePath()' or 'addModulePath(const std::string&)' then the system module path is used for loading modules.
virtual AnalyzerObjectBuilderInterface* strus::ModuleLoaderInterface::createAnalyzerObjectBuilder ( ) const
pure virtual

Create a builder for analyzer objects build from components loaded from module or the defaults defined.

Returns
the builder object (with ownership)
virtual StorageObjectBuilderInterface* strus::ModuleLoaderInterface::createStorageObjectBuilder ( ) const
pure virtual

Create a builder for storage objects build from components loaded from module or the defaults defined.

Returns
the builder object (with ownership)
virtual TraceObjectBuilderInterface* strus::ModuleLoaderInterface::createTraceObjectBuilder ( const std::string &  config) const
pure virtual

Get the builder for call trace proxy objects for analyzer or storage. The returned builder is built from components loaded from module or the standard builders defined by name.

Parameters
[in]configtrace object builder config
Returns
the builder object (with ownership)
virtual void strus::ModuleLoaderInterface::defineWorkingDirectory ( const std::string &  path)
pure virtual

Declare the root path for all data created and written by strus modules.

Parameters
[in]pathpath to define as root path
virtual std::vector<std::string> strus::ModuleLoaderInterface::get3rdPartyLicenseTexts ( ) const
pure virtual

Get the license texts of loaded 3rdParty components, that need to be visible.

Returns
the list of license tests
virtual std::vector<std::string> strus::ModuleLoaderInterface::get3rdPartyVersionTexts ( ) const
pure virtual

Get the version info of loaded 3rdParty components, if of any interest.

Returns
the list of version strings
virtual bool strus::ModuleLoaderInterface::loadModule ( const std::string &  name)
pure virtual

Load a module with name 'name' seeking in all module paths defined in the order of their definition.

Parameters
[in]namename of the module with or without file extension (default file extension depends on platform)
virtual std::vector<std::string> strus::ModuleLoaderInterface::moduleLoadTryPaths ( const std::string &  name)
pure virtual

Get the list of files tried to load for module with a given name.

Parameters
[in]namename of the module with or without file extension (default file extension depends on platform)
virtual std::vector<std::string> strus::ModuleLoaderInterface::modulePaths ( ) const
pure virtual

Get the paths where to seek modules to load.

Returns
list of paths in order of their definition
virtual std::vector<std::string> strus::ModuleLoaderInterface::modules ( ) const
pure virtual

Get the names of loaded modules.

Returns
the names of loaded modules in the order of their definition
virtual std::vector<std::string> strus::ModuleLoaderInterface::resourcePaths ( ) const
pure virtual

Get the paths for resource files.

Returns
the paths for resource files
virtual std::string strus::ModuleLoaderInterface::workingDirectory ( ) const
pure virtual

Get the root path for all data created and written by strus modules.

Returns
data root path

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