doxygen update

This commit is contained in:
Harry Moffat 2010-08-10 15:30:53 +00:00
parent ec30757b88
commit cc5e72a2b3
4 changed files with 45 additions and 14 deletions

View file

@ -559,7 +559,7 @@ namespace ctml {
* @param v Output map of the results.
* @param convert Turn on conversion to SI units
*/
void getFloats(const Cantera::XML_Node& node, std::map<std::string, double>& v,
void getFloats(const Cantera::XML_Node& node, std::map<std::string, doublereal > & v,
const bool convert) {
std::vector<XML_Node*> f;
node.getChildren("float",f);
@ -629,8 +629,7 @@ namespace ctml {
* and "" , for no conversion. The default value is ""
* which implies that no conversion is allowed.
*/
doublereal getFloat(const Cantera::XML_Node& parent,
const std::string &name,
doublereal getFloat(const Cantera::XML_Node& parent, const std::string &name,
const std::string type) {
if (!parent.hasChild(name))
throw CanteraError("getFloat (called from XML Node \"" +
@ -728,7 +727,7 @@ namespace ctml {
return fctr*x;
}
//====================================================================================================================
//====================================================================================================================
bool getOptionalFloat(const Cantera::XML_Node& parent,
const std::string &name,
doublereal &fltRtn,
@ -957,11 +956,13 @@ namespace ctml {
* The default value for the node name is floatArray
*
* @return Returns the number of floats read
*
* @note change the v to a std::vector to eliminate a doxygen error. No idea why doxygen needs this.
*/
int getFloatArray(const Cantera::XML_Node& node, Cantera::vector_fp& v,
int getFloatArray(const Cantera::XML_Node& node, std::vector<double> &v,
const bool convert, const std::string unitsString,
const std::string nodeName) {
string::size_type icom;
std::string::size_type icom;
string numstr;
doublereal dtmp;
string nn = node.name();
@ -1332,9 +1333,11 @@ namespace ctml {
* units converter is used.
* @param nodeName XML Name of the XML node to read.
* The default value for the node name is floatArray
*
* @note change the coeffs to a std::vector to eliminate a doxygen error. No idea why doxygen needs this.
*/
void getFunction(const Cantera::XML_Node& node, std::string& type, doublereal& xmin,
doublereal& xmax, Cantera::vector_fp& coeffs) {
doublereal& xmax, std::vector< double > & coeffs) {
const XML_Node& c = node.child("floatArray");
coeffs.clear();
getFloatArray(c,coeffs);

View file

@ -22,6 +22,9 @@
//! The ctml namespace adds functionality to the XML object, by providing
//! standard functions that read, write, and interpret XML files and
//! object trees.
/*!
* Standardization of reads and write from Cantera files occur here.
*/
namespace ctml {
//! const Specifying the CTML version number
@ -367,7 +370,7 @@ namespace ctml {
* The default value for the node name is floatArray
* @return Returns the number of floats read into v.
*/
int getFloatArray(const Cantera::XML_Node& node, Cantera::vector_fp& v,
int getFloatArray(const Cantera::XML_Node& node, Cantera::vector_fp & v,
const bool convert=true, const std::string unitsString="",
const std::string nodeName = "floatArray");
@ -681,7 +684,7 @@ namespace ctml {
* @param v Output map of the results.
* @param convert Turn on conversion to SI units
*/
void getFloats(const Cantera::XML_Node& node, std::map<std::string, double>& v,
void getFloats(const Cantera::XML_Node& node, std::map<std::string, doublereal >& v,
const bool convert=true);
//! Get an integer value from a child element.

View file

@ -53,11 +53,20 @@ using namespace std;
#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
static boost::mutex dir_mutex; // For input directory access
static boost::mutex msg_mutex; // For access to string messages
static boost::mutex app_mutex; // Application state including creating singleton
//static boost::mutex log_mutex; // Logger pointer
static boost::mutex xml_mutex; // XML file storage
//! Mutex for input directory access
static boost::mutex dir_mutex;
//! Mutex for access to string messages
static boost::mutex msg_mutex;
//! Mutex for creating singeltons within the application object
static boost::mutex app_mutex;
// Mutex for controlling access to the log file
//static boost::mutex log_mutex;
//! Mutex for controlling access to XML file storage
static boost::mutex xml_mutex;
//! Macro for locking input directory access
#define DIR_LOCK() boost::mutex::scoped_lock d_lock(dir_mutex)

View file

@ -539,6 +539,14 @@ namespace Cantera {
return (val * fp);
}
//================================================================================================
//! Find the first white space in a string
/*!
* Returns the location of the first white space character in a string
*
* @param val Input string to be parsed
* @return In a size_type variable, return the location of the first white space character.
* Return npos if none is found
*/
static std::string::size_type findFirstWS(const std::string& val) {
std::string::size_type ibegin = std::string::npos;
int j = 0;
@ -555,6 +563,14 @@ namespace Cantera {
return ibegin;
}
//================================================================================================
//! Find the first non-white space in a string
/*!
* Returns the location of the first non-white space character in a string
*
* @param val Input string to be parsed
* @return In a size_type variable, return the location of the first nonwhite space character.
* Return npos if none is found
*/
static std::string::size_type findFirstNotOfWS(const std::string& val) {
std::string::size_type ibegin = std::string::npos;
int j = 0;