From 81e8de48dfb32ae3be8b56e414405bf552e59604 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 13 Jan 2009 23:41:23 +0000 Subject: [PATCH] Doxygen update --- Cantera/src/base/stringUtils.cpp | 9 +++++---- Cantera/src/base/stringUtils.h | 12 +++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Cantera/src/base/stringUtils.cpp b/Cantera/src/base/stringUtils.cpp index 01f4fc6d9..4cbeaa407 100755 --- a/Cantera/src/base/stringUtils.cpp +++ b/Cantera/src/base/stringUtils.cpp @@ -249,11 +249,12 @@ namespace Cantera { while (s != ""); } - int fillArrayFromString(const std::string& str, doublereal* a, char delim) { + int fillArrayFromString(const std::string& str, + doublereal* const a, char delim) { std::string::size_type iloc; int count = 0; - std::string num, s; - s = str; + std::string num; + std::string s = str; while (s.size() > 0) { iloc = s.find(delim); if (iloc > 0) { @@ -264,7 +265,7 @@ namespace Cantera { num = s; s = ""; } - a[count] = atof(num.c_str()); + a[count] = atofCheck(num.c_str()); count++; } return count; diff --git a/Cantera/src/base/stringUtils.h b/Cantera/src/base/stringUtils.h index 28666c878..56392eac6 100755 --- a/Cantera/src/base/stringUtils.h +++ b/Cantera/src/base/stringUtils.h @@ -117,7 +117,17 @@ namespace Cantera { */ void split(const std::string &ss, std::vector& w); - int fillArrayFromString(const std::string& str, doublereal* a, char delim = ' '); + //! Interpret a string as a list of floats, and convert it to a vector + //! of floats + /*! + * @param str String input vector + * @param a Output pointer to a vector of floats + * @param delim character delimiter. Defaults to a space + * @return Returns the number of floats found and converted + */ + int fillArrayFromString(const std::string& str, doublereal* const a, + char delim = ' '); + std::string report(const ThermoPhase& th, bool show_thermo = true); std::string formatCompList(const Phase& mix, int xyc); std::string logfileName(const std::string& infile);