CVC3
2.4.1
|
#include <context.h>
Public Member Functions | |
Context (ContextManager *cm, const std::string &name, int id) | |
~Context () | |
ContextManager * | getCM () const |
Access methods. | |
const std::string & | name () const |
int | id () const |
Scope * | topScope () const |
Scope * | bottomScope () const |
int | level () const |
void | push () |
void | pop () |
void | popto (int toLevel) |
void | addNotifyObj (ContextNotifyObj *obj) |
void | deleteNotifyObj (ContextNotifyObj *obj) |
unsigned long | getMemory (int verbosity) |
Private Attributes | |
ContextManager * | d_cm |
Context Manager. | |
std::string | d_name |
Name of context. | |
int | d_id |
Context ID. | |
Scope * | d_topScope |
Pointer to top and bottom scopes of context. | |
Scope * | d_bottomScope |
std::vector< ContextNotifyObj * > | d_notifyObjList |
List of objects to notify with every pop. | |
std::vector < ContextMemoryManager * > | d_cmmStack |
Stack of free ContextMemoryManager's. |
Encapsulates the general notion of stack-based saving and restoring of a database.
Context::Context | ( | ContextManager * | cm, |
const std::string & | name, | ||
int | id | ||
) |
Definition at line 208 of file context.cpp.
References d_bottomScope, d_topScope, and TRACE.
Referenced by CVC3::ContextManager::createContext(), and getMemory().
Context::~Context | ( | ) |
Definition at line 221 of file context.cpp.
References d_cmmStack, d_notifyObjList, d_topScope, CVC3::Scope::finalize(), CVC3::ContextMemoryManager::garbageCollect(), CVC3::Scope::getCMM(), and CVC3::Scope::prevScope().
|
inline |
|
inline |
Definition at line 333 of file context.h.
Referenced by CVC3::ContextManager::switchContext().
|
inline |
|
inline |
void Context::push | ( | ) |
Definition at line 244 of file context.cpp.
References d_cmmStack, d_topScope, IF_DEBUG, level(), and TRACE.
void Context::pop | ( | ) |
Definition at line 266 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 TRACE.
Referenced by popto().
void Context::popto | ( | int | toLevel | ) |
Definition at line 296 of file context.cpp.
References CVC3::Scope::level(), pop(), and topScope().
|
inline |
Definition at line 341 of file context.h.
Referenced by CVC3::ContextNotifyObj::ContextNotifyObj().
void Context::deleteNotifyObj | ( | ContextNotifyObj * | obj | ) |
Definition at line 302 of file context.cpp.
References d_notifyObjList.
unsigned long Context::getMemory | ( | int | verbosity | ) |
Definition at line 312 of file context.cpp.
References Context(), d_cmmStack, d_name, d_notifyObjList, d_topScope, CVC3::Scope::getMemory(), CVC3::MemoryTracker::getString(), CVC3::MemoryTracker::getVecAndDataP(), and CVC3::MemoryTracker::print().
|
private |
|
private |
|
private |
Pointer to top and bottom scopes of context.
Definition at line 317 of file context.h.
Referenced by Context(), getMemory(), pop(), push(), and ~Context().
|
private |
|
private |
List of objects to notify with every pop.
Definition at line 321 of file context.h.
Referenced by deleteNotifyObj(), getMemory(), pop(), and ~Context().
|
private |
Stack of free ContextMemoryManager's.
Definition at line 324 of file context.h.
Referenced by getMemory(), pop(), push(), and ~Context().