From e16a74df83333c5036b9caee3f28641784970ae9 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Mon, 5 Jan 2009 23:52:43 +0000 Subject: [PATCH] doxygen updates --- Cantera/src/base/xml.cpp | 21 ++++++++++++++------- Cantera/src/base/xml.h | 7 +++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Cantera/src/base/xml.cpp b/Cantera/src/base/xml.cpp index 8cdc95581..430c1532e 100755 --- a/Cantera/src/base/xml.cpp +++ b/Cantera/src/base/xml.cpp @@ -34,17 +34,21 @@ using namespace std; #include "stringUtils.h" #include -#define XML_INDENT 4 - namespace Cantera { ////////////////////// exceptions //////////////////////////// - + //! Classs representing a generic XML error condition class XML_Error : public CanteraError { public: - XML_Error(int line=0) : m_line(line) { + //! Constructor + /*! + * @param line Number number where the error occurred. + */ + XML_Error(int line=0) : + m_line(line) + { m_msg = "Error in XML file"; if (line > 0) { m_msg += " at line " + int2str(line+1); @@ -52,10 +56,13 @@ namespace Cantera { m_msg += ".\n"; //setError("XML_Error",m_msg); } + //! destructor virtual ~XML_Error() {} protected: + //! Line number of the file int m_line; - string m_msg; + //! String message for the error + std::string m_msg; }; class XML_TagMismatch : public XML_Error { @@ -186,7 +193,7 @@ namespace Cantera { * type. Quotes may be commented out by preceding with a * backslash character, '\\'. */ - int XML_Reader::findQuotedString(const string& s, std::string &rstring) const { + int XML_Reader::findQuotedString(const std::string& s, std::string &rstring) const { const char q1 = '\''; const char q2 = '"'; rstring = ""; @@ -336,7 +343,7 @@ namespace Cantera { * @param p pointer to the root for this node in the tree. * The default is 0 indicating this is the top of the tree. */ - XML_Node::XML_Node(const string nm, XML_Node * const p) + XML_Node::XML_Node(const std::string nm, XML_Node * const p) : m_name(nm), m_value(""), m_parent(p), diff --git a/Cantera/src/base/xml.h b/Cantera/src/base/xml.h index 927310d8d..9b795d108 100755 --- a/Cantera/src/base/xml.h +++ b/Cantera/src/base/xml.h @@ -24,8 +24,9 @@ #include #include +//@{ #define XML_INDENT 4 - +//@} namespace Cantera { @@ -320,7 +321,7 @@ namespace Cantera { * @param fmt Format of the printf string conversion of the double. * Default is "%g". */ - void addAttribute(const std::string & attrib, const double value, + void addAttribute(const std::string & attrib, const doublereal value, const std::string fmt="%g"); //! The operator[] is overloaded to provide a lookup capability @@ -653,8 +654,10 @@ namespace Cantera { //! XML node name of the node. /*! * For example, if we were in the XML_Node where + * @verbatim * * + * @endverbatim * Then, this string would be equal to "phase". "dim" and "id" * are attributes of the XML_Node. */