strusModule  0.17
moduleLoaderInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_MODULE_LOADER_INTERFACE_HPP_INCLUDED
11 #define _STRUS_MODULE_LOADER_INTERFACE_HPP_INCLUDED
12 #include <string>
13 #include <vector>
14 
16 namespace strus
17 {
19 class StorageObjectBuilderInterface;
21 class AnalyzerObjectBuilderInterface;
23 class TraceObjectBuilderInterface;
24 
27 {
28 public:
31 
34  virtual void addSystemModulePath()=0;
35 
38  virtual void addModulePath( const std::string& path)=0;
39 
42  virtual bool loadModule( const std::string& name)=0;
43 
46  virtual std::vector<std::string> moduleLoadTryPaths( const std::string& name)=0;
47 
50  virtual void addResourcePath( const std::string& path)=0;
51 
54  virtual void defineWorkingDirectory( const std::string& path)=0;
55 
58  virtual std::vector<std::string> modulePaths() const=0;
59 
62  virtual std::vector<std::string> modules() const=0;
63 
66  virtual std::vector<std::string> resourcePaths() const=0;
67 
70  virtual std::string workingDirectory() const=0;
71 
74  virtual StorageObjectBuilderInterface* createStorageObjectBuilder() const=0;
75 
78  virtual AnalyzerObjectBuilderInterface* createAnalyzerObjectBuilder() const=0;
79 
84  virtual TraceObjectBuilderInterface* createTraceObjectBuilder( const std::string& config) const=0;
85 
88  virtual std::vector<std::string> get3rdPartyLicenseTexts() const=0;
89 
92  virtual std::vector<std::string> get3rdPartyVersionTexts() const=0;
93 };
94 
95 }//namespace
96 #endif
97 
98 
virtual void addResourcePath(const std::string &path)=0
Declare a path for analyzer components to find resource files.
virtual std::vector< std::string > get3rdPartyVersionTexts() const =0
Get the version info of loaded 3rdParty components, if of any interest.
virtual std::vector< std::string > resourcePaths() const =0
Get the paths for resource files.
virtual AnalyzerObjectBuilderInterface * createAnalyzerObjectBuilder() const =0
Create a builder for analyzer objects build from components loaded from module or the defaults define...
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...
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.
virtual std::vector< std::string > modules() const =0
Get the names of loaded modules.
virtual void defineWorkingDirectory(const std::string &path)=0
Declare the root path for all data created and written by strus modules.
virtual void addModulePath(const std::string &path)=0
Add a new path where to seek modules to load.
Interface providing a mechanism to load modules and to create the objects defined in the modules...
Definition: moduleLoaderInterface.hpp:26
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 f...
virtual StorageObjectBuilderInterface * createStorageObjectBuilder() const =0
Create a builder for storage objects build from components loaded from module or the defaults defined...
virtual std::vector< std::string > get3rdPartyLicenseTexts() const =0
Get the license texts of loaded 3rdParty components, that need to be visible.
virtual ~ModuleLoaderInterface()
Destructor.
Definition: moduleLoaderInterface.hpp:30
virtual void addSystemModulePath()=0
Add the path defined by the system depending on the platform where to seek modules to load...
virtual std::string workingDirectory() const =0
Get the root path for all data created and written by strus modules.
virtual std::vector< std::string > modulePaths() const =0
Get the paths where to seek modules to load.