base::Shared Class Reference

Base class containing a reference-count maintained by SharedPtr. More...

#include <base_shared_ptr.hh>

Inheritance diagram for base::Shared:

base::Array< T > base::Dlist< T, LOCK > base::Event< EVENT >::ListenerFunctor base::TempArray< T, TEMP, TEMP_SIZE > mod_sim::ModuleSim::StartupIdleFunctor

List of all members.

Public Member Functions

uint GetRefCnt (void) const
void IncRefCnt (void)

Protected Member Functions

 Shared (void)
 Shared (const Shared &src)
 ~Shared ()
Sharedoperator= (const Shared &src)

Private Attributes

int mRefCnt

Friends

class SharedPtr
class SharedPtrNull
class SharedPtrLocked
class SharedPtrNullLocked


Detailed Description

Base class containing a reference-count maintained by SharedPtr.

Shared provides storage for the reference-count that SharedPtr maintains. Combining the reference-count with the object reduces memory allocations (as opposed to allocating a separate reference-count).

Shared is just a data class. SharedPtr computes the reference-count.

-----------------------------------------------------------------------------


Constructor & Destructor Documentation

base::Shared::Shared ( void   )  [inline, protected]

base::Shared::Shared ( const Shared src  )  [inline, protected]

base::Shared::~Shared (  )  [inline, protected]


Member Function Documentation

uint base::Shared::GetRefCnt ( void   )  const [inline]

void base::Shared::IncRefCnt ( void   )  [inline]

LIMITED USE: A special case is where a class has a Shared as an actual member but has methods that return it as a SharedPtr. The class implicitly hold a reference to it, so ctor should increment ref-cnt.

Shared& base::Shared::operator= ( const Shared src  )  [inline, protected]


Friends And Related Function Documentation

friend class SharedPtr [friend]

friend class SharedPtrNull [friend]

friend class SharedPtrLocked [friend]

friend class SharedPtrNullLocked [friend]


Member Data Documentation

int base::Shared::mRefCnt [mutable, private]


The documentation for this class was generated from the following file: Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:19 2007