NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
NumeReKernel Class Reference

This class provides the interface to the core of NumeRe. It provides all functionalities, which was done by the main function before and handles the communication to the graphical user interface. More...

#include <kernel.hpp>

Collaboration diagram for NumeReKernel:

Public Types

enum  KernelStatus {
  NUMERE_QUIT = -1 , NUMERE_ERROR = 0 , NUMERE_DONE = 1 , NUMERE_DONE_KEYWORD ,
  NUMERE_PRINTLINE , NUMERE_PRINTLINE_PREFMT , NUMERE_ISSUE_WARNING , NUMERE_PENDING ,
  NUMERE_PENDING_SPECIAL , NUMERE_CALC_UPDATE , NUMERE_STATUSBAR_UPDATE , NUMERE_QUEUED_COMMAND ,
  NUMERE_EDIT_FILE , NUMERE_OPEN_DOC , NUMERE_SHOW_TABLE , NUMERE_EDIT_TABLE ,
  NUMERE_SHOW_STRING_TABLE , NUMERE_DEBUG_EVENT , NUMERE_ANSWER_READ , NUMERE_SHOW_WINDOW ,
  NUMERE_REFRESH_FUNCTIONTREE , NUMERE_CLOSE_WINDOWS , NUMERE_INSTALLATION_DONE , NUMERE_CLC_TERMINAL
}
 
enum  DebuggerCodes { DEBUGGER_CONTINUE = 1 , DEBUGGER_STEP , DEBUGGER_STEPOVER , DEBUGGER_LEAVE }
 

Public Member Functions

 NumeReKernel ()
 Constructor of the kernel. More...
 
 ~NumeReKernel ()
 Destructor of the kernel. More...
 
void showWindow (const NumeRe::Window &window)
 This member function passes a window object to the user interface, which will then converted into a real window. More...
 
NumeRe::Table getTable (const std::string &sTableName)
 This member function creates the table container for the selected numerical table. More...
 
NumeRe::Container< std::string > getStringTable (const std::string &sStringTableName)
 This member function creates the table container for the string table or the clusters. More...
 
void refreshFunctionTree ()
 This member function informs the GUI to reload the contents of the function tree as soon as possible. More...
 
void closeWindows (int type)
 This member function informs the GUI to close all windows of the selected type. Use 0 or WT_ALL to close all closable windows at once. More...
 
KernelStatus MainLoop (const std::string &sCommand)
 This is the main loop for the core of NumeRe. More...
 
FileSystemgetFileSystem ()
 
MemoryManagergetMemoryManager ()
 
NumeRe::ClustergetAns ()
 
void setAns (NumeRe::Cluster *ans)
 
mu::ParsergetParser ()
 
NumeRe::StringParsergetStringParser ()
 
FunctionDefinitionManagergetDefinitions ()
 
SettingsgetSettings ()
 
PlotDatagetPlottingData ()
 
OutputgetOutput ()
 
ScriptgetScript ()
 
ProceduregetProcedureInterpreter ()
 
ProcedureLibrarygetProcedureLibrary ()
 
NumeReDebuggergetDebugger ()
 
NumeRe::WindowManagergetWindowManager ()
 
void displaySplash ()
 This function displays the intro text. More...
 
std::map< std::string, std::string > getPluginLanguageStrings ()
 This member function returns a map of language strings for the installed plugins, which will be used by the global language object in the editor and the symbols browser. More...
 
std::map< std::string, std::string > getFunctionLanguageStrings ()
 This member function returns a map of language strings for the declared functions, which will be used by the global language object in the editor and the symbols browser. More...
 
std::vector< std::string > getPluginCommands ()
 This member function is used by the syntax highlighter to hightlight the plugin commands. More...
 
int ReadOpenFileFlag ()
 This member function returns the mode, how a file shall be opened in the editor, when called by the kernel-. More...
 
std::string ReadAnswer ()
 This member function is a simple wrapper to read the kernel answer and reset it automatically. More...
 
std::string getDocumentation (const std::string &sCommand)
 This member function returns the documentation for the passed command string as HTML string prepared for the help browser. More...
 
std::vector< std::string > getDocIndex ()
 This member function returns the documentation index as a string vector, which can be used to fill the tree in the documentation browser. More...
 
NumeReVariables getVariableList ()
 This member function returns a structure containing all currently declared variables, which can be displayed in the variable viewer. More...
 
bool SettingsModified ()
 Returns true, if the user changed any internal settings using the set command. More...
 
int getAutosaveInterval () const
 
long long int getLastSavedTime () const
 
void Autosave ()
 Saves the allocated memories by the tables automatically. More...
 
void StartUp (NumeReTerminal *_parent, const std::string &__sPath, const std::string &sPredefinedFunctions)
 This is the kernel "booting" function. More...
 
void CloseSession ()
 This member function shuts the kernel down and terminates the kernel instance. Every call to NumeReKernel::getInstance() after a call to this function will produce a segmentation fault. More...
 
void CancelCalculation ()
 
void saveData ()
 This member function performs the autosaving of tables at application shutdown. More...
 
Settings getKernelSettings ()
 Get the settings available in the Settings class. More...
 
void setKernelSettings (const Settings &_settings)
 Update the internal settings. More...
 
std::vector< std::string > getPathSettings () const
 This member function returns a vector containing all currently declared paths in a distinct order. More...
 
const std::vector< Package > & getInstalledPackages () const
 Returns a vector containing the names and the version info of each installed plugin. More...
 
std::map< std::string, std::string > getMenuMap () const
 Returns the menu map used to construct the package menu. More...
 
void initializeStackTracker ()
 Starts the stack tracker, which will prevent stack overflows. More...
 
void printVersionInfo ()
 This member function prints the version headline and the version information to the console. More...
 
void updateLineLenght (int nLength)
 This member function is used to update the internal terminal line length information after the terminal had been resized. More...
 
void sendErrorNotification ()
 This member function is used to toggle the error notification status. The error notification is used to style text as error messages. More...
 

Static Public Member Functions

static NumeReKernelgetInstance ()
 This static member function returns a a pointer to the singleton instance of the kernel. More...
 
static void toggleTableStatus ()
 Toggles the table writing status, which will reduce the number or events send to the terminal. More...
 
static void flush ()
 Inform the terminal to write the current output buffer as soon as possible. More...
 
static void print (const std::string &__sLine, bool printingEnabled=true)
 This member function appends the passed string as a new output line to the buffer and informs the terminal that we have a new string to print. More...
 
static void printPreFmt (const std::string &__sLine, bool printingEnabled=true)
 This member function appends the pre- formatted string to the buffer and informs the terminal that we have a new string to print. More...
 
static std::string formatResultOutput (int nNum, mu::value_type *v)
 This static function is used to format the result output in the terminal for numerical-only results. More...
 
static std::string formatResultOutput (const std::vector< std::string > &vStringResults)
 This static function is used to format the result output in the terminal for string and numerical results converted to a string vector. More...
 
static void issueWarning (std::string sWarningMessage)
 This static function may be used to issue a warning to the user. The warning will be printed by the terminal in a separate colour. More...
 
static void failMessage (std::string sFailMessage)
 This static function may be used to print a test failure message in the terminal. More...
 
static int numberOfNumbersPerLine ()
 This member function returns the count of numbers fitting into a single terminal line depending on its line length. More...
 
static void progressBar (int nStep, int nFirstStep, int nFinalStep, const std::string &sType)
 This function displays a progress bar constructed from characters in the terminal. More...
 
static void getline (std::string &sLine)
 This function is an implementation replacing the std::getline() function. More...
 
static void gotoLine (const std::string &sFile, unsigned int nLine=0)
 This member function handles opening files and jumping to lines as requested by the kernel. More...
 
static void setDocumentation (const std::string &_sDocumentation)
 This member function handles the display of a documentation window as requested by the kernel. More...
 
static void installationDone ()
 Notify the GUI that the installation was processed. More...
 
static bool GetAsyncCancelState ()
 This function is used by the kernel to get informed, when the user pressed ESC or used other means of aborting the current calculation process. More...
 
static void showTable (NumeRe::Table _table, std::string __name, bool openeditable=false)
 This member function passes a table to the GUI to be displayed in the table viewer. It also allows to create a table editor window. More...
 
static void showStringTable (NumeRe::Container< std::string > _stringtable, std::string __name, bool openeditable=false)
 This member function passes a string table to the GUI to be displayed in the table viewer. More...
 
static NumeRe::Table getTable ()
 This member function is used by the kernel to be notified when the user finished the table edit process and the table may be updated internally. More...
 
static void showDebugEvent (const std::string &sTitle, const std::vector< std::string > &vStacktrace)
 This member function passes the debugging information to the GUI to be displayed in the debugger window. More...
 
static int waitForContinue ()
 This static function waits until the user sends a continuation command via the debugger and returns the corresponding debugger code. More...
 
static int evalDebuggerBreakPoint (const std::string &sCurrentCommand="")
 This member function handles the creation of the debugger information for a script debugger breakpoint and returns the obtained debugger code. More...
 
static void clcTerminal ()
 Clear the terminal. More...
 

Static Public Attributes

static int * baseStackPosition = nullptr
 
static NumeReTerminalm_parent = nullptr
 
static std::queue< NumeReTasktaskQueue
 
static int nLINE_LENGTH = 80
 
static bool bWritingTable = false
 
static bool bCancelSignal = false
 
static int nOpenFileFlag = 0
 
static int nLastStatusVal = -1
 
static unsigned int nLastLineLength = 0
 
static bool modifiedSettings = false
 
static NumeRe::Table table
 
static bool bSupressAnswer = false
 
static bool bGettingLine = false
 
static bool bErrorNotification = false
 
static ProcedureLibrary ProcLibrary
 

Private Member Functions

void printResult (const std::string &sLine, bool bScriptRunning)
 This member function appends the formatted string to the buffer and informs the terminal that we have a new string to print. More...
 
std::string maskProcedureSigns (std::string sLine)
 This member function masks the dollar signs in the strings to avoid that the line breaking functions uses them as aliases for line breaks. More...
 
bool handleCommandLineSource (std::string &sLine, std::string &sKeep)
 This private member function will handle the command line input source and validate it, before the core will evaluate it. More...
 
bool getLineFromCommandCache (std::string &sLine, const std::string &sCurrentCommand)
 This private member function returns the current command line from the command cache (i.e. the list of commands separated by semicolons). More...
 
bool handleComposeBlock (std::string &sLine, const std::string &sCurrentCommand, KernelStatus &nReturnVal)
 This private member function will handle the compose block (i.e. store the different commands and return them, once the block is finished). More...
 
bool handleProcedureWrite (const std::string &sLine, const std::string &sCurrentCommand, KernelStatus &nReturnVal)
 This private member function will handle the writing of procedure lines to the corresponding file. More...
 
bool uninstallPlugin (const std::string &sLine, const std::string &sCurrentCommand)
 This private member function uninstalls a previously installed plugin. More...
 
void handleToCmd (std::string &sLine, std::string &sCache, std::string &sCurrentCommand)
 This private member function handles the "to_cmd()" function, if it is part of the current command line. More...
 
bool evaluateProcedureCalls (std::string &sLine)
 This private member function will evaluate any calls to procedurs and replace their results in the current command line. More...
 
bool executePlugins (std::string &sLine)
 This private member function will execute any call to a plugin. More...
 
bool handleFlowControls (std::string &sLine, const std::string &sCurrentCommand, KernelStatus &nReturnVal)
 This private member function will handle used flow controls. More...
 
bool evaluateStrings (std::string &sLine, std::string &sCache, bool &bWriteToCache, KernelStatus &nReturnVal)
 This private member function redirects the processing of strings to the string parser. More...
 
void createCalculationAnswer (int nNum, mu::value_type *v)
 This private member function will create the answer line for the parser which is then passed to NumeReKernel::printResult(). More...
 
void resetAfterError ()
 This private member function will reset the kernel variables after an error had been handled. More...
 
std::string getGreeting ()
 Returns a random greeting string, which may be printed to the terminal later. More...
 
void checkInternalStates ()
 Evaluates the internal states, performs necessary actions and resets them. More...
 
void defineOperators ()
 This member function declares all numerical operators. More...
 
void defineConst ()
 This member function declares all numerical constants. More...
 
void defineFunctions ()
 This member function declares all mathematical functions. More...
 

Private Attributes

std::string sCommandLine
 
std::string sAnswer
 
std::string sPlotCompose
 
std::queue< std::string > commandQueue
 
bool refreshTree
 
FileSystem _fSys
 
Settings _option
 
Output _out
 
MemoryManager _memoryManager
 
mu::Parser _parser
 
NumeRe::StringParser _stringParser
 
FunctionDefinitionManager _functions
 
PlotData _pData
 
Script _script
 
Procedure _procedure
 
NumeReDebugger _debugger
 
NumeRe::WindowManager _manager
 
NumeRe::Cluster_ans
 

Static Private Attributes

static NumeReKernelkernelInstance = nullptr
 

Detailed Description

This class provides the interface to the core of NumeRe. It provides all functionalities, which was done by the main function before and handles the communication to the graphical user interface.

Definition at line 96 of file kernel.hpp.

Member Enumeration Documentation

◆ DebuggerCodes

Enumerator
DEBUGGER_CONTINUE 
DEBUGGER_STEP 
DEBUGGER_STEPOVER 
DEBUGGER_LEAVE 

Definition at line 129 of file kernel.hpp.

◆ KernelStatus

Enumerator
NUMERE_QUIT 
NUMERE_ERROR 
NUMERE_DONE 
NUMERE_DONE_KEYWORD 
NUMERE_PRINTLINE 
NUMERE_PRINTLINE_PREFMT 
NUMERE_ISSUE_WARNING 
NUMERE_PENDING 
NUMERE_PENDING_SPECIAL 
NUMERE_CALC_UPDATE 
NUMERE_STATUSBAR_UPDATE 
NUMERE_QUEUED_COMMAND 
NUMERE_EDIT_FILE 
NUMERE_OPEN_DOC 
NUMERE_SHOW_TABLE 
NUMERE_EDIT_TABLE 
NUMERE_SHOW_STRING_TABLE 
NUMERE_DEBUG_EVENT 
NUMERE_ANSWER_READ 
NUMERE_SHOW_WINDOW 
NUMERE_REFRESH_FUNCTIONTREE 
NUMERE_CLOSE_WINDOWS 
NUMERE_INSTALLATION_DONE 
NUMERE_CLC_TERMINAL 

Definition at line 101 of file kernel.hpp.

Constructor & Destructor Documentation

◆ NumeReKernel()

NumeReKernel::NumeReKernel ( )

Constructor of the kernel.

Definition at line 67 of file kernel.cpp.

References _ans, kernelInstance, sAnswer, sCommandLine, and sPlotCompose.

◆ ~NumeReKernel()

NumeReKernel::~NumeReKernel ( )

Destructor of the kernel.

Definition at line 80 of file kernel.cpp.

References CloseSession(), and kernelInstance.

Here is the call graph for this function:

Member Function Documentation

◆ Autosave()

void NumeReKernel::Autosave ( )

Saves the allocated memories by the tables automatically.

Returns
void

Definition at line 121 of file kernel.cpp.

References _memoryManager, g_logger, MemoryManager::getSaveStatus(), DetachedLogger::info(), and MemoryManager::saveToCacheFile().

Referenced by NumeReTerminal::Entry().

Here is the call graph for this function:

◆ CancelCalculation()

void NumeReKernel::CancelCalculation ( )
inline

Definition at line 357 of file kernel.hpp.

References bCancelSignal.

Referenced by NumeReTerminal::CancelCalculation().

◆ checkInternalStates()

void NumeReKernel::checkInternalStates ( )
private

Evaluates the internal states, performs necessary actions and resets them.

Returns
void

Definition at line 2133 of file kernel.cpp.

References _lang, Language::addToLanguage(), getPluginLanguageStrings(), NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NUMERE_QUEUED_COMMAND, NUMERE_REFRESH_FUNCTIONTREE, refreshTree, taskQueue, and NumeReTask::taskType.

Referenced by evaluateStrings(), handleFlowControls(), and MainLoop().

Here is the call graph for this function:

◆ clcTerminal()

void NumeReKernel::clcTerminal ( )
static

Clear the terminal.

Returns
void

Definition at line 3543 of file kernel.cpp.

References DetachedLogger::debug(), g_logger, KERNEL_PRINT_SLEEP, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NUMERE_CLC_TERMINAL, NUMERE_QUEUED_COMMAND, taskQueue, and NumeReTask::taskType.

Referenced by cmd_clc().

Here is the call graph for this function:

◆ CloseSession()

void NumeReKernel::CloseSession ( )

This member function shuts the kernel down and terminates the kernel instance. Every call to NumeReKernel::getInstance() after a call to this function will produce a segmentation fault.

Returns
void

Definition at line 2210 of file kernel.cpp.

References _functions, _memoryManager, _option, _out, _pData, _script, Settings::controlDefinitions(), g_logger, FunctionDefinitionManager::getDefinedFunctions(), Settings::getExePath(), FileSystem::getPath(), Settings::getSetting(), DetachedLogger::info(), m_parent, MemoryManager::removeTablesFromMemory(), sAnswer, FunctionDefinitionManager::save(), Settings::save(), saveData(), sCommandLine, SETTING_S_LOADPATH, SETTING_S_PLOTPATH, SETTING_S_SAVEPATH, SETTING_S_SCRIPTPATH, and SettingsValue::stringval().

Referenced by NumeReTerminal::Entry(), and ~NumeReKernel().

Here is the call graph for this function:

◆ closeWindows()

void NumeReKernel::closeWindows ( int  type)

This member function informs the GUI to close all windows of the selected type. Use 0 or WT_ALL to close all closable windows at once.

Parameters
typeint
Returns
void

Definition at line 3590 of file kernel.cpp.

References KERNEL_PRINT_SLEEP, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NumeReTask::nLine, NUMERE_CLOSE_WINDOWS, NUMERE_QUEUED_COMMAND, taskQueue, and NumeReTask::taskType.

Referenced by cmd_close().

◆ createCalculationAnswer()

void NumeReKernel::createCalculationAnswer ( int  nNum,
mu::value_type v 
)
private

This private member function will create the answer line for the parser which is then passed to NumeReKernel::printResult().

Parameters
nNumint
vvalue_type*
Returns
void

Definition at line 2058 of file kernel.cpp.

References _script, bSupressAnswer, formatResultOutput(), getAns(), Script::isOpen(), Script::isValid(), printResult(), NumeRe::Cluster::setDoubleArray(), and vAns.

Referenced by MainLoop().

Here is the call graph for this function:

◆ defineConst()

void NumeReKernel::defineConst ( )
private

This member function declares all numerical constants.

Returns
void

Definition at line 361 of file kernel.cpp.

References _parser, mu::ParserBase::DefineConst(), errorTypeToString(), TYPE_ASSERTIONERROR, TYPE_CUSTOMERROR, TYPE_MATHERROR, and TYPE_SYNTAXERROR.

Referenced by StartUp().

Here is the call graph for this function:

◆ defineFunctions()

void NumeReKernel::defineFunctions ( )
private

This member function declares all mathematical functions.

Returns
void

Definition at line 425 of file kernel.cpp.

References _parser, mu::ParserBase::DefineFun(), parser_acsc(), parser_acsch(), parser_AiryA(), parser_AiryB(), parser_and(), parser_asec(), parser_asech(), parser_AssociatedLaguerrePolynomial(), parser_AssociatedLegendrePolynomial(), parser_beta(), parser_BetheWeizsaecker(), parser_Binom(), parser_clausen(), parser_clock(), parser_Cnt(), parser_compare(), parser_complex(), parser_conj(), parser_cot(), parser_csc(), parser_csch(), parser_date(), parser_digamma(), parser_dilogarithm(), parser_doubleFaculty(), parser_EllipticD(), parser_EllipticE(), parser_EllipticF(), parser_EllipticP(), parser_erf(), parser_erfc(), parser_Faculty(), parser_floor(), parser_gamma(), parser_gcd(), parser_gRandom(), parser_Heaviside(), parser_HermitePolynomial(), parser_Ignore(), parser_imag(), parser_imSphericalHarmonics(), parser_interval(), parser_IrregularCylBessel(), parser_is_string(), parser_isnan(), parser_ivl(), parser_LaguerrePolynomial(), parser_lcm(), parser_LegendrePolynomial(), parser_log_b(), parser_MaxPos(), parser_Med(), parser_MinPos(), parser_Norm(), parser_Num(), parser_numereversion(), parser_or(), parser_Pct(), parser_perlin(), parser_phi(), parser_polar2rect(), parser_polygamma(), parser_polynomial(), parser_product(), parser_Random(), parser_real(), parser_rect(), parser_rect2polar(), parser_RegularCylBessel(), parser_roof(), parser_round(), parser_sec(), parser_sech(), parser_SinusCardinalis(), parser_sleep(), parser_SphericalBessel(), parser_SphericalHarmonics(), parser_SphericalNeumann(), parser_Std(), parser_studentFactor(), parser_theta(), parser_time(), parser_toDegree(), parser_toRadian(), parser_weeknum(), parser_xor(), parser_Zernike(), and parser_zeta().

Referenced by StartUp().

◆ defineOperators()

◆ displaySplash()

void NumeReKernel::displaySplash ( )

This function displays the intro text.

Returns
void

Definition at line 2265 of file kernel.cpp.

References printPreFmt().

Referenced by cmd_credits(), and printVersionInfo().

Here is the call graph for this function:

◆ evalDebuggerBreakPoint()

int NumeReKernel::evalDebuggerBreakPoint ( const std::string &  sCurrentCommand = "")
static

This member function handles the creation of the debugger information for a script debugger breakpoint and returns the obtained debugger code.

Parameters
sCurrentCommandconst std::string&
Returns
int

Definition at line 3475 of file kernel.cpp.

References _debugger, _parser, DEBUGGER_CONTINUE, NumeReDebugger::gatherInformations(), NumeRe::ClusterManager::getClusterMap(), getDebugger(), getInstance(), getMemoryManager(), getParser(), getScript(), getStringParser(), NumeRe::StringVarFactory::getStringVars(), MemoryManager::getTableMap(), mu::ParserBase::GetVar(), and NumeReDebugger::showBreakPoint().

Referenced by Procedure::evalDebuggerBreakPoint(), and MainLoop().

Here is the call graph for this function:

◆ evaluateProcedureCalls()

bool NumeReKernel::evaluateProcedureCalls ( std::string &  sLine)
private

This private member function will evaluate any calls to procedurs and replace their results in the current command line.

Parameters
sLinestd::string&
Returns
bool

Definition at line 1702 of file kernel.cpp.

References _functions, _memoryManager, _option, _out, _parser, _pData, _procedure, _script, Procedure::execute(), findCommand(), FlowCtrl::getCurrentBlockDepth(), getMatchingParenthesis(), Procedure::getReturnType(), isInQuotes(), Procedure::mangleName(), Procedure::replaceReturnVal(), StripSpaces(), and toString().

Referenced by MainLoop().

Here is the call graph for this function:

◆ evaluateStrings()

bool NumeReKernel::evaluateStrings ( std::string &  sLine,
std::string &  sCache,
bool &  bWriteToCache,
KernelStatus nReturnVal 
)
private

This private member function redirects the processing of strings to the string parser.

Parameters
sLinestd::string&
sCachestd::string&
bWriteToCachebool&
nReturnValKernelStatus&
Returns
bool

Definition at line 2007 of file kernel.cpp.

References _lang, _memoryManager, _option, _procedure, _script, _stringParser, bCancelSignal, checkInternalStates(), commandQueue, NumeRe::StringParser::evalAndFormat(), Language::get(), PackageManager::getPluginNames(), Script::getScriptFileName(), Script::isOpen(), NumeRe::StringParser::isStringExpression(), Script::isValid(), LineBreak(), NUMERE_DONE_KEYWORD, print(), sCommandLine, MemoryManager::setPluginCommands(), NumeRe::StringParser::STRING_SUCCESS, and Script::wasLastCommand().

Referenced by MainLoop().

Here is the call graph for this function:

◆ executePlugins()

◆ failMessage()

void NumeReKernel::failMessage ( std::string  sFailMessage)
static

This static function may be used to print a test failure message in the terminal.

Parameters
sFailMessagestd::string
Returns
void

Definition at line 2865 of file kernel.cpp.

References KERNEL_PRINT_SLEEP, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NumeReTerminal::m_sAnswer, NUMERE_ANSWER_READ, NUMERE_ISSUE_WARNING, NUMERE_STATUSBAR_UPDATE, and replaceAll().

Referenced by Procedure::catchExceptionForTest().

Here is the call graph for this function:

◆ flush()

void NumeReKernel::flush ( )
static

Inform the terminal to write the current output buffer as soon as possible.

Returns
void

Definition at line 3684 of file kernel.cpp.

References m_parent.

Referenced by printVersionInfo(), progressBar(), and showMatrixResult().

◆ formatResultOutput() [1/2]

std::string NumeReKernel::formatResultOutput ( const std::vector< std::string > &  vStringResults)
static

This static function is used to format the result output in the terminal for string and numerical results converted to a string vector.

Parameters
vStringResultsconst std::vector<std::string>&
Returns
std::string

Definition at line 2781 of file kernel.cpp.

References _option, getInstance(), Settings::getPrecision(), getSettings(), numberOfNumbersPerLine(), strfill(), TERMINAL_FORMAT_FIELD_LENOFFSET, and truncString().

Here is the call graph for this function:

◆ formatResultOutput() [2/2]

std::string NumeReKernel::formatResultOutput ( int  nNum,
mu::value_type v 
)
static

This static function is used to format the result output in the terminal for numerical-only results.

Parameters
nNumint
vvalue_type*
Returns
std::string

Definition at line 2730 of file kernel.cpp.

References _option, getInstance(), Settings::getPrecision(), getSettings(), numberOfNumbersPerLine(), strfill(), TERMINAL_FORMAT_FIELD_LENOFFSET, and toString().

Referenced by FlowCtrl::calc(), FlowCtrl::compile(), createCalculationAnswer(), NumeRe::StringParser::createTerminalOutput(), and Procedure::ProcCalc().

Here is the call graph for this function:

◆ getAns()

◆ GetAsyncCancelState()

bool NumeReKernel::GetAsyncCancelState ( )
static

This function is used by the kernel to get informed, when the user pressed ESC or used other means of aborting the current calculation process.

Returns
bool

Definition at line 3703 of file kernel.cpp.

References bCancelSignal.

Referenced by FlowCtrl::calc(), FlowCtrl::compile(), FlowCtrl::evalHeader(), FlowCtrl::evalRangeBasedHeader(), executeCommand(), Fitcontroller::fitctrl(), integrate(), integrate2d(), MainLoop(), Procedure::ProcCalc(), and Odesolver::solve().

◆ getAutosaveInterval()

int NumeReKernel::getAutosaveInterval ( ) const
inline

Definition at line 346 of file kernel.hpp.

References _option, and Settings::getAutoSaveInterval().

Referenced by NumeReTerminal::Entry().

Here is the call graph for this function:

◆ getDebugger()

◆ getDefinitions()

◆ getDocIndex()

std::vector< std::string > NumeReKernel::getDocIndex ( )

This member function returns the documentation index as a string vector, which can be used to fill the tree in the documentation browser.

Returns
std::vector<std::string>

Definition at line 2383 of file kernel.cpp.

References _option, and Documentation::getDocIndex().

Referenced by NumeReTerminal::getDocIndex().

Here is the call graph for this function:

◆ getDocumentation()

std::string NumeReKernel::getDocumentation ( const std::string &  sCommand)

This member function returns the documentation for the passed command string as HTML string prepared for the help browser.

Parameters
sCommandconst std::string&
Returns
std::string

Definition at line 2368 of file kernel.cpp.

References _option, and doc_HelpAsHTML().

Referenced by NumeReTerminal::getDocumentation().

Here is the call graph for this function:

◆ getFileSystem()

FileSystem & NumeReKernel::getFileSystem ( )
inline

◆ getFunctionLanguageStrings()

std::map< std::string, std::string > NumeReKernel::getFunctionLanguageStrings ( )

This member function returns a map of language strings for the declared functions, which will be used by the global language object in the editor and the symbols browser.

Returns
std::map<std::string, std::string>

Definition at line 2306 of file kernel.cpp.

References _functions, FunctionDefinitionManager::getComment(), FunctionDefinitionManager::getDefinedFunctions(), FunctionDefinitionManager::getFunctionSignature(), and toUpperCase().

Referenced by NumeReTerminal::getFunctionLanguageStrings().

Here is the call graph for this function:

◆ getGreeting()

std::string NumeReKernel::getGreeting ( )
private

Returns a random greeting string, which may be printed to the terminal later.

Returns
std::string

Definition at line 2110 of file kernel.cpp.

References _option, NumeRe::DataBase::addData(), fileExists(), NumeRe::DataBase::getElement(), NumeRe::DataBase::randomRecord(), NumeRe::DataBase::size(), Settings::useCustomLangFiles(), and FileSystem::ValidFileName().

Referenced by printVersionInfo().

Here is the call graph for this function:

◆ getInstalledPackages()

const std::vector< Package > & NumeReKernel::getInstalledPackages ( ) const

Returns a vector containing the names and the version info of each installed plugin.

Returns
const std::vector<Package>&

Definition at line 2553 of file kernel.cpp.

References _procedure, and PackageManager::getPackages().

Referenced by NumeReTerminal::getInstalledPackages(), and Script::handleInstallInformation().

Here is the call graph for this function:

◆ getInstance()

static NumeReKernel * NumeReKernel::getInstance ( )
inlinestatic

This static member function returns a a pointer to the singleton instance of the kernel.

Returns
NumeReKernel*

Obtaining the pointer to the kernel allows getting references to the main class objects.

Definition at line 221 of file kernel.hpp.

References kernelInstance.

Referenced by analyzePulse(), append_data(), applyFitAlgorithm(), NumeRe::StringFuncHandler::applySpecialStringFuncs(), applySyntaxHighlighting(), NumeRe::StringFuncHandler::argumentParser(), boneDetection(), FlowCtrl::calc(), calculateChiMap(), calculatePercentageAvgAndCreateParserVariables(), calculateSplines(), FunctionDefinitionManager::call(), NumeRe::StringFuncHandler::callFunction(), NumeRe::StringFuncHandler::callFunctionParallel(), NumeRe::StringFuncHandler::callMultiFunction(), NumeRe::StringFuncHandler::callMultiFunctionParallel(), Procedure::catchExceptionForTest(), ProcedureVarFactory::checkArgument(), ProcedureVarFactory::checkArgumentValue(), Assertion::checkAssertion(), cmd_append(), cmd_audio(), cmd_audioread(), cmd_clear(), cmd_close(), cmd_copy(), cmd_credits(), cmd_datagrid(), cmd_define(), cmd_delete(), cmd_diff(), cmd_edit(), cmd_eval(), cmd_execute(), cmd_extrema(), cmd_find(), cmd_fit(), cmd_get(), cmd_help(), cmd_ifndefined(), cmd_install(), cmd_list(), cmd_load(), cmd_matop(), cmd_move(), cmd_new(), cmd_odesolve(), cmd_pack(), cmd_plotting(), cmd_print(), cmd_progress(), cmd_pulse(), cmd_quit(), cmd_read(), cmd_readline(), cmd_redefine(), cmd_regularize(), cmd_reload(), cmd_remove(), cmd_rename(), cmd_resample(), cmd_retouch(), cmd_save(), cmd_seek(), cmd_set(), cmd_show(), cmd_smooth(), cmd_spline(), cmd_start(), cmd_stats(), cmd_stfa(), cmd_swap(), cmd_taylor(), cmd_undefine(), cmd_unpack(), cmd_warn(), cmd_window(), cmd_workpath(), cmd_write(), cmd_zeroes(), FlowCtrl::compile(), Plot::constructDataLegendElement(), containsStringClusters(), ValueColumn::convert(), FunctionDefinition::convertToValues(), CopyData(), MemoryManager::copyTable(), Plot::create2dDrawing(), Plot::create2dPlot(), Plot::create3dDrawing(), createDatagrid(), Documentation::createDocumentationIndex(), createEveryDefinition(), createHist1D(), createHist2D(), DocumentationGenerator::createLaTeXFileName(), ProcedureVarFactory::createLocalClusters(), ProcedureVarFactory::createLocalInlineStrings(), ProcedureVarFactory::createLocalInlineVars(), ProcedureVarFactory::createLocalStrings(), ProcedureVarFactory::createLocalTables(), ProcedureVarFactory::createLocalVars(), createMafVectorName(), DocumentationGenerator::createMainProcedure(), createOutputForHist1D(), createOutputForHist2D(), createPlot(), createPlotForHist1D(), createPlotsForHist2D(), ProcedureVarFactory::createProcedureArguments(), Plot::createStd3dPlot(), Plot::createStdPlot(), NumeRe::StringParser::createStringOutput(), DocumentationGenerator::createStyleFile(), Plot::createSubPlotSet(), NumeRe::WindowManager::createWindow(), DataAccessParser::DataAccessParser(), PackageManager::declareNewPackage(), NumeReDebugger::decodeType(), FunctionDefinitionManager::defineFunc(), deleteCacheEntry(), PackageManager::deletePackage(), Dependencies::Dependencies(), dialogCommand(), differentiate(), doc_ReplaceTokensForHTML(), DocumentationGenerator::DocumentationGenerator(), editObject(), FlowCtrl::eval(), NumeRe::StringParser::eval(), evalDebuggerBreakPoint(), Procedure::evalDebuggerBreakPoint(), NumeRe::StringFuncHandler::evalFunction(), FlowCtrl::evalHeader(), DataAccessParser::evalIndices(), evalPoints(), FlowCtrl::evalRangeBasedHeader(), NumeRe::StringLogicParser::evalStringLogic(), NumeRe::StringLogicParser::evalStringTernary(), evaluateExpression(), evaluateFittingParams(), evaluateNumerical(), evaluateParameterValues(), ProcedureVarFactory::evaluateProcedureArguments(), NumeRe::StringVarFactory::evaluateStringVectors(), Procedure::execute(), CommandLineParser::exprContainsDataObjects(), extractFirstParameterStringValue(), extractRange(), fastFourierTransform(), fastWaveletTransform(), Plot::filename(), findExtrema(), findExtremaInData(), findExtremaInMultiResult(), findZeroes(), findZeroesInData(), findZeroesInMultiResult(), DocumentationGenerator::followBranch(), FlowCtrl::for_loop(), formatNumberToTex(), formatResultOutput(), NumeReDebugger::gatherLoopBasedInformations(), getArgAtPos(), StringVector::getBooleanVectorized(), getDataForFit(), getDataFromObject(), getDataGridDimensions(), Procedure::getErrorInformationForDebugger(), CommandLineParser::getExprAsDataObject(), CommandLineParser::getExprAsFileName(), CommandLineParser::getExprAsMathExpression(), CommandLineParser::getFileParameterValue(), getFittingParameters(), NumeReDebugger::getGlobals(), getIndices(), Procedure::getInlined(), Script::getNextScriptCommandFromScript(), StringVector::getNumericalVectorized(), getParametersFromWindow(), getParameterTable(), PlotData::getParams(), NumeRe::CallTipProvider::getProcedure(), getProcedureFileName(), Dependencies::getProcedureFileName(), getSamplesForDatagrid(), CommandLineParser::getTargetTable(), ValueColumn::getValueAsString(), getVarList(), getWindow(), Script::handleInstallInformation(), handleMafDataAccess(), handleToCmd(), FlowCtrl::if_fork(), Includer::Includer(), ProcedureVarFactory::init(), FileSystem::initializeFromKernel(), integrate(), integrate2d(), integrateSingleDimensionData(), integrationstep_simpson(), integrationstep_trapezoidal(), is_dir(), is_file(), isClusterCandidate(), listDeclaredVariables(), listInstalledPlugins(), moveData(), moveOrCopyFiles(), numberOfNumbersPerLine(), Archive::pack(), parseArg(), DocumentationGenerator::parseDocumentation(), parseEventOpt(), MemoryManager::parseEvery(), CommandLineParser::parseExprAsNumericalValues(), CommandLineParser::parseExprAsString(), parseLayoutScript(), particleSwarmOptimizer(), plotTableBySize(), plugin_histogram(), plugin_random(), plugin_statistics(), DocumentationGenerator::prepareFileNameForLaTeX(), prepareTemplate(), NumeRe::StringFuncHandler::printValue(), Procedure::ProcCalc(), FlowCtrl::range_based_for_loop(), readAudioFile(), readImage(), Interval::refresh(), refreshBoundaries(), refreshFunctionTree(), regularizeDataSet(), removeFile(), replaceDataEntities(), Procedure::replaceReturnVal(), PlotData::reset(), FlowCtrl::reset(), ProcedureVarFactory::reset(), Procedure::resetProcedure(), rotateTable(), saveDataObject(), seekInAudioFile(), setParametersInWindow(), PlotData::setParams(), CommandLineParser::setReturnValue(), StringColumn::setValue(), CategoricalColumn::setValue(), shortTimeFourierAnalysis(), showMatrix(), Odesolver::solve(), solveLGSSymbolic(), sortClusters(), sortData(), sortStrings(), NumeRe::StringParser::storeStringResults(), strfnc_getfileinfo(), strfnc_sha256(), swapTables(), FlowCtrl::switch_fork(), tableMethod_aliasof(), tableMethod_annotate(), tableMethod_anova(), tableMethod_binsof(), tableMethod_categories(), tableMethod_categorize(), tableMethod_convert(), tableMethod_counteq(), tableMethod_cov(), tableMethod_findCols(), tableMethod_index(), tableMethod_pcorr(), tableMethod_rank(), tableMethod_scorr(), tableMethod_typeof(), tableMethod_zscore(), taylor(), FlowCtrl::try_catch(), FunctionDefinitionManager::undefineFunc(), Archive::unpack(), FlowCtrl::updateTestStats(), FlowCtrl::while_loop(), windowCommand(), writeAudioFile(), Script::writeDocumentationArticle(), Script::writeProcedure(), and writeToFile().

◆ getKernelSettings()

Settings NumeReKernel::getKernelSettings ( )

Get the settings available in the Settings class.

Returns
Settings

Definition at line 94 of file kernel.cpp.

References _option.

Referenced by NumeReTerminal::getKernelSettings().

◆ getLastSavedTime()

long long int NumeReKernel::getLastSavedTime ( ) const
inline

Definition at line 350 of file kernel.hpp.

References _memoryManager, and MemoryManager::getLastSaved().

Referenced by NumeReTerminal::Entry().

Here is the call graph for this function:

◆ getline()

void NumeReKernel::getline ( std::string &  sLine)
static

This function is an implementation replacing the std::getline() function.

Parameters
sLinestd::string&
Returns
void

Definition at line 3621 of file kernel.cpp.

References bGettingLine, NumeReTerminal::m_bCommandAvailable, NumeReTerminal::m_kernelCS, m_parent, NumeReTerminal::m_sCommandLine, and StripSpaces().

Referenced by clear_cache(), cmd_readline(), cmd_set(), confirmOperation(), Output::format(), getPathForSetting(), Script::handleInstallInformation(), load_data(), MainLoop(), promptForUserInput(), and removeFile().

Here is the call graph for this function:

◆ getLineFromCommandCache()

bool NumeReKernel::getLineFromCommandCache ( std::string &  sLine,
const std::string &  sCurrentCommand 
)
private

This private member function returns the current command line from the command cache (i.e. the list of commands separated by semicolons).

Parameters
sLinestd::string&
sCurrentCommandconst std::string&
Returns
bool

Definition at line 1336 of file kernel.cpp.

References _procedure, bSupressAnswer, commandQueue, getAllSemiColonSeparatedTokens(), and Procedure::is_writing().

Referenced by MainLoop().

Here is the call graph for this function:

◆ getMemoryManager()

MemoryManager & NumeReKernel::getMemoryManager ( )
inline

Definition at line 263 of file kernel.hpp.

References _memoryManager.

Referenced by append_data(), NumeRe::StringFuncHandler::applySpecialStringFuncs(), NumeRe::StringFuncHandler::argumentParser(), boneDetection(), calculateChiMap(), cmd_append(), cmd_clear(), cmd_define(), cmd_delete(), cmd_edit(), cmd_execute(), cmd_fit(), cmd_get(), cmd_list(), cmd_load(), cmd_matop(), cmd_new(), cmd_odesolve(), cmd_pack(), cmd_plotting(), cmd_quit(), cmd_reload(), cmd_remove(), cmd_rename(), cmd_resample(), cmd_retouch(), cmd_set(), cmd_show(), cmd_smooth(), cmd_stats(), containsStringClusters(), CopyData(), createDatagrid(), createHist1D(), createHist2D(), createMafVectorName(), DataAccessParser::DataAccessParser(), NumeReDebugger::decodeType(), deleteCacheEntry(), dialogCommand(), differentiate(), FlowCtrl::eval(), evalDebuggerBreakPoint(), DataAccessParser::evalIndices(), evalPoints(), evaluateExpression(), evaluateFittingParams(), evaluateNumerical(), evaluateParameterValues(), CommandLineParser::exprContainsDataObjects(), extractFirstParameterStringValue(), extractRange(), fastFourierTransform(), fastWaveletTransform(), findExtrema(), findZeroes(), NumeReDebugger::gatherLoopBasedInformations(), getDataForFit(), getDataFromObject(), getDataGridDimensions(), CommandLineParser::getExprAsMathExpression(), NumeReDebugger::getGlobals(), Procedure::getInlined(), getParametersFromWindow(), getSamplesForDatagrid(), CommandLineParser::getTargetTable(), ProcedureVarFactory::init(), integrate(), integrateSingleDimensionData(), isClusterCandidate(), moveData(), parseArg(), CommandLineParser::parseExprAsNumericalValues(), plugin_histogram(), plugin_random(), plugin_statistics(), readAudioFile(), readImage(), Interval::refresh(), regularizeDataSet(), Procedure::replaceReturnVal(), rotateTable(), saveDataObject(), seekInAudioFile(), setParametersInWindow(), shortTimeFourierAnalysis(), sortClusters(), sortData(), sortStrings(), tableMethod_aliasof(), tableMethod_annotate(), tableMethod_anova(), tableMethod_binsof(), tableMethod_categories(), tableMethod_categorize(), tableMethod_convert(), tableMethod_counteq(), tableMethod_cov(), tableMethod_findCols(), tableMethod_index(), tableMethod_pcorr(), tableMethod_rank(), tableMethod_scorr(), tableMethod_typeof(), tableMethod_zscore(), FlowCtrl::updateTestStats(), and writeAudioFile().

◆ getMenuMap()

std::map< std::string, std::string > NumeReKernel::getMenuMap ( ) const

Returns the menu map used to construct the package menu.

Returns
std::map<std::string, std::string>

Definition at line 2566 of file kernel.cpp.

References _procedure, and PackageManager::getMenuMap().

Referenced by NumeReTerminal::getMenuMap().

Here is the call graph for this function:

◆ getOutput()

◆ getParser()

mu::Parser & NumeReKernel::getParser ( )
inline

Definition at line 281 of file kernel.hpp.

References _parser.

Referenced by NumeRe::StringFuncHandler::applySpecialStringFuncs(), NumeRe::StringFuncHandler::argumentParser(), calculateChiMap(), calculatePercentageAvgAndCreateParserVariables(), Assertion::checkAssertion(), cmd_edit(), cmd_execute(), cmd_fit(), cmd_get(), cmd_list(), cmd_load(), cmd_matop(), cmd_new(), cmd_odesolve(), cmd_plotting(), cmd_reload(), cmd_set(), FunctionDefinition::convertToValues(), createDatagrid(), NumeRe::StringParser::createStringOutput(), DataAccessParser::DataAccessParser(), NumeReDebugger::decodeType(), deleteCacheEntry(), differentiate(), FlowCtrl::eval(), evalDebuggerBreakPoint(), evalPoints(), NumeRe::StringLogicParser::evalStringLogic(), NumeRe::StringLogicParser::evalStringTernary(), evaluateExpression(), evaluateFittingParams(), evaluateNumerical(), evaluateParameterValues(), NumeRe::StringVarFactory::evaluateStringVectors(), extractFirstParameterStringValue(), findExtrema(), findExtremaInData(), findExtremaInMultiResult(), findZeroes(), findZeroesInData(), findZeroesInMultiResult(), StringVector::getBooleanVectorized(), CommandLineParser::getExprAsMathExpression(), getFittingParameters(), NumeReDebugger::getGlobals(), Procedure::getInlined(), StringVector::getNumericalVectorized(), CommandLineParser::getTargetTable(), getWindow(), ProcedureVarFactory::init(), integrate(), integrate2d(), integrationstep_simpson(), integrationstep_trapezoidal(), parseArg(), MemoryManager::parseEvery(), CommandLineParser::parseExprAsNumericalValues(), particleSwarmOptimizer(), plugin_random(), Interval::refresh(), refreshBoundaries(), PlotData::setParams(), CommandLineParser::setReturnValue(), tableMethod_anova(), tableMethod_binsof(), tableMethod_categories(), tableMethod_categorize(), tableMethod_convert(), tableMethod_counteq(), tableMethod_cov(), tableMethod_findCols(), tableMethod_index(), tableMethod_pcorr(), tableMethod_rank(), tableMethod_scorr(), tableMethod_typeof(), tableMethod_zscore(), taylor(), and windowCommand().

◆ getPathSettings()

std::vector< std::string > NumeReKernel::getPathSettings ( ) const

This member function returns a vector containing all currently declared paths in a distinct order.

Returns
std::vector<std::string>

Definition at line 2531 of file kernel.cpp.

References _option, Settings::getExePath(), Settings::getLoadPath(), Settings::getPlotPath(), Settings::getProcPath(), Settings::getSavePath(), Settings::getScriptPath(), and Settings::getWorkPath().

Referenced by DocumentationGenerator::createLaTeXFileName(), DocumentationGenerator::createMainProcedure(), NumeReTerminal::getPathSettings(), and DocumentationGenerator::prepareFileNameForLaTeX().

Here is the call graph for this function:

◆ getPlottingData()

PlotData & NumeReKernel::getPlottingData ( )
inline

◆ getPluginCommands()

std::vector< std::string > NumeReKernel::getPluginCommands ( )

This member function is used by the syntax highlighter to hightlight the plugin commands.

Returns
std::vector<std::string>

Definition at line 2329 of file kernel.cpp.

References _procedure, PackageManager::getPackageCount(), and PackageManager::getPluginCommand().

Referenced by applySyntaxHighlighting(), and NumeReTerminal::OnThreadUpdate().

Here is the call graph for this function:

◆ getPluginLanguageStrings()

std::map< std::string, std::string > NumeReKernel::getPluginLanguageStrings ( )

This member function returns a map of language strings for the installed plugins, which will be used by the global language object in the editor and the symbols browser.

Returns
std::map<std::string, std::string>

Definition at line 2281 of file kernel.cpp.

References _procedure, PackageManager::getPackageCount(), PackageManager::getPackageDescription(), PackageManager::getPluginCommand(), PackageManager::getPluginCommandSignature(), replaceAll(), and toUpperCase().

Referenced by checkInternalStates(), NumeReTerminal::getPluginLanguageStrings(), and StartUp().

Here is the call graph for this function:

◆ getProcedureInterpreter()

◆ getProcedureLibrary()

◆ getScript()

Script & NumeReKernel::getScript ( )
inline

◆ getSettings()

Settings & NumeReKernel::getSettings ( )
inline

Definition at line 296 of file kernel.hpp.

References _option.

Referenced by append_data(), applyFitAlgorithm(), NumeRe::StringFuncHandler::applySpecialStringFuncs(), NumeRe::StringFuncHandler::argumentParser(), calculateChiMap(), calculateSplines(), NumeRe::StringFuncHandler::callFunction(), NumeRe::StringFuncHandler::callFunctionParallel(), NumeRe::StringFuncHandler::callMultiFunction(), NumeRe::StringFuncHandler::callMultiFunctionParallel(), cmd_clear(), cmd_copy(), cmd_datagrid(), cmd_define(), cmd_delete(), cmd_edit(), cmd_execute(), cmd_extrema(), cmd_find(), cmd_fit(), cmd_get(), cmd_help(), cmd_ifndefined(), cmd_list(), cmd_load(), cmd_matop(), cmd_move(), cmd_new(), cmd_odesolve(), cmd_plotting(), cmd_quit(), cmd_read(), cmd_readline(), cmd_redefine(), cmd_regularize(), cmd_remove(), cmd_rename(), cmd_resample(), cmd_retouch(), cmd_save(), cmd_set(), cmd_show(), cmd_smooth(), cmd_spline(), cmd_undefine(), cmd_warn(), cmd_workpath(), cmd_zeroes(), FunctionDefinition::convertToValues(), Documentation::createDocumentationIndex(), createHist2D(), createOutputForHist1D(), createOutputForHist2D(), createPlotForHist1D(), createPlotsForHist2D(), DataAccessParser::DataAccessParser(), deleteCacheEntry(), Dependencies::Dependencies(), differentiate(), FlowCtrl::eval(), NumeRe::StringFuncHandler::evalFunction(), evaluateExpression(), evaluateFittingParams(), evaluateParameterValues(), extractFirstParameterStringValue(), fastFourierTransform(), fastWaveletTransform(), findExtrema(), findZeroes(), formatNumberToTex(), formatResultOutput(), CommandLineParser::getExprAsMathExpression(), getParameterTable(), PlotData::getParams(), NumeRe::CallTipProvider::getProcedure(), CommandLineParser::getTargetTable(), Script::handleInstallInformation(), ProcedureVarFactory::init(), integrate(), integrate2d(), numberOfNumbersPerLine(), Archive::pack(), parseArg(), parseEventOpt(), CommandLineParser::parseExprAsNumericalValues(), plugin_random(), plugin_statistics(), prepareTemplate(), Interval::refresh(), removeFile(), PlotData::reset(), saveDataObject(), solveLGSSymbolic(), tableMethod_anova(), tableMethod_binsof(), tableMethod_counteq(), tableMethod_cov(), tableMethod_index(), tableMethod_pcorr(), tableMethod_rank(), tableMethod_scorr(), tableMethod_zscore(), taylor(), and Script::writeDocumentationArticle().

◆ getStringParser()

NumeRe::StringParser & NumeReKernel::getStringParser ( )
inline

Definition at line 286 of file kernel.hpp.

References _stringParser.

Referenced by FlowCtrl::calc(), cmd_define(), cmd_ifndefined(), cmd_install(), cmd_pack(), cmd_print(), cmd_redefine(), cmd_set(), cmd_stats(), FlowCtrl::compile(), Plot::create2dDrawing(), Plot::create2dPlot(), Plot::create3dDrawing(), ProcedureVarFactory::createLocalClusters(), ProcedureVarFactory::createLocalInlineStrings(), ProcedureVarFactory::createLocalInlineVars(), ProcedureVarFactory::createLocalStrings(), ProcedureVarFactory::createLocalTables(), ProcedureVarFactory::createLocalVars(), Plot::createStd3dPlot(), Plot::createStdPlot(), Plot::createSubPlotSet(), NumeReDebugger::decodeType(), dialogCommand(), evalDebuggerBreakPoint(), FlowCtrl::evalHeader(), FlowCtrl::evalRangeBasedHeader(), evaluateExpression(), evaluateFittingParams(), evaluateParameterValues(), ProcedureVarFactory::evaluateProcedureArguments(), Procedure::execute(), extractFirstParameterStringValue(), Plot::filename(), findExtrema(), findZeroes(), NumeReDebugger::gatherLoopBasedInformations(), getArgAtPos(), CommandLineParser::getExprAsFileName(), CommandLineParser::getFileParameterValue(), NumeReDebugger::getGlobals(), getIndices(), getVarList(), handleMafDataAccess(), handleToCmd(), listDeclaredVariables(), moveOrCopyFiles(), parseArg(), CommandLineParser::parseExprAsNumericalValues(), CommandLineParser::parseExprAsString(), plotTableBySize(), Procedure::ProcCalc(), FlowCtrl::range_based_for_loop(), replaceDataEntities(), Procedure::replaceReturnVal(), FlowCtrl::reset(), ProcedureVarFactory::reset(), saveDataObject(), CommandLineParser::setReturnValue(), tableMethod_aliasof(), tableMethod_annotate(), tableMethod_categorize(), tableMethod_convert(), tableMethod_counteq(), tableMethod_findCols(), tableMethod_index(), tableMethod_rank(), windowCommand(), and writeToFile().

◆ getStringTable()

NumeRe::Container< std::string > NumeReKernel::getStringTable ( const std::string &  sStringTableName)

This member function creates the table container for the string table or the clusters.

Parameters
sStringTableNameconst std::string&
Returns
NumeRe::Container<std::string>

Definition at line 3357 of file kernel.cpp.

References _memoryManager, NumeRe::ClusterManager::getCluster(), NumeRe::Cluster::getDouble(), NumeRe::Cluster::getString(), StringMemory::getStringCols(), StringMemory::getStringElements(), NumeRe::Cluster::getType(), NumeRe::ClusterManager::isCluster(), mu::isnan(), NumeRe::ClusterItem::ITEMTYPE_STRING, StringMemory::readString(), NumeRe::Container< T >::set(), NumeRe::Cluster::size(), and toString().

Referenced by NumeReTerminal::getStringTable().

Here is the call graph for this function:

◆ getTable() [1/2]

NumeRe::Table NumeReKernel::getTable ( )
static

This member function is used by the kernel to be notified when the user finished the table edit process and the table may be updated internally.

Returns
NumeRe::Table

Definition at line 3299 of file kernel.cpp.

References NumeReTerminal::m_bTableEditAvailable, NumeReTerminal::m_bTableEditCanceled, NumeReTerminal::m_kernelCS, m_parent, and table.

Referenced by editObject(), and NumeReTerminal::getTable().

◆ getTable() [2/2]

NumeRe::Table NumeReKernel::getTable ( const std::string &  sTableName)

This member function creates the table container for the selected numerical table.

Parameters
sTableNameconst std::string&
Returns
NumeRe::Table

Definition at line 3335 of file kernel.cpp.

References _memoryManager, MemoryManager::extractTable(), MemoryManager::getCols(), and MemoryManager::isTable().

Here is the call graph for this function:

◆ getVariableList()

◆ getWindowManager()

NumeRe::WindowManager & NumeReKernel::getWindowManager ( )
inline

◆ gotoLine()

void NumeReKernel::gotoLine ( const std::string &  sFile,
unsigned int  nLine = 0 
)
static

This member function handles opening files and jumping to lines as requested by the kernel.

Parameters
sFileconst std::string&
nLineunsigned int
Returns
void

Definition at line 3098 of file kernel.cpp.

References NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NumeReTask::nLine, NUMERE_EDIT_FILE, NUMERE_QUEUED_COMMAND, NumeReTask::sString, taskQueue, and NumeReTask::taskType.

Referenced by editObject(), NumeReDebugger::select(), and NumeReDebugger::showEvent().

◆ handleCommandLineSource()

bool NumeReKernel::handleCommandLineSource ( std::string &  sLine,
std::string &  sKeep 
)
private

This private member function will handle the command line input source and validate it, before the core will evaluate it.

Parameters
sLinestd::string&
sKeepstd::string&
Returns
bool

Definition at line 1261 of file kernel.cpp.

References _script, commandQueue, findCommand(), Script::getNextScriptCommand(), Script::isOpen(), Script::isValid(), StripSpaces(), SyntaxError::UNMATCHED_PARENTHESIS, and validateParenthesisNumber().

Referenced by MainLoop().

Here is the call graph for this function:

◆ handleComposeBlock()

bool NumeReKernel::handleComposeBlock ( std::string &  sLine,
const std::string &  sCurrentCommand,
KernelStatus nReturnVal 
)
private

This private member function will handle the compose block (i.e. store the different commands and return them, once the block is finished).

Parameters
sLinestd::string&
sCurrentCommandconst std::string&
nReturnValKernelStatus&
Returns
bool

Definition at line 1404 of file kernel.cpp.

References _lang, _option, _procedure, _script, commandQueue, findCommand(), findParameter(), Language::get(), getArgAtPos(), FlowCtrl::getCurrentBlock(), FlowCtrl::getCurrentBlockDepth(), Procedure::is_writing(), Script::isOpen(), Script::isValid(), LineBreak(), NUMERE_PENDING_SPECIAL, print(), printPreFmt(), sPlotCompose, Match::sString, and strfill().

Referenced by MainLoop().

Here is the call graph for this function:

◆ handleFlowControls()

bool NumeReKernel::handleFlowControls ( std::string &  sLine,
const std::string &  sCurrentCommand,
KernelStatus nReturnVal 
)
private

This private member function will handle used flow controls.

Parameters
sLinestd::string&
sCurrentCommandconst std::string&
nReturnValKernelStatus&
Returns
bool

Definition at line 1891 of file kernel.cpp.

References _lang, _memoryManager, _option, _procedure, _script, bCancelSignal, bSupressAnswer, checkInternalStates(), commandQueue, Language::get(), FlowCtrl::getCurrentBlock(), FlowCtrl::getCurrentBlockDepth(), Script::getCurrentLine(), PackageManager::getPluginNames(), FlowCtrl::getReturnSignal(), Script::getScriptFileName(), Procedure::is_writing(), FlowCtrl::isFlowCtrlStatement(), Script::isOpen(), Script::isValid(), LineBreak(), NUMERE_DONE_KEYWORD, NUMERE_PENDING_SPECIAL, print(), printPreFmt(), Script::returnCommand(), FlowCtrl::setCommand(), MemoryManager::setPluginCommands(), sPlotCompose, strfill(), toggleTableStatus(), and Script::wasLastCommand().

Referenced by MainLoop().

Here is the call graph for this function:

◆ handleProcedureWrite()

bool NumeReKernel::handleProcedureWrite ( const std::string &  sLine,
const std::string &  sCurrentCommand,
KernelStatus nReturnVal 
)
private

This private member function will handle the writing of procedure lines to the corresponding file.

Parameters
sLineconst std::string&
sCurrentCommandconst std::string&
nReturnValKernelStatus&
Returns
bool

Definition at line 1550 of file kernel.cpp.

References _lang, _option, _procedure, _script, commandQueue, Language::get(), FlowCtrl::getCurrentBlock(), FlowCtrl::getCurrentBlockDepth(), Procedure::is_writing(), Script::isOpen(), Script::isValid(), LineBreak(), NUMERE_PENDING_SPECIAL, print(), printPreFmt(), sPlotCompose, strfill(), and Procedure::writeProcedure().

Referenced by MainLoop().

Here is the call graph for this function:

◆ handleToCmd()

void NumeReKernel::handleToCmd ( std::string &  sLine,
std::string &  sCache,
std::string &  sCurrentCommand 
)
private

This private member function handles the "to_cmd()" function, if it is part of the current command line.

Parameters
sLinestd::string&
sCachestd::string&
sCurrentCommandstd::string&
Returns
void

Definition at line 1657 of file kernel.cpp.

References _procedure, _stringParser, NumeRe::StringParser::evalAndFormat(), findCommand(), FlowCtrl::getCurrentBlockDepth(), getInstance(), getMatchingParenthesis(), getStringParser(), isInQuotes(), NumeRe::StringParser::isStringExpression(), Match::sString, StripSpaces(), and SyntaxError::UNMATCHED_PARENTHESIS.

Referenced by MainLoop().

Here is the call graph for this function:

◆ initializeStackTracker()

void NumeReKernel::initializeStackTracker ( )

Starts the stack tracker, which will prevent stack overflows.

Returns
void

Definition at line 546 of file kernel.cpp.

References baseStackPosition, DetachedLogger::debug(), g_logger, and toHexString().

Referenced by NumeReTerminal::Entry().

Here is the call graph for this function:

◆ installationDone()

void NumeReKernel::installationDone ( )
static

◆ issueWarning()

void NumeReKernel::issueWarning ( std::string  sWarningMessage)
static

This static function may be used to issue a warning to the user. The warning will be printed by the terminal in a separate colour.

Parameters
sWarningMessagestd::string
Returns
void

Definition at line 2833 of file kernel.cpp.

References _lang, g_logger, Language::get(), KERNEL_PRINT_SLEEP, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NumeReTerminal::m_sAnswer, NUMERE_ANSWER_READ, NUMERE_ISSUE_WARNING, NUMERE_STATUSBAR_UPDATE, replaceAll(), and DetachedLogger::warning().

Referenced by calculateChiMap(), calculateSplines(), FileSystem::cleanPath(), cmd_define(), cmd_ifndefined(), cmd_redefine(), cmd_retouch(), cmd_warn(), differentiate(), ProcedureVarFactory::evaluateProcedureArguments(), fitDataSet(), Memory::importTable(), Includer::openIncludedFile(), NumeRe::NumeReDataFile::readHeader(), NumeRe::JcampDX::readTable(), rotateTable(), solveLGSSymbolic(), strfnc_getkeyval(), taylor(), and undefineFunctions().

Here is the call graph for this function:

◆ MainLoop()

NumeReKernel::KernelStatus NumeReKernel::MainLoop ( const std::string &  sCommand)

This is the main loop for the core of NumeRe.

Parameters
sCommandconst std::string&
Returns
NumeReKernel::KernelStatus

This function is called by the terminal to process the desired operations using the core of this application. It features an inner loop, which will process a whole script or a semicolon-separated list of commands automatically.

Definition at line 600 of file kernel.cpp.

References _assertionHandler, _functions, _lang, _memoryManager, _option, _parser, _procedure, _script, _stringParser, NumeRe::Cluster::assignResults(), bCancelSignal, bSupressAnswer, FunctionDefinitionManager::call(), Assertion::checkAssertion(), checkInternalStates(), mu::ParserBase::ClearVectorVars(), Script::close(), DetachedLogger::cmdline(), Indices::col, COMMAND_HAS_RETURNVALUE, COMMAND_PROCESSED, commandHandler(), commandQueue, MemoryManager::containsTablesOrClusters(), createCalculationAnswer(), DEBUGGER_LEAVE, DEBUGGER_STEP, Assertion::enable(), Settings::enableSystemPrints(), DetachedLogger::error(), mu::ParserBase::Eval(), evalDebuggerBreakPoint(), evalRecursiveExpressions(), evaluateProcedureCalls(), evaluateStrings(), executePlugins(), findCommand(), SyntaxError::FUNCTION_ERROR, g_logger, Language::get(), GetAsyncCancelState(), NumeRe::ClusterManager::getCluster(), FlowCtrl::getCurrentBlockDepth(), Script::getCurrentLine(), getDataElements(), Procedure::getDebuggerCode(), mu::ParserError::GetExpr(), getIndices(), Language::getKey(), getline(), getLineFromCommandCache(), mu::ParserError::GetMsg(), FileSystem::getPath(), PackageManager::getPluginNames(), mu::ParserError::GetPos(), Settings::getProcPath(), FileSystem::getProgramPath(), MemoryManager::getSaveStatus(), Script::getScriptFileName(), Settings::getSetting(), mu::ParserError::GetToken(), handleCommandLineSource(), handleComposeBlock(), handleFlowControls(), handleProcedureWrite(), handleToCmd(), SyntaxError::INVALID_INDEX, SyntaxError::invalid_position, Procedure::is_writing(), mu::ParserBase::IsAlreadyParsed(), isClusterCandidate(), FlowCtrl::isFlowCtrlStatement(), Script::isOpen(), VectorIndex::isOpenEnd(), NumeRe::StringParser::isStringExpression(), Script::isValid(), isValidIndexSet(), LineBreak(), SyntaxError::LOOP_THROW, m_parent, make_hline(), maskProcedureSigns(), mu::ParserBase::mVarMapPntr, nLastLineLength, nLastStatusVal, NO_COMMAND, SyntaxError::NO_MATRIX, NUMERE_DONE, NUMERE_DONE_KEYWORD, NUMERE_ERROR, NUMERE_PENDING, NUMERE_QUIT, pointToError(), print(), printPreFmt(), SyntaxError::PROCEDURE_THROW, SyntaxError::PROCESS_ABORTED_BY_USER, promptForUserInput(), refreshTree, MemoryManager::removeTablesFromMemory(), NumeRe::ClusterManager::removeTemporaryClusters(), NumeRe::StringVarFactory::removeTempStringVectorVars(), Assertion::reset(), resetAfterError(), Assertion::resetStats(), Indices::row, MemoryManager::saveToCacheFile(), sCommandLine, sendErrorNotification(), mu::ParserBase::SetExpr(), FileSystem::setPath(), MemoryManager::setPluginCommands(), SETTING_S_PROCPATH, Match::sString, SettingsValue::stringval(), StripSpaces(), sVersion, VectorIndex::to_string(), toString(), toSystemCodePage(), toUpperCase(), uninstallPlugin(), Settings::useDebugger(), Settings::useEscInScripts(), DetachedLogger::warning(), Script::wasLastCommand(), MemoryManager::writeToTable(), and Language::YES().

Referenced by NumeReTerminal::Entry().

◆ maskProcedureSigns()

std::string NumeReKernel::maskProcedureSigns ( std::string  sLine)
private

This member function masks the dollar signs in the strings to avoid that the line breaking functions uses them as aliases for line breaks.

Parameters
sLinestd::string
Returns
std::string

Definition at line 2613 of file kernel.cpp.

Referenced by MainLoop().

◆ numberOfNumbersPerLine()

int NumeReKernel::numberOfNumbersPerLine ( )
static

This member function returns the count of numbers fitting into a single terminal line depending on its line length.

Returns
int

Definition at line 2897 of file kernel.cpp.

References getInstance(), Settings::getPrecision(), getSettings(), getWindow(), and TERMINAL_FORMAT_FIELD_LENOFFSET.

Referenced by formatResultOutput().

Here is the call graph for this function:

◆ print()

void NumeReKernel::print ( const std::string &  __sLine,
bool  printingEnabled = true 
)
static

This member function appends the passed string as a new output line to the buffer and informs the terminal that we have a new string to print.

Parameters
__sLineconst std::string&
printingEnabledbool
Returns
void

Definition at line 2636 of file kernel.cpp.

References bErrorNotification, bWritingTable, KERNEL_PRINT_SLEEP, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NumeReTerminal::m_sAnswer, NUMERE_ANSWER_READ, NUMERE_PRINTLINE, and NUMERE_STATUSBAR_UPDATE.

Referenced by mu::ParserBase::ActivateLoopMode(), MemoryManager::addTable(), analyzePulse(), append_data(), mu::ParserByteCode::AsciiDump(), boneDetection(), FlowCtrl::calc(), calculateChiMap(), calculateSplines(), clear_cache(), cmd_audio(), cmd_audioread(), cmd_clear(), cmd_copy(), cmd_credits(), cmd_datagrid(), cmd_define(), cmd_delete(), cmd_find(), cmd_get(), cmd_ifndefined(), cmd_load(), cmd_move(), cmd_plotting(), cmd_redefine(), cmd_regularize(), cmd_remove(), cmd_rename(), cmd_resample(), cmd_retouch(), cmd_seek(), cmd_set(), cmd_smooth(), cmd_stfa(), cmd_workpath(), FlowCtrl::compile(), confirmOperation(), createOutputForHist1D(), createOutputForHist2D(), mu::ParserBase::CreateRPN(), createStatsOutput(), mu::ParserBase::DeactivateLoopMode(), doc_Help(), doc_SearchFct(), mu::ParserBase::Eval(), Script::evaluateInstallInformation(), evaluateStrings(), fitDataSet(), Output::format(), mu::ParserBase::GetExpr(), Script::getNextScriptCommandFromScript(), getPathForSetting(), handleComposeBlock(), handleFlowControls(), Script::handleInstallInformation(), handleProcedureWrite(), listCommands(), listConstants(), listDeclaredVariables(), listDefinitions(), listFiles(), listFunctions(), listInstalledPlugins(), listLogicalOperators(), listUnitConversions(), FunctionDefinitionManager::load(), load_data(), MainLoop(), make_stringmatrix(), newObject(), mu::ParserBase::PauseLoopMode(), plugin_random(), printVersionInfo(), Procedure::ProcCalc(), removeFile(), resetAfterError(), Script::returnCommand(), rotateTable(), Settings::save(), saveData(), saveDataObject(), FlowCtrl::setCommand(), show_data(), showMatrixResult(), solveLGS(), solveLGSSymbolic(), mu::ParserBase::StackDump(), Timer::Stop(), swapTables(), taylor(), undefineFunctions(), uninstallPlugin(), and Script::writeProcedure().

◆ printPreFmt()

void NumeReKernel::printPreFmt ( const std::string &  __sLine,
bool  printingEnabled = true 
)
static

This member function appends the pre- formatted string to the buffer and informs the terminal that we have a new string to print.

Parameters
__sLineconst std::string&
printingEnabledbool
Returns
void

Definition at line 2683 of file kernel.cpp.

References bErrorNotification, bWritingTable, KERNEL_PRINT_SLEEP, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NumeReTerminal::m_sAnswer, NUMERE_ANSWER_READ, NUMERE_PRINTLINE_PREFMT, and NUMERE_STATUSBAR_UPDATE.

Referenced by analyzePulse(), applyFitAlgorithm(), mu::ParserByteCode::AsciiDump(), autoSave(), FlowCtrl::calc(), calculateChiMap(), clear_cache(), cmd_append(), cmd_credits(), cmd_readline(), cmd_set(), FlowCtrl::compile(), confirmOperation(), createPlotForHist1D(), Plot::createPlotOrAnimation(), createPlotsForHist2D(), Plot::createSubPlotSet(), createTeXExport(), Plot::displayMessage(), displaySplash(), doc_SearchFct(), editObject(), NumeReTerminal::Entry(), FlowCtrl::eval(), NumeRe::StringParser::evalAndFormat(), FlowCtrl::evalForkFlowCommands(), FlowCtrl::evalHeader(), FlowCtrl::evalRangeBasedHeader(), executeCommand(), fastFourierTransform(), fastWaveletTransform(), fitDataSet(), FlowCtrl::for_loop(), Output::format(), getPathForSetting(), handleComposeBlock(), handleFlowControls(), Script::handleInstallInformation(), handleProcedureWrite(), integrate(), integrate2d(), listCommands(), listConstants(), listDeclaredVariables(), listDefinitions(), listDirectory(), listFiles(), listFunctions(), listLogicalOperators(), listUnitConversions(), FunctionDefinitionManager::load(), Settings::load(), load_data(), MainLoop(), make_hline(), Plot::Plot(), plotTableBySize(), Output::print(), printUnits(), printVersionInfo(), progressBar(), promptForUserInput(), FlowCtrl::range_based_for_loop(), removeFile(), FunctionDefinitionManager::save(), showMatrixResult(), Odesolver::solve(), mu::ParserBase::StackDump(), and FlowCtrl::while_loop().

◆ printResult()

void NumeReKernel::printResult ( const std::string &  sLine,
bool  bScriptRunning 
)
private

This member function appends the formatted string to the buffer and informs the terminal that we have a new string to print.

Parameters
sLineconst std::string&
bScriptRunningbool
Returns
void

Definition at line 2582 of file kernel.cpp.

References bSupressAnswer, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NumeReTerminal::m_sAnswer, NUMERE_ANSWER_READ, NUMERE_CALC_UPDATE, and NUMERE_STATUSBAR_UPDATE.

Referenced by createCalculationAnswer().

◆ printVersionInfo()

void NumeReKernel::printVersionInfo ( )

This member function prints the version headline and the version information to the console.

Returns
void

Definition at line 563 of file kernel.cpp.

References _lang, _option, bWritingTable, AutoVersion::DATE, displaySplash(), fileExists(), flush(), Language::get(), Settings::getExePath(), getGreeting(), LineBreak(), make_hline(), AutoVersion::MONTH, print(), printPreFmt(), Settings::showGreeting(), strfill(), sVersion, toSystemCodePage(), and AutoVersion::YEAR.

Referenced by NumeReTerminal::clearTerminal(), and NumeReTerminal::Entry().

Here is the call graph for this function:

◆ progressBar()

void NumeReKernel::progressBar ( int  nStep,
int  nFirstStep,
int  nFinalStep,
const std::string &  sType 
)
static

This function displays a progress bar constructed from characters in the terminal.

Parameters
nStepint
nFirstStepint
nFinalStepint
sTypeconst std::string&
Returns
void

Definition at line 2950 of file kernel.cpp.

References _lang, date::abs(), drawBar(), flush(), Language::get(), intCast(), nLastLineLength, nLastStatusVal, printPreFmt(), strfill(), toggleTableStatus(), and toString().

Referenced by make_progressBar().

Here is the call graph for this function:

◆ ReadAnswer()

std::string NumeReKernel::ReadAnswer ( )

This member function is a simple wrapper to read the kernel answer and reset it automatically.

Returns
std::string

Definition at line 2251 of file kernel.cpp.

References sAnswer.

◆ ReadOpenFileFlag()

int NumeReKernel::ReadOpenFileFlag ( )

This member function returns the mode, how a file shall be opened in the editor, when called by the kernel-.

Returns
int

Definition at line 2351 of file kernel.cpp.

References nOpenFileFlag.

Referenced by NumeReTerminal::OnThreadUpdate().

◆ refreshFunctionTree()

void NumeReKernel::refreshFunctionTree ( )

This member function informs the GUI to reload the contents of the function tree as soon as possible.

Returns
void

Definition at line 3573 of file kernel.cpp.

References DetachedLogger::debug(), g_logger, getInstance(), and refreshTree.

Referenced by PackageManager::declareNewPackage(), FunctionDefinitionManager::defineFunc(), PackageManager::deletePackage(), and FunctionDefinitionManager::undefineFunc().

Here is the call graph for this function:

◆ resetAfterError()

void NumeReKernel::resetAfterError ( )
private

This private member function will reset the kernel variables after an error had been handled.

Returns
void

Definition at line 2076 of file kernel.cpp.

References _debugger, _lang, _option, _parser, _pData, _procedure, _script, _stringParser, bCancelSignal, Script::close(), commandQueue, mu::ParserBase::DeactivateLoopMode(), NumeReDebugger::finalize(), Language::get(), Script::getCurrentLine(), Script::isOpen(), Script::isValid(), LineBreak(), print(), NumeRe::StringVarFactory::removeTempStringVectorVars(), FlowCtrl::reset(), sCommandLine, PlotData::setFileName(), and toString().

Referenced by MainLoop().

Here is the call graph for this function:

◆ saveData()

void NumeReKernel::saveData ( )

This member function performs the autosaving of tables at application shutdown.

Returns
void

Definition at line 2187 of file kernel.cpp.

References _lang, _memoryManager, _option, g_logger, Language::get(), MemoryManager::getSaveStatus(), DetachedLogger::info(), LineBreak(), print(), and MemoryManager::saveToCacheFile().

Referenced by CloseSession().

Here is the call graph for this function:

◆ sendErrorNotification()

void NumeReKernel::sendErrorNotification ( )

This member function is used to toggle the error notification status. The error notification is used to style text as error messages.

Returns
void

Definition at line 2916 of file kernel.cpp.

References bErrorNotification.

Referenced by MainLoop().

◆ setAns()

void NumeReKernel::setAns ( NumeRe::Cluster ans)
inline

Definition at line 276 of file kernel.hpp.

References _ans.

Referenced by cmd_clear().

◆ setDocumentation()

void NumeReKernel::setDocumentation ( const std::string &  _sDocumentation)
static

This member function handles the display of a documentation window as requested by the kernel.

Parameters
_sDocumentationconst std::string&
Returns
void

Definition at line 3130 of file kernel.cpp.

References NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NUMERE_OPEN_DOC, NUMERE_QUEUED_COMMAND, NumeReTask::sString, taskQueue, and NumeReTask::taskType.

Referenced by doc_Help().

◆ setKernelSettings()

void NumeReKernel::setKernelSettings ( const Settings _settings)

Update the internal settings.

Parameters
_settingsconst Settings&
Returns
void

Definition at line 107 of file kernel.cpp.

References _debugger, _option, Settings::copySettings(), NumeReDebugger::setActive(), and Settings::useDebugger().

Referenced by NumeReTerminal::setKernelSettings().

Here is the call graph for this function:

◆ SettingsModified()

bool NumeReKernel::SettingsModified ( )

Returns true, if the user changed any internal settings using the set command.

Returns
bool

Definition at line 2515 of file kernel.cpp.

References modifiedSettings.

Referenced by NumeReTerminal::OnThreadUpdate().

◆ showDebugEvent()

void NumeReKernel::showDebugEvent ( const std::string &  sTitle,
const std::vector< std::string > &  vStacktrace 
)
static

This member function passes the debugging information to the GUI to be displayed in the debugger window.

Parameters
sTitleconst std::string&
vStacktraceconst std::vector<std::string>&
Returns
void

Definition at line 3405 of file kernel.cpp.

References DetachedLogger::debug(), g_logger, NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, NumeReTerminal::m_nDebuggerCode, m_parent, NUMERE_DEBUG_EVENT, NUMERE_QUEUED_COMMAND, taskQueue, NumeReTask::taskType, and NumeReTask::vDebugEvent.

Referenced by NumeReDebugger::showEvent().

Here is the call graph for this function:

◆ showStringTable()

void NumeReKernel::showStringTable ( NumeRe::Container< std::string >  _stringtable,
std::string  __name,
bool  openeditable = false 
)
static

This member function passes a string table to the GUI to be displayed in the table viewer.

Parameters
_stringtableNumeRe::Container<std::string>
__namestd::string
openeditablebool
Returns
void

Definition at line 3230 of file kernel.cpp.

References NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NUMERE_EDIT_TABLE, NUMERE_QUEUED_COMMAND, NUMERE_SHOW_STRING_TABLE, NumeReTask::sString, NumeReTask::stringTable, taskQueue, and NumeReTask::taskType.

Referenced by cmd_show().

◆ showTable()

void NumeReKernel::showTable ( NumeRe::Table  _table,
std::string  __name,
bool  openeditable = false 
)
static

This member function passes a table to the GUI to be displayed in the table viewer. It also allows to create a table editor window.

Parameters
_tableNumeRe::Table
__namestd::string
openeditablebool
Returns
void

Definition at line 3191 of file kernel.cpp.

References NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NUMERE_EDIT_TABLE, NUMERE_QUEUED_COMMAND, NUMERE_SHOW_TABLE, NumeReTask::sString, NumeReTask::table, taskQueue, and NumeReTask::taskType.

Referenced by editObject(), and show_data().

◆ showWindow()

void NumeReKernel::showWindow ( const NumeRe::Window window)

This member function passes a window object to the user interface, which will then converted into a real window.

Parameters
windowconst NumeRe::Window&
Returns
void

Definition at line 3267 of file kernel.cpp.

References NumeReTerminal::m_kernelCS, NumeReTerminal::m_KernelStatus, m_parent, NUMERE_QUEUED_COMMAND, NUMERE_SHOW_WINDOW, taskQueue, NumeReTask::taskType, and NumeReTask::window.

Referenced by NumeRe::WindowManager::createWindow().

◆ StartUp()

void NumeReKernel::StartUp ( NumeReTerminal _parent,
const std::string &  __sPath,
const std::string &  sPredefinedFunctions 
)

This is the kernel "booting" function.

Parameters
_parentwxTerm*
__sPathconst std::string&
sPredefinedFunctionsconst std::string&
Returns
void

This function sets all parameters, functions and constants used for the numerical parser. loads possible available autosaves and definition files for functions and plugins.

Definition at line 144 of file kernel.cpp.

References _defVars, _fontData, _fSys, _functions, _lang, _memoryManager, _option, _out, _parser, _pData, _procedure, _script, Language::addToLanguage(), Settings::controlDefinitions(), Documentation::createDocumentationIndex(), FileSystem::createRevisionsFolder(), NumeRe::ClusterManager::dClusterElementsCount, DetachedLogger::debug(), defineConst(), defineFunctions(), defineOperators(), mu::ParserBase::DefineVar(), fileExists(), g_logger, Settings::getDefaultPlotFont(), Settings::getExePath(), Settings::getLoadPath(), Settings::getPlotPath(), PackageManager::getPluginInfoPath(), getPluginLanguageStrings(), PackageManager::getPluginNames(), FunctionDefinitionManager::getPredefinedFuncs(), Settings::getProcPath(), Settings::getSavePath(), Settings::getScriptPath(), Settings::getSetting(), getTimeStamp(), Settings::getTokenPaths(), Settings::getWindow(), DetachedLogger::info(), FunctionDefinitionManager::load(), Settings::load(), Settings::loadEmptyCols(), MemoryManager::loadFromCacheFile(), PackageManager::loadPlugins(), Language::loadStrings(), Logger::LVL_DISABLED, mu::ParserBase::m_lDataStorage, m_parent, NumeRe::ClusterManager::newCluster(), nLINE_LENGTH, DetachedLogger::open(), parser_AddVariable(), reduceLogFilesize(), refreshTree, NumeRe::FileAdapter::setbLoadEmptyCols(), NumeRe::Cluster::setDouble(), DetachedLogger::setLoggingLevel(), FileSystem::setPath(), MemoryManager::setPluginCommands(), MemoryManager::setPredefinedFuncs(), FunctionDefinitionManager::setPredefinedFuncs(), Procedure::setPredefinedFuncs(), Script::setPredefinedFuncs(), NumeRe::FileAdapter::setSavePath(), SETTING_S_EXEPATH, FileSystem::setTokens(), mu::ParserBase::SetVarFactory(), DefaultVariables::sName, SettingsValue::stringval(), MemoryManager::tableColumnsCount, MemoryManager::tableLinesCount, Settings::useCustomLangFiles(), Settings::useLogFile(), vAns, and DefaultVariables::vValue.

◆ toggleTableStatus()

◆ uninstallPlugin()

bool NumeReKernel::uninstallPlugin ( const std::string &  sLine,
const std::string &  sCurrentCommand 
)
private

This private member function uninstalls a previously installed plugin.

Parameters
sLineconst std::string&
sCurrentCommandconst std::string&
Returns
bool

Definition at line 1609 of file kernel.cpp.

References _lang, _option, _procedure, PackageManager::deletePackage(), findCommand(), fromSystemCodePage(), Language::get(), getArgAtPos(), getNextArgument(), installationDone(), LineBreak(), print(), and Documentation::removeFromDocIndex().

Referenced by MainLoop().

Here is the call graph for this function:

◆ updateLineLenght()

void NumeReKernel::updateLineLenght ( int  nLength)

This member function is used to update the internal terminal line length information after the terminal had been resized.

Parameters
nLengthint
Returns
void

Definition at line 2169 of file kernel.cpp.

References _option, DetachedLogger::debug(), g_logger, Settings::getSetting(), nLINE_LENGTH, SETTING_V_WINDOW_X, and SettingsValue::value().

Referenced by NumeReTerminal::UpdateSize().

Here is the call graph for this function:

◆ waitForContinue()

int NumeReKernel::waitForContinue ( )
static

This static function waits until the user sends a continuation command via the debugger and returns the corresponding debugger code.

Returns
int

Definition at line 3440 of file kernel.cpp.

References DetachedLogger::debug(), DEBUGGER_CONTINUE, g_logger, NumeReTerminal::m_kernelCS, NumeReTerminal::m_nDebuggerCode, and m_parent.

Referenced by NumeReDebugger::showEvent().

Here is the call graph for this function:

Member Data Documentation

◆ _ans

NumeRe::Cluster* NumeReKernel::_ans
private

Definition at line 159 of file kernel.hpp.

Referenced by getAns(), NumeReKernel(), and setAns().

◆ _debugger

NumeReDebugger NumeReKernel::_debugger
private

◆ _fSys

FileSystem NumeReKernel::_fSys
private

Definition at line 147 of file kernel.hpp.

Referenced by getFileSystem(), and StartUp().

◆ _functions

◆ _manager

NumeRe::WindowManager NumeReKernel::_manager
private

Definition at line 158 of file kernel.hpp.

Referenced by getWindowManager().

◆ _memoryManager

◆ _option

◆ _out

Output NumeReKernel::_out
private

Definition at line 149 of file kernel.hpp.

Referenced by CloseSession(), evaluateProcedureCalls(), executePlugins(), getOutput(), and StartUp().

◆ _parser

◆ _pData

PlotData NumeReKernel::_pData
private

◆ _procedure

◆ _script

◆ _stringParser

NumeRe::StringParser NumeReKernel::_stringParser
private

◆ baseStackPosition

int * NumeReKernel::baseStackPosition = nullptr
static

Definition at line 188 of file kernel.hpp.

Referenced by Procedure::execute(), and initializeStackTracker().

◆ bCancelSignal

bool NumeReKernel::bCancelSignal = false
static

◆ bErrorNotification

bool NumeReKernel::bErrorNotification = false
static

Definition at line 201 of file kernel.hpp.

Referenced by print(), printPreFmt(), and sendErrorNotification().

◆ bGettingLine

bool NumeReKernel::bGettingLine = false
static

Definition at line 200 of file kernel.hpp.

Referenced by getline(), and NumeReTerminal::pipe_command().

◆ bSupressAnswer

◆ bWritingTable

bool NumeReKernel::bWritingTable = false
static

Definition at line 192 of file kernel.hpp.

Referenced by print(), printPreFmt(), printVersionInfo(), and toggleTableStatus().

◆ commandQueue

std::queue<std::string> NumeReKernel::commandQueue
private

◆ kernelInstance

NumeReKernel * NumeReKernel::kernelInstance = nullptr
staticprivate

Definition at line 144 of file kernel.hpp.

Referenced by getInstance(), NumeReKernel(), and ~NumeReKernel().

◆ m_parent

◆ modifiedSettings

bool NumeReKernel::modifiedSettings = false
static

Definition at line 197 of file kernel.hpp.

Referenced by cmd_set(), and SettingsModified().

◆ nLastLineLength

unsigned int NumeReKernel::nLastLineLength = 0
static

Definition at line 196 of file kernel.hpp.

Referenced by MainLoop(), and progressBar().

◆ nLastStatusVal

int NumeReKernel::nLastStatusVal = -1
static

Definition at line 195 of file kernel.hpp.

Referenced by MainLoop(), and progressBar().

◆ nLINE_LENGTH

int NumeReKernel::nLINE_LENGTH = 80
static

Definition at line 191 of file kernel.hpp.

Referenced by make_hline(), sectionHeadline(), StartUp(), and updateLineLenght().

◆ nOpenFileFlag

int NumeReKernel::nOpenFileFlag = 0
static

Definition at line 194 of file kernel.hpp.

Referenced by editObject(), and ReadOpenFileFlag().

◆ ProcLibrary

◆ refreshTree

bool NumeReKernel::refreshTree
private

Definition at line 142 of file kernel.hpp.

Referenced by checkInternalStates(), MainLoop(), refreshFunctionTree(), and StartUp().

◆ sAnswer

std::string NumeReKernel::sAnswer
private

Definition at line 139 of file kernel.hpp.

Referenced by CloseSession(), NumeReKernel(), and ReadAnswer().

◆ sCommandLine

std::string NumeReKernel::sCommandLine
private

Definition at line 138 of file kernel.hpp.

Referenced by CloseSession(), evaluateStrings(), MainLoop(), NumeReKernel(), and resetAfterError().

◆ sPlotCompose

std::string NumeReKernel::sPlotCompose
private

◆ table

NumeRe::Table NumeReKernel::table
static

Definition at line 198 of file kernel.hpp.

Referenced by getTable(), and NumeReTerminal::passEditedTable().

◆ taskQueue


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