Cantera  2.0
Namespaces | Functions
ckr_utils.h File Reference
#include <math.h>
#include <string>
#include <map>
#include <vector>
Include dependency graph for ckr_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ckr
 the namespace for the CKReader packaage
 

Functions

template<class K , class V >
void getMapKeys (const std::map< K, V > &mp, std::vector< K > &keys)
 Fill vector 'keys' with the keys of map 'mp'.
 
template<class K , class V >
void getMapValues (const std::map< K, V > &mp, std::vector< V > &values)
 Fill vector 'values' with the values of map 'mp'.
 
template<class T , class S >
max (T a, S b)
 Template to compare two objects a and b, possibly of different types, and return the greater of the two, converted to the type of a.
 
template<class T , class S >
min (T a, S b)
 Template to compare two objects a and b, possibly of different types, and * return the lesser of the two, converted to the type of a.
 
template<class S >
pad (const S &s, size_t n)
 Template to return a string equal to s, but padded with spaces on the right as necessary to make the length n.
 
template<class T >
absval (T x)
 Absolute value.
 
template<class L >
bool valid (L &list)
 Iterate through a list of objects that have a numeric member named 'valid', and return false if for any object this attribute is not greater than 0.
 
void removeWhiteSpace (std::string &s)
 Remove all white space from string s.
 
void getTokens (std::string &s, int n, std::vector< std::string > &toks, char delim)
 Get tokens from char array of length n beginning at 'begin'.
 
bool match (const std::string &s1, const std::string &s2)
 Perform a case-insensitive comparison of the first n2 characters of strings s1 and s2, where n2 is the length of s2.
 
bool isKeyword (std::string word)
 Check whether string 'word' begins with a Chemkin keyword.
 
bool extractSlashData (std::string &s, std::string &name, std::string &data)
 Look for a slash-delimited number in string s, and if found set v to the numerical value, and set s to the portion of the string before the first slash.
 
string capitalize (const std::string &word)
 Return a modified version of string word, in which the first letter is upper case, and the rest are lower case.