NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
kernel.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2017 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19
20
21#include <string>
22#include <fstream>
23#include <queue>
24
25// --> LOKALE HEADER <--
26#include "windowmanager.hpp"
27
28#include "core/built-in.hpp"
29#include "core/plugins.hpp"
30#include "core/script.hpp"
31#include "core/settings.hpp"
32#include "core/version.h"
33
36
38
39#include "core/io/output.hpp"
40
41#include "core/maths/define.hpp"
44
46
49
52
54
55#include "core/ui/error.hpp"
56#include "core/ui/language.hpp"
57
58#include "core/utils/tools.hpp"
59
60
61#ifndef KERNEL_HPP
62#define KERNEL_HPP
63
64// Forward declarations of the terminal class and
65// the task container used for communicating between
66// the kernel and the GUI
67class NumeReTerminal;
68struct NumeReTask;
69
70
80{
81 std::vector<std::string> vVariables;
82 size_t nNumerics;
83 size_t nStrings;
84 size_t nTables;
85 size_t nClusters;
86};
87
88
97{
98 public:
99 // return values indicating status
100 // pre-declared for the private member functions
102 {
127 };
128
130 {
135 };
136
137 private:
138 std::string sCommandLine;
139 std::string sAnswer;
140 std::string sPlotCompose;
141 std::queue<std::string> commandQueue;
143
145
146 //datasets
160
161 // private member functions for special tasks
162 void printResult(const std::string& sLine, bool bScriptRunning);
163 std::string maskProcedureSigns(std::string sLine);
164 bool handleCommandLineSource(std::string& sLine, std::string& sKeep);
165 bool getLineFromCommandCache(std::string& sLine, const std::string& sCurrentCommand);
166 bool handleComposeBlock(std::string& sLine, const std::string& sCurrentCommand, KernelStatus& nReturnVal);
167 bool handleProcedureWrite(const std::string& sLine, const std::string& sCurrentCommand, KernelStatus& nReturnVal);
168 bool uninstallPlugin(const std::string& sLine, const std::string& sCurrentCommand);
169 void handleToCmd(std::string& sLine, std::string& sCache, std::string& sCurrentCommand);
170 bool evaluateProcedureCalls(std::string& sLine);
171 bool executePlugins(std::string& sLine);
172 bool handleFlowControls(std::string& sLine, const std::string& sCurrentCommand, KernelStatus& nReturnVal);
173 bool evaluateStrings(std::string& sLine, std::string& sCache, bool& bWriteToCache, KernelStatus& nReturnVal);
174 void createCalculationAnswer(int nNum, mu::value_type* v);
175 void resetAfterError();
176 std::string getGreeting();
177 void checkInternalStates();
178
179 // Functions for initializing the numerical parser
180 void defineOperators();
181 void defineConst();
182 void defineFunctions();
183
184 public:
185 // Static public class members
186 // Used for controlling the programm flow, to update the internal
187 // state and to communicate with the graphical layer
188 static int* baseStackPosition;
190 static std::queue<NumeReTask> taskQueue;
191 static int nLINE_LENGTH;
192 static bool bWritingTable;
193 static bool bCancelSignal;
194 static int nOpenFileFlag;
195 static int nLastStatusVal;
196 static unsigned int nLastLineLength;
197 static bool modifiedSettings;
199 static bool bSupressAnswer;
200 static bool bGettingLine;
203
204 // Constructor and Destructor
205 NumeReKernel();
207
208 // Static member functions
209 // can be called from everywhere without an explicit instance of the kernel
210 // These functions are the interface for communication with the GUI
222 {
223 return kernelInstance;
224 }
225
226 static void toggleTableStatus();
227 static void flush();
228 static void print(const std::string& __sLine, bool printingEnabled = true);
229 static void printPreFmt(const std::string& __sLine, bool printingEnabled = true);
230 static std::string formatResultOutput(int nNum, mu::value_type* v);
231 static std::string formatResultOutput(const std::vector<std::string>& vStringResults);
232 static void issueWarning(std::string sWarningMessage);
233 static void failMessage(std::string sFailMessage);
234 static int numberOfNumbersPerLine();
235 static void progressBar(int nStep, int nFirstStep, int nFinalStep, const std::string& sType);
236 static void getline(std::string& sLine);
237 static void gotoLine(const std::string& sFile, unsigned int nLine = 0);
238 static void setDocumentation(const std::string& _sDocumentation);
239 static void installationDone();
240 static bool GetAsyncCancelState();
241 static void showTable(NumeRe::Table _table, std::string __name, bool openeditable = false);
242 static void showStringTable(NumeRe::Container<std::string> _stringtable, std::string __name, bool openeditable = false);
243 void showWindow(const NumeRe::Window& window);
244 static NumeRe::Table getTable();
245 NumeRe::Table getTable(const std::string& sTableName);
246 NumeRe::Container<std::string> getStringTable(const std::string& sStringTableName);
247 static void showDebugEvent(const std::string& sTitle, const std::vector<std::string>& vStacktrace);
248 static int waitForContinue();
249 static int evalDebuggerBreakPoint(const std::string& sCurrentCommand = "");
250 static void clcTerminal();
251 void refreshFunctionTree();
252 void closeWindows(int type);
253
254 // Public member functions
255 // Main loop function
256 KernelStatus MainLoop(const std::string& sCommand);
257
259 {
260 return _fSys;
261 }
262
264 {
265 return _memoryManager;
266 }
267
269 {
270 if (!_ans)
272
273 return *_ans;
274 }
275
277 {
278 _ans = ans;
279 }
280
282 {
283 return _parser;
284 }
285
287 {
288 return _stringParser;
289 }
290
292 {
293 return _functions;
294 }
295
297 {
298 return _option;
299 }
300
302 {
303 return _pData;
304 }
305
307 {
308 return _out;
309 }
310
312 {
313 return _script;
314 }
315
317 {
318 return _procedure;
319 }
320
322 {
323 return ProcLibrary;
324 }
325
327 {
328 return _debugger;
329 }
330
332 {
333 return _manager;
334 }
335
336 void displaySplash();
337 std::map<std::string,std::string> getPluginLanguageStrings();
338 std::map<std::string,std::string> getFunctionLanguageStrings();
339 std::vector<std::string> getPluginCommands();
340 int ReadOpenFileFlag();
341 std::string ReadAnswer();
342 std::string getDocumentation(const std::string& sCommand);
343 std::vector<std::string> getDocIndex();
345 bool SettingsModified();
347 {
349 }
350 long long int getLastSavedTime() const
351 {
353 }
354 void Autosave();
355 void StartUp(NumeReTerminal* _parent, const std::string& __sPath, const std::string& sPredefinedFunctions);
356 void CloseSession();
358 {
359 bCancelSignal = true;
360 }
361 void saveData();
363 void setKernelSettings(const Settings& _settings);
364 std::vector<std::string> getPathSettings() const;
365 const std::vector<Package>& getInstalledPackages() const;
366 std::map<std::string, std::string> getMenuMap() const;
368 void printVersionInfo();
369 void updateLineLenght(int nLength);
371};
372
373
380{
381 std::string sString;
382 size_t nLine;
383 std::vector<std::string> vDebugEvent;
388
390};
391
392
408inline std::string strfill(const std::string& sString, unsigned int nWidth, char cFill = ' ', bool limit = false)
409{
410 if (!nWidth)
411 return "";
412
413 std::string sReturn = sString;
414
415 // Fill the string
416 if (sString.length() < nWidth)
417 sReturn.insert(0, nWidth-sReturn.length(), cFill);
418
419 // Limit the output size if required
420 if (limit && sString.length() > nWidth)
421 sReturn = sString.substr(0, nWidth - 3) + "...";
422
423 return sReturn;
424}
425
426
438inline std::string strlfill(const std::string& sString, unsigned int nWidth, char cFill = ' ')
439{
440 if (!nWidth)
441 return "";
442 std::string sReturn = sString;
443 if (sString.length() < nWidth)
444 sReturn.append(nWidth-sReturn.length(), cFill);
445 return sReturn;
446}
447
448
458inline std::string sectionHeadline(const std::string& sString, char cHeadLineSep = '-')
459{
460 std::string sSectionHeadline = "|\n| " + toUpperCase(sString);
461
462 if (sSectionHeadline.back() != ':')
463 sSectionHeadline += ": ";
464 else
465 sSectionHeadline += " ";
466
467 sSectionHeadline.append(NumeReKernel::nLINE_LENGTH-sSectionHeadline.length()+1, cHeadLineSep);
468 sSectionHeadline += "\n";
469 return sSectionHeadline;
470}
471
472
482inline std::string pointToError(unsigned int nPos)
483{
484 std::string sErrorPointer = "| ";
485 sErrorPointer += strfill("^^^", nPos+13) + "\n";
486 return sErrorPointer;
487}
488
489
490#endif // KERNEL_HPP
491
This class implements the basic input/ output file system and provides functionalities to work with f...
Definition: filesystem.hpp:92
This class implements the function definition managing instance.
Definition: define.hpp:74
This class represents the central memory managing instance. It will handle all tables and clusters,...
long long int getLastSaved() const
Returns the earliest time-point, when a table was saved. This value is used to determine the elapsed ...
This class represents a whole cluster. The single items are stored as pointers to the abstract cluste...
Definition: cluster.hpp:325
Cluster & getCluster(StringView sCluster)
This member function returns a reference to the cluster indicated by the passed cluster identifier.
Definition: cluster.cpp:2077
This class is the central string expression parser. It is designed as being a singleton with a persis...
This data container is a copy- efficient table to interchange data between Kernel and GUI.
Definition: table.hpp:87
This class represents an abstract window handled by the window manager.
This is the window manager of the kernel. All windows opened by the kernel will be registered here.
This class provides the interface to the core of NumeRe. It provides all functionalities,...
Definition: kernel.hpp:97
static NumeReKernel * getInstance()
This static member function returns a a pointer to the singleton instance of the kernel.
Definition: kernel.hpp:221
static ProcedureLibrary ProcLibrary
Definition: kernel.hpp:202
static int evalDebuggerBreakPoint(const std::string &sCurrentCommand="")
This member function handles the creation of the debugger information for a script debugger breakpoin...
Definition: kernel.cpp:3475
std::string maskProcedureSigns(std::string sLine)
This member function masks the dollar signs in the strings to avoid that the line breaking functions ...
Definition: kernel.cpp:2613
FunctionDefinitionManager _functions
Definition: kernel.hpp:153
std::map< std::string, std::string > getPluginLanguageStrings()
This member function returns a map of language strings for the installed plugins, which will be used ...
Definition: kernel.cpp:2281
void setAns(NumeRe::Cluster *ans)
Definition: kernel.hpp:276
NumeRe::StringParser & getStringParser()
Definition: kernel.hpp:286
NumeReDebugger _debugger
Definition: kernel.hpp:157
static void getline(std::string &sLine)
This function is an implementation replacing the std::getline() function.
Definition: kernel.cpp:3621
NumeRe::Cluster * _ans
Definition: kernel.hpp:159
Settings getKernelSettings()
Get the settings available in the Settings class.
Definition: kernel.cpp:94
static bool bSupressAnswer
Definition: kernel.hpp:199
bool handleCommandLineSource(std::string &sLine, std::string &sKeep)
This private member function will handle the command line input source and validate it,...
Definition: kernel.cpp:1261
std::string ReadAnswer()
This member function is a simple wrapper to read the kernel answer and reset it automatically.
Definition: kernel.cpp:2251
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.
Definition: kernel.cpp:1550
static NumeReKernel * kernelInstance
Definition: kernel.hpp:144
Script & getScript()
Definition: kernel.hpp:311
void closeWindows(int type)
This member function informs the GUI to close all windows of the selected type. Use 0 or WT_ALL to cl...
Definition: kernel.cpp:3590
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.
Definition: kernel.cpp:2007
std::vector< std::string > getDocIndex()
This member function returns the documentation index as a string vector, which can be used to fill th...
Definition: kernel.cpp:2383
static NumeRe::Table getTable()
This member function is used by the kernel to be notified when the user finished the table edit proce...
Definition: kernel.cpp:3299
static bool bGettingLine
Definition: kernel.hpp:200
FileSystem _fSys
Definition: kernel.hpp:147
PlotData & getPlottingData()
Definition: kernel.hpp:301
void CancelCalculation()
Definition: kernel.hpp:357
void defineConst()
This member function declares all numerical constants.
Definition: kernel.cpp:361
Output & getOutput()
Definition: kernel.hpp:306
NumeRe::WindowManager & getWindowManager()
Definition: kernel.hpp:331
PlotData _pData
Definition: kernel.hpp:154
bool uninstallPlugin(const std::string &sLine, const std::string &sCurrentCommand)
This private member function uninstalls a previously installed plugin.
Definition: kernel.cpp:1609
void updateLineLenght(int nLength)
This member function is used to update the internal terminal line length information after the termin...
Definition: kernel.cpp:2169
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...
Definition: kernel.cpp:2683
bool SettingsModified()
Returns true, if the user changed any internal settings using the set command.
Definition: kernel.cpp:2515
static std::queue< NumeReTask > taskQueue
Definition: kernel.hpp:190
static int nLastStatusVal
Definition: kernel.hpp:195
std::vector< std::string > getPluginCommands()
This member function is used by the syntax highlighter to hightlight the plugin commands.
Definition: kernel.cpp:2329
static bool bCancelSignal
Definition: kernel.hpp:193
mu::Parser & getParser()
Definition: kernel.hpp:281
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 NumeR...
Definition: kernel.cpp:2058
std::string sCommandLine
Definition: kernel.hpp:138
NumeReDebugger & getDebugger()
Definition: kernel.hpp:326
static void failMessage(std::string sFailMessage)
This static function may be used to print a test failure message in the terminal.
Definition: kernel.cpp:2865
void defineFunctions()
This member function declares all mathematical functions.
Definition: kernel.cpp:425
MemoryManager & getMemoryManager()
Definition: kernel.hpp:263
NumeRe::WindowManager _manager
Definition: kernel.hpp:158
int getAutosaveInterval() const
Definition: kernel.hpp:346
bool evaluateProcedureCalls(std::string &sLine)
This private member function will evaluate any calls to procedurs and replace their results in the cu...
Definition: kernel.cpp:1702
static void installationDone()
Notify the GUI that the installation was processed.
Definition: kernel.cpp:3159
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 ret...
Definition: kernel.cpp:1404
std::string getGreeting()
Returns a random greeting string, which may be printed to the terminal later.
Definition: kernel.cpp:2110
static int numberOfNumbersPerLine()
This member function returns the count of numbers fitting into a single terminal line depending on it...
Definition: kernel.cpp:2897
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 wind...
Definition: kernel.cpp:3405
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 ter...
Definition: kernel.cpp:2636
~NumeReKernel()
Destructor of the kernel.
Definition: kernel.cpp:80
@ DEBUGGER_LEAVE
Definition: kernel.hpp:134
@ DEBUGGER_STEPOVER
Definition: kernel.hpp:133
@ DEBUGGER_CONTINUE
Definition: kernel.hpp:131
NumeRe::Cluster & getAns()
Definition: kernel.hpp:268
static void clcTerminal()
Clear the terminal.
Definition: kernel.cpp:3543
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....
Definition: kernel.cpp:3191
std::map< std::string, std::string > getMenuMap() const
Returns the menu map used to construct the package menu.
Definition: kernel.cpp:2566
KernelStatus MainLoop(const std::string &sCommand)
This is the main loop for the core of NumeRe.
Definition: kernel.cpp:600
void checkInternalStates()
Evaluates the internal states, performs necessary actions and resets them.
Definition: kernel.cpp:2133
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.
Definition: kernel.cpp:2950
Script _script
Definition: kernel.hpp:155
static bool bErrorNotification
Definition: kernel.hpp:201
std::queue< std::string > commandQueue
Definition: kernel.hpp:141
void StartUp(NumeReTerminal *_parent, const std::string &__sPath, const std::string &sPredefinedFunctions)
This is the kernel "booting" function.
Definition: kernel.cpp:144
MemoryManager _memoryManager
Definition: kernel.hpp:150
ProcedureLibrary & getProcedureLibrary()
Definition: kernel.hpp:321
void displaySplash()
This function displays the intro text.
Definition: kernel.cpp:2265
std::string sPlotCompose
Definition: kernel.hpp:140
std::string getDocumentation(const std::string &sCommand)
This member function returns the documentation for the passed command string as HTML string prepared ...
Definition: kernel.cpp:2368
Settings _option
Definition: kernel.hpp:148
std::string sAnswer
Definition: kernel.hpp:139
static int nLINE_LENGTH
Definition: kernel.hpp:191
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 li...
Definition: kernel.cpp:1657
@ NUMERE_CLC_TERMINAL
Definition: kernel.hpp:126
@ NUMERE_EDIT_FILE
Definition: kernel.hpp:115
@ NUMERE_INSTALLATION_DONE
Definition: kernel.hpp:125
@ NUMERE_PENDING_SPECIAL
Definition: kernel.hpp:111
@ NUMERE_QUEUED_COMMAND
Definition: kernel.hpp:114
@ NUMERE_EDIT_TABLE
Definition: kernel.hpp:118
@ NUMERE_PRINTLINE_PREFMT
Definition: kernel.hpp:108
@ NUMERE_PRINTLINE
Definition: kernel.hpp:107
@ NUMERE_STATUSBAR_UPDATE
Definition: kernel.hpp:113
@ NUMERE_ANSWER_READ
Definition: kernel.hpp:121
@ NUMERE_ISSUE_WARNING
Definition: kernel.hpp:109
@ NUMERE_SHOW_WINDOW
Definition: kernel.hpp:122
@ NUMERE_OPEN_DOC
Definition: kernel.hpp:116
@ NUMERE_PENDING
Definition: kernel.hpp:110
@ NUMERE_DEBUG_EVENT
Definition: kernel.hpp:120
@ NUMERE_CLOSE_WINDOWS
Definition: kernel.hpp:124
@ NUMERE_CALC_UPDATE
Definition: kernel.hpp:112
@ NUMERE_SHOW_TABLE
Definition: kernel.hpp:117
@ NUMERE_DONE_KEYWORD
Definition: kernel.hpp:106
@ NUMERE_REFRESH_FUNCTIONTREE
Definition: kernel.hpp:123
@ NUMERE_SHOW_STRING_TABLE
Definition: kernel.hpp:119
void saveData()
This member function performs the autosaving of tables at application shutdown.
Definition: kernel.cpp:2187
static NumeRe::Table table
Definition: kernel.hpp:198
void refreshFunctionTree()
This member function informs the GUI to reload the contents of the function tree as soon as possible.
Definition: kernel.cpp:3573
std::map< std::string, std::string > getFunctionLanguageStrings()
This member function returns a map of language strings for the declared functions,...
Definition: kernel.cpp:2306
void sendErrorNotification()
This member function is used to toggle the error notification status. The error notification is used ...
Definition: kernel.cpp:2916
static void flush()
Inform the terminal to write the current output buffer as soon as possible.
Definition: kernel.cpp:3684
void CloseSession()
This member function shuts the kernel down and terminates the kernel instance. Every call to NumeReKe...
Definition: kernel.cpp:2210
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...
Definition: kernel.cpp:2582
FileSystem & getFileSystem()
Definition: kernel.hpp:258
void resetAfterError()
This private member function will reset the kernel variables after an error had been handled.
Definition: kernel.cpp:2076
static NumeReTerminal * m_parent
Definition: kernel.hpp:189
mu::Parser _parser
Definition: kernel.hpp:151
NumeRe::Container< std::string > getStringTable(const std::string &sStringTableName)
This member function creates the table container for the string table or the clusters.
Definition: kernel.cpp:3357
const std::vector< Package > & getInstalledPackages() const
Returns a vector containing the names and the version info of each installed plugin.
Definition: kernel.cpp:2553
bool handleFlowControls(std::string &sLine, const std::string &sCurrentCommand, KernelStatus &nReturnVal)
This private member function will handle used flow controls.
Definition: kernel.cpp:1891
void printVersionInfo()
This member function prints the version headline and the version information to the console.
Definition: kernel.cpp:563
NumeReKernel()
Constructor of the kernel.
Definition: kernel.cpp:67
NumeReVariables getVariableList()
This member function returns a structure containing all currently declared variables,...
Definition: kernel.cpp:2421
int ReadOpenFileFlag()
This member function returns the mode, how a file shall be opened in the editor, when called by the k...
Definition: kernel.cpp:2351
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.
Definition: kernel.cpp:3230
NumeRe::StringParser _stringParser
Definition: kernel.hpp:152
void setKernelSettings(const Settings &_settings)
Update the internal settings.
Definition: kernel.cpp:107
static unsigned int nLastLineLength
Definition: kernel.hpp:196
static bool bWritingTable
Definition: kernel.hpp:192
FunctionDefinitionManager & getDefinitions()
Definition: kernel.hpp:291
bool getLineFromCommandCache(std::string &sLine, const std::string &sCurrentCommand)
This private member function returns the current command line from the command cache (i....
Definition: kernel.cpp:1336
long long int getLastSavedTime() const
Definition: kernel.hpp:350
Procedure & getProcedureInterpreter()
Definition: kernel.hpp:316
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.
Definition: kernel.cpp:3098
static int nOpenFileFlag
Definition: kernel.hpp:194
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 t...
Definition: kernel.cpp:2833
void initializeStackTracker()
Starts the stack tracker, which will prevent stack overflows.
Definition: kernel.cpp:546
void defineOperators()
This member function declares all numerical operators.
Definition: kernel.cpp:303
static bool GetAsyncCancelState()
This function is used by the kernel to get informed, when the user pressed ESC or used other means of...
Definition: kernel.cpp:3703
static void setDocumentation(const std::string &_sDocumentation)
This member function handles the display of a documentation window as requested by the kernel.
Definition: kernel.cpp:3130
bool refreshTree
Definition: kernel.hpp:142
std::vector< std::string > getPathSettings() const
This member function returns a vector containing all currently declared paths in a distinct order.
Definition: kernel.cpp:2531
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.
Definition: kernel.cpp:2730
static void toggleTableStatus()
Toggles the table writing status, which will reduce the number or events send to the terminal.
Definition: kernel.cpp:3671
void Autosave()
Saves the allocated memories by the tables automatically.
Definition: kernel.cpp:121
Settings & getSettings()
Definition: kernel.hpp:296
static int * baseStackPosition
Definition: kernel.hpp:188
static bool modifiedSettings
Definition: kernel.hpp:197
static int waitForContinue()
This static function waits until the user sends a continuation command via the debugger and returns t...
Definition: kernel.cpp:3440
Procedure _procedure
Definition: kernel.hpp:156
void showWindow(const NumeRe::Window &window)
This member function passes a window object to the user interface, which will then converted into a r...
Definition: kernel.cpp:3267
bool executePlugins(std::string &sLine)
This private member function will execute any call to a plugin.
Definition: kernel.cpp:1800
Output _out
Definition: kernel.hpp:149
The terminal class for the GUI. It's a specialisation of the GenericTerminal.
Definition: terminal.hpp:46
This class contains all the plot settings usable by the plotting algorithm.
Definition: plotdata.hpp:42
This class implements the logic to evaluate complex procedures, which may be called recursively.
Definition: procedure.hpp:56
This class manages all already read and possibly pre-parsed procedure files for easier and faster acc...
This class manages the setting values of the internal (kernel) settings of this application.
Definition: settings.hpp:663
size_t getAutoSaveInterval() const
Returns the timespan for the autosave interval in seconds.
Definition: settings.hpp:1078
Mathematical expressions parser.
Definition: muParser.h:51
std::string sectionHeadline(const std::string &sString, char cHeadLineSep='-')
This function provides a headline for the "windows" in the console.
Definition: kernel.hpp:458
std::string pointToError(unsigned int nPos)
This function points to the error indicated by nPos. It draws three circumflexes below the error loca...
Definition: kernel.hpp:482
std::string strfill(const std::string &sString, unsigned int nWidth, char cFill=' ', bool limit=false)
This function fills the passed string up to the width nWidth with the characters cFill....
Definition: kernel.hpp:408
std::string strlfill(const std::string &sString, unsigned int nWidth, char cFill=' ')
This function fills the passed string up to the width nWidth with the characters cFill....
Definition: kernel.hpp:438
Definition of the standard floating point parser.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
Definition: muParserDef.h:251
std::string toUpperCase(const std::string &sLowerCase)
Converts lowercase letters to uppercase ones.
This structure abstracts the necessary information for a task to be done by the graphical user interf...
Definition: kernel.hpp:380
NumeRe::Table table
Definition: kernel.hpp:384
NumeRe::Container< std::string > stringTable
Definition: kernel.hpp:386
std::vector< std::string > vDebugEvent
Definition: kernel.hpp:383
NumeReTask()
Definition: kernel.hpp:389
NumeRe::Window window
Definition: kernel.hpp:385
int taskType
Definition: kernel.hpp:387
size_t nLine
Definition: kernel.hpp:382
std::string sString
Definition: kernel.hpp:381
This structure combines a vector of declared variables including their values and respective sizes wi...
Definition: kernel.hpp:80
size_t nNumerics
Definition: kernel.hpp:82
size_t nStrings
Definition: kernel.hpp:83
size_t nTables
Definition: kernel.hpp:84
size_t nClusters
Definition: kernel.hpp:85
std::vector< std::string > vVariables
Definition: kernel.hpp:81