NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
built-in.cpp File Reference
#include "built-in.hpp"
#include "../kernel.hpp"
#include "io/fileops.hpp"
#include "datamanagement/dataops.hpp"
#include "commandfunctions.hpp"
Include dependency graph for built-in.cpp:

Go to the source code of this file.

Functions

CommandReturnValues commandHandler (string &sCmd)
 This function is the main command handling function. More...
 
bool extractFirstParameterStringValue (const string &sCmd, string &sArgument)
 This function returns the string argument for a single parameter in the command line. More...
 
string evaluateParameterValues (const string &sCmd)
 This function evaluates a passed parameter string, so that the values of the parameters are only values. No expressions exist after this call anymore. More...
 
bool parseCmdArg (const string &sCmd, size_t nPos, Parser &_parser, size_t &nArgument)
 This function finds the numerical argument to the selected command line parameter and evaluates it. More...
 

Function Documentation

◆ commandHandler()

CommandReturnValues commandHandler ( string &  sCmd)

This function is the main command handling function.

Parameters
sCmdstring&
Returns
CommandReturnValues

The function identifies the commands in the passed string and passes control to the corresponding command function registered in one of the static maps.

If no command has been found, the function will return NO_COMMAND

Definition at line 42 of file built-in.cpp.

References cmd_find(), cmd_get(), cmd_help(), findCommand(), getCommandFunctions(), getCommandFunctionsWithReturnValues(), NO_COMMAND, Match::sString, and StripSpaces().

Referenced by FlowCtrl::calc(), FlowCtrl::compile(), NumeReKernel::MainLoop(), and Procedure::ProcCalc().

Here is the call graph for this function:

◆ evaluateParameterValues()

string evaluateParameterValues ( const string &  sCmd)

This function evaluates a passed parameter string, so that the values of the parameters are only values. No expressions exist after this call anymore.

Parameters
sCmdconst string&
Returns
string

Definition at line 221 of file built-in.cpp.

References FunctionDefinitionManager::call(), MemoryManager::containsTablesOrClusters(), mu::ParserBase::Eval(), NumeRe::StringParser::evalAndFormat(), findParameter(), getDataElements(), NumeReKernel::getDefinitions(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextIndex(), NumeReKernel::getParser(), Settings::getPrecision(), NumeReKernel::getSettings(), getStringArgument(), NumeReKernel::getStringParser(), NumeRe::StringVarFactory::getStringValues(), isInQuotes(), mu::isnan(), readAndParseIntervals(), mu::ParserBase::SetExpr(), toCmdString(), and toString().

Referenced by FlowCtrl::calc(), cmd_hist(), cmd_new(), cmd_rename(), cmd_stats(), FlowCtrl::compile(), and swapTables().

Here is the call graph for this function:

◆ extractFirstParameterStringValue()

bool extractFirstParameterStringValue ( const string &  sCmd,
string &  sArgument 
)

This function returns the string argument for a single parameter in the command line.

Parameters
sCmdconst string&
sArgumentstring&
Returns
bool

It will also parse it directly, which means that it won't contain further string operations.

Definition at line 98 of file built-in.cpp.

References MemoryManager::containsTablesOrClusters(), NumeRe::StringParser::evalAndFormat(), getDataElements(), Settings::getExePath(), NumeReKernel::getInstance(), getMatchingParenthesis(), NumeReKernel::getMemoryManager(), NumeReKernel::getParser(), NumeReKernel::getSettings(), getStringArgument(), NumeReKernel::getStringParser(), NumeRe::StringVarFactory::getStringValues(), Settings::getTokenPaths(), NumeRe::StringParser::isStringExpression(), and SyntaxError::UNKNOWN_PATH_TOKEN.

Referenced by cmd_edit(), cmd_install(), cmd_set(), editObject(), and getPathForSetting().

Here is the call graph for this function:

◆ parseCmdArg()

bool parseCmdArg ( const string &  sCmd,
size_t  nPos,
Parser _parser,
size_t &  nArgument 
)

This function finds the numerical argument to the selected command line parameter and evaluates it.

Parameters
sCmdconst string&
nPossize_t
_parserParser&
nArgumentsize_t&
Returns
bool

Definition at line 422 of file built-in.cpp.

References date::abs(), mu::ParserBase::Eval(), getMatchingParenthesis(), intCast(), mu::isinf(), mu::isnan(), and mu::ParserBase::SetExpr().

Referenced by cmd_set().

Here is the call graph for this function: