#include <SLContext.h>
Public Members | |||
SLContext (Int maxAttributes) | |||
AttrPtr | Get (AttrType attrType) | ||
Get current attribute of type attrType. | |||
Void | Set (AttrType attrType, AttrPtr attrPtr) | ||
Set attribute of type attrType. | |||
Void | SetDaemon (AttrType attrType, AttrDaemon *daemon) | ||
Bool | IsCurrent (AttrType attrType) | ||
Void | Push () | ||
Push current context. | |||
Void | Pop () | ||
Restore last context. | |||
Void | Clear () | ||
Clear the context stack. | |||
Protected Members | |||
AttrList | attributeList | ||
AttrStackList | attributeStack | ||
Int | level | ||
Friends | |||
ostream& | operator<< (ostream &s, const SLContext &ctx) |
The context maintains a list of the attributes (i.e., state variables), and can conceptually pop or push that list from/to a stack. In fact attributes are only pushed / popped on a need-to basis, to avoid the overhead of copying the entire list each time.
Definition at line 73 of file SLContext.h.
SLContext::SLContext (Int numAttrs) |
Definition at line 34 of file SLContext.cc.
Void SLContext::Clear () |
AttrPtr SLContext::Get (AttrType attrType) |
Bool SLContext::IsCurrent (AttrType attrType) |
Definition at line 130 of file SLContext.cc.
Void SLContext::Pop () |
Void SLContext::Push () |
Void SLContext::Set (AttrType attrType, AttrPtr attrPtr) |
Void SLContext::SetDaemon (AttrType attrType, AttrDaemon * daemon) |
Definition at line 78 of file SLContext.cc.
ostream& operator<< (ostream & s, const SLContext & ctx) [friend]
|
Definition at line 163 of file SLContext.h.
AttrList SLContext::attributeList [protected]
|
Definition at line 91 of file SLContext.h.
AttrStackList SLContext::attributeStack [protected]
|
Definition at line 92 of file SLContext.h.
Int SLContext::level [protected]
|
Definition at line 93 of file SLContext.h.