CVC3
2.4.1
|
#include <context.h>
Public Member Functions | |
Scope (Context *context, ContextMemoryManager *cmm, Scope *prevScope=NULL) | |
Constructor. More... | |
~Scope () | |
Destructor. More... | |
Scope * | prevScope () const |
Access functions. More... | |
int | level (void) const |
bool | isCurrent (void) const |
Scope * | topScope () const |
Context * | getContext () const |
ContextMemoryManager * | getCMM () const |
void * | operator new (size_t size, MemoryManager *mm) |
void | operator delete (void *pMem, MemoryManager *mm) |
void | operator delete (void *) |
void | restore (void) |
Restore all the values. More... | |
void | finalize (void) |
Called by ~ContextManager. More... | |
void | check (void) |
Check for memory leaks. More... | |
unsigned long | getMemory (int verbosity) |
Compute memory used. More... | |
Private Member Functions | |
void | addToChain (ContextObjChain *obj) |
Called by ContextObj when created. More... | |
Private Attributes | |
Context * | d_context |
Context that created this scope. More... | |
ContextMemoryManager * | d_cmm |
Memory manager for this scope. More... | |
Scope * | d_prevScope |
Previous scope in this context. More... | |
int | d_level |
Scope level. More... | |
ContextObjChain * | d_restoreChain |
Linked list of objects which are "current" in this scope, and thus need to be restored when the scope is deleted. More... | |
Friends | |
class | ContextObj |
class | ContextObjChain |
class | CDFlags |
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.
|
inline |
|
inline |
Access functions.
Definition at line 94 of file context.h.
References d_prevScope.
Referenced by CVC3::Context::pop(), Scope(), CVC3::CDFlags::update(), and CVC3::Context::~Context().
|
inline |
Definition at line 95 of file context.h.
References d_level.
Referenced by CVC3::ContextObj::isCurrent(), CVC3::ContextObj::level(), CVC3::Context::level(), CVC3::Context::popto(), Scope(), and CVC3::CDFlags::update().
|
inline |
|
inline |
Definition at line 99 of file context.h.
References d_cmm.
Referenced by CVC3::ContextObj::getCMM(), CVC3::Context::pop(), CVC3::CDFlags::update(), and CVC3::Context::~Context().
|
inline |
Definition at line 101 of file context.h.
References CVC3::ContextMemoryManager::newData().
|
inline |
void Scope::finalize | ( | void | ) |
Called by ~ContextManager.
Definition at line 37 of file context.cpp.
References CVC3::ContextObjChain::d_master, CVC3::ContextObj::d_restore, CVC3::ContextObjChain::d_restoreChainNext, and CVC3::ContextObj::d_scope.
Referenced by CVC3::Context::~Context().
void Scope::check | ( | void | ) |
Check for memory leaks.
Definition at line 55 of file context.cpp.
References CVC3::ContextObjChain::d_restoreChainNext, std::endl(), and IF_DEBUG.
Referenced by CVC3::Context::pop().
unsigned long Scope::getMemory | ( | int | verbosity | ) |
Compute memory used.
Definition at line 82 of file context.cpp.
References std::endl().
Referenced by CVC3::Context::getMemory().
|
friend |
|
friend |
|
private |
Context that created this scope.
Definition at line 65 of file context.h.
Referenced by getContext().
|
private |
|
private |
|
private |
|
private |