2 * Config_FeatureReader.h
4 * Created on: Mar 20, 2014
8 #ifndef CONFIG_FEATUREREADER_H_
9 #define CONFIG_FEATUREREADER_H_
11 #include <Config_def.h>
12 #include <Config_XMLReader.h>
19 class Config_FeatureMessage;
21 class Config_FeatureReader : public Config_XMLReader
24 Config_FeatureReader(const std::string& theXmlFile, const std::string& theLibraryName,
25 const char* theEventGenerated = 0);
26 virtual ~Config_FeatureReader();
28 std::list<std::string> features() const;
31 void processNode(xmlNodePtr aNode);
32 bool processChildren(xmlNodePtr aNode);
34 void fillFeature(xmlNodePtr theRoot,
35 const std::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
37 void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
38 std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
39 std::string restoreAttribute(const char* theNodeName, const char* theNodeAttribute);
42 /// A map to store all parent's attributes.
43 /// The key has from "Node_Name:Node_Attribute"
44 std::map<std::string, std::string> myParentAttributes;
45 std::string myLibraryName;
47 std::list<std::string> myFeatures;
48 /// event generated on feature data sending, by default it is Config_FeatureMessage::GUI_EVENT()
49 const char* myEventGenerated;
50 bool myIsProcessWidgets;
53 #endif /* CONFIG_FEATUREREADER_H_ */