Salome HOME
Implimentation of the Config XML Reader
[modules/shaper.git] / src / Config / Config_XMLReader.h
1 /*
2  * Config_XMLReader.h
3  *
4  *  Created on: Mar 14, 2014
5  *      Author: sbh
6  */
7
8 #ifndef CONFIG_XMLREADER_H_
9 #define CONFIG_XMLREADER_H_
10
11 #include "Config.h"
12 #include "Config_Message.h"
13
14 #include <string>
15 #include <map>
16
17 class CONFIG_EXPORT Config_XMLReader {
18 public:
19   Config_XMLReader(const std::string& theXmlFile);
20   virtual ~Config_XMLReader();
21
22   std::string documentPath() const;
23   void setDocumentPath(std::string documentName);
24
25   void readAll();
26
27 protected:
28   //! Performs the real import of the given xml file, return false if file is not found
29   //! or generates an algo error if file content is bad
30   //! \param theFile name of the imported XML file
31   //! \returns true if file exists and not corrupted
32   bool import();
33   bool importWorkbench(void*);
34   void fillFeature(void *theRoot, Config_FeatureMessage& outFeatureMessage);
35   std::string getProperty(void *theRoot, const char* name);
36
37 private:
38   std::string m_DocumentPath;
39 };
40
41 #endif /* CONFIG_XMLREADER_H_ */