SeExpr
SeContext Class Reference

#include <SeContext.h>

Public Member Functions

bool lookupParameter (const std::string &parameterName, std::string &value) const
 Lookup a SeContext parameter by name.
 
void setParameter (const std::string &parameterName, const std::string &value)
 Set a parameter. NOTE: this must be done when no threads are accessing lookupParameter for safety.
 
SeContextcreateChildContext () const
 Create a context that is a child of this context.
 
void setParent (const SeContext *context)
 
const SeContextgetParent () const
 
bool hasContext (const SeContext *context) const
 

Static Public Member Functions

static SeContextglobal ()
 The global default context of the seexpr.
 

Private Types

typedef std::map< std::string, std::string > ParameterMap
 

Private Member Functions

 SeContext (const SeContext &)
 
SeContextoperator= (const SeContext &)
 
 SeContext (const SeContext *parent)
 

Private Attributes

const SeContext_parent
 The parent scope.
 
ParameterMap _parameters
 Attribute/value pairs.
 

Detailed Description

Definition at line 22 of file SeContext.h.

Member Typedef Documentation

◆ ParameterMap

typedef std::map<std::string, std::string> SeContext::ParameterMap
private

Definition at line 64 of file SeContext.h.

Constructor & Destructor Documentation

◆ SeContext() [1/2]

SeContext::SeContext ( const SeContext & )
private

Private constructor and un-implemented default/copy/assignment (it is required that we derive from the global context via createChildContext)

References SeContext().

Referenced by createChildContext(), getParent(), global(), hasContext(), operator=(), SeContext(), SeContext(), and setParent().

◆ SeContext() [2/2]

SeContext::SeContext ( const SeContext * parent)
private

Definition at line 19 of file SeContext.cpp.

References _parent, and SeContext().

Member Function Documentation

◆ createChildContext()

SeContext * SeContext::createChildContext ( ) const

Create a context that is a child of this context.

Definition at line 25 of file SeContext.cpp.

References SeContext().

◆ getParent()

const SeContext * SeContext::getParent ( ) const
inline

Definition at line 42 of file SeContext.h.

References _parent, and SeContext().

◆ global()

SeContext & SeContext::global ( )
static

The global default context of the seexpr.

Definition at line 27 of file SeContext.cpp.

References context, and SeContext().

◆ hasContext()

bool SeContext::hasContext ( const SeContext * context) const
inline

Definition at line 44 of file SeContext.h.

References _parent, context, and SeContext().

◆ lookupParameter()

bool SeContext::lookupParameter ( const std::string & parameterName,
std::string & value ) const
inline

Lookup a SeContext parameter by name.

Definition at line 25 of file SeContext.h.

References _parameters, _parent, it, and value().

◆ operator=()

SeContext & SeContext::operator= ( const SeContext & )
private

References SeContext().

◆ setParameter()

void SeContext::setParameter ( const std::string & parameterName,
const std::string & value )

Set a parameter. NOTE: this must be done when no threads are accessing lookupParameter for safety.

Definition at line 21 of file SeContext.cpp.

References _parameters, and value().

◆ setParent()

void SeContext::setParent ( const SeContext * context)
inline

Definition at line 41 of file SeContext.h.

References _parent, context, and SeContext().

Member Data Documentation

◆ _parameters

ParameterMap SeContext::_parameters
private

Attribute/value pairs.

Definition at line 66 of file SeContext.h.

Referenced by lookupParameter(), and setParameter().

◆ _parent

const SeContext* SeContext::_parent
private

The parent scope.

Definition at line 61 of file SeContext.h.

Referenced by getParent(), hasContext(), lookupParameter(), SeContext(), and setParent().


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