CVC3
2.4.1
|
#include <context.h>
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_topScope, d_bottomScope, and TRACE.
Referenced by getMemory(), and CVC3::ContextManager::createContext().
Context::~Context | ( | ) |
Definition at line 221 of file context.cpp.
References d_topScope, CVC3::Scope::prevScope(), CVC3::Scope::finalize(), CVC3::Scope::getCMM(), d_cmmStack, CVC3::ContextMemoryManager::garbageCollect(), and d_notifyObjList.
ContextManager* CVC3::Context::getCM | ( | ) | const [inline] |
const std::string& CVC3::Context::name | ( | ) | const [inline] |
int CVC3::Context::id | ( | ) | const [inline] |
Definition at line 333 of file context.h.
Referenced by CVC3::ContextManager::switchContext().
Scope* CVC3::Context::topScope | ( | ) | const [inline] |
int CVC3::Context::level | ( | void | ) | const [inline] |
void Context::push | ( | ) |
Definition at line 244 of file context.cpp.
References IF_DEBUG, level(), TRACE, d_cmmStack, and d_topScope.
void Context::pop | ( | ) |
Definition at line 266 of file context.cpp.
References d_topScope, DebugAssert, CVC3::Scope::prevScope(), d_notifyObjList, CVC3::Scope::restore(), IF_DEBUG, CVC3::Scope::check(), CVC3::Scope::getCMM(), CVC3::ContextMemoryManager::pop(), d_cmmStack, level(), and TRACE.
Referenced by popto().
void Context::popto | ( | int | toLevel | ) |
Definition at line 296 of file context.cpp.
References topScope(), CVC3::Scope::level(), and pop().
void CVC3::Context::addNotifyObj | ( | ContextNotifyObj * | obj | ) | [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(), CVC3::MemoryTracker::getString(), d_name, d_topScope, CVC3::Scope::getMemory(), CVC3::MemoryTracker::getVecAndDataP(), d_notifyObjList, d_cmmStack, and CVC3::MemoryTracker::print().
ContextManager* CVC3::Context::d_cm [private] |
std::string CVC3::Context::d_name [private] |
int CVC3::Context::d_id [private] |
Scope* CVC3::Context::d_topScope [private] |
Pointer to top and bottom scopes of context.
Definition at line 317 of file context.h.
Referenced by Context(), ~Context(), push(), pop(), and getMemory().
Scope* CVC3::Context::d_bottomScope [private] |
List of objects to notify with every pop.
Definition at line 321 of file context.h.
Referenced by ~Context(), pop(), deleteNotifyObj(), and getMemory().
std::vector<ContextMemoryManager*> CVC3::Context::d_cmmStack [private] |
Stack of free ContextMemoryManager's.
Definition at line 324 of file context.h.
Referenced by ~Context(), push(), pop(), and getMemory().