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(
")"));
75 const std::string& openDel = std::string(
"#("),
76 const std::string& closeDel = std::string(
")"));
87 static const char*
itoa(
int val, std::string &outStr);
90 static int atoi(
const std::string& InStr);
112 std::vector<std::string> &tokens,
120 static std::string
basename(
const std::string &path);
Exception class used by expandEnvVar.
Untranslatable(const std::string &toTrans)
static int stringToInt(const std::string &InStr)
static const char * itoa(int val, std::string &outStr)
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 catchOptionVal(std::string *toCatch, const int ops=0, const std::string &openDel=std::string("#("), const std::string &closeDel=std::string(")"))
static int atoi(const std::string &InStr)
converts an std::string to an integer
static double stringToDouble(const std::string &InStr)
static std::string basename(const std::string &path)
Exception class used when converting from string to numeric type.
WrongType(const std::string &toConvert, const std::string &typeName)