Salome HOME
Documentation for config module updated
authorsbh <sergey.belash@opencascade.com>
Wed, 28 Jan 2015 12:34:31 +0000 (15:34 +0300)
committersbh <sergey.belash@opencascade.com>
Wed, 28 Jan 2015 12:34:31 +0000 (15:34 +0300)
15 files changed:
src/Config/Config_AttributeMessage.h
src/Config/Config_Common.h
src/Config/Config_FeatureMessage.h
src/Config/Config_FeatureReader.h
src/Config/Config_ModuleReader.h
src/Config/Config_PointerMessage.h
src/Config/Config_Prop.h
src/Config/Config_PropManager.h
src/Config/Config_SelectionFilterMessage.h
src/Config/Config_ValidatorMessage.h
src/Config/Config_WidgetAPI.h
src/Config/Config_WidgetReader.h
src/Config/Config_XMLReader.cpp
src/Config/Config_XMLReader.h
src/XGUI/XGUI_Workshop.cpp

index 9272a7b6ed3fd9f82d535d5a9fc2770f3f79e02f..bfb9b64b1b5c1deb55c6986c7184c8ca78ffaa9e 100644 (file)
  */
 class Config_AttributeMessage : public Events_Message
 {
-  std::string myAttributeId;  //Feature unique id
-  std::string myFeatureId;  //Feature unique id
-  bool myIsObligatory;
-  bool myIsConcealment;
+  std::string myAttributeId; ///< Attribute's unique id
+  std::string myFeatureId; ///< Attribute's feature's unique id
+  bool myIsObligatory; ///< Required to be set by user, else it's feature is invalid.
+  bool myIsConcealment; ///< If true, conceals features used as input
 
  public:
-  // Same event as Config_FeatureMessage::MODEL_EVENT()
+  /// Same event as Config_FeatureMessage::MODEL_EVENT()
   inline static const char* MODEL_EVENT()
   {
     return Config_FeatureMessage::MODEL_EVENT();
   }
 
-  //const Events_ID theID, const void* theSender = 0
+  /// Constructor
   CONFIG_EXPORT Config_AttributeMessage(const Events_ID theId, const void* theParent = 0);
+  /// Destructor
   CONFIG_EXPORT virtual ~Config_AttributeMessage();
 
   //Auto-generated getters/setters
+  /// Returns attribute's unique id
   CONFIG_EXPORT const std::string& attributeId() const;
+  /// Returns attribute's feature's unique id
   CONFIG_EXPORT const std::string& featureId() const;
+  /// Returns true if attribute is obligatory:
+  /// Required to be set by user, else it's feature is invalid.
   CONFIG_EXPORT bool isObligatory() const;
+  /// Returns true if attribute should conceal input features
   CONFIG_EXPORT bool isConcealment() const;
 
+  /// Set attribute's unique id
   CONFIG_EXPORT void setAttributeId(const std::string& theId);
+  /// Set attribute's feature's unique id
   CONFIG_EXPORT void setFeatureId(const std::string& id);
+  /// Returns attribute's concealment state
   CONFIG_EXPORT void setConcealment(bool isConcealment);
+  /// Returns attribute's obligatory state
   CONFIG_EXPORT void setObligatory(bool isObligatory);
 };
 
index c1379efe62a43196f39f91f581d17c6239476c72..e6d641d2e0148cd6c984568bbed4fd6999c65694 100644 (file)
@@ -98,6 +98,10 @@ CONFIG_EXPORT bool getBooleanAttribute(xmlNodePtr theNode,
  * Should be used for case insensitive string matching.
  */
 CONFIG_EXPORT std::string normalize(const char* theString);
+/*!
+ * Returns normalized (lower case) version of string.
+ * Should be used for case insensitive string matching.
+ */
 CONFIG_EXPORT std::string normalize(const std::string& theString);
 
 #endif
index 28ae49c3891681333db52dd166b13c5b0dc0b1f7..a56d7253ad9e03aa6e551896830af600ed87693d 100644 (file)
  */\r
 class Config_FeatureMessage : public Events_Message\r
 {\r
-  std::string myId;  //Feature unique id\r
-  std::string myText;  //Represents action's text\r
-  std::string myTooltip;  //Represents action's tooltip\r
-  std::string myIcon;  //Represents action's icon\r
-  std::string myKeysequence;  //Represents action's key sequence\r
+  std::string myId;  ///<Feature unique id\r
+  std::string myText;  ///<Represents action's text\r
+  std::string myTooltip;  ///<Represents action's tooltip\r
+  std::string myIcon;  ///<Represents action's icon\r
+  std::string myKeysequence;  ///<Represents action's key sequence\r
 \r
-  std::string myGroupId;  //Id of feature's group\r
-  std::string myWorkbenchId;  //Id of feature's workbench\r
-  std::string myDocumentKind;  // kind of the document of the workbench (all documents if empty)\r
-  std::string myPluginLibrary;  //Name of feature's library\r
+  std::string myGroupId;  ///<Id of feature's group\r
+  std::string myWorkbenchId;  ///<Id of feature's workbench\r
+  std::string myDocumentKind;  ///< kind of the document of the workbench (all documents if empty)\r
+  std::string myPluginLibrary;  ///<Name of feature's library\r
 \r
-  bool myUseInput;  //Action is being checked until user commit the operation\r
-  bool myInternal;  //Internal feature without GUI representation\r
-  std::string myNestedFeatures;\r
+  bool myUseInput;  ///<Action is being checked until user commit the operation\r
+  bool myInternal;  ///<Internal feature without GUI representation\r
+  std::string myNestedFeatures; ///<Comma separated list of child features\r
 \r
  public:\r
   /// Event ID that feature is loaded in workbench (GUI)\r
@@ -40,41 +40,67 @@ class Config_FeatureMessage : public Events_Message
     static const char * MY_GUI_EVENT_ID("WorkshopFeatureLoaded");\r
     return MY_GUI_EVENT_ID;\r
   }\r
+  /// Event ID that feature is loaded in workbench (Model)\r
   inline static const char* MODEL_EVENT()\r
   {\r
     static const char * MY_MODEL_EVENT_ID("ModelFeatureLoaded");\r
     return MY_MODEL_EVENT_ID;\r
   }\r
 \r
-  //const Events_ID theID, const void* theSender = 0\r
+  /// Constructs Config_FeatureMessage\r
   CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0);\r
+  /// Deletes Config_FeatureMessage\r
   CONFIG_EXPORT virtual ~Config_FeatureMessage();\r
 \r
   //Auto-generated getters/setters\r
-  CONFIG_EXPORT const std::string& icon() const;\r
+  /// Feature's Id\r
   CONFIG_EXPORT const std::string& id() const;\r
+  /// Feature's Icon\r
+  CONFIG_EXPORT const std::string& icon() const;\r
+  /// Feature's shortcut\r
   CONFIG_EXPORT const std::string& keysequence() const;\r
+  /// Feature's text\r
   CONFIG_EXPORT const std::string& text() const;\r
+  /// Feature's tooltip\r
   CONFIG_EXPORT const std::string& tooltip() const;\r
+  /// Id of Feature's Group\r
   CONFIG_EXPORT const std::string& groupId() const;\r
+  /// Id of Feature's Workbench\r
   CONFIG_EXPORT const std::string& workbenchId() const;\r
+  /// Kind of a document which contains the feature\r
   CONFIG_EXPORT const std::string& documentKind() const;\r
+  /// Name of a library which contains the feature\r
   CONFIG_EXPORT const std::string& pluginLibrary() const;\r
+  /// Comma separated list of nested features\r
   CONFIG_EXPORT const std::string& nestedFeatures() const;\r
+  /// If false - feature has no Property panel representation\r
   CONFIG_EXPORT bool isUseInput() const;\r
+  /// If true - feature will not be added into the workbench\r
   CONFIG_EXPORT bool isInternal() const;\r
 \r
-  CONFIG_EXPORT void setIcon(const std::string& icon);\r
+  ///Set feature's Id\r
   CONFIG_EXPORT void setId(const std::string& id);\r
+  ///Set feature's Icon\r
+  CONFIG_EXPORT void setIcon(const std::string& icon);\r
+  ///Set feature's shortcut\r
   CONFIG_EXPORT void setKeysequence(const std::string& keysequence);\r
+  ///Set feature's text\r
   CONFIG_EXPORT void setText(const std::string& text);\r
+  ///Set feature's tooltip\r
   CONFIG_EXPORT void setTooltip(const std::string& tooltip);\r
+  ///Set id of Feature's Group\r
   CONFIG_EXPORT void setGroupId(const std::string& groupId);\r
+  ///Set id of Feature's Workbench\r
   CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);\r
+  ///Set kind of a document which contains the feature\r
   CONFIG_EXPORT void setDocumentKind(const std::string& documentKind);\r
+  ///Set name of a library which contains the feature\r
   CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);\r
+  ///Set comma separated list of nested features\r
   CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures);\r
+  ///Set use input state; If false - feature has no Property panel representation\r
   CONFIG_EXPORT void setUseInput(bool isUseInput);\r
+  ///Set internal state; If true - feature will not be added into the workbench\r
   CONFIG_EXPORT void setInternal(bool isInternal);\r
 };\r
 \r
index 7986f3b59e3f8ea62efbcf78f20343e54d2a4ac0..7c0096ccdf38d687ed74e106421e1b1fc573fcf8 100644 (file)
@@ -27,6 +27,7 @@ class Config_FeatureMessage;
 class Config_FeatureReader : public Config_XMLReader
 {
  public:
+  /// Constructor
   Config_FeatureReader(const std::string& theXmlFile,
                        const std::string& theLibraryName,
                        const char* theEventGenerated = 0);
index 911e5d813c8afa10b11f37a859812378cccb5202..655a6ca7a91649143313eb953843cc163b8ae1fa 100644 (file)
@@ -31,38 +31,47 @@ class Config_ModuleReader : public Config_XMLReader
   };
 
  public:
+  /// Constructor
   CONFIG_EXPORT Config_ModuleReader(const char* theEventGenerated = 0);
+  /// Destructor
   CONFIG_EXPORT virtual ~Config_ModuleReader();
-
+  /// Returns map that describes which file contains a feature (the feature is key, the file is value)
   CONFIG_EXPORT const std::map<std::string, std::string>& featuresInFiles() const;
-
+  /// Returns module name: an xml attribute from the root of the plugins.xml:
+  /// e.g <plugins module="PartSet">
   CONFIG_EXPORT std::string getModuleName();
-
+  /// Detects type of the given plugin and loads it using loadLibrary or loadScript.
   CONFIG_EXPORT static void loadPlugin(const std::string& thePluginName);
   /// loads the library with specific name, appends "lib*.dll" or "*.so" depending on the platform
   CONFIG_EXPORT static void loadLibrary(const std::string& theLibName);
   /// loads the python module with specified name
   CONFIG_EXPORT static void loadScript(const std::string& theFileName);
-  // extends set of modules, which will be used for dependency 
-  // checking (if there is no required module in the set, a plugin will not be loaded)
+  /*!
+   * Extends set of modules,  used for dependency checking (if there is no
+   * required module in the set, a plugin will not be loaded)
+   */
   CONFIG_EXPORT static void addDependencyModule(const std::string& theModuleName);
 
  protected:
-  void processNode(xmlNodePtr aNode);
-  bool processChildren(xmlNodePtr aNode);
-
+  /// Recursively process the given xmlNode
+  virtual void processNode(xmlNodePtr aNode);
+  /// Defines if the reader should process children of the given node
+  virtual bool processChildren(xmlNodePtr aNode);
+  /// check if dependencies of the given node are in the list of loaded modules
   bool hasRequiredModules(xmlNodePtr aNode) const;
+  /// reads info about plugin's features from plugin xml description
   std::list<std::string> importPlugin(const std::string& thePluginLibrary,
                                       const std::string& thePluginFile);
+  /// stores information about plugin in the internal cache
   std::string addPlugin(const std::string& aPluginLibrary,
                         const std::string& aPluginScript,
                         const std::string& aPluginConf);
 
  private:
-  std::map<std::string, std::string> myFeaturesInFiles;
-  static std::map<std::string, PluginType> myPluginTypes;
-  static std::set<std::string> myDependencyModules;
-  const char* myEventGenerated;
+  std::map<std::string, std::string> myFeaturesInFiles; ///< a feature name is key, a file is value
+  static std::map<std::string, PluginType> myPluginTypes; ///< a plugin name is key, a plugin type is value
+  static std::set<std::string> myDependencyModules; ///< set of loaded modules
+  const char* myEventGenerated; ///< gives ability to send Feature_Messages to various listeners
 };
 
 #endif /* CONFIG_XMLMODULEREADER_H_ */
index 4edb8c31e8f39dba3658f227a4ec95dda574ebf5..aafa6b036eb2a1e995d60b51294348bcaba4889d 100644 (file)
 class CONFIG_EXPORT Config_PointerMessage : public Events_Message
 {
  public:
+  /// Constructor
   Config_PointerMessage(const Events_ID theId, const void* theParent = 0);
   virtual ~Config_PointerMessage();
 
+  /// Returns pointer to an object
   void* pointer() const;
+  /// Sets pointer to an object
   void setPointer(void* pointer);
 
  private:
-  void* myPointer;
+  void* myPointer; ///< Pointer to an object
 };
 
 #endif /* PARTSET_MESSAGE_H_ */
index b9252a8c0b3bd8138aaa0806942e807c3cea5a6d..1cf0c0c53b19e5b0e9ce9462a7c3363d3d06345b 100644 (file)
@@ -17,6 +17,7 @@ class Config_Prop
 {
  public:
 
+  /// Type of stored property
   enum PropType
   {
     Disabled,
@@ -61,59 +62,63 @@ class Config_Prop
     myDefaultValue = theDefaultValue;
   }
 
+  /// Get name of section
   std::string section() const
   {
     return mySection;
   }
+  /// Get name of property
   std::string name() const
   {
     return myName;
   }
-
+  /// Get title of property
   std::string title() const
   {
     return myTitle;
   }
+  /// Set title of property
   void setTitle(const std::string& theTitle)
   {
     myTitle = theTitle;
   }
-
+  /// Get type of property
   PropType type() const
   {
     return myType;
   }
+  /// Set type of property
   void setType(PropType theType)
   {
     myType = theType;
   }
-
+  /// Get property's value in string format
   std::string value() const
   {
     return myValue;
   }
-
+  /// Set property's value in string format
   CONFIG_EXPORT void setValue(const std::string& theValue);
-  
+  /// Get default value of property
   std::string defaultValue() const
   {
     return myDefaultValue;
   }
-
+  /// Set default value of property
   CONFIG_EXPORT void setDefaultValue(const std::string& theValue);
-
+  /// Alows to compare Config_Prop with each other
   bool operator==(const Config_Prop* theProp) const
   {
     return (mySection == theProp->section()) && (myName == theProp->name());
   }
 
  private:
-  std::string mySection;
-  std::string myName;
-  std::string myTitle;
-  PropType myType;
-  std::string myValue;
-  std::string myDefaultValue;
+  std::string mySection; ///< Name of section
+  std::string myName; ///< Name of property
+  std::string myTitle; ///< Title of property
+  PropType myType; ///< Type of property
+  std::string myValue; // Value in string format
+  std::string myDefaultValue; // Default value
 };
 
 typedef std::list<Config_Prop*> Config_Properties;
index 40e2f762a6be1c7fcb016a08c9102b8bcc7f3627..a875fbf6ffa4a858e07c450ea6e1e8b75d9cbc4a 100644 (file)
@@ -21,7 +21,6 @@ class Config_PropManager
 
   /** 
    * Registers property parameters
-   * \param theOwnerId - name of owner (name of plugin for example)
    * \param theSection - name of section (domain of using) of the property.
    * \param theName - name (title) of the value.
    * \param theType - type of the value.
@@ -30,33 +29,35 @@ class Config_PropManager
    */
   CONFIG_EXPORT static Config_Prop* registerProp(const std::string& theSection, const std::string& theName,
     const std::string& theTitle, Config_Prop::PropType theType, const std::string& theDefValue = "");
-
+  //! Finds property in the given section by the given name, if property not found returns NULL
   CONFIG_EXPORT static Config_Prop* findProp(
     const std::string& theSection, const std::string& theName);
-
+  //! Returns std::list of all existing properies
   CONFIG_EXPORT static Config_Properties getProperties();
-
   //! Returns list of registered section names.
   CONFIG_EXPORT static std::list<std::string> getSections();
-
   //! Returns list of properties by its owner and section.
   CONFIG_EXPORT static Config_Properties getProperties(const std::string& theSection);
 
   //! Returns value of the property by its owner, section, and name
-  CONFIG_EXPORT static std::string string(
-    const std::string& theSection, const std::string& theName, const std::string& theDefault);
-  
-  CONFIG_EXPORT static std::vector<int> color(
-    const std::string& theSection, const std::string& theName, const std::string& theDefault);
-  
-  CONFIG_EXPORT static int integer(
-    const std::string& theSection, const std::string& theName, const std::string& theDefault);
-  
-  CONFIG_EXPORT static double real(
-    const std::string& theSection, const std::string& theName, const std::string& theDefault);
+  CONFIG_EXPORT static std::string string(const std::string& theSection,
+                                          const std::string& theName,
+                                          const std::string& theDefault);
+  //! Returns color by given section and name as 3-element vector {r,g,b}.
+  CONFIG_EXPORT static std::vector<int> color(const std::string& theSection,
+                                              const std::string& theName,
+                                              const std::string& theDefault);
+  //! Returns integer by given section and name
+  CONFIG_EXPORT static int integer(const std::string& theSection,
+                                   const std::string& theName,
+                                   const std::string& theDefault);
+  //! Returns real by given section and name
+  CONFIG_EXPORT static double real(const std::string& theSection,
+                                   const std::string& theName,
+                                   const std::string& theDefault);
 
  private:
-  CONFIG_EXPORT static Config_Properties myProps;
+  CONFIG_EXPORT static Config_Properties myProps; ///< List of all stored properties
 };
 
 #endif
index fcc54a01097c07e692fc67071233fc5e3fb48466..1d3e6d98d2452a8f64148a0ee274208d45b9d5d8 100644 (file)
@@ -34,14 +34,22 @@ class Config_SelectionFilterMessage : public Events_Message
   CONFIG_EXPORT Config_SelectionFilterMessage(const Events_ID theId, const void* theParent = 0);
   CONFIG_EXPORT virtual ~Config_SelectionFilterMessage();
 
+  //! Get id of the filter
   CONFIG_EXPORT const std::string& selectionFilterId() const;
+  //! Get id of a feature to which the filter belongs to
   CONFIG_EXPORT const std::string& featureId() const;
+  //! Get id of an attribute to which the filter belongs to
   CONFIG_EXPORT const std::string& attributeId() const;
+  //! Get filter parameters
   CONFIG_EXPORT const std::list<std::string>& parameters() const;
 
+  //! Set id of the filter
   CONFIG_EXPORT void setSelectionFilterId(const std::string& theId);
+  //! Set id of a feature to which the filter belongs to
   CONFIG_EXPORT void setFeatureId(const std::string& theId);
+  //! Set id of an attribute to which the filter belongs to
   CONFIG_EXPORT void setAttributeId(const std::string& theId);
+  //! Get filter parameters
   CONFIG_EXPORT void setFilterParameters(const std::list<std::string>& parameters);
 };
 
index d137097f9e25ae2a20f1384a23d65a59db8d0a3d..a0e410c153b1978a652946d8acd477b2eca3348f 100644 (file)
@@ -34,17 +34,24 @@ class Config_ValidatorMessage : public Events_Message
   CONFIG_EXPORT Config_ValidatorMessage(const Events_ID theId, const void* theParent = 0);
   CONFIG_EXPORT virtual ~Config_ValidatorMessage();
 
-  //CONFIG_EXPORT static const char* UID() const;
-
+  //! Get id of the filter
   CONFIG_EXPORT const std::string& validatorId() const;
+  //! Get id of a feature to which the filter belongs to
   CONFIG_EXPORT const std::string& featureId() const;
+  //! Get id of an attribute to which the filter belongs to
   CONFIG_EXPORT const std::string& attributeId() const;
+  //! Get filter parameters
   CONFIG_EXPORT const std::list<std::string>& parameters() const;
+  //! Returns true if validator id is not empty
   CONFIG_EXPORT bool isValid() const;
 
+  //! Set id of the filter
   CONFIG_EXPORT void setValidatorId(const std::string& theId);
+  //! Set id of a feature to which the filter belongs to
   CONFIG_EXPORT void setFeatureId(const std::string& theId);
+  //! Set id of an attribute to which the filter belongs to
   CONFIG_EXPORT void setAttributeId(const std::string& theId);
+  //! Get filter parameters
   CONFIG_EXPORT void setValidatorParameters(const std::list<std::string>& parameters);
 };
 
index 2c2cd9c7165015879a397dc73dceac73e74aa717..fa11e44e1ffb282c962d7675a3164bfbb08de84e 100644 (file)
@@ -36,37 +36,47 @@ class CONFIG_EXPORT Config_WidgetAPI
  public:
   virtual ~Config_WidgetAPI();
 
+  //! Returns name of widget's node (attribute)
   std::string widgetType() const;
+  //! Returns true if widget has container type, which means it able to contain other widgets
   bool isContainerWidget() const;
+  //! Returns true if widget has page type;
+  //! Page is container widget with combo box control to switch between pages
   bool isPagedWidget() const;
 
+  //! Returns id of current widget
   std::string widgetId() const;
+  //! Returns icon of current widget
   std::string widgetIcon() const;
+  //! Returns text for label of current widget
   std::string widgetLabel() const;
+  //! Returns text for tooltip of current widget
   std::string widgetTooltip() const;
-
+  //! Returns a custom property of current widget
   std::string getProperty(const char* thePropName) const;
 
-  /// Checks if the XML representation of widget has given attribute,
-  /// if yes - returns it's bool value, if no, or if the value can not
-  /// be converted to bool - returns theDefault.
-  /// \param theAttributeName attribute to check
-  /// \param theDefault default value on bad data
-  /// \return the boolean result
+  /*! Checks if the XML representation of widget has given attribute,
+   *  if yes - returns it's bool value, if no, or if the value can not
+   *  be converted to bool - returns theDefault.
+   *  \param theAttributeName attribute to check
+   *  \param theDefault default value on bad data
+   *  \return the boolean result
+   */
   bool getBooleanAttribute(const char* theAttributeName, bool theDefault) const;
 
-  bool isComputedDefault() const;
-
  protected:
   /// These fields are accessible for ModuleBase_WidgetFactory only
   Config_WidgetAPI(std::string theRawXml);
+  //! Pass to the next (sibling) node of widget's xml definition. If impossible, returns false
   bool toNextWidget();
+  //! Pass into the child node of widget's xml definition. If impossible, returns false
   bool toChildWidget();
+  //! Pass into the parent node of widget's xml definition. If impossible, returns false
   bool toParentWidget();
 
  private:
-  xmlDocPtr myDoc;
-  xmlNodePtr myCurrentNode;
+  xmlDocPtr myDoc; //!< Pointer to the root of widget's xml definition
+  xmlNodePtr myCurrentNode; //!< Pointer to the current node in the widget's xml definition
 
   friend class ModuleBase_WidgetFactory;
 };
index 783f2aa45739472641ee554d029dd9324a38a1fc..f36f95140b5e88893c354995853cbea354124a2c 100644 (file)
@@ -27,13 +27,19 @@ class Config_WidgetReader : public Config_XMLReader
   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);
+  /// Extract feature's description from local cache, stored on node processing
   CONFIG_EXPORT std::string featureDescription(const std::string& theFeatureName);
 
  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:
index a29eaab64cf67b41d80c4bf7350601b27b3dac59..03af8f4c7e5c4d8b43f1a5e6f7ec5ad1447c881e 100644 (file)
@@ -64,22 +64,12 @@ Config_XMLReader::~Config_XMLReader()
   xmlFreeDoc(myXmlDoc);
 }
 
-/*!
- * Read all nodes in associated xml file,
- * recursively if processChildren(xmlNode) is true for the xmlNode.
- * For each read node the processNode will be called.
- */
 void Config_XMLReader::readAll()
 {
   xmlNodePtr aRoot = findRoot();
   readRecursively(aRoot);
 }
 
-/*!
- * Allows to customize reader's behavior for a node. Virtual.
- * The default impl does nothing. (In debug mode prints
- * some info)
- */
 void Config_XMLReader::processNode(xmlNodePtr theNode)
 {
   if (isNode(theNode, NODE_SOURCE, NULL)) {
@@ -96,19 +86,11 @@ void Config_XMLReader::processNode(xmlNodePtr theNode)
   }
 }
 
-/*!
- * Defines which nodes should be processed recursively. Virtual.
- * The default impl is to read all nodes.
- */
 bool Config_XMLReader::processChildren(xmlNodePtr aNode)
 {
   return true;
 }
 
-/*!
- * Returns xmlNodePtr to the root of reader's document
- * or NULL if not found
- */
 xmlNodePtr Config_XMLReader::findRoot()
 {
   if (myXmlDoc == NULL) {
@@ -130,11 +112,6 @@ xmlNodePtr Config_XMLReader::findRoot()
   return aRoot;
 }
 
-/*!
- * Calls processNode() for each child (for some - recursively)
- * of the given node.
- * \sa ReadAll()
- */
 void Config_XMLReader::readRecursively(xmlNodePtr theParent)
 {
   if (!theParent)
@@ -152,17 +129,11 @@ void Config_XMLReader::readRecursively(xmlNodePtr theParent)
   }
 }
 
-/*!
- * void* -> xmlNodePtr
- */
 xmlNodePtr Config_XMLReader::node(void* theNode)
 {
   return static_cast<xmlNodePtr>(theNode);
 }
 
-/*!
- * Gets xml node name
- */
 std::string Config_XMLReader::getNodeName(xmlNodePtr theNode)
 {
   std::string result = "";
@@ -173,10 +144,6 @@ std::string Config_XMLReader::getNodeName(xmlNodePtr theNode)
   return result;
 }
 
-/*!
- * Retrieves all the necessary info from the validator node.
- * Sends ValidatorLoaded event
- */
 void Config_XMLReader::processValidator(xmlNodePtr theNode)
 {
   Events_ID aValidatoEvent = Events_Loop::eventByName(EVENT_VALIDATOR_LOADED);
@@ -198,10 +165,6 @@ void Config_XMLReader::processValidator(xmlNodePtr theNode)
   aEvLoop->send(aMessage);
 }
 
-/*!
- * Retrieves all the necessary info from the SelectionFilter node.
- * Sends SelectionFilterLoaded event
- */
 void Config_XMLReader::processSelectionFilter(xmlNodePtr theNode)
 {
   Events_ID aFilterEvent = Events_Loop::eventByName(EVENT_SELFILTER_LOADED);
index 412af81a24d7cfef1b78ffac43caff7c1296a2c4..1a75184b619496a5627c26ef968bf2947272454b 100644 (file)
@@ -29,6 +29,7 @@ struct _xmlDoc;
 
 /*!
  * \class Config_XMLReader
+ * \ingroup Config
  * \brief Base class for all libxml readers. Provides high-level API
  * for all xml operations.
 */
@@ -37,29 +38,57 @@ class Config_XMLReader
  public:
   CONFIG_EXPORT Config_XMLReader(const std::string& theXmlFile);
   CONFIG_EXPORT virtual ~Config_XMLReader();
-
+  /*!
+   * Read all nodes in associated xml file,
+   * recursively if processChildren(xmlNode) is true for the xmlNode.
+   * For each read node the processNode will be called.
+   */
   CONFIG_EXPORT void readAll();
-
- public:
+  /*!
+   * Returns xmlNodePtr to the root of reader's document
+   * or NULL if not found
+   */
   CONFIG_EXPORT xmlNodePtr findRoot();
 
  protected:
+  /*!
+   * \brief Allows to customize reader's behavior for a node. Virtual.
+   * The default implementation process "source", "validator" and
+   * "selection_filter" nodes.
+   */
   virtual void processNode(xmlNodePtr aNode);
+  /*!
+   * \brief Defines which nodes should be processed recursively. Virtual.
+   * The default impl is to read all nodes.
+   */
   virtual bool processChildren(xmlNodePtr aNode);
-
+  /*!
+   * Calls processNode() for each child (for some - recursively)
+   * of the given node.
+   * \sa ReadAll()
+   */
   void readRecursively(xmlNodePtr theParent);
-
+  /*!
+   * \brief void* -> xmlNodePtr
+   */
   xmlNodePtr node(void* theNode);
+  /// Gets xml node name
   std::string getNodeName(xmlNodePtr theNode);
+  /*!
+   * \brief Retrieves all the necessary info from the validator node.
+   * Sends ValidatorLoaded event
+   */
   void processValidator(xmlNodePtr theNode);
+  /*!
+   * \brief Retrieves all the necessary info from the SelectionFilter node.
+   * Sends SelectionFilterLoaded event
+   */
   void processSelectionFilter(xmlNodePtr theNode);
 
  protected:
-  std::string myCurrentFeature;
-
- protected:
-  std::string myDocumentPath;
-  xmlDocPtr myXmlDoc;
+  std::string myCurrentFeature; ///< Name of currently processed feature
+  std::string myDocumentPath; ///< Path to the xml document
+  xmlDocPtr myXmlDoc; ///< Root of the xml document
 };
 
 #endif /* CONFIG_XMLREADER_H_ */
index 77acb88d5fb0d6fc6937e72a2d42e3204e38f948..742b0adc063ab6537b1b3d521ff3280921a0c8e1 100644 (file)
@@ -1095,7 +1095,7 @@ void XGUI_Workshop::createDockWidgets()
   connect(myPropertyPanel, SIGNAL(noMoreWidgets()), myModule, SLOT(onNoMoreWidgets()));
 
   aDesktop->addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanel);
-  hidePropertyPanel();  //<! Invisible by default
+  hidePropertyPanel();  ///<! Invisible by default
   hideObjectBrowser();
   aDesktop->tabifyDockWidget(aObjDock, myPropertyPanel);
   myPropertyPanel->installEventFilter(myOperationMgr);
@@ -1115,7 +1115,7 @@ void XGUI_Workshop::createDockWidgets()
 void XGUI_Workshop::showPropertyPanel()
 {
   QAction* aViewAct = myPropertyPanel->toggleViewAction();
-  //<! Restore ability to close panel from the window's menu
+  ///<! Restore ability to close panel from the window's menu
   aViewAct->setEnabled(true);
   myPropertyPanel->show();
   myPropertyPanel->raise();
@@ -1125,7 +1125,7 @@ void XGUI_Workshop::showPropertyPanel()
 void XGUI_Workshop::hidePropertyPanel()
 {
   QAction* aViewAct = myPropertyPanel->toggleViewAction();
-  //<! Do not allow to show empty property panel
+  ///<! Do not allow to show empty property panel
   aViewAct->setEnabled(false);
   myPropertyPanel->hide();
 }