Salome HOME
c9535c34bf72e4ca9d25aaa9fdcdf9799af895e0
[modules/shaper.git] / src / Config / Config_FeatureReader.h
1 /*
2  * Config_FeatureReader.h
3  *
4  *  Created on: Mar 20, 2014
5  *      Author: sbh
6  */
7
8 #ifndef CONFIG_FEATUREREADER_H_
9 #define CONFIG_FEATUREREADER_H_
10
11 #include <Config_def.h>
12 #include <Config_XMLReader.h>
13 #include <boost/shared_ptr.hpp>
14
15 #include <string>
16 #include <list>
17
18 class Config_FeatureMessage;
19
20 class Config_FeatureReader : public Config_XMLReader
21 {
22  public:
23   Config_FeatureReader(const std::string& theXmlFile, const std::string& theLibraryName,
24                        const char* theEventGenerated = 0);
25   virtual ~Config_FeatureReader();
26
27   std::list<std::string> features() const;
28
29  protected:
30   void processNode(xmlNodePtr aNode);
31   bool processChildren(xmlNodePtr aNode);
32
33   void fillFeature(xmlNodePtr theRoot, 
34     const boost::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
35   bool isInternalFeature(xmlNodePtr theRoot);
36
37  private:
38   std::string myLastWorkbench;
39   std::string myLastGroup;
40   std::string myLibraryName;
41
42   std::list<std::string> myFeatures;
43   /// event generated on feature data sending, by default it is EVENT_FEATURE_LOADED
44   const char* myEventGenerated;
45 };
46
47 #endif /* CONFIG_FEATUREREADER_H_ */