CVC3  2.4.1
Classes | Public Member Functions | Private Attributes
CVC3::SmartCDO Class Reference

SmartCDO. More...

#include <smartcdo.h>

List of all members.

Classes

Public Member Functions

Private Attributes


Detailed Description

SmartCDO.

Author: Clark Barrett

Created: Fri Nov 12 17:33:31 2004

Wrapper for CDO which automatically allocates and deletes a pointer to a CDO. This allows the copy constructor and operator= to be defined which are especially useful for storing CDO's in vectors. All operations are const to enable use as a member of CDLists.

Be careful not to delete RefCDO during pop(), since this messes up the backtracking data structures. We delay the deletion by registering each RefCDO to be notified before and after each pop(). This makes the use of SmartCDO somewhat more expensive, so use it with care.


Constructor & Destructor Documentation

CVC3::SmartCDO::SmartCDO ( ) [inline]

Default constructor: create a Null SmartCDO object.

Definition at line 96 of file smartcdo.h.

CVC3::SmartCDO::SmartCDO ( Context context) [inline]

Create and initialize SmartCDO object at the current scope.

Definition at line 98 of file smartcdo.h.

References d_data, and CVC3::SmartCDO::RefCDO::d_refCount.

CVC3::SmartCDO::SmartCDO ( Context context,
const T &  data,
int  scope = -1 
) [inline]

Create and initialize SmartCDO object at the given scope.

Definition at line 101 of file smartcdo.h.

References d_data, and CVC3::SmartCDO::RefCDO::d_refCount.

CVC3::SmartCDO::~SmartCDO ( ) [inline]

Delete.

Definition at line 104 of file smartcdo.h.

References isNull(), d_data, CVC3::SmartCDO::RefCDO::d_refCount, and CVC3::SmartCDO::RefCDO::kill().

CVC3::SmartCDO::SmartCDO ( const SmartCDO< T > &  cdo) [inline]

Definition at line 108 of file smartcdo.h.

References isNull(), d_data, and CVC3::SmartCDO::RefCDO::d_refCount.


Member Function Documentation

bool CVC3::SmartCDO::isNull ( ) const [inline]

Check if the SmartCDO object is Null.

Definition at line 94 of file smartcdo.h.

References d_data.

Referenced by ~SmartCDO(), SmartCDO(), operator=(), set(), and get().

SmartCDO<T>& CVC3::SmartCDO::operator= ( const SmartCDO< T > &  cdo) [inline]
void CVC3::SmartCDO::set ( const T &  data,
int  scope = -1 
) const [inline]

Definition at line 120 of file smartcdo.h.

References DebugAssert, isNull(), d_data, CVC3::SmartCDO::RefCDO::d_cdo, and CVC3::CDO::set().

const T& CVC3::SmartCDO::get ( ) const [inline]

Definition at line 124 of file smartcdo.h.

References DebugAssert, isNull(), d_data, CVC3::SmartCDO::RefCDO::d_cdo, and CVC3::CDO::get().

CVC3::SmartCDO::operator T ( ) const [inline]

Definition at line 128 of file smartcdo.h.

const SmartCDO<T>& CVC3::SmartCDO::operator= ( const T &  data) const [inline]

Definition at line 129 of file smartcdo.h.


Member Data Documentation

Definition at line 90 of file smartcdo.h.

Referenced by isNull(), SmartCDO(), ~SmartCDO(), operator=(), set(), and get().


The documentation for this class was generated from the following file: