|
Leonardus
|
The context of execution. More...
#include <context.h>
Inheritance diagram for Context:
Collaboration diagram for Context:Public Member Functions | |
| Context () | |
| Ctor. | |
| Context (const Context &)=delete | |
| Delete the copy ctor. | |
| Context (Context &&)=delete | |
| Delete the move ctor. | |
| Context & | operator= (const Context &)=delete |
| Delete copy assignement. | |
| Context & | operator= (Context &&)=delete |
| Delete move assignement. | |
| virtual | ~Context () |
| Dtor. | |
| SOK & | opst () |
| Access to the operand stack. | |
| SOK & | exst () |
| Access to the execution stack. | |
| SOK & | dist () |
| Access to the dictionary stack. | |
| std::ostream & | getCout () |
| Getter for cout_. | |
| size_t | getProclevel () const |
| Getter for procedure level. | |
| size_t | getLoadlevel () const |
| Getter for load level. | |
| size_t | getArraynesting () const |
| Getter for nesting level. | |
| size_t | getMaxloadlevel () const |
| Getter for maximum load level. | |
| bool | getInterpreterLoop () const |
| Getter for interpreter loop control variable run_. | |
| void | stopInterpreterLoop () |
| Sets run_ to false. | |
| void | setSnapLeonline (const std::string &p_line) |
| Setter for snapLeonline_. | |
| size_t | getRealprecision () const |
| Getter for realprecision_. | |
| void | setRealprecision (size_t p_prec) |
| Setter for realprecision_. | |
| auto | getAngularUnit () const |
| Getter for angularunit_. | |
| void | setAngularUnit (AngularUnit p_unit) |
| Setter for angularunit_. | |
| uint32_t | getSeed () const |
| Getter for seed_. | |
| void | setSeed (uint32_t p_seed) |
| Setter for seed_. | |
| void | incProclevel () |
| Increments the procedure level. | |
| void | decProclevel () |
| Decrements the procedure level. | |
| void | incLoadlevel () |
| Increments load level. | |
| void | decLoadlevel () |
| Decrements load level. | |
| void | incArraynesting () |
| Increments array nesting. | |
| void | decArraynesting () |
| Decrements array nesting. | |
| void | status_statistics () |
| Snapshot of Context state to cout. | |
| void | property_statistics () |
| Snapshot of Context properties to cout. | |
| void | stack_statistics () |
| Snapshot of stacks to cout. | |
Public Member Functions inherited from Counter< Context > | |
| Counter (Counter< Context > &&)=delete | |
| Counter< Context > & | operator= (const Counter< Context > &)=delete |
| Counter< Context > & | operator= (Counter< Context > &&)=delete |
Static Public Attributes | |
| static constexpr size_t | mindictstack_ = 3 |
| Corresponds with the setup in the ctor. | |
Protected Member Functions | |
| bool | invariant () const noexcept override |
| Checks class invariants. | |
Protected Member Functions inherited from Counter< Context > | |
| Counter () | |
| Ctor. | |
| Counter (const Counter< Context > &) | |
| Copy ctor. | |
| ~Counter () | |
| Dtor. | |
Private Attributes | |
| std::string | snapLeonline_ |
| For debugging purposes a copy of the current leon-format line. | |
| SOK | os_ |
| The operand stack. | |
| SOK | es_ |
| The execution stack. | |
| SOK | ds_ |
| The dictionary stack. | |
| bool | run_ = true |
| Control variable for the interpreter loop. | |
| int | proclevel_ = 0 |
| The process level is incremented for every '{' on input. | |
| int | loadlevel_ = 0 |
| The load level is incemented for ever load_exec() call. | |
| int | arraynesting_ = 0 |
| The nesting level is incemented for every array within an array for the bind operator. | |
| AngularUnit | angularunit_ = AngularUnit::DEG |
| Context Property. | |
| size_t | realprecision_ = 10 |
| Context Property. | |
| size_t | maxloadlevel_ = 1000 |
| Context Property. | |
| uint32_t | seed_ = 0 |
| Context Property. | |
Static Private Attributes | |
| static const std::map< const char *, core_t * > | systemdictmap_ |
| Maps SON data to SOO data for the systemdict. | |
| static const std::map< const char *, core_t * > | leodictmap_ |
| Maps SON data to SOO data for the leodict. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Counter< Context > | |
| static size_t | getTotalCounter () |
| Static getter for totaly created objects. | |
| static size_t | getAliveCounter () |
| Static getter for objects alive. | |
| static size_t | getWatermarkCounter () |
| Static getter for the object counter watermark. | |
The context of execution.
| Context::Context | ( | ) |
Ctor.
Pushes and initializes a user dictionary, a leo dictionary, and a system dictionary onto the dictionary stack. Sets up empty stacks and all Context parameters.
|
virtual |
Dtor.
Frees all resources to enable a comprehensive memory leak analysis upon program exit.
|
inline |
Getter for cout_.
We use the Interpreter stream until a split of streams for multiple Contexts will be implemented.
|
inlineoverrideprotectedvirtualnoexcept |
Checks class invariants.
Reimplemented from DbC.
| void Context::property_statistics | ( | ) |
Snapshot of Context properties to cout.
| void Context::stack_statistics | ( | ) |
Snapshot of stacks to cout.
| void Context::status_statistics | ( | ) |
Snapshot of Context state to cout.
|
private |
Context Property.
The angular unit for trigonometric functions.
|
private |
The nesting level is incemented for every array within an array for the bind operator.
within the class it is an int and a size_t on the interface.
|
staticprivate |
|
private |
The load level is incemented for ever load_exec() call.
within the class it is an int and a size_t on the interface.
|
private |
Context Property.
A maximum of nesting load of name objects.
|
private |
The process level is incremented for every '{' on input.
within the class it is an int and a size_t on the interface.
|
private |
|
private |
Context Property.
A maximum of nesting load of name objects.