CVCL::Scope Class Reference
[Context Management]

#include <context.h>

Collaboration diagram for CVCL::Scope:

Collaboration graph
List of all members.

Public Member Functions

Private Member Functions

Private Attributes


Detailed Description

Author: Clark Barrett

Created: Thu Feb 13 00:19:15 2003

A scope encapsulates the portion of a context which has changed since the last call to push(). Thus, when pop() is called, everything in this scope is restored to its previous state.

Definition at line 66 of file context.h.

Constructor & Destructor Documentation

Scope::Scope Context context,
Scope prevScope = NULL


Definition at line 53 of file context.cpp.

References d_delayDelete, d_level, IF_DEBUG(), and level().

Scope::~Scope  ) 

Delete the scope (only free up memory, do not call restore()).

Definition at line 62 of file context.cpp.

References d_delayDelete, d_level, CVCL::ContextObjChain::d_master, d_restoreChain, CVCL::ContextObjChain::d_restoreChainNext, CVCL::ContextObj::d_scope, CVCL::debugger, std::endl(), CVCL::Debug::flag(), CVCL::Debug::getOS(), IF_DEBUG(), and CVCL::Debug::trace().

Member Function Documentation

void Scope::addToChain ContextObjChain obj  )  [private]

Called by ContextObj when created.

Definition at line 42 of file context.cpp.

References d_restoreChain, CVCL::ContextObjChain::d_restoreChainNext, and CVCL::ContextObjChain::d_restoreChainPrev.

Referenced by CVCL::ContextObjChain::restore(), CVCL::ContextObj::update(), and CVCL::CDFlags::update().

Scope* CVCL::Scope::prevScope  )  const [inline]

Access functions.

Definition at line 99 of file context.h.

References d_prevScope.

Referenced by CVCL::Context::pop(), CVCL::ContextObjChain::restore(), CVCL::ContextObj::update(), CVCL::CDFlags::update(), and CVCL::Context::~Context().

int CVCL::Scope::level void   )  const [inline]

Definition at line 100 of file context.h.

References d_level.

Referenced by CVCL::ContextObj::isCurrent(), CVCL::Context::level(), CVCL::ContextObj::level(), Scope(), CVCL::ContextObj::update(), and CVCL::CDFlags::update().

void Scope::restore void   ) 

Restore all the values.

Definition at line 106 of file context.cpp.

References d_delayDelete, d_restoreChain, and CVCL::ContextObjChain::restore().

Referenced by CVCL::Context::pop().

Friends And Related Function Documentation

friend class ContextObj [friend]

Definition at line 67 of file context.h.

friend class ContextObjChain [friend]

Definition at line 68 of file context.h.

friend class CDFlags [friend]

Definition at line 69 of file context.h.

Member Data Documentation

Context* CVCL::Scope::d_context [private]

Context that created this scope.

Definition at line 71 of file context.h.

Referenced by isCurrent(), topScope(), and CVCL::Context::~Context().

Scope* CVCL::Scope::d_prevScope [private]

Previous scope in this context.

Definition at line 74 of file context.h.

Referenced by prevScope().

int CVCL::Scope::d_level [private]

Scope level.

Definition at line 77 of file context.h.

Referenced by level(), Scope(), and ~Scope().

ContextObjChain* CVCL::Scope::d_restoreChain [private]

Linked list of objects which are "current" in this scope, and thus need to be restored when the scope is deleted.

Definition at line 81 of file context.h.

Referenced by addToChain(), restore(), and ~Scope().

std::vector<ContextObjChain*> CVCL::Scope::d_deleted [private]

Deleted ContextObj's (queued up for deletion during restore()).

Definition at line 84 of file context.h.

bool CVCL::Scope::d_delayDelete [private]

Set while inside restore() or ~Scope() methods.

Definition at line 87 of file context.h.

Referenced by restore(), Scope(), CVCL::ContextObj::~ContextObj(), and ~Scope().

The documentation for this class was generated from the following files:
Generated on Thu Apr 13 16:57:42 2006 for CVC Lite by  doxygen 1.4.4