|
static std::vector< std::string > | getWords (const std::string &line, const char *sep=NULL, int *parlevel=NULL, const char *parenthesis="{") |
| Split the line in words using separators. More...
|
|
static bool | getline (FILE *, std::string &line) |
| Get a line from the file pointer ifile. More...
|
|
static bool | getParsedLine (IFile &ifile, std::vector< std::string > &line) |
| Get a parsed line from the file pointer ifile This function already takes care of joining continued lines and splitting the resulting line into an array of words. More...
|
|
static bool | convert (const std::string &str, double &t) |
| Convert a string to a double, reading it. More...
|
|
static bool | convert (const std::string &str, float &t) |
| Convert a string to a float, reading it. More...
|
|
static bool | convert (const std::string &str, int &t) |
| Convert a string to a int, reading it. More...
|
|
static bool | convert (const std::string &str, long int &t) |
| Convert a string to a long int, reading it. More...
|
|
static bool | convert (const std::string &str, unsigned &t) |
| Convert a string to an unsigned int, reading it. More...
|
|
static bool | convert (const std::string &str, AtomNumber &t) |
| Convert a string to a atom number, reading it. More...
|
|
static bool | convert (const std::string &str, std::string &t) |
| Convert a string to a string (i.e. copy) More...
|
|
template<typename T > |
static void | convert (T i, std::string &str) |
| Convert anything into a string. More...
|
|
static void | trim (std::string &s) |
| Remove trailing blanks. More...
|
|
static void | trimComments (std::string &s) |
| Remove trailing comments. More...
|
|
static double | pbc (double) |
| Apply pbc for a unitary cell. More...
|
|
static bool | getKey (std::vector< std::string > &line, const std::string &key, std::string &s) |
| Retrieve a key from a vector of options. More...
|
|
template<class T > |
static bool | parse (std::vector< std::string > &line, const std::string &key, T &val) |
| Find a keyword on the input line, eventually deleting it, and saving its value to val. More...
|
|
template<class T > |
static bool | parseVector (std::vector< std::string > &line, const std::string &key, std::vector< T > &val) |
| Find a keyword on the input line, eventually deleting it, and saving its value to a vector. More...
|
|
static bool | parseFlag (std::vector< std::string > &line, const std::string &key, bool &val) |
| Find a keyword without arguments on the input line. More...
|
|
static void | interpretRanges (std::vector< std::string > &) |
| Interpret atom ranges. More...
|
|
template<typename T > |
static void | removeDuplicates (std::vector< T > &vec) |
| Remove duplicates from a vector of type T. More...
|
|
static void | interpretLabel (std::vector< std::string > &s) |
| interpret ":" syntax for labels More...
|
|
static std::vector< std::string > | ls (const std::string &) |
| list files in a directory More...
|
|
static void | stripLeadingAndTrailingBlanks (std::string &str) |
| removes leading and trailing blanks from a string More...
|
|
static std::string | extension (const std::string &) |
| Extract the extensions from a file name. More...
|
|
static double | fastpow (double base, int exp) |
| Fast int power. More...
|
|
Empty class which just contains several (static) tools.