19#ifndef STRINGDATASTRUCTURES_HPP
20#define STRINGDATASTRUCTURES_HPP
25#include "../ParserLib/muParserDef.h"
26#include "../utils/stringtools.hpp"
27#include "../structures.hpp"
156 void assign(
const std::vector<bool>& vect);
168 StringVector(
size_t n,
const std::string& sStr = std::string());
189 std::string&
getRef(
size_t i);
226typedef std::vector<long long int>
n_vect;
231typedef std::vector<mu::value_type>
d_vect;
342 vNoStringVal.push_back(sRet.find(
'"') == std::string::npos);
This class manages the setting values of the internal (kernel) settings of this application.
Simply container to provide the data for a StringView instance usable by all the string functions.
StringArg(const StringArg &sStr)
Copy a StringArg instance.
StringArg()
Default constructor.
StringView view() const
Get a view to the contained string.
StringArg & operator=(const StringArg &sStr)
StringArg assignment operator overload.
bool is_string() const
Determine, whether the contained string represents a string literal.
std::string & getRef()
Get a reference to the contained string.
StringArg(const std::string &sStr)
Construct a StringArg instance from a std::string instance.
StringArg & operator=(const std::string &sStr)
StringArg assignment operator overload for a std::string instance.
This class is an extension to the std::vector<std::string> to provide the vector-like functionalities...
StringVector & operator=(const StringVector &sVect)
Assignment operator overload for a StringVector instance.
StringView operator[](size_t i) const
Return a view to the i-th element.
StringVector & operator=(StringVector &&sVect)=default
void push_back(const std::string &sStr)
Append a string to the end of this vector. Will be stored as local string.
std::string & getRef(size_t i)
Return a reference to the i-th element in this string.
std::vector< bool > operator!=(const StringVector &sVect) const
Inequality operator overload.
std::string getMasked(size_t i) const
Return the contained string with the internal quotation marks as escaped variants.
std::vector< bool > operator<(const StringVector &sVect) const
Less-than operator overload.
StringVector(StringVector &&vect)=default
StringVector()
Default constructor.
std::vector< bool > operator==(const StringVector &sVect) const
Equality operator overload.
void convert_to_string(size_t i, size_t minChars=0)
Convert the i-th element to a string.
const std::string m_sDUMMY
static StringVector convert_internal(const std::string &sInternal)
Static member function to create a StringVector instance from an internal string.
static StringVector empty_string()
Static member function to create a StringVector with one component with zero length.
void push_generic(const std::string &sStr)
Append a generic string value to the end of this vector. Depending on the existence of surrounding qu...
mu::value_type getNumericalVectorized(size_t i) const
Get either the i-th element or the 1st element converted as numerical value, if this vector has only ...
std::vector< bool > xor_f(const StringVector &sVect) const
This member function represents an XOR operator.
std::vector< bool > operator>=(const StringVector &sVect) const
Greater-equal operator overload.
bool is_string(size_t i) const
Check whether the i-th element represents a string or a numeric value.
static StringView makePureString(StringView sStr)
Static member function to convert the contained string into a pur C++ string.
std::vector< bool > operator<=(const StringVector &sVect) const
Lesser-equal operator overload.
std::vector< bool > or_f(const StringVector &sVect) const
This member function represents an OR operator.
StringVector & operator+=(const std::string &sLiteral)
Append a string literal to this StringVector instance.
StringVector operator+(const std::string &sLiteral) const
Concatenate a StringVector and a string literal.
std::vector< bool > and_f(const StringVector &sVect) const
This member function represents an AND operator.
std::vector< bool > operator>(const StringVector &sVect) const
Greater-than operator overload.
StringVector & evalIfElse(const StringVector &sLogicals, const StringVector &sIfBranch, const StringVector &sElseBranch)
Assign the results of an if-else construct to this StringVector instance.
bool getBooleanVectorized(size_t i) const
Get either the i-th element or the 1st element converted as boolean, if this vector has only one comp...
StringView getVectorized(size_t i) const
Get either the i-th element or the 1st element, if this vector has only one component (and is a singl...
StringArg getArg(size_t i) const
Create a StringArg instance from the i-th or the 1st element, if this vector is a singleton.
void assign(const StringVector &sVect)
Assign another StringVector instance.
static StringVector convert_literal(const std::string &sLiteral)
Static member function to create a StringVector instance from a string literal.
static std::string makeLocalString(const std::string &sStr)
Static member function to convert the string literal to an internal string for this class.
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.
StringVector(* StringFunc)(StringFuncArgs &)
Defines the pointer to an arbitrary string function as StringFunc.
std::vector< long long int > n_vect
Simple abbreviation.
FunctionSignatureType
This enumeration contains all possible string function signature types (as they are called from the u...
@ PARSER_STRING_INT_INT_STRING
@ PARSER_STRING_STRING_STRING_INT_INT
@ STR_STR_STR_VALOPT_VALOPT
@ PARSER_STRING_STRING_INT_INT
StringVector s_vect
Simple abbreviation.
StringParserFlags
Defines the possible flags, which the user might pass to the string parser.
@ KEEP_MASKED_CONTROL_CHARS
std::vector< mu::value_type > d_vect
Simple abbreviation.
This structure combines all string function's arguments into a single structure to align all string f...
This structure defines the internal string function signature. It contains the pointer to the actual ...
StringFuncHandle(FunctionSignatureType _fType, StringFunc _fHandle, bool _bTakesMultiArguments)
FunctionSignatureType fType
bool bTakesMultiArguments
This structure contains all possible return values of the central string parser in single combined st...
StringResult(s_vect &_vResult, std::vector< bool > &_vNoStringVal, bool _bOnlyLogicals)
std::vector< bool > vNoStringVal
std::vector< mu::value_type > vNumericalValues
StringResult(const std::string &sRet, mu::value_type *vals, int nvals)
StringResult(const std::string &sRet, bool _bOnlyLogicals=false)
A simple container for a single item in the string expression RPN stack.
StringStackItem(StringView sView, int val=-1)
Structure containing the german umlauts. The lower field will contain lower case umlauts,...