NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include "built-in.hpp"
#include "../kernel.hpp"
#include "io/fileops.hpp"
#include "datamanagement/dataops.hpp"
#include "commandfunctions.hpp"
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... | |
CommandReturnValues commandHandler | ( | string & | sCmd | ) |
This function is the main command handling function.
sCmd | string& |
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().
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.
sCmd | const 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().
bool extractFirstParameterStringValue | ( | const string & | sCmd, |
string & | sArgument | ||
) |
This function returns the string argument for a single parameter in the command line.
sCmd | const string& |
sArgument | string& |
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().
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.
sCmd | const string& |
nPos | size_t |
_parser | Parser& |
nArgument | size_t& |
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().