CVCL::ContextObj Class Reference
[Context Management]

#include <context.h>

Inheritance diagram for CVCL::ContextObj:

Inheritance graph
[legend]
Collaboration diagram for CVCL::ContextObj:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Protected Member Functions

Private Member Functions

Private Attributes

Friends


Detailed Description

Description: This is a generic class from which all objects that are context-dependent should inherit. Subclasses need to implement makeCopy, restoreData, and setNull.

Definition at line 165 of file context.h.


Constructor & Destructor Documentation

CVCL::ContextObj::ContextObj const ContextObj co  )  [protected]
 

Copy constructor (defined mainly for debugging purposes).

ContextObj::ContextObj Context context,
bool  atBottomScope = true
 

Create a new ContextObj.

The initial scope is set to the bottom scope by default, to reduce the work of pop() (otherwise, if the object is defined only on a very high scope, its scope will be moved down with each pop). If 'atBottomScope' == false, the scope is set to the current scope.

Definition at line 232 of file context.cpp.

References IF_DEBUG(), and CVCL::TRACE.

ContextObj::~ContextObj  )  [virtual]
 

Definition at line 245 of file context.cpp.

References CVCL::Scope::d_delayDelete, CVCL::ContextObjChain::d_restore, d_restore, CVCL::ContextObjChain::d_restoreChainNext, CVCL::ContextObjChain::d_restoreChainPrev, d_scope, IF_DEBUG(), and CVCL::TRACE.


Member Function Documentation

CVCL::ContextObj::IF_DEBUG std::string  d_name  )  [private]
 

CVCL::ContextObj::IF_DEBUG bool  d_active  )  [private]
 

void ContextObj::update int  scope = -1  )  [private]
 

Update on the given scope, on the current scope if 'scope' == 0.

Definition at line 194 of file context.cpp.

References CVCL::Scope::addToChain(), ContextObjChain, d_restore, d_scope, IF_DEBUG(), CVCL::int2string(), CVCL::Scope::level(), level(), makeCopy(), CVCL::Scope::prevScope(), and CVCL::Scope::topScope().

Referenced by makeCurrent().

ContextObj & ContextObj::operator= const ContextObj co  )  [protected]
 

Assignment operator (defined mainly for debugging purposes).

Definition at line 188 of file context.cpp.

virtual ContextObj* CVCL::ContextObj::makeCopy void   )  [protected, pure virtual]
 

Make a copy of the current object so it can be restored to its current state.

Implemented in CVCL::CDFlags, CVCL::CDList< T >, CVCL::CDOmap< Key, Data, HashFcn >, CVCL::CDMapData, CVCL::CDMap< Key, Data, HashFcn >, CVCL::CDOmapOrdered< Key, Data >, CVCL::CDMapOrderedData, CVCL::CDMapOrdered< Key, Data >, CVCL::CDO< T >, CVCL::CDList< Theory * >, CVCL::CDList< Theorem >, CVCL::CDList< Literal >, CVCL::CDList< SAT::Lit >, CVCL::CDList< ProcessKinds >, CVCL::CDList< Splitter >, CVCL::CDList< Expr >, CVCL::CDList< ClauseOwner >, CVCL::CDList< Clause >, CVCL::CDList< SmartCDO< Theorem > >, CVCL::CDOmap< Expr, bool, HashFcn >, CVCL::CDOmap< Expr, Theory *, HashFcn >, CVCL::CDOmap< std::string, bool, HashFcn >, CVCL::CDOmap< Expr, int, HashFcn >, CVCL::CDOmap< Expr, FreeConst, HashFcn >, CVCL::CDOmap< Expr, UserAssertion, HashFcn >, CVCL::CDOmap< Expr, Theorem, HashFcn >, CVCL::CDOmap< int, CVCL::Theorem, HashFcn >, CVCL::CDOmap< Expr, Literal, HashFcn >, CVCL::CDOmap< Expr, SmartCDO< bigunsigned >, HashFcn >, CVCL::CDMap< Expr, bool, HashFcn >, CVCL::CDMap< Expr, Theory *, HashFcn >, CVCL::CDMap< std::string, bool >, CVCL::CDMap< Expr, int >, CVCL::CDMap< int, CVCL::Theorem >, CVCL::CDMap< Expr, FreeConst >, CVCL::CDMap< std::string, bool, HashFcn >, CVCL::CDMap< Expr, Literal >, CVCL::CDMap< Expr, int, HashFcn >, CVCL::CDMap< Expr, FreeConst, HashFcn >, CVCL::CDMap< Expr, UserAssertion, HashFcn >, CVCL::CDMap< Expr, bool >, CVCL::CDMap< Expr, Theorem, HashFcn >, CVCL::CDMap< int, CVCL::Theorem, HashFcn >, CVCL::CDMap< Expr, Theory * >, CVCL::CDMap< Expr, Literal, HashFcn >, CVCL::CDMap< Expr, SmartCDO< bigunsigned >, HashFcn >, CVCL::CDMap< Expr, Theorem >, CVCL::CDMap< Expr, SmartCDO< bigunsigned > >, CVCL::CDMap< Expr, UserAssertion >, CVCL::CDO< int >, CVCL::CDO< Theorem >, CVCL::CDO< U >, CVCL::CDO< Expr >, CVCL::CDO< size_t >, CVCL::CDO< Clause >, CVCL::CDO< bigunsigned >, CVCL::CDO< unsigned >, and CVCL::CDO< bool >.

Referenced by update().

virtual void CVCL::ContextObj::restoreData ContextObj data  )  [inline, protected, virtual]
 

Restore the current object from the given data.

Reimplemented in CVCL::CDFlags, CVCL::CDList< T >, CVCL::CDOmap< Key, Data, HashFcn >, CVCL::CDMapData, CVCL::CDMap< Key, Data, HashFcn >, CVCL::CDOmapOrdered< Key, Data >, CVCL::CDMapOrderedData, CVCL::CDMapOrdered< Key, Data >, CVCL::CDO< T >, CVCL::CDList< Theory * >, CVCL::CDList< Theorem >, CVCL::CDList< Literal >, CVCL::CDList< SAT::Lit >, CVCL::CDList< ProcessKinds >, CVCL::CDList< Splitter >, CVCL::CDList< Expr >, CVCL::CDList< ClauseOwner >, CVCL::CDList< Clause >, CVCL::CDList< SmartCDO< Theorem > >, CVCL::CDOmap< Expr, bool, HashFcn >, CVCL::CDOmap< Expr, Theory *, HashFcn >, CVCL::CDOmap< std::string, bool, HashFcn >, CVCL::CDOmap< Expr, int, HashFcn >, CVCL::CDOmap< Expr, FreeConst, HashFcn >, CVCL::CDOmap< Expr, UserAssertion, HashFcn >, CVCL::CDOmap< Expr, Theorem, HashFcn >, CVCL::CDOmap< int, CVCL::Theorem, HashFcn >, CVCL::CDOmap< Expr, Literal, HashFcn >, CVCL::CDOmap< Expr, SmartCDO< bigunsigned >, HashFcn >, CVCL::CDMap< Expr, bool, HashFcn >, CVCL::CDMap< Expr, Theory *, HashFcn >, CVCL::CDMap< std::string, bool >, CVCL::CDMap< Expr, int >, CVCL::CDMap< int, CVCL::Theorem >, CVCL::CDMap< Expr, FreeConst >, CVCL::CDMap< std::string, bool, HashFcn >, CVCL::CDMap< Expr, Literal >, CVCL::CDMap< Expr, int, HashFcn >, CVCL::CDMap< Expr, FreeConst, HashFcn >, CVCL::CDMap< Expr, UserAssertion, HashFcn >, CVCL::CDMap< Expr, bool >, CVCL::CDMap< Expr, Theorem, HashFcn >, CVCL::CDMap< int, CVCL::Theorem, HashFcn >, CVCL::CDMap< Expr, Theory * >, CVCL::CDMap< Expr, Literal, HashFcn >, CVCL::CDMap< Expr, SmartCDO< bigunsigned >, HashFcn >, CVCL::CDMap< Expr, Theorem >, CVCL::CDMap< Expr, SmartCDO< bigunsigned > >, CVCL::CDMap< Expr, UserAssertion >, CVCL::CDO< int >, CVCL::CDO< Theorem >, CVCL::CDO< U >, CVCL::CDO< Expr >, CVCL::CDO< size_t >, CVCL::CDO< Clause >, CVCL::CDO< bigunsigned >, CVCL::CDO< unsigned >, and CVCL::CDO< bool >.

Definition at line 193 of file context.h.

Referenced by CVCL::ContextObjChain::restore().

virtual void CVCL::ContextObj::setNull void   )  [protected, pure virtual]
 

Set the current object to be invalid.

Implemented in CVCL::CDFlags, CVCL::CDList< T >, CVCL::CDOmap< Key, Data, HashFcn >, CVCL::CDMapData, CVCL::CDMap< Key, Data, HashFcn >, CVCL::CDOmapOrdered< Key, Data >, CVCL::CDMapOrderedData, CVCL::CDMapOrdered< Key, Data >, CVCL::CDO< T >, CVCL::CDList< Theory * >, CVCL::CDList< Theorem >, CVCL::CDList< Literal >, CVCL::CDList< SAT::Lit >, CVCL::CDList< ProcessKinds >, CVCL::CDList< Splitter >, CVCL::CDList< Expr >, CVCL::CDList< ClauseOwner >, CVCL::CDList< Clause >, CVCL::CDList< SmartCDO< Theorem > >, CVCL::CDOmap< Expr, bool, HashFcn >, CVCL::CDOmap< Expr, Theory *, HashFcn >, CVCL::CDOmap< std::string, bool, HashFcn >, CVCL::CDOmap< Expr, int, HashFcn >, CVCL::CDOmap< Expr, FreeConst, HashFcn >, CVCL::CDOmap< Expr, UserAssertion, HashFcn >, CVCL::CDOmap< Expr, Theorem, HashFcn >, CVCL::CDOmap< int, CVCL::Theorem, HashFcn >, CVCL::CDOmap< Expr, Literal, HashFcn >, CVCL::CDOmap< Expr, SmartCDO< bigunsigned >, HashFcn >, CVCL::CDMap< Expr, bool, HashFcn >, CVCL::CDMap< Expr, Theory *, HashFcn >, CVCL::CDMap< std::string, bool >, CVCL::CDMap< Expr, int >, CVCL::CDMap< int, CVCL::Theorem >, CVCL::CDMap< Expr, FreeConst >, CVCL::CDMap< std::string, bool, HashFcn >, CVCL::CDMap< Expr, Literal >, CVCL::CDMap< Expr, int, HashFcn >, CVCL::CDMap< Expr, FreeConst, HashFcn >, CVCL::CDMap< Expr, UserAssertion, HashFcn >, CVCL::CDMap< Expr, bool >, CVCL::CDMap< Expr, Theorem, HashFcn >, CVCL::CDMap< int, CVCL::Theorem, HashFcn >, CVCL::CDMap< Expr, Theory * >, CVCL::CDMap< Expr, Literal, HashFcn >, CVCL::CDMap< Expr, SmartCDO< bigunsigned >, HashFcn >, CVCL::CDMap< Expr, Theorem >, CVCL::CDMap< Expr, SmartCDO< bigunsigned > >, CVCL::CDMap< Expr, UserAssertion >, CVCL::CDO< int >, CVCL::CDO< Theorem >, CVCL::CDO< U >, CVCL::CDO< Expr >, CVCL::CDO< size_t >, CVCL::CDO< Clause >, CVCL::CDO< bigunsigned >, CVCL::CDO< unsigned >, and CVCL::CDO< bool >.

Referenced by CVCL::ContextObjChain::restore().

CVCL::ContextObj::IF_DEBUG  )  [protected]
 

Return our name (for debugging).

Referenced by CVCL::CDFlags::CDFlags(), CVCL::CDList< SmartCDO< Theorem > >::CDList(), CVCL::CDMap< Expr, UserAssertion >::CDMap(), CVCL::CDMapOrdered< Key, Data >::CDMapOrdered(), CVCL::CDO< bool >::CDO(), CVCL::CDOmap< Expr, SmartCDO< bigunsigned >, HashFcn >::CDOmap(), CVCL::CDOmapOrdered< Key, Data >::CDOmapOrdered(), update(), CVCL::CDFlags::update(), and ~ContextObj().

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

Definition at line 216 of file context.h.

References d_scope, and CVCL::Scope::level().

Referenced by update(), and CVCL::CDFlags::update().

bool CVCL::ContextObj::isCurrent int  scope = -1  )  const [inline]
 

Definition at line 217 of file context.h.

References d_scope, CVCL::Scope::isCurrent(), and CVCL::Scope::level().

Referenced by makeCurrent().

void CVCL::ContextObj::makeCurrent int  scope = -1  )  [inline]
 

Definition at line 221 of file context.h.

References isCurrent(), and update().

Referenced by CVCL::CDList< SmartCDO< Theorem > >::push_back(), CVCL::CDO< bool >::set(), CVCL::CDOmapOrdered< Key, Data >::set(), CVCL::CDOmap< Expr, SmartCDO< bigunsigned >, HashFcn >::set(), and CVCL::CDFlags::update().

CVCL::ContextObj::IF_DEBUG  ) 
 


Friends And Related Function Documentation

friend class Scope [friend]
 

Definition at line 166 of file context.h.

friend class ContextObjChain [friend]
 

Definition at line 167 of file context.h.

Referenced by update(), and CVCL::CDFlags::update().

friend class CDFlags [friend]
 

Definition at line 168 of file context.h.


Member Data Documentation

Scope* CVCL::ContextObj::d_scope [private]
 

Last scope in which this object was modified.

Definition at line 171 of file context.h.

Referenced by isCurrent(), level(), CVCL::ContextObjChain::restore(), update(), CVCL::CDFlags::update(), ~ContextObj(), and CVCL::Scope::~Scope().

ContextObjChain* CVCL::ContextObj::d_restore [private]
 

The list of values on previous scopes; our destructor should clean up those.

Definition at line 175 of file context.h.

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


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