Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_M_RefCounted Class Reference

Mix-in class for objects that are reference counted.

Inheritance diagram for CP_M_RefCounted:

CP_DataSource CP_FileFilter CP_Font CP_FontMetrics CP_FontRecord CP_HDC CP_ImageList CP_KeyInputFilter CP_MacOSHandle CP_MacOSPtr CP_Menu CP_OSIcon CP_Palette CP_PropertyList::Node CP_TimeZone CP_TV_DataBrowser_CH_Base CP_ViewBackground List of all members.

Public Member Functions

operators
CP_M_RefCountedoperator= (const CP_M_RefCounted &inRefCounted)

Protected Member Functions

Constructor / Destructor
 CP_M_RefCounted ()
 Constructor.
 CP_M_RefCounted (CP_M_RefCounted &inRefCounted)
virtual ~CP_M_RefCounted ()
 Destructor.

Private Attributes

UInt32 fRefCount

Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_M_RefCounted::CP_M_RefCounted  )  [protected]
 

Constructor.

Exceptions:
none 

CP_M_RefCounted::CP_M_RefCounted CP_M_RefCounted inRefCounted  )  [protected]
 

Copy constructor.

Parameters:
inRefCounted Not used.
Exceptions:
none 

CP_M_RefCounted::~CP_M_RefCounted  )  [protected, virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

UInt32 CP_M_RefCounted::AddReference  )  const
 

Add a reference to our object, returning the new reference count.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

UInt32 CP_M_RefCounted::RemoveReference  )  const
 

Remove a reference to our object, returning the new reference count. If the count is 0, then this object is also deleted, and 0 is returned.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

void CP_M_RefCounted::Autorelease  )  const
 

Add the object to the topmost auto-release pool. This will ensure that the object is eventually released.

See also:
CP_AutoReleasePool
Exceptions:
none 
Returns:
void

UInt32 CP_M_RefCounted::GetRefCount  )  const
 

Returns the current ref count.

Exceptions:
none 
Returns:
UInt32 The current referencce count.

CP_M_RefCounted & CP_M_RefCounted::operator= const CP_M_RefCounted inRefCounted  ) 
 

Assignment operator.

Parameters:
inRefCounted Object to copy.
Exceptions:
none 
Returns:
CP_M_RefCounted Returns a reference to ourselves.


Member Data Documentation

UInt32 CP_M_RefCounted::fRefCount [mutable, private]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:49 2005 for CPLAT by  doxygen 1.4.0