CVC3::Context Class Reference
[Context Management]

#include <context.h>

Collaboration diagram for CVC3::Context:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Attributes


Detailed Description

Encapsulates the general notion of stack-based saving and restoring of a database.

Definition at line 301 of file context.h.


Constructor & Destructor Documentation

Context::Context ( ContextManager cm,
const std::string &  name,
int  id 
)

Definition at line 184 of file context.cpp.

References d_bottomScope, d_topScope, and CVC3::TRACE.

Context::~Context (  ) 

Definition at line 197 of file context.cpp.

References d_cmmStack, d_notifyObjList, d_topScope, CVC3::Scope::finalize(), CVC3::ContextMemoryManager::garbageCollect(), CVC3::Scope::getCMM(), and CVC3::Scope::prevScope().


Member Function Documentation

ContextManager* CVC3::Context::getCM (  )  const [inline]

Access methods.

Definition at line 326 of file context.h.

const std::string& CVC3::Context::name (  )  const [inline]

Definition at line 327 of file context.h.

int CVC3::Context::id (  )  const [inline]

Definition at line 328 of file context.h.

Referenced by CVC3::ContextManager::switchContext().

Scope* CVC3::Context::topScope (  )  const [inline]

Definition at line 329 of file context.h.

Referenced by CVC3::Scope::isCurrent(), popto(), and CVC3::Scope::topScope().

Scope* CVC3::Context::bottomScope (  )  const [inline]

Definition at line 330 of file context.h.

int CVC3::Context::level ( void   )  const [inline]

Definition at line 331 of file context.h.

Referenced by pop(), popto(), push(), and CVC3::ContextManager::scopeLevel().

void Context::push (  ) 

Definition at line 220 of file context.cpp.

References CVC3::Debug::counter(), d_cmmStack, d_topScope, CVC3::debugger, IF_DEBUG, level(), and CVC3::TRACE.

Referenced by CVC3::ContextManager::push().

void Context::pop (  ) 

Definition at line 242 of file context.cpp.

References CVC3::Scope::check(), d_cmmStack, d_notifyObjList, d_topScope, DebugAssert, CVC3::Scope::getCMM(), IF_DEBUG, level(), CVC3::ContextMemoryManager::pop(), CVC3::Scope::prevScope(), CVC3::Scope::restore(), and CVC3::TRACE.

Referenced by CVC3::ContextManager::pop(), and popto().

void Context::popto ( int  toLevel  ) 

Definition at line 272 of file context.cpp.

References level(), pop(), and topScope().

Referenced by CVC3::ContextManager::popto().

void CVC3::Context::addNotifyObj ( ContextNotifyObj obj  )  [inline]

Definition at line 336 of file context.h.

Referenced by CVC3::ContextNotifyObj::ContextNotifyObj().

void Context::deleteNotifyObj ( ContextNotifyObj obj  ) 

Definition at line 278 of file context.cpp.

References d_notifyObjList.

Referenced by CVC3::ContextNotifyObj::~ContextNotifyObj().

unsigned long Context::getMemory (  ) 

Definition at line 288 of file context.cpp.

References d_cmmStack, d_topScope, std::endl(), CVC3::Scope::getCMM(), CVC3::ContextMemoryManager::getMemory(), CVC3::ContextMemoryManager::getStaticMemory(), CVC3::Scope::level(), and CVC3::Scope::prevScope().

Referenced by CVC3::ContextManager::getMemory().


Member Data Documentation

ContextManager* CVC3::Context::d_cm [private]

Context Manager.

Definition at line 303 of file context.h.

std::string CVC3::Context::d_name [private]

Name of context.

Definition at line 306 of file context.h.

int CVC3::Context::d_id [private]

Context ID.

Definition at line 309 of file context.h.

Scope* CVC3::Context::d_topScope [private]

Pointer to top and bottom scopes of context.

Definition at line 312 of file context.h.

Referenced by Context(), getMemory(), pop(), push(), and ~Context().

Scope* CVC3::Context::d_bottomScope [private]

Definition at line 313 of file context.h.

Referenced by Context().

std::vector<ContextNotifyObj*> CVC3::Context::d_notifyObjList [private]

List of objects to notify with every pop.

Definition at line 316 of file context.h.

Referenced by deleteNotifyObj(), pop(), and ~Context().

std::vector<ContextMemoryManager*> CVC3::Context::d_cmmStack [private]

Stack of free ContextMemoryManager's.

Definition at line 319 of file context.h.

Referenced by getMemory(), pop(), push(), and ~Context().


The documentation for this class was generated from the following files:
Generated on Tue Jul 3 14:36:04 2007 for CVC3 by  doxygen 1.5.1