/** * XMLConfigurator.hh * * Created on: 17 oct. 2012 * Author: AKKA IS */ #ifndef XMLConfigurator_HH_ #define XMLConfigurator_HH_ #include #include #include namespace AMDA { namespace XMLConfigurator { class NodeCfg; typedef NodeCfg RootNodeCfg; typedef boost::shared_ptr RootNodeCfgSPtr; typedef boost::shared_ptr NodeCfgSPtr; // Parameter XML Configurator typedef std::map RootNodeCfgMap; class XMLConfigurator : public AMDA::Parameters::FileConfigurator { public: XMLConfigurator(const char* pXSDFile, bool isUsedXmlId); virtual ~XMLConfigurator(); /** * Parse an XML file to configure an Object Parameter. */ virtual bool proceed(const char* filename, const AMDA::Parameters::CfgContext& context, bool optionalFile); /** * Add a node parser. * @param xpath example "param/get/baseParam" * @param node A NodeCfgSPtr to parse baseParam XML node */ void addNodeParser( const char* xpath, NodeCfgSPtr node); RootNodeCfgMap& getXmlConfiguratorMap() { return _xmlConfiguratorMap; } protected: RootNodeCfgMap _xmlConfiguratorMap; char* _XSDFile; private : bool _isUsedXmlId; }; }/* namespace XMLConfigurator */ } /* namespace AMDA */ #endif /* XMLConfigurator_HH_ */