Salome HOME
Corrections in the documentation of the Config package
authorsbh <sergey.belash@opencascade.com>
Fri, 23 Jan 2015 13:30:15 +0000 (16:30 +0300)
committersbh <sergey.belash@opencascade.com>
Fri, 23 Jan 2015 13:30:15 +0000 (16:30 +0300)
16 files changed:
src/Config/Config_AttributeMessage.cpp
src/Config/Config_AttributeMessage.h
src/Config/Config_Common.h
src/Config/Config_FeatureMessage.cpp
src/Config/Config_FeatureMessage.h
src/Config/Config_FeatureReader.h
src/Config/Config_ModuleReader.cpp
src/Config/Config_ModuleReader.h
src/Config/Config_PointerMessage.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

index cea94547e49461fd9c6d1e363902698be512fe8e..3b37a27bdcef9d45009b941ae70c779403bed470 100644 (file)
@@ -1,8 +1,5 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
-/*
- *
- */
 #include "Config_AttributeMessage.h"
 
 Config_AttributeMessage::Config_AttributeMessage(const Events_ID theId, const void* theParent)
index c93565758847f1aac94c36f198f036b5ac829074..160efa7e85f84f88e27d28b2637e0762327a2c0d 100644 (file)
@@ -9,8 +9,9 @@
 
 #include <string>
 
-/*
- * Class to pass an attribute's (widget's) entry info extracted from xml file.
+/*!
+ * \class Config_AttributeMessage
+ * \brief Class to pass an attribute's (widget's) entry info extracted from xml file.
  * <widget id="tool_object" concealment="true" obligatory="0"/>
  */
 class Config_AttributeMessage : public Events_Message
index a2cc7884378b87a13006242531dc20f146aa88fb..c1379efe62a43196f39f91f581d17c6239476c72 100644 (file)
@@ -28,12 +28,12 @@ typedef xmlDoc *xmlDocPtr;
 struct _xmlDoc;
 //<<
 
-/*
+/*!
  * Returns true if theNode is XML ELEMENT node (not a "text" node ie).
  */
 CONFIG_EXPORT bool isElementNode(xmlNodePtr theNode);
 
-/*
+/*!
  * Returns true if theNode is XML node with a given name.
 
  * Please note that this function should be called with NULL last argument.
@@ -43,12 +43,12 @@ CONFIG_EXPORT bool isElementNode(xmlNodePtr theNode);
  */
 CONFIG_EXPORT bool isNode(xmlNodePtr theNode, const char* theNodeName, ...);
 
-/*
+/*!
  * Checks is the given node is attribute (widget) node.
  */
 CONFIG_EXPORT bool isWidgetNode(xmlNodePtr theNode);
 
-/*
+/*!
  * Every xml node has child. Even if there is no explicit
  * child nodes libxml gives the "Text node" as child.
  *
@@ -57,7 +57,7 @@ CONFIG_EXPORT bool isWidgetNode(xmlNodePtr theNode);
  */
 CONFIG_EXPORT bool hasChild(xmlNodePtr theNode);
 
-/*
+/*!
  * Returns named property for an id node as std::string and the parameters of the node.
  */
 CONFIG_EXPORT bool getParametersInfo(xmlNodePtr theNode, std::string& outPropertyId,
@@ -76,12 +76,12 @@ CONFIG_EXPORT bool getParametersInfo(xmlNodePtr theNode, std::string& outPropert
  */
 CONFIG_EXPORT std::string library(const std::string& theLibName);
 
-/*
+/*!
  * Returns named property for a given node as std::string.
  */
 CONFIG_EXPORT std::string getProperty(xmlNodePtr theNode, const char* thePropName);
 
-/*
+/*!
  * Checks if the given XML node has the given attribute,
  * if yes - returns it's bool value, if no, or if the value can not
  * be converted to bool - returns theDefault value.
@@ -93,7 +93,7 @@ CONFIG_EXPORT bool getBooleanAttribute(xmlNodePtr theNode,
                                        const char* theAttributeName,
                                        bool theDefault);
 
-/*
+/*!
  * Returns normalized (lower case) version of string.
  * Should be used for case insensitive string matching.
  */
index f5c77fb40ead4a08b94b9c4b5e6c7061f1899371..b925ab656b00117e990b2fa1f7ddf0a366ce3e99 100644 (file)
@@ -1,8 +1,5 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
-/*
- *
- */
 #include "Config_FeatureMessage.h"
 
 Config_FeatureMessage::Config_FeatureMessage(const Events_ID theId, const void* theParent)
index 68bd94378fc5c54ca4f29a91c4faa11e10cef399..f890f44c3f8f42f743e6774a0e996b126eb2d8ab 100644 (file)
@@ -8,8 +8,9 @@
 \r
 #include <string>\r
 \r
-/*\r
- * Class to pass a feature entry extracted from xml file.\r
+/*!\r
+ * \class Config_FeatureMessage\r
+ * \brief Class to pass a feature entry extracted from xml file.\r
  * Example of the feature entry:\r
  * <feature id="Part" text="New part" tooltip="Creates a new part" icon=":pictures/part_ico.png"/>\r
  */\r
index eec7889b01df91ee00b815a8373929d4956f8b9a..7986f3b59e3f8ea62efbcf78f20343e54d2a4ac0 100644 (file)
 
 class Config_FeatureMessage;
 
+/*!
+ * \class Config_FeatureReader
+ * \brief Class to process feature's xml definition.
+ */
 class Config_FeatureReader : public Config_XMLReader
 {
  public:
-  Config_FeatureReader(const std::string& theXmlFile, const std::string& theLibraryName,
+  Config_FeatureReader(const std::string& theXmlFile,
+                       const std::string& theLibraryName,
                        const char* theEventGenerated = 0);
   virtual ~Config_FeatureReader();
-
+  /// Returns list of all features defined in reader's file
   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);
+  /// Overloaded method. Defines if the given node should be parsed recursively
+  virtual bool processChildren(xmlNodePtr aNode);
 
+  /// Fills feature message
   void fillFeature(xmlNodePtr theRoot, 
                    const std::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
 
+  /// Stores an attribute in internal map for later use.
+  /// Key is "Node_Name:Node_Attribute" and value is getProperty(theNodeAttribute)
   void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
+  /// Restores an attribute from internal map.
   std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
+  /// Restores an attribute from internal map.
   std::string restoreAttribute(const char* theNodeName, const char* theNodeAttribute);
 
  private:
index 0b0245c5ad926af7399c7785dd04ed6f654bd65d..6acffa268d3e46e2ac66c57df2602a93688c271f 100644 (file)
@@ -48,7 +48,7 @@ const std::map<std::string, std::string>& Config_ModuleReader::featuresInFiles()
   return myFeaturesInFiles;
 }
 
-/*
+/*!
  * Get module name from plugins.xml
  * (property "module")
  */
@@ -58,9 +58,6 @@ std::string Config_ModuleReader::getModuleName()
   return getProperty(aRoot, PLUGINS_MODULE);
 }
 
-/*
- *
- */
 void Config_ModuleReader::processNode(xmlNodePtr theNode)
 {
   if (isNode(theNode, NODE_PLUGIN, NULL)) {
index cdfae0a43f46eaa6e8e2310a3c25a728708febbb..911e5d813c8afa10b11f37a859812378cccb5202 100644 (file)
 #include <set>
 #include <string>
 
+/*!
+ * \class Config_ModuleReader
+ * \brief Class to process plugins.xml - definition of plugins (scripts, libraries).
+ */
 class Config_ModuleReader : public Config_XMLReader
 {
   enum PluginType {
index e745beb0e48dc3abc0eb83794edb8d4f86ac683c..4edb8c31e8f39dba3658f227a4ec95dda574ebf5 100644 (file)
@@ -13,8 +13,9 @@
 #include <Config_def.h>
 #include <Events_Message.h>
 
-/*
- * A general class to pass pointers over the event loop.
+/*!
+ * \class Config_PointerMessage
+ * \brief A general class to pass pointers over the event loop.
  */
 class CONFIG_EXPORT Config_PointerMessage : public Events_Message
 {
index 4df2e55635c63d168dfb2156a92802ea6ccf94c2..40e2f762a6be1c7fcb016a08c9102b8bcc7f3627 100644 (file)
@@ -14,7 +14,7 @@
 #include <string>
 #include <vector>
 
-//! Class wihich let to register properties
+//! Class which let to register properties
 class Config_PropManager
 {
  public:
index d43b41382d426986320e570d71b9024450429768..fcc54a01097c07e692fc67071233fc5e3fb48466 100644 (file)
 /// Event ID that Selection Filter is loaded (comes with Config_SelectionFilterMessage)
 static const char * EVENT_SELFILTER_LOADED = "SelectionFilterLoaded";
 
+/*!
+ * \class Config_SelectionFilterMessage
+ * \brief Transmits info about selection filters on "SelectionFilterLoaded" event
+ */
 class Config_SelectionFilterMessage : public Events_Message
 {
   std::string mySelectionFilterId;
index 1863891933a23b4476b6a0c46cc942a6a7ed7cef..d137097f9e25ae2a20f1384a23d65a59db8d0a3d 100644 (file)
 /// Event ID that Validator is loaded (comes with Config_ValidatorMessage)
 static const char * EVENT_VALIDATOR_LOADED = "ValidatorLoaded";
 
+/*!
+ * \class Config_ValidatorMessage
+ * \brief Transmits info about created validator on "ValidatorLoaded" event
+ */
 class Config_ValidatorMessage : public Events_Message
 {
   std::string myValidatorId;
index ed58bb4f50b6ff05a0d8df052359280d4e979634..2c2cd9c7165015879a397dc73dceac73e74aa717 100644 (file)
@@ -27,6 +27,10 @@ typedef xmlDoc *xmlDocPtr;
 struct _xmlDoc;
 //<<
 
+/*!
+ * \class Config_WidgetAPI
+ * \brief Provides low-level API for WidgetFactory for reading xml definitions of widgets
+ */
 class CONFIG_EXPORT Config_WidgetAPI
 {
  public:
index ab60f4278d7dd63fe6163c9d4a2903445f8ab82a..783f2aa45739472641ee554d029dd9324a38a1fc 100644 (file)
 #include <map>
 #include <string>
 
+/*!
+ * \class Config_WidgetReader
+ * \brief Class that dumps xml definitions of widgets for
+ * further processing in the WidgetFactory
+ */
 class Config_WidgetReader : public Config_XMLReader
 {
  public:
-  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();
 
-  CONFIG_EXPORT std::string featureWidgetCfg(const std::string& theFeatureName);CONFIG_EXPORT std::string featureDescription(
-      const std::string& theFeatureName);
+  CONFIG_EXPORT std::string featureWidgetCfg(const std::string& theFeatureName);
+  CONFIG_EXPORT std::string featureDescription(const std::string& theFeatureName);
 
  protected:
   void processNode(xmlNodePtr theNode);
index 856e663becd7511c6a01bd1fa9a6a4685a6ff5c0..a29eaab64cf67b41d80c4bf7350601b27b3dac59 100644 (file)
@@ -64,7 +64,7 @@ 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.
@@ -75,7 +75,7 @@ void Config_XMLReader::readAll()
   readRecursively(aRoot);
 }
 
-/*
+/*!
  * Allows to customize reader's behavior for a node. Virtual.
  * The default impl does nothing. (In debug mode prints
  * some info)
@@ -96,7 +96,7 @@ void Config_XMLReader::processNode(xmlNodePtr theNode)
   }
 }
 
-/*
+/*!
  * Defines which nodes should be processed recursively. Virtual.
  * The default impl is to read all nodes.
  */
@@ -105,8 +105,9 @@ 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()
 {
@@ -129,7 +130,7 @@ xmlNodePtr Config_XMLReader::findRoot()
   return aRoot;
 }
 
-/*
+/*!
  * Calls processNode() for each child (for some - recursively)
  * of the given node.
  * \sa ReadAll()
@@ -151,7 +152,7 @@ void Config_XMLReader::readRecursively(xmlNodePtr theParent)
   }
 }
 
-/*
+/*!
  * void* -> xmlNodePtr
  */
 xmlNodePtr Config_XMLReader::node(void* theNode)
@@ -159,6 +160,9 @@ 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 = "";
@@ -169,6 +173,10 @@ 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);
@@ -190,6 +198,10 @@ 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 119bd71c132542d662f3fb5b9f152207d4955fb1..412af81a24d7cfef1b78ffac43caff7c1296a2c4 100644 (file)
@@ -27,15 +27,16 @@ typedef xmlDoc *xmlDocPtr;
 struct _xmlDoc;
 //<<
 
-/*
- * Base class for all libxml readers. Provides high-level API
+/*!
+ * \class Config_XMLReader
+ * \brief Base class for all libxml readers. Provides high-level API
  * for all xml operations.
- *
- */
+*/
 class Config_XMLReader
 {
  public:
-  CONFIG_EXPORT Config_XMLReader(const std::string& theXmlFile);CONFIG_EXPORT virtual ~Config_XMLReader();
+  CONFIG_EXPORT Config_XMLReader(const std::string& theXmlFile);
+  CONFIG_EXPORT virtual ~Config_XMLReader();
 
   CONFIG_EXPORT void readAll();