47 #ifndef _MIRA_LOADER_H_ 48 #define _MIRA_LOADER_H_ 51 #include <boost/filesystem/path.hpp> 52 #include <boost/filesystem/operations.hpp> 53 #include <boost/assign.hpp> 66 class ConfigurationLoader;
83 virtual void prepareDocument(
XMLDom& xml) = 0;
92 virtual int getOrder()
const = 0;
184 typedef std::map<std::string, std::string>
Context;
206 void registerLoaderPlugin(
const ClassProxy& plugin);
215 void prepare(
XMLDom& ioXML);
221 void load(
const XMLDom& xml);
250 struct CompareConfigurationPreparePlugin {
253 return a->getOrder() < b->getOrder();
261 CompareConfigurationPreparePlugin> PreparePluginMap;
263 typedef std::vector<std::pair<ClassProxy, ConfigurationLoaderPluginPtr>> LoaderPluginSet;
264 typedef std::map<std::string, LoaderPluginSet> LoaderPluginMap;
266 bool mEnableUnknownTagWarnings;
269 PreparePluginMap mPreparePlugins;
272 LoaderPluginMap mLoaderPluginsMap;
273 LoaderPluginSet mLoaderPlugins;
275 bool mAddedInfoToException;
A STL conform DOM reader/writer for XML.
A STL conform wrapper for libxml2 to read XML files as DOM.
Definition: XMLDom.h:73
boost::shared_ptr< ConfigurationLoaderPlugin > ConfigurationLoaderPluginPtr
typedef for ConfigurationLoaderPlugin pointer
Definition: Loader.h:173
Base class for loader plugins.
Definition: Loader.h:140
The class proxy assures that the pointer to the class object is always valid.
Definition: Class.h:400
virtual ~ConfigurationLoaderPlugin()
Definition: Loader.h:144
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Framework export macro declaration.
Const sibling_iterator for iterating over xml nodes that have the same parent (siblings) ...
Definition: XMLDom.h:671
#define MIRA_ABSTRACT_OBJECT(classIdentifier)
Use this MACRO instead of MIRA_OBJECT to declare the class as abstract.
Definition: FactoryMacros.h:235
Base class for prepare plugins.
Definition: Loader.h:73
$Header file containing base classes to enable class creation using a class factory$ ...
#define MIRA_FRAMEWORK_EXPORT
Definition: FrameworkExports.h:61
boost::shared_ptr< ConfigurationPreparePlugin > ConfigurationPreparePluginPtr
typedef for ConfigurationPreparePlugin pointer
Definition: Loader.h:96
The object class acts as a generic base class for classes which should be used with the classFactory...
Definition: Object.h:144
Context & getContext()
Get the context of the loader.
Definition: Loader.h:230
std::map< std::string, std::string > Context
Definition: Loader.h:184
virtual void startDocument(ConfigurationLoader *ioLoader)
Is called when a new document is parsed.
Definition: Loader.h:153
virtual void endDocument(ConfigurationLoader *ioLoader)
Is called after the whole document was parsed.
Definition: Loader.h:160
Class for loading, parsing, modifying and interpreting application configuration files.
Definition: Loader.h:181
virtual ~ConfigurationPreparePlugin()
Definition: Loader.h:77