Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Roll back the modification, not yet approved
[modules/shaper.git]
/
src
/
Config
/
Config_FeatureReader.h
diff --git
a/src/Config/Config_FeatureReader.h
b/src/Config/Config_FeatureReader.h
index 92a9d705fc630b2bc17ce1d5b387eb8a40e89c3f..409af6c7ec4270ae3db3e4d98f5f4a7a23c57339 100644
(file)
--- a/
src/Config/Config_FeatureReader.h
+++ b/
src/Config/Config_FeatureReader.h
@@
-1,3
+1,5
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
/*
* Config_FeatureReader.h
*
/*
* Config_FeatureReader.h
*
@@
-10,46
+12,50
@@
#include <Config_def.h>
#include <Config_XMLReader.h>
#include <Config_def.h>
#include <Config_XMLReader.h>
-#include <
boost/shared_ptr.hpp
>
+#include <
memory
>
#include <string>
#include <list>
#include <string>
#include <list>
-#include <map>
class Config_FeatureMessage;
class Config_FeatureMessage;
+/*!
+ * \class Config_FeatureReader
+ * \ingroup Config
+ * \brief Class to process feature's xml definition.
+ */
class Config_FeatureReader : public Config_XMLReader
{
public:
class Config_FeatureReader : public Config_XMLReader
{
public:
- Config_FeatureReader(const std::string& theXmlFile, const std::string& theLibraryName,
+ /// Constructor
+ Config_FeatureReader(const std::string& theXmlFile,
+ const std::string& theLibraryName,
const char* theEventGenerated = 0);
virtual ~Config_FeatureReader();
const char* theEventGenerated = 0);
virtual ~Config_FeatureReader();
-
+ /// Returns list of all features defined in reader's file
std::list<std::string> features() const;
protected:
std::list<std::string> features() const;
protected:
- void processNode(xmlNodePtr aNode);
-
bool processChildren
(xmlNodePtr aNode);
+ /// Overloaded method. Defines how to process each node
+
virtual void processNode
(xmlNodePtr aNode);
- void fillFeature(xmlNodePtr theRoot,
- const boost::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
- bool isInternalFeature(xmlNodePtr theRoot);
+ /// Overloaded method. Clears attribute cache on exit from attribute's node
+ virtual void cleanup(xmlNodePtr aNode);
+
+ /// Overloaded method. Defines if the given node should be parsed recursively
+ virtual bool processChildren(xmlNodePtr aNode);
- void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
- std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
-
std::string restoreAttribute(const char* theNodeName, const char* theNodeAttribut
e);
+ /// Fills feature message
+ void fillFeature(xmlNodePtr theRoot,
+
const std::shared_ptr<Config_FeatureMessage>& outFeatureMessag
e);
private:
private:
- /// A map to store all parent's attributes.
- /// The key has from "Node_Name:Node_Attribute"
- std::map<std::string, std::string> myParentAttributes;
- //std::string myLastWorkbench;
- //std::string myLastGroup;
std::string myLibraryName;
std::list<std::string> myFeatures;
std::string myLibraryName;
std::list<std::string> myFeatures;
- /// event generated on feature data sending, by default it is
EVENT_FEATURE_LOADED
+ /// event generated on feature data sending, by default it is
Config_FeatureMessage::GUI_EVENT()
const char* myEventGenerated;
const char* myEventGenerated;
+ bool myIsProcessWidgets;
};
#endif /* CONFIG_FEATUREREADER_H_ */
};
#endif /* CONFIG_FEATUREREADER_H_ */