36#ifndef NEKTAR_LIBUTILITIES_PARSEUTILS_H
37#define NEKTAR_LIBUTILITIES_PARSEUTILS_H
51 const std::string &str, std::vector<unsigned int> &out);
54 static bool GenerateVector(
const std::string &str, std::vector<T> &out);
74 static_assert(std::is_integral<T>::value && std::is_unsigned<T>::value,
75 "Unsigned integer type required.");
82 std::ostringstream ss;
83 auto first = v[0], last = v[0];
89 if (i != last + 1 && i != last)
126 const std::string &str,
const std::vector<std::string> &variables,
130 const std::string &str,
const std::vector<std::string> &variables,
131 std::vector<int> &out);
#define LIB_UTILITIES_EXPORT
static bool GenerateVariableSet(const std::string &str, const std::vector< std::string > &variables, std::set< int > &out)
Generate a set of variable locations.
static std::string GenerateSeqString(const std::vector< T > &v)
Generate a compressed comma-separated string representation of a vector of unsigned integers.
static bool GenerateVector(const std::string &str, std::vector< T > &out)
Takes a comma-separated string and converts it to entries in a vector.
static bool GenerateSeqVector(const std::string &str, std::vector< unsigned int > &out)
Takes a comma-separated compressed string and converts it to entries in a vector.
static bool GenerateVariableVector(const std::string &str, const std::vector< std::string > &variables, std::vector< int > &out)