Doxygen updates
This commit is contained in:
parent
93b71cdc3f
commit
09236f42f8
4 changed files with 92 additions and 21 deletions
|
|
@ -120,11 +120,39 @@ namespace ctml {
|
|||
if (maxval != Undef) f.addAttribute("max",maxval);
|
||||
}
|
||||
|
||||
void addString(XML_Node& node, string title, string val,
|
||||
string type) {
|
||||
XML_Node& f = node.addChild("string",val);
|
||||
f.addAttribute("title",title);
|
||||
if (type != "") f.addAttribute("type",type);
|
||||
// This function adds a child node with the name string with a string value
|
||||
// to the current node
|
||||
/*
|
||||
* This function will add a child node to the current XML node, with the
|
||||
* name "string". It will have a title attribute, and the body
|
||||
* of the XML node will be filled out with the valueString argument verbatim.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Code snipet:
|
||||
* @verbatum
|
||||
const XML_Node &node;
|
||||
addString(XML_Node& node, std::string titleString, std::string valueString,
|
||||
std::string typeString);
|
||||
@endverbatum
|
||||
*
|
||||
* Creates the following the snippet in the XML file:
|
||||
* @verbatum
|
||||
<string title="titleString" type="typeString">
|
||||
valueString
|
||||
<\string>
|
||||
@endverbatum
|
||||
*
|
||||
* @param node reference to the XML_Node object of the parent XML element
|
||||
* @param valueString Value string to be used in the new XML node.
|
||||
* @param titleString String name of the title attribute
|
||||
* @param typeString String type. This is an optional parameter.
|
||||
*/
|
||||
void addString(XML_Node& node, std::string titleString, std::string valueString,
|
||||
std::string typeString) {
|
||||
XML_Node& f = node.addChild("string", valueString);
|
||||
f.addAttribute("title", titleString);
|
||||
if (typeString != "") f.addAttribute("type", typeString);
|
||||
}
|
||||
|
||||
XML_Node* getByTitle(XML_Node& node, string title) {
|
||||
|
|
|
|||
|
|
@ -64,10 +64,36 @@ namespace ctml {
|
|||
doublereal minval = Cantera::Undef,
|
||||
doublereal maxval = Cantera::Undef);
|
||||
|
||||
void addString(Cantera::XML_Node& node,
|
||||
std::string title,
|
||||
std::string val,
|
||||
std::string type="");
|
||||
//! This function adds a child node with the name string with a string value
|
||||
//! to the current node
|
||||
/*!
|
||||
* This function will add a child node to the current XML node, with the
|
||||
* name "string". It will have a title attribute, and the body
|
||||
* of the XML node will be filled out with the valueString argument verbatim.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Code snipet:
|
||||
* @verbatum
|
||||
const XML_Node &node;
|
||||
addString(XML_Node& node, std::string titleString, std::string valueString,
|
||||
std::string typeString);
|
||||
@endverbatum
|
||||
*
|
||||
* Creates the following the snippet in the XML file:
|
||||
* @verbatum
|
||||
<string title="titleString" type="typeString">
|
||||
valueString
|
||||
<\string>
|
||||
@endverbatum
|
||||
*
|
||||
* @param node reference to the XML_Node object of the parent XML element
|
||||
* @param valueString Value string to be used in the new XML node.
|
||||
* @param titleString String name of the title attribute
|
||||
* @param typeString String type. This is an optional parameter.
|
||||
*/
|
||||
void addString(Cantera::XML_Node& node, std::string titleString,
|
||||
std::string valueString, std::string typeString="");
|
||||
|
||||
void getFloatArray(const Cantera::XML_Node& node, Cantera::vector_fp& v,
|
||||
bool convert=true, std::string type="",
|
||||
|
|
|
|||
|
|
@ -686,17 +686,37 @@ namespace Cantera {
|
|||
m_parent = p;
|
||||
return p;
|
||||
}
|
||||
|
||||
// Tests whether the current node has a child node with a particular name
|
||||
/*
|
||||
* @param ch Name of the child node to test
|
||||
*
|
||||
* @return Returns true if the child node exists, false otherwise.
|
||||
*/
|
||||
bool XML_Node::hasChild(const std::string ch) const {
|
||||
return (m_childindex.find(ch) != m_childindex.end());
|
||||
}
|
||||
|
||||
// Tests whether the current node has an attribute with a particular name
|
||||
/*
|
||||
* @param a Name of the attribute to test
|
||||
*
|
||||
* @return Returns true if the attribute exists, false otherwise.
|
||||
*/
|
||||
bool XML_Node::hasAttrib(std::string a) const {
|
||||
return (m_attribs.find(a) != m_attribs.end());
|
||||
}
|
||||
|
||||
//! return a reference to the n'th child of the current node
|
||||
/*!
|
||||
// Return a reference to the n'th child of the current node
|
||||
/*
|
||||
* @param n Number of the child to return
|
||||
*/
|
||||
XML_Node& XML_Node::child(const int n) const {
|
||||
return *m_children[n];
|
||||
}
|
||||
|
||||
//! Return an unchangeable reference to the vector of children of the current node
|
||||
/*!
|
||||
// Return an unchangeable reference to the vector of children of the current node
|
||||
/*
|
||||
* Each of the individual XML_Node child pointers, however,
|
||||
* is to a changeable xml node object.
|
||||
*
|
||||
|
|
@ -706,8 +726,8 @@ namespace Cantera {
|
|||
return m_children;
|
||||
}
|
||||
|
||||
//! return the number of children
|
||||
/*!
|
||||
// return the number of children
|
||||
/*
|
||||
*
|
||||
*/
|
||||
int XML_Node::nChildren() const {
|
||||
|
|
|
|||
|
|
@ -363,6 +363,7 @@ namespace Cantera {
|
|||
std::map<std::string,std::string>& attribs();
|
||||
|
||||
public:
|
||||
|
||||
//! Set the line number
|
||||
/*!
|
||||
* @param n the member data m_linenum is set to n
|
||||
|
|
@ -393,9 +394,7 @@ namespace Cantera {
|
|||
*
|
||||
* @return Returns true if the child node exists, false otherwise.
|
||||
*/
|
||||
bool hasChild(const std::string ch) const {
|
||||
return (m_childindex.find(ch) != m_childindex.end());
|
||||
}
|
||||
bool hasChild(const std::string ch) const;
|
||||
|
||||
//! Tests whether the current node has an attribute with a particular name
|
||||
/*!
|
||||
|
|
@ -403,9 +402,7 @@ namespace Cantera {
|
|||
*
|
||||
* @return Returns true if the attribute exists, false otherwise.
|
||||
*/
|
||||
bool hasAttrib(std::string a) const {
|
||||
return (m_attribs.find(a) != m_attribs.end());
|
||||
}
|
||||
bool hasAttrib(std::string a) const;
|
||||
|
||||
//! Returns the name of the XML node
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue