22 template<
class K,
class V>
23 void getMapKeys(
const std::map<K,V>& mp, std::vector<K>& keys)
26 typename std::map<K,V>::const_iterator i = mp.begin();
27 for (; i != mp.end(); ++i) {
28 keys.push_back(i->first);
36 template<
class K,
class V>
40 typename std::map<K,V>::const_iterator i = mp.begin();
41 for (; i != mp.end(); ++i) {
42 values.push_back(i->second);
56 template<
class T,
class S>
57 inline T
max(T a, S b)
59 return (a < b ? b : a);
73 template<
class T,
class S>
74 inline T
min(T a, S b)
76 return (a < b ? a : b);
85 inline S
pad(
const S& s,
size_t n)
88 output.resize(
max(n,s.size()),
' ');
89 copy(s.begin(), s.end(), output.begin());
115 for (i=0; i < list.size(); i++)
if (list[i].
valid <= 0) {
126 int n, std::vector<std::string>& toks,
char delim=
' ');
138 bool match(
const std::string& s1,
const std::string& s2);
145 return (
match(word,
"ELEM") ||
146 match(word,
"SPEC") ||
147 match(word,
"THERM") ||
148 match(word,
"REAC") ||
153 bool extractSlashData(std::string& s, std::string& name, std::string& data);
154 std::string
capitalize(
const std::string& word);