40 void setError(
const std::string& r,
const std::string& msg);
146 void writelog(
const std::string& msg);
149 inline void writelog(
const std::string& msg,
int loglevel)
172 void writeline(
char repeat,
size_t count,
173 bool endl_after=
true,
bool endl_before=
false);
176 void error(
const std::string& msg);
179 void warn_deprecated(
const std::string& method,
const std::string& extra=
"");
192 doublereal
toSI(
const std::string& unit);
202 XML_Node*
get_XML_File(
const std::string& file,
int debug = 0);
233 XML_Node*
get_XML_Node(
const std::string& file_ID, XML_Node* root);
265 const std::string& file_ID,
270 inline T
clip(
const T& value,
const T& lower,
const T& upper)
272 return std::max(lower, std::min(upper, value));
276 template <
typename T>
int sign(T x) {
277 return (T(0) < x) - (x < T(0));
XML_Node * get_XML_Node(const std::string &file_ID, XML_Node *root)
This routine will locate an XML node in either the input XML tree or in another input file specified ...
XML_Node * get_XML_File(const std::string &file, int debug)
Return a pointer to the XML tree for a Cantera input file.
void popError()
Discard the last error message.
string lastErrorMessage()
Retrieve the last error message in a string.
doublereal actEnergyToSI(const std::string &unit)
Return the conversion factor to convert activation energy unit std::string 'unit' to Kelvin...
void showErrors(std::ostream &f)
Prints all of the error messages to an ostream.
doublereal toSI(const std::string &unit)
Return the conversion factor to convert unit std::string 'unit' to SI units.
void thread_complete()
Delete and free memory allocated per thread in multithreaded applications.
void setLogger(Logger *logwriter)
Install a logger.
static std::string fmt(const std::string &r, size_t n)
void setError(const std::string &r, const std::string &msg)
Set an error condition in the application class without throwing an exception.
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
T clip(const T &value, const T &lower, const T &upper)
Clip value such that lower <= value <= upper.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
int sign(T x)
Sign of a number. Returns -1 if x < 0, 1 if x > 0 and 0 if x == 0.
XML_Node * get_XML_from_string(const std::string &text)
Read a CTI or CTML string and fill up an XML tree.
void close_XML_File(const std::string &file)
Close an XML File.
void writelogf(const char *fmt,...)
Write a formatted message to the screen.
void error(const std::string &msg)
Write an error message and quit.
void appdelete()
Delete and free all memory associated with the application.
void writelogendl()
Write an end of line character to the screen and flush output.
void suppress_deprecation_warnings()
Globally disable printing of deprecation warnings.
void writelog(const std::string &msg)
Write a message to the screen.
int nErrors()
Return the number of errors that have been encountered so far.
XML_Node * get_XML_NameID(const std::string &nameTarget, const std::string &file_ID, XML_Node *root)
This routine will locate an XML node in either the input XML tree or in another input file specified ...