Interpreter status.
More...
#include <interpreter.h>
|
|
| Interpreter (const Interpreter &)=delete |
| |
|
| Interpreter (Interpreter &&)=delete |
| |
|
Interpreter & | operator= (const Interpreter &)=delete |
| |
|
Interpreter & | operator= (Interpreter &&)=delete |
| |
|
std::string | getIif () const |
| | Getter for initial input file.
|
| |
|
int | getStartup_nof () const |
| | Getter for startup_nof_.
|
| |
|
bool | getVerbose () const |
| | Getter for verbose mode.
|
| |
|
void | setContext (Context *p_c) |
| | Setter for current context.
|
| |
|
void | setSuppressAEC (bool p_saec) |
| | Setter for suppressaec_.
|
| |
|
bool | getSuppressAEC () const |
| | Getter for suppressaec_.
|
| |
|
void | setOdo (bool p_odo) |
| | Setter for odo_.
|
| |
|
bool | getOdo () const |
| | Getter for odo_.
|
| |
|
size_t | getOdoIterations () const |
| | Getter for odo_iterations_.
|
| |
|
size_t | getMaxopeelevel () const |
| | Getter for maximum opee level.
|
| |
|
size_t | getRealprecision () const |
| | Getter for realprecision_.
|
| |
|
void | setRealprecision (size_t p_prec) |
| | Setter for realprecision_.
|
| |
| void | processLeonLine (std::string &p_line, Context &k) const |
| | Processes one line of the leon-format input.
|
| |
| void | print (const std::string &p_line) const |
| | Wrapper around SOF::writestring().
|
| |
| void | print (std::string_view p_line) const |
| | Wrapper around SOF::writestring().
|
| |
| void | startup (int p_argc, char *p_argv[]) |
| | Interpreter start up IO file handling.
|
| |
| __int128 | msec () const |
| | Milliseconds since program start.
|
| |
|
void | snap () |
| | Snapshot of complete Interpreter and Context statistics to Interpreter-outfile.
|
| |
|
void | snapIfVerbose () |
| | Snapshot if verbose mode is enabled.
|
| |
|
| static auto | get () |
| | Getter for singleton pointer.
|
| |
| static void | addchanges (size_t p_allchanges) |
| | Add p_allchanges to odo_changes_ counter.
|
| |
| static void | shutdown () |
| | Shut down.
|
| |
| static void | leak_statistics (bool p_force, const std::string &p_fname, int p_nof) |
| | Dumps memory and open files statistical data.
|
| |
|
| bool | invariant () const noexcept override |
| | Checks class invariants.
|
| |
|
| ~DbC ()=default |
| | Protected dtor.
|
| |
|
|
| Interpreter () |
| | Private ctor.
|
| |
| virtual | ~Interpreter () |
| | Private dtor.
|
| |
|
void | help () const |
| | Command line help text.
|
| |
|
void | property_statistics () const |
| | Dumps property statistical data.
|
| |
|
void | status_statistics () const |
| | Dumps various status statistical data.
|
| |
|
| static std::string | unescape (const std::string &p_s) |
| | Unescape string.
|
| |
|
|
static Interpreter * | instance_ = nullptr |
| | Pointer to the singleton instance or a nullptr.
|
| |
Interpreter status.
- Invariant
- Singleton.
-
pimpltime_ is not null
-
outf_ is not null
◆ ~Interpreter()
| Interpreter::~Interpreter |
( |
| ) |
|
|
privatevirtual |
Private dtor.
It's virtual, because DbC has a virtual bool invariant() member.
◆ addchanges()
| static void Interpreter::addchanges |
( |
size_t |
p_allchanges | ) |
|
|
inlinestatic |
Add p_allchanges to odo_changes_ counter.
- Parameters
-
| [in] | p_allchanges | Number of changes to add. |
◆ get()
| static auto Interpreter::get |
( |
| ) |
|
|
inlinestatic |
Getter for singleton pointer.
- Postcondition
- return value != nullptr
◆ invariant()
| bool Interpreter::invariant |
( |
| ) |
const |
|
inlineoverrideprotectedvirtualnoexcept |
Checks class invariants.
- Returns
- bool ... Indicates whether the class invariants are maintained.
Reimplemented from DbC.
◆ leak_statistics()
| void Interpreter::leak_statistics |
( |
bool |
p_force, |
|
|
const std::string & |
p_fname, |
|
|
int |
p_nof |
|
) |
| |
|
static |
Dumps memory and open files statistical data.
Dumps it if and only if
- there are open memory allocations or
- there more open files compared to startup
- p_force is true.
- Parameters
-
| [in] | p_force | Force the output even for an empty open memory allocation list. |
| [in] | p_fname | File name to write to. |
| [in] | p_nof | Number of open files at program startup. |
◆ msec()
| __int128 Interpreter::msec |
( |
| ) |
const |
Milliseconds since program start.
- Returns
- __int128 Milliseconds since program start.
◆ print() [1/2]
| void Interpreter::print |
( |
const std::string & |
p_line | ) |
const |
◆ print() [2/2]
| void Interpreter::print |
( |
std::string_view |
p_line | ) |
const |
◆ processLeonLine()
| void Interpreter::processLeonLine |
( |
std::string & |
p_line, |
|
|
Context & |
k |
|
) |
| const |
Processes one line of the leon-format input.
Executable names outside of procedures and '{', '}' are pushed onto the execution stack. Everything else is pushed onto the operand stack.
- Parameters
-
| [in] | p_line | A leon-format input line. |
| [in] | k | Context to use. |
◆ shutdown()
| void Interpreter::shutdown |
( |
| ) |
|
|
static |
Shut down.
Closes the line source and deletes pimpltime_ and outf_ pointer via destructor call.
Ignores Context pointer.
Frees the singleton Interpreter memory.
◆ startup()
| void Interpreter::startup |
( |
int |
p_argc, |
|
|
char * |
p_argv[] |
|
) |
| |
Interpreter start up IO file handling.
Command line parsing.
Calls exit() in case of command line issues or after printing the help text.
- Parameters
-
| [in] | p_argc | Command line argument count. |
| [in] | p_argv | Comamnd line argument vector of strings. |
◆ unescape()
| string Interpreter::unescape |
( |
const std::string & |
p_s | ) |
|
|
staticprivate |
Unescape string.
Substitutes double backslashes by single backslashes and sequences backslash + 'n' by the ASCII CR code.
- Parameters
-
| [in] | p_s | String to be escaped. |
- Returns
- std::string ... Modified string.
◆ curctx_
◆ iif_
| std::string Interpreter::iif_ {} |
|
private |
Interpreter Property.
The name of the initital input file.
◆ maxopeelevel_
| size_t Interpreter::maxopeelevel_ = 2 |
|
private |
Interpreter Property.
A maximum for the nesting level of printed SOA, SOD and SOK in the "OPerator Equal Equal".
◆ odo_
| bool Interpreter::odo_ = false |
|
private |
Interpreter Property.
Controls if the operator bind includes odo features.
◆ odo_iterations_
| size_t Interpreter::odo_iterations_ = 10 |
|
private |
Interpreter Property.
Maximum odo iterations even if there are more possible optimizations.
◆ outf_
Interpreter Property.
Our output stream. Prepares for rerouting.
The Interpreter ist the owner of the pointer.
◆ pimpltime_
Structure for opaque pointer pimpltime_.
Pointer to implemenation of time functions - opaque pointer.
◆ realprecision_
| size_t Interpreter::realprecision_ = 10 |
|
private |
◆ suppressaec_
| bool Interpreter::suppressaec_ = false |
|
private |
Interpreter Property.
Indicates the suppression of ANSI escape codes.
◆ verbose_
| bool Interpreter::verbose_ = false |
|
private |
Interpreter Property.
Execution in verbose mode or not.
The documentation for this class was generated from the following files: