2#ifndef FACILITIES_UTIL_H
3#define FACILITIES_UTIL_H
31 WrongType(
const std::string& toConvert,
const std::string& typeName) :
32 m_toConvert(toConvert), m_typeName(typeName) {}
35 "facilities::WrongType. Cannot convert '" + m_toConvert +
"' to type "
40 std::string m_toConvert;
41 std::string m_typeName;
61 const std::string& openDel = std::string(
"$("),
62 const std::string& closeDel = std::string(
")"));
73 static const char*
itoa(
int val, std::string &outStr);
76 static int atoi(
const std::string& InStr);
97 static void stringTokenize(std::string input,
const std::string &delimiters,
98 std::vector<std::string> &tokens,
118 const std::string &delimiters,
119 std::map<std::string,std::string> &tokenMap,
120 const std::string& pairDelimiter =
130 static std::string
basename(
const std::string &path);
Exception class used by expandEnvVar.
Untranslatable(const std::string &toTrans)
static double stringToDouble(const std::string &InStr)
static int expandEnvVar(std::string *toExpand, const std::string &openDel=std::string("$("), const std::string &closeDel=std::string(")"))
static void stringTokenize(std::string input, const std::string &delimiters, std::vector< std::string > &tokens, bool clear=true)
static int atoi(const std::string &InStr)
converts an std::string to an integer
static std::string basename(const std::string &path)
static int stringToInt(const std::string &InStr)
static void keyValueTokenize(std::string input, const std::string &delimiters, std::map< std::string, std::string > &tokenMap, const std::string &pairDelimiter=std::string("="), bool clear=true)
static const char * itoa(int val, std::string &outStr)
static unsigned trimTrailing(std::string *toTrim)
Exception class used when converting from string to numeric type.
WrongType(const std::string &toConvert, const std::string &typeName)