20#ifndef STRINGFUNCHANDLER_HPP
21#define STRINGFUNCHANDLER_HPP
63 size_t findNextFunction(
const std::string& sFunc,
StringView sLine,
size_t nStartPos,
size_t& nEndPosition,
bool searchForMethods =
false);
70 virtual StringResult eval(std::string& sLine, std::string sCache,
bool bParseNumericals =
true) = 0;
This class provides the complete function evaluation logic to the StringParser class.
std::string applyStringFuncs(std::string sLine)
This member function searches for an occurence of a known string function in the passed command line ...
std::string applySpecialStringFuncs(std::string sLine)
This member function applies special string functions in the expression, which cannot be implemented ...
size_t findNextFunction(const std::string &sFunc, StringView sLine, size_t nStartPos, size_t &nEndPosition, bool searchForMethods=false)
Finds the position of the next function occurence in the passed string including the position of the ...
virtual bool isStringExpression(const std::string &sExpression)=0
virtual StringResult eval(std::string &sLine, std::string sCache, bool bParseNumericals=true)=0
std::vector< s_vect > callMultiFunction(StringFuncHandle, s_vect &, s_vect &, s_vect &, n_vect &, n_vect &, d_vect &, size_t)
Calls the selected string function accepting multiple values as first argument using the passed strin...
void evalFunction(std::string &sLine, const std::string &sFuncName, StringFuncHandle)
This member function evaluates the passed call sequence to the string function.
StringView getFunctionArgumentList(const std::string &sFunc, StringView sLine, size_t nStartPosition, size_t nEndPosition)
Returns the contents of the argument parentheses of the function starting at nStartPosition.
size_t getStringFuncMapSize() const
std::vector< s_vect > callFunctionParallel(StringFuncHandle, s_vect &, s_vect &, s_vect &, n_vect &, n_vect &, d_vect &, size_t)
Calls the selected string function using the passed string function arguments parallel using OpenMP.
std::string addMaskedStrings(const std::string &sString)
This member function adds escape characters into the passed string and transforms the newstring chara...
void declareStringFuncs(const std::map< std::string, StringFuncHandle > &mStringFuncs)
This member function is used to fill the internal map of declared string functions with the data of t...
size_t argumentParser(StringView, n_vect &)
This member function is the string function argument parser for numerical arguments.
std::vector< s_vect > callFunction(StringFuncHandle, s_vect &, s_vect &, s_vect &, n_vect &, n_vect &, d_vect &, size_t)
Calls the selected string function using the passed string function arguments sequentially.
virtual ~StringFuncHandler()
std::map< std::string, StringFuncHandle > m_mStringFuncs
std::vector< s_vect > callMultiFunctionParallel(StringFuncHandle, s_vect &, s_vect &, s_vect &, n_vect &, n_vect &, d_vect &, size_t)
Calls the selected string function accepting multiple values as first argument using the passed strin...
std::string printValue(const mu::value_type &value)
Prints a value to a string respecting possible integer optimizations.
This class handles the creation and deletion of string vector variables.
This class is an extension to the std::vector<std::string> to provide the vector-like functionalities...
This class is the immutable (const) version of a string view. It can be constructed from a MutableStr...
MUP_BASETYPE value_type
The numeric datatype used by the parser.
std::vector< long long int > n_vect
Simple abbreviation.
std::vector< mu::value_type > d_vect
Simple abbreviation.
This structure defines the internal string function signature. It contains the pointer to the actual ...
This structure contains all possible return values of the central string parser in single combined st...