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_WidgetReader.h
diff --git
a/src/Config/Config_WidgetReader.h
b/src/Config/Config_WidgetReader.h
index cfc1519a56b62fcc46eafeaeb39e489d3fba599d..a95d8b805b154302decb362ca6c23d1111e5d2d5 100644
(file)
--- a/
src/Config/Config_WidgetReader.h
+++ b/
src/Config/Config_WidgetReader.h
@@
-1,3
+1,5
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
/*
* Config_WidgetReader.h
*
/*
* Config_WidgetReader.h
*
@@
-8,28
+10,44
@@
#ifndef CONFIG_WIDGETREADER_H_
#define CONFIG_WIDGETREADER_H_
#ifndef CONFIG_WIDGETREADER_H_
#define CONFIG_WIDGETREADER_H_
-#include <Config.h>
+#include <Config
_def
.h>
#include <Config_XMLReader.h>
#include <map>
#include <string>
#include <Config_XMLReader.h>
#include <map>
#include <string>
-
-class Config_WidgetReader: public Config_XMLReader
+/*!
+ * \class Config_WidgetReader
+ * \ingroup Config
+ * \brief Class that dumps xml definitions of widgets for
+ * further processing in the WidgetFactory
+ */
+class Config_WidgetReader : public Config_XMLReader
{
{
-public:
+ public:
+ /*!
+ * Constructor
+ * \param theXmlFile - full path to the xml file which will be processed by the reader
+ */
CONFIG_EXPORT Config_WidgetReader(const std::string& theXmlFile);
CONFIG_EXPORT virtual ~Config_WidgetReader();
CONFIG_EXPORT Config_WidgetReader(const std::string& theXmlFile);
CONFIG_EXPORT virtual ~Config_WidgetReader();
+ /// Extract feature's widget configuration from local cache, stored on node processing
CONFIG_EXPORT std::string featureWidgetCfg(const std::string& theFeatureName);
CONFIG_EXPORT std::string featureWidgetCfg(const std::string& theFeatureName);
+ /// Extract feature's description from local cache, stored on node processing
CONFIG_EXPORT std::string featureDescription(const std::string& theFeatureName);
CONFIG_EXPORT std::string featureDescription(const std::string& theFeatureName);
-protected:
+ protected:
+ /// Overloaded method. Defines how to process each node
void processNode(xmlNodePtr theNode);
void processNode(xmlNodePtr theNode);
+ /// Overloaded method. Defines if the given node should be parsed recursively
bool processChildren(xmlNodePtr theNode);
bool processChildren(xmlNodePtr theNode);
+ /// Extracts xml definition of the given node and it's children
std::string dumpNode(xmlNodePtr theNode);
std::string dumpNode(xmlNodePtr theNode);
+ /// Replace all "source" nodes with their content (used before dumping nodes)
+ void resolveSourceNodes(xmlNodePtr theNode);
-private:
+
private:
std::map<std::string, std::string> myWidgetCache;
std::map<std::string, std::string> myDescriptionCache;
std::map<std::string, std::string> myWidgetCache;
std::map<std::string, std::string> myDescriptionCache;