NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
NumeRe::StringFuncHandler Class Referenceabstract

This class provides the complete function evaluation logic to the StringParser class. More...

#include <stringfunchandler.hpp>

Inheritance diagram for NumeRe::StringFuncHandler:
Collaboration diagram for NumeRe::StringFuncHandler:

Public Member Functions

virtual ~StringFuncHandler ()
 
virtual bool isStringExpression (const std::string &sExpression)=0
 
- Public Member Functions inherited from NumeRe::StringVarFactory
bool containsStringVectorVars (const std::string &sLine)
 This member function determines, whether there are string vector variables in the passed command line. More...
 
std::string createTempStringVectorVar (const std::vector< std::string > &vStringVector)
 This member function is used to create a temporary string vector variable. More...
 
void removeTempStringVectorVars ()
 This member function removes all temporary string vector variables. More...
 
bool containsStringVars (const std::string &sLine) const
 This public member function determines, whether the passed string line contains string variables as part of the expression. More...
 
bool isStringVar (const std::string &sVarName) const
 Determine, whether the passed string is the identifier of a string variable. More...
 
void getStringValues (std::string &sLine)
 This public member function resolves all string variable occurences and replaces them with their value or the standard string function signature, if the string variable is connected to a method. More...
 
std::string getStringValue (const std::string &sVar) const
 Returns the value of the selected string variable. More...
 
void setStringValue (const std::string &sVar, const std::string &sValue)
 This public member function creates or updates a string variable and fills it with the passed value. More...
 
void removeStringVar (const std::string &sVar)
 This public member function removes the selected string variable from memory. More...
 
const std::map< std::string, std::string > & getStringVars () const
 

Protected Member Functions

std::string applySpecialStringFuncs (std::string sLine)
 This member function applies special string functions in the expression, which cannot be implemented as standard string functions. More...
 
std::string applyStringFuncs (std::string sLine)
 This member function searches for an occurence of a known string function in the passed command line and passes the control to StringFuncHandler::evalFunction() member function for evaluation. More...
 
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 the passed one. More...
 
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 closing parenthesis. More...
 
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. More...
 
std::string printValue (const mu::value_type &value)
 Prints a value to a string respecting possible integer optimizations. More...
 
size_t getStringFuncMapSize () const
 
virtual StringResult eval (std::string &sLine, std::string sCache, bool bParseNumericals=true)=0
 
- Protected Member Functions inherited from NumeRe::StringVarFactory
StringVector evaluateStringVectors (std::string sLine)
 This member function evaluates the passed string vector and returns it's evaluated components in separate vector components. More...
 
StringVector expandStringVectorComponents (std::vector< StringVector > &vStringVector)
 This member function expands the internal multi-expressions in the veector into separate components by enlarging the dimension of the vector. More...
 
void removeStringVectorVars ()
 This member function removes all internal string vector variables. More...
 
std::string createStringVectorVar (const std::vector< std::string > &vStringVector)
 This member function is used to create a string vector variable. More...
 
bool isStringVectorVar (const std::string &sVarName) const
 Check, whether the passed string identifies a string vector variable. More...
 
const StringVectorgetStringVectorVar (const std::string &sVarName) const
 Return a reference to the identified string vector variable or throw if it does not exist. More...
 
void getStringValuesAsInternalVar (std::string &sLine, unsigned int nPos=0)
 This public member function resolves all string variable occurences and replaces them with an internal string vector variable or the standard string function signature, if the string variable is connected to a method. More...
 

Private Member Functions

std::string addMaskedStrings (const std::string &sString)
 This member function adds escape characters into the passed string and transforms the newstring character into a comma. More...
 
void evalFunction (std::string &sLine, const std::string &sFuncName, StringFuncHandle)
 This member function evaluates the passed call sequence to the string function. More...
 
size_t argumentParser (StringView, n_vect &)
 This member function is the string function argument parser for numerical arguments. More...
 
size_t argumentParser (StringView, d_vect &)
 This member function is the string function argument parser for numerical arguments. More...
 
size_t argumentParser (StringView, d_vect &, n_vect &)
 This member function is the string function argument parser for double and numeric values. More...
 
size_t argumentParser (StringView, s_vect &, bool &bLogicalOnly)
 This member function is the string function argument parser for string arguments. More...
 
size_t argumentParser (StringView, s_vect &, d_vect &)
 This member function is the string function argument parser for one string and one (optional) numerical argument. More...
 
size_t argumentParser (StringView, s_vect &, n_vect &, n_vect &)
 This member function is the string function argument parser for one string and two (optional) numerical arguments. More...
 
size_t argumentParser (StringView, s_vect &, n_vect &, n_vect &, s_vect &)
 This member function is the string function argument parser for two string and two numerical values, where the second string is the last argument. Every argument except of the first one is optional. More...
 
size_t argumentParser (StringView, s_vect &, s_vect &, n_vect &, n_vect &)
 This member function is the string function argument parser for two string and two numerical values. Every argument except of the first one is optional. More...
 
size_t argumentParser (StringView, s_vect &, s_vect &, s_vect &, n_vect &, n_vect &)
 This member function is the string function argument parser for three string and two numerical values. Every argument except of the first one is optional. More...
 
std::vector< s_vectcallFunction (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. More...
 
std::vector< s_vectcallFunctionParallel (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. More...
 
std::vector< s_vectcallMultiFunction (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 string function arguments sequentially. More...
 
std::vector< s_vectcallMultiFunctionParallel (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 string function arguments parallel using OpenMP. More...
 

Private Attributes

std::map< std::string, StringFuncHandlem_mStringFuncs
 

Detailed Description

This class provides the complete function evaluation logic to the StringParser class.

Definition at line 37 of file stringfunchandler.hpp.

Constructor & Destructor Documentation

◆ ~StringFuncHandler()

virtual NumeRe::StringFuncHandler::~StringFuncHandler ( )
inlinevirtual

Definition at line 73 of file stringfunchandler.hpp.

Member Function Documentation

◆ addMaskedStrings()

string NumeRe::StringFuncHandler::addMaskedStrings ( const std::string &  sString)
private

This member function adds escape characters into the passed string and transforms the newstring character into a comma.

Parameters
sStringconst string&
Returns
string

Definition at line 43 of file stringfunchandler.cpp.

References NEWSTRING.

◆ applySpecialStringFuncs()

string NumeRe::StringFuncHandler::applySpecialStringFuncs ( std::string  sLine)
protected

This member function applies special string functions in the expression, which cannot be implemented as standard string functions.

Parameters
sLinestring
Returns
string

Definition at line 1036 of file stringfunchandler.cpp.

References VectorIndex::back(), Indices::col, MemoryManager::containsTablesOrClusters(), StringVector::convert_to_string(), NumeRe::StringVarFactory::createStringVectorVar(), mu::ParserBase::DisableAccessCaching(), mu::ParserBase::Eval(), eval(), findNextFunction(), VectorIndex::front(), NumeRe::ClusterManager::getCluster(), MemoryManager::getCols(), getDataElements(), DataAccessParser::getDataObject(), getFunctionArgumentList(), MemoryManager::getHeadLineElement(), DataAccessParser::getIndices(), NumeReKernel::getInstance(), MemoryManager::getLines(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), StringVector::getRef(), NumeReKernel::getSettings(), StringMemory::getStringCols(), StringMemory::getStringElements(), intCast(), VectorIndex::INVALID, SyntaxError::invalid_position, StringVector::is_string(), DataAccessParser::isCluster(), NumeRe::ClusterManager::isCluster(), VectorIndex::isOpenEnd(), isStringExpression(), MemoryManager::isTable(), isValidIndexSet(), VectorIndex::last(), VectorIndex::linearize(), printValue(), StringVector::push_back(), removeQuotationMarks(), replaceToVectorname(), Indices::row, mu::ParserBase::SetExpr(), VectorIndex::setRange(), mu::ParserBase::SetVectorVar(), NumeRe::Cluster::size(), VectorIndex::size(), SyntaxError::STRING_ERROR, StripSpaces(), StringViewBase::to_string(), toString(), and StringResult::vResult.

Referenced by NumeRe::StringParser::eval().

Here is the call graph for this function:

◆ applyStringFuncs()

string NumeRe::StringFuncHandler::applyStringFuncs ( std::string  sLine)
protected

This member function searches for an occurence of a known string function in the passed command line and passes the control to StringFuncHandler::evalFunction() member function for evaluation.

Parameters
sLinestring
Returns
string

Definition at line 1534 of file stringfunchandler.cpp.

References evalFunction(), and m_mStringFuncs.

Referenced by NumeRe::StringParser::eval().

Here is the call graph for this function:

◆ argumentParser() [1/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
d_vect dArg 
)
private

This member function is the string function argument parser for numerical arguments.

Parameters
__sFuncArgumentStringView
dArgd_vect& a vector of numerical values as return value
Returns
size_t

It is one of the two basic argument parser functions, which are called by all others depending on the signatures of their functions.

Definition at line 289 of file stringfunchandler.cpp.

References NumeRe::ClusterManager::containsClusters(), MemoryManager::containsTablesOrClusters(), mu::ParserBase::Eval(), eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), NumeReKernel::getParser(), NumeReKernel::getSettings(), isStringExpression(), mu::ParserBase::SetExpr(), StringViewBase::to_string(), StringResult::vNumericalValues, and StringResult::vResult.

Here is the call graph for this function:

◆ argumentParser() [2/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
d_vect dArg,
n_vect nArg 
)
private

This member function is the string function argument parser for double and numeric values.

Parameters
__sFuncArgumentStringView
dArgd_vect& a vector of numerical values as return value
nArgn_vect& a vector of numerical values as return value
Returns
size_t

It is one of the two basic argument parser functions, which are called by all others depending on the signatures of their functions.

Definition at line 353 of file stringfunchandler.cpp.

References argumentParser(), getNextViewedArgument(), and StringViewBase::length().

Here is the call graph for this function:

◆ argumentParser() [3/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
n_vect nArg 
)
private

This member function is the string function argument parser for numerical arguments.

Parameters
__sFuncArgumentStringView
nArgn_vect& a vector of numerical values as return value
Returns
size_t

It is one of the two basic argument parser functions, which are called by all others depending on the signatures of their functions.

Definition at line 220 of file stringfunchandler.cpp.

References NumeRe::ClusterManager::containsClusters(), MemoryManager::containsTablesOrClusters(), mu::ParserBase::Eval(), eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), NumeReKernel::getParser(), NumeReKernel::getSettings(), intCast(), isStringExpression(), mu::ParserBase::SetExpr(), StringViewBase::to_string(), StringResult::vNumericalValues, and StringResult::vResult.

Referenced by argumentParser(), and evalFunction().

Here is the call graph for this function:

◆ argumentParser() [4/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
s_vect sArg,
bool &  bLogicalOnly 
)
private

This member function is the string function argument parser for string arguments.

Parameters
__sFuncArgumentStringView
sArgs_vect& a vector of string values as return value
bLogicalOnlybool&
Returns
size_t

It is one of the two basic argument parser functions, which are called by all others depending on the signatures of their functions.

Definition at line 398 of file stringfunchandler.cpp.

References StringResult::bOnlyLogicals, NumeRe::ClusterManager::containsClusters(), MemoryManager::containsTablesOrClusters(), convertVectorToExpression(), eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getSettings(), isStringExpression(), StringVector::push_generic(), removeQuotationMarks(), StringViewBase::to_string(), and StringResult::vResult.

Here is the call graph for this function:

◆ argumentParser() [5/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
s_vect sArg1,
d_vect dArg1 
)
private

This member function is the string function argument parser for one string and one (optional) numerical argument.

Parameters
__sFuncArgumentStringView
sArg1s_vect&
dArg1d_vect&
Returns
size_t

Definition at line 467 of file stringfunchandler.cpp.

References argumentParser(), getNextViewedArgument(), and StringViewBase::length().

Here is the call graph for this function:

◆ argumentParser() [6/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
s_vect sArg1,
n_vect nArg1,
n_vect nArg2 
)
private

This member function is the string function argument parser for one string and two (optional) numerical arguments.

Parameters
__sFuncArgumentStringView
sArg1s_vect&
nArg1n_vect&
nArg2n_vect&
Returns
size_t

Definition at line 510 of file stringfunchandler.cpp.

References argumentParser(), getNextViewedArgument(), and StringViewBase::length().

Here is the call graph for this function:

◆ argumentParser() [7/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
s_vect sArg1,
n_vect nArg1,
n_vect nArg2,
s_vect sArg2 
)
private

This member function is the string function argument parser for two string and two numerical values, where the second string is the last argument. Every argument except of the first one is optional.

Parameters
__sFuncArgumentStringView
sArg1s_vect&
nArg1n_vect&
nArg2n_vect&
sArg2s_vect&
Returns
size_t

Definition at line 570 of file stringfunchandler.cpp.

References argumentParser(), getNextViewedArgument(), and StringViewBase::length().

Here is the call graph for this function:

◆ argumentParser() [8/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
s_vect sArg1,
s_vect sArg2,
n_vect nArg1,
n_vect nArg2 
)
private

This member function is the string function argument parser for two string and two numerical values. Every argument except of the first one is optional.

Parameters
__sFuncArgumentStringView
sArg1s_vect&
sArg2s_vect&
nArg1n_vect&
nArg2n_vect&
Returns
size_t

Definition at line 643 of file stringfunchandler.cpp.

References argumentParser(), getNextViewedArgument(), and StringViewBase::length().

Here is the call graph for this function:

◆ argumentParser() [9/9]

size_t NumeRe::StringFuncHandler::argumentParser ( StringView  __sFuncArgument,
s_vect sArg1,
s_vect sArg2,
s_vect sArg3,
n_vect nArg1,
n_vect nArg2 
)
private

This member function is the string function argument parser for three string and two numerical values. Every argument except of the first one is optional.

Parameters
__sFuncArgumentStringView
sArg1s_vect&
sArg2s_vect&
sArg3s_vect&
nArg1n_vect&
nArg2n_vect&
Returns
size_t

Definition at line 717 of file stringfunchandler.cpp.

References argumentParser(), getNextViewedArgument(), and StringViewBase::length().

Here is the call graph for this function:

◆ callFunction()

std::vector< s_vect > NumeRe::StringFuncHandler::callFunction ( StringFuncHandle  funcHandle,
s_vect sStringArg1,
s_vect sStringArg2,
s_vect sStringArg3,
n_vect nIntArg1,
n_vect nIntArg2,
d_vect dValArg,
size_t  nMaxArgs 
)
private

Calls the selected string function using the passed string function arguments sequentially.

Parameters
funcHandleStringFuncHandle
sStringArg1s_vect&
sStringArg2s_vect&
sStringArg3s_vect&
nIntArg1n_vect&
nIntArg2n_vect&
dValArgd_vect&
nMaxArgssize_t
Returns
std::vector<s_vect>

Definition at line 806 of file stringfunchandler.cpp.

References StringFuncArgs::dArg1, DEFAULT_NUM_ARG, StringFuncHandle::fHandle, StringVector::getArg(), NumeReKernel::getInstance(), NumeReKernel::getSettings(), StringFuncArgs::nArg1, StringFuncArgs::nArg2, StringFuncArgs::opt, StringFuncArgs::sArg1, StringFuncArgs::sArg2, and StringFuncArgs::sArg3.

Referenced by evalFunction().

Here is the call graph for this function:

◆ callFunctionParallel()

std::vector< s_vect > NumeRe::StringFuncHandler::callFunctionParallel ( StringFuncHandle  funcHandle,
s_vect sStringArg1,
s_vect sStringArg2,
s_vect sStringArg3,
n_vect nIntArg1,
n_vect nIntArg2,
d_vect dValArg,
size_t  nMaxArgs 
)
private

Calls the selected string function using the passed string function arguments parallel using OpenMP.

Parameters
funcHandleStringFuncHandle
sStringArg1s_vect&
sStringArg2s_vect&
sStringArg3s_vect&
nIntArg1n_vect&
nIntArg2n_vect&
dValArgd_vect&
nMaxArgssize_t
Returns
std::vector<s_vect>

Definition at line 867 of file stringfunchandler.cpp.

References StringFuncArgs::dArg1, DEFAULT_NUM_ARG, StringFuncHandle::fHandle, StringVector::getArg(), NumeReKernel::getInstance(), NumeReKernel::getSettings(), StringFuncArgs::nArg1, StringFuncArgs::nArg2, StringFuncArgs::opt, StringFuncArgs::sArg1, StringFuncArgs::sArg2, and StringFuncArgs::sArg3.

Referenced by evalFunction().

Here is the call graph for this function:

◆ callMultiFunction()

std::vector< s_vect > NumeRe::StringFuncHandler::callMultiFunction ( StringFuncHandle  funcHandle,
s_vect sStringArg1,
s_vect sStringArg2,
s_vect sStringArg3,
n_vect nIntArg1,
n_vect nIntArg2,
d_vect dValArg,
size_t  nMaxArgs 
)
private

Calls the selected string function accepting multiple values as first argument using the passed string function arguments sequentially.

Parameters
funcHandleStringFuncHandle
sStringArg1s_vect&
sStringArg2s_vect&
sStringArg3s_vect&
nIntArg1n_vect&
nIntArg2n_vect&
dValArgd_vect&
nMaxArgssize_t
Returns
std::vector<s_vect>

Definition at line 926 of file stringfunchandler.cpp.

References StringFuncArgs::dArg1, DEFAULT_NUM_ARG, StringFuncHandle::fHandle, StringVector::getArg(), NumeReKernel::getInstance(), NumeReKernel::getSettings(), StringFuncArgs::nArg1, StringFuncArgs::nArg2, StringFuncArgs::opt, StringFuncArgs::sArg2, StringFuncArgs::sArg3, and StringFuncArgs::sMultiArg.

Referenced by evalFunction().

Here is the call graph for this function:

◆ callMultiFunctionParallel()

std::vector< s_vect > NumeRe::StringFuncHandler::callMultiFunctionParallel ( StringFuncHandle  funcHandle,
s_vect sStringArg1,
s_vect sStringArg2,
s_vect sStringArg3,
n_vect nIntArg1,
n_vect nIntArg2,
d_vect dValArg,
size_t  nMaxArgs 
)
private

Calls the selected string function accepting multiple values as first argument using the passed string function arguments parallel using OpenMP.

Parameters
funcHandleStringFuncHandle
sStringArg1s_vect&
sStringArg2s_vect&
sStringArg3s_vect&
nIntArg1n_vect&
nIntArg2n_vect&
dValArgd_vect&
nMaxArgssize_t
Returns
std::vector<s_vect>

Definition at line 984 of file stringfunchandler.cpp.

References StringFuncArgs::dArg1, DEFAULT_NUM_ARG, StringFuncHandle::fHandle, StringVector::getArg(), NumeReKernel::getInstance(), NumeReKernel::getSettings(), StringFuncArgs::nArg1, StringFuncArgs::nArg2, StringFuncArgs::opt, StringFuncArgs::sArg2, StringFuncArgs::sArg3, and StringFuncArgs::sMultiArg.

Referenced by evalFunction().

Here is the call graph for this function:

◆ declareStringFuncs()

void NumeRe::StringFuncHandler::declareStringFuncs ( const std::map< std::string, StringFuncHandle > &  mStringFuncs)
protected

This member function is used to fill the internal map of declared string functions with the data of the passed one.

Parameters
mStringFuncsconst map<string,StringFuncHandle>&
Returns
void

Definition at line 1561 of file stringfunchandler.cpp.

References m_mStringFuncs.

Referenced by NumeRe::StringParser::StringParser().

◆ eval()

virtual StringResult NumeRe::StringFuncHandler::eval ( std::string &  sLine,
std::string  sCache,
bool  bParseNumericals = true 
)
protectedpure virtual

◆ evalFunction()

void NumeRe::StringFuncHandler::evalFunction ( std::string &  sLine,
const std::string &  sFuncName,
StringFuncHandle  funcHandle 
)
private

This member function evaluates the passed call sequence to the string function.

Parameters
sLinestd::string&
sFuncNameconst std::string&
funcHandleStringFuncHandle
Returns
void

The arguments of the string function are evaluated depending on the defined signature of the called string function and passed to the linked implementation of the string function. The return value of the string function is transformed back into a usual string expression afterwards and stored in a string vector, which replaces the selected call to the string function.

Definition at line 104 of file stringfunchandler.cpp.

References argumentParser(), StringFuncHandle::bTakesMultiArguments, callFunction(), callFunctionParallel(), callMultiFunction(), callMultiFunctionParallel(), NumeRe::StringVarFactory::createStringVectorVar(), NumeRe::StringVarFactory::expandStringVectorComponents(), StringFuncHandle::fHandle, findNextFunction(), StringFuncHandle::fType, getFunctionArgumentList(), NumeReKernel::getInstance(), NumeReKernel::getSettings(), SyntaxError::invalid_position, isStringExpression(), max, StringFuncArgs::nMultiArg, NOARGS, StringFuncArgs::opt, PARSER_DOUBLE, PARSER_INT, PARSER_STRING, PARSER_STRING_DOUBLE, PARSER_STRING_INT_INT, PARSER_STRING_INT_INT_STRING, PARSER_STRING_STRING_INT_INT, PARSER_STRING_STRING_STRING_INT_INT, StringVector::push_generic(), SyntaxError::STRING_ERROR, and StringViewBase::to_string().

Referenced by applyStringFuncs().

Here is the call graph for this function:

◆ findNextFunction()

size_t NumeRe::StringFuncHandler::findNextFunction ( const std::string &  sFunc,
StringView  sLine,
size_t  nStartPos,
size_t &  nEndPosition,
bool  searchForMethods = false 
)
protected

Finds the position of the next function occurence in the passed string including the position of the closing parenthesis.

Parameters
sFuncconst string&
sLineStringView
nStartPossize_t
nEndPositionsize_t&
searchForMethodsbool
Returns
size_t

Definition at line 1581 of file stringfunchandler.cpp.

References StringViewBase::find(), getMatchingParenthesis(), isDelimiter(), isInQuotes(), StringViewBase::length(), StringView::subview(), StringViewBase::to_string(), and SyntaxError::UNMATCHED_PARENTHESIS.

Referenced by applySpecialStringFuncs(), evalFunction(), NumeRe::StringParser::getDataForString(), and NumeRe::StringParser::replaceDataOccurence().

Here is the call graph for this function:

◆ getFunctionArgumentList()

StringView NumeRe::StringFuncHandler::getFunctionArgumentList ( const std::string &  sFunc,
StringView  sLine,
size_t  nStartPosition,
size_t  nEndPosition 
)
protected

Returns the contents of the argument parentheses of the function starting at nStartPosition.

Parameters
sFuncconst std::string&
sLineStringView
nStartPositionsize_t First character of the function
nEndPositionsize_t Position of the closing parenthesis
Returns
string

Definition at line 1646 of file stringfunchandler.cpp.

References StringView::subview().

Referenced by applySpecialStringFuncs(), evalFunction(), NumeRe::StringParser::getDataForString(), and NumeRe::StringParser::replaceDataOccurence().

Here is the call graph for this function:

◆ getStringFuncMapSize()

size_t NumeRe::StringFuncHandler::getStringFuncMapSize ( ) const
inlineprotected

Definition at line 66 of file stringfunchandler.hpp.

References m_mStringFuncs.

◆ isStringExpression()

virtual bool NumeRe::StringFuncHandler::isStringExpression ( const std::string &  sExpression)
pure virtual

◆ printValue()

std::string NumeRe::StringFuncHandler::printValue ( const mu::value_type value)
protected

Prints a value to a string respecting possible integer optimizations.

Parameters
valueconst mu::value_type&
Returns
std::string

Definition at line 1661 of file stringfunchandler.cpp.

References NumeReKernel::getInstance(), intCast(), mu::rint(), and toString().

Referenced by applySpecialStringFuncs(), and NumeRe::StringParser::numToString().

Here is the call graph for this function:

Member Data Documentation

◆ m_mStringFuncs

std::map<std::string,StringFuncHandle> NumeRe::StringFuncHandler::m_mStringFuncs
private

The documentation for this class was generated from the following files: