X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_WidgetReader.h;h=339b3ad21f4831a3458f829069a6936bf26e7a22;hb=8e80972644fce257cd66382ae976e71e2d2e6c32;hp=58fd904b062024a8658865e7b75d67f0e5748f3e;hpb=24fd5aa4e000a03e484c5d4c544e5e08b08a747f;p=modules%2Fshaper.git diff --git a/src/Config/Config_WidgetReader.h b/src/Config/Config_WidgetReader.h index 58fd904b0..339b3ad21 100644 --- 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 * @@ -8,27 +10,42 @@ #ifndef CONFIG_WIDGETREADER_H_ #define CONFIG_WIDGETREADER_H_ -#include +#include #include #include #include - -class CONFIG_EXPORT 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: - Config_WidgetReader(const std::string& theXmlFile); - virtual ~Config_WidgetReader(); + public: + CONFIG_EXPORT Config_WidgetReader(const std::string& theXmlFile); + CONFIG_EXPORT virtual ~Config_WidgetReader(); - std::string featureWidgetCfg(std::string theFeatureName); + /// Extract feature's widget configuration from local cache, stored on node processing + 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); -protected: + protected: + /// Overloaded method. Defines how to process each node void processNode(xmlNodePtr theNode); + /// Overloaded method. Defines if the given node should be parsed recursively bool processChildren(xmlNodePtr theNode); + /// Extracts xml definition of the given node and it's children + std::string dumpNode(xmlNodePtr theNode); + /// Replace all "source" nodes with their content (used before dumping nodes) + void resolveSourceNodes(xmlNodePtr theNode); -private: + private: std::map myWidgetCache; + std::map myDescriptionCache; };