doxygen update

This commit is contained in:
Harry Moffat 2008-12-29 21:19:28 +00:00
parent 1e238f7c4d
commit e8c33462c6
2 changed files with 55 additions and 25 deletions

View file

@ -122,7 +122,7 @@ namespace Cantera {
// Returns string 'aline' stripped of leading and trailing white
// space.
// @todo why is this a class method?
string XML_Reader::strip(const string& aline) {
std::string XML_Reader::strip(const std::string& aline) const {
int len = static_cast<int>(aline.size());
int i, j, ll;
for (i = len-1; i >= 0; i--) {
@ -142,7 +142,7 @@ namespace Cantera {
/// quotes, and returns this substring (without the quotes) if
/// found. If not, an empty string is returned.
/// @todo why is this a class method?
string XML_Reader::inquotes(const string& aline) {
std::string XML_Reader::inquotes(const std::string& aline) const {
int len = static_cast<int>(aline.size());
int i, j;
for (i = len-1; i >= 0; i--)
@ -158,8 +158,8 @@ namespace Cantera {
* which is not immediately preceded by the backslash character
* '\'
*/
static string::size_type findUnbackslashed(string s, const char q,
string::size_type istart = 0) {
static string::size_type findUnbackslashed(std::string s, const char q,
std::string::size_type istart = 0) {
string::size_type iloc, icurrent, len;
icurrent = istart;
len = s.size();
@ -185,7 +185,7 @@ namespace Cantera {
* type. Quotes may be commented out by preceding with a
* backslash character, '\\'.
*/
int XML_Reader::findQuotedString(const string& s, string &rstring) {
int XML_Reader::findQuotedString(const string& s, std::string &rstring) const {
const char q1 = '\'';
const char q2 = '"';
rstring = "";
@ -225,8 +225,8 @@ namespace Cantera {
* parseTag parses XML tags, i.e., the XML elements that are
* inbetween angle brackets.
*/
void XML_Reader::parseTag(string tag, string& name,
map<string, string>& attribs) {
void XML_Reader::parseTag(std::string tag, std::string& name,
std::map<std::string, std::string>& attribs) const {
string::size_type iloc;
string attr, val;
string s = strip(tag);
@ -260,7 +260,7 @@ namespace Cantera {
}
}
string XML_Reader::readTag(map<string, string>& attribs) {
std::string XML_Reader::readTag(std::map<std::string, std::string>& attribs) {
string name, tag = "";
bool incomment = false;
char ch = '-';
@ -298,7 +298,7 @@ namespace Cantera {
}
}
string XML_Reader::readValue() {
std::string XML_Reader::readValue() {
string tag = "";
char ch, lastch;
ch = '\n';

View file

@ -5,7 +5,7 @@
* manipulate CTML data files.
*/
/* $Author$
/*
* $Revision$
* $Date$
*/
@ -30,9 +30,10 @@
namespace Cantera {
/**
* Class XML_Reader is designed for internal use.
* This function reads an XML file into an XML_Node object.
//! Class XML_Reader reads an XML file into an XML_Node object.
/*!
*
* Class XML_Reader is designed for internal use.
*/
class XML_Reader {
public:
@ -44,12 +45,6 @@ namespace Cantera {
*/
XML_Reader(std::istream& input);
//! Input Stream containing the XML file
std::istream& m_s;
//! Line count
int m_line;
//! Read a single character from the input stream
//! and return it
/*!
@ -73,13 +68,13 @@ namespace Cantera {
*
* @todo why is this a class method?
*/
std::string strip(const std::string& aline);
std::string strip(const std::string& aline) const;
/// Looks for a substring within 'aline' enclosed in double
/// quotes, and returns this substring (without the quotes) if
/// found. If not, an empty string is returned.
/// @todo why is this a class method?
std::string inquotes(const std::string& aline);
std::string inquotes(const std::string& aline) const;
/**
* Searches a string for the first occurrence of a valid
@ -88,12 +83,47 @@ namespace Cantera {
* type. Quotes may be commented out by preceding with a
* backslash character, '\\'.
*/
int findQuotedString(const std::string& aline, std::string &rstring);
void parseTag(std::string line, std::string& name,
std::map<std::string, std::string>& attribs);
int findQuotedString(const std::string& aline, std::string &rstring) const;
//! parseTag parses XML tags, i.e., the XML elements that are
//! inbetween angle brackets.
/*!
* @param tag Tag to be parsed - input
*
* @param name Output string containing name
* of the XML
* @param attribs map of attribute name and
* attribute value - output
*/
void parseTag(std::string tag, std::string& name,
std::map<std::string, std::string>& attribs) const;
//! Reads an XML tag into a string
/*!
* This function advances the input streams pointer
*
* @param attribs map of attribute name and
* attribute value - output
*
* @return Output string containing name
* of the XML
*/
std::string readTag(std::map<std::string, std::string>& attribs);
//! Return the value portion of an XML element
/*!
* This function advances the input streams pointer
*/
std::string readValue();
protected:
//! Input Stream containing the XML file
std::istream& m_s;
public:
//! Line count
int m_line;
};