1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 * Config_FeatureReader.h
6 * Created on: Mar 20, 2014
10 #ifndef CONFIG_FEATUREREADER_H_
11 #define CONFIG_FEATUREREADER_H_
13 #include <Config_def.h>
14 #include <Config_XMLReader.h>
20 class Config_FeatureMessage;
23 * \class Config_FeatureReader
25 * \brief Class to process feature's xml definition.
27 class Config_FeatureReader : public Config_XMLReader
31 Config_FeatureReader(const std::string& theXmlFile,
32 const std::string& theLibraryName,
33 const char* theEventGenerated = 0);
34 virtual ~Config_FeatureReader();
35 /// Returns list of all features defined in reader's file
36 std::list<std::string> features() const;
39 /// Overloaded method. Defines how to process each node
40 virtual void processNode(xmlNodePtr aNode);
42 /// Overloaded method. Clears attribute cache on extit from attribute's node
43 virtual void cleanup(xmlNodePtr aNode);
45 /// Overloaded method. Defines if the given node should be parsed recursively
46 virtual bool processChildren(xmlNodePtr aNode);
48 /// Fills feature message
49 void fillFeature(xmlNodePtr theRoot,
50 const std::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
53 std::string myLibraryName;
55 std::list<std::string> myFeatures;
56 /// event generated on feature data sending, by default it is Config_FeatureMessage::GUI_EVENT()
57 const char* myEventGenerated;
58 bool myIsProcessWidgets;
61 #endif /* CONFIG_FEATUREREADER_H_ */