KSeExpr 6.0.0.0
|
#include <Context.h>
Public Member Functions | |
bool | lookupParameter (const std::string ¶meterName, std::string &value) const |
Lookup a Context parameter by name. | |
void | setParameter (const std::string ¶meterName, const std::string &value) |
Set a parameter. NOTE: this must be done when no threads are accessing lookupParameter for safety. | |
Context * | createChildContext () const |
Create a context that is a child of this context. | |
void | setParent (const Context *context) |
const Context * | getParent () const |
bool | hasContext (const Context *context) const |
~Context ()=default | |
Context (const Context &)=delete | |
Context (Context &&)=delete | |
Context & | operator= (const Context &)=delete |
Context & | operator= (Context &&)=delete |
Static Public Member Functions | |
static Context & | global () |
The global default context of the seexpr. | |
Private Types | |
using | ParameterMap = std::unordered_map< std::string, std::string > |
Private Member Functions | |
Context (const Context *parent) | |
Private Attributes | |
const Context * | _parent {nullptr} |
The parent scope. | |
ParameterMap | _parameters |
Attribute/value pairs. | |
|
private |
|
default |
Private constructor and un-implemented default/copy/assignment (it is required that we derive from the global context via createChildContext)
|
delete |
Definition at line 10 of file Context.cpp.
Context * Context::createChildContext | ( | ) | const |
Create a context that is a child of this context.
Definition at line 20 of file Context.cpp.
|
static |
The global default context of the seexpr.
Definition at line 25 of file Context.cpp.
|
inline |
Lookup a Context parameter by name.
Definition at line 18 of file Context.h.
References _parameters, and _parent.
Set a parameter. NOTE: this must be done when no threads are accessing lookupParameter for safety.
Definition at line 15 of file Context.cpp.
References _parameters.
|
private |
Attribute/value pairs.
Definition at line 73 of file Context.h.
Referenced by lookupParameter(), and setParameter().
The parent scope.
Definition at line 69 of file Context.h.
Referenced by getParent(), hasContext(), lookupParameter(), and setParent().