SeExpr

Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
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. More...
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. More...
SeContext * | createChildContext () const
| Create a context that is a child of this context. More...
void | setParent (const SeContext *context)
const SeContext * | getParent () const
bool | hasContext (const SeContext *context) const

## Static Public Member Functions
static SeContext & | global ()
| The global default context of the seexpr. More...

## Private Types
typedef std::map< std::string, std::string > | ParameterMap

## Private Member Functions
| SeContext (const SeContext &)
SeContext & | operator= (const SeContext &)
| SeContext (const SeContext *parent)

## Private Attributes
const SeContext * | _parent
| The parent scope. More...
ParameterMap | _parameters
| Attribute/value pairs. More...

## 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)

Referenced by createChildContext().

## ◆ SeContext() [2/2]

SeContext::SeContext | ( | const SeContext * | parent | ) |
| private

Definition at line 19 of file SeContext.cpp.

## 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.

## ◆ global()

SeContext & SeContext::global | ( |  | ) |
| static

The global default context of the seexpr.

Definition at line 27 of file SeContext.cpp.

References context.

## ◆ hasContext()

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

Definition at line 44 of file SeContext.h.

References _parent, context, and hasContext().

Referenced by hasContext().

## ◆ 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, lookupParameter(), and value().

Referenced by lookupParameter().

## ◆ operator=()

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

## ◆ 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, and context.

## 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(), and setParent().

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

- /build/seexpr/src/SeExpr/src/SeExpr2/SeContext.h
- /build/seexpr/src/SeExpr/src/SeExpr2/SeContext.cpp