Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

mpcl::memory::TBaseSmartPointer Class Reference

Base class for smart pointers. More...

#include <base_smart_pointer.hh>

Inheritance diagram for mpcl::memory::TBaseSmartPointer:

mpcl::memory::TAllocSmartPointer< TItem, TAllocator > mpcl::memory::TSmartPointer< TItem > List of all members.

Public Types

typedef TSharedCell cell_type
 Cell type.


Public Methods

 TBaseSmartPointer (void) throw ()
 Builds a new instance.

virtual ~TBaseSmartPointer (void)
 Destroys the instance.

const void * address (void) const throw ()
bool isNull (void) const throw ()
long unsigned int references (void) const throw (TConstraintException)

Protected Types

typedef const TSharedCellcell_const_reference
typedef TSharedCellcell_pointer
typedef TSharedCellcell_reference

Protected Attributes

cell_pointer ptSharedCell
 Pointer to shared cell.


Detailed Description

Base class for smart pointers.

Definition at line 79 of file base_smart_pointer.hh.


Member Typedef Documentation

typedef const TSharedCell& mpcl::memory::TBaseSmartPointer::cell_const_reference [protected]
 

Cell const reference type.

See also:
lib.container.requirements.

Definition at line 90 of file base_smart_pointer.hh.

typedef TSharedCell* mpcl::memory::TBaseSmartPointer::cell_pointer [protected]
 

Cell pointer type.

See also:
lib.container.requirements.

Definition at line 98 of file base_smart_pointer.hh.

typedef TSharedCell& mpcl::memory::TBaseSmartPointer::cell_reference [protected]
 

Cell reference type.

See also:
lib.container.requirements.

Definition at line 106 of file base_smart_pointer.hh.


Member Function Documentation

const void* mpcl::memory::TBaseSmartPointer::address void    const throw () [inline]
 

Returns the address of the object pointed to.

Returns:
Current pointed object.

Definition at line 161 of file base_smart_pointer.hh.

References ptSharedCell.

bool mpcl::memory::TBaseSmartPointer::isNull void    const throw () [inline]
 

Checks if the smart pointer is empty.

Returns:
True if the instance is pointing to nothing.

Definition at line 192 of file base_smart_pointer.hh.

References ptSharedCell.

long unsigned int mpcl::memory::TBaseSmartPointer::references void    const throw (TConstraintException) [inline]
 

Returns the reference count to the item pointed by this.

Returns:
Reference count.
Exceptions:
TConstraintException  Whenever pointer is null.

Definition at line 202 of file base_smart_pointer.hh.

References ptSharedCell.


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:25 2003 for MPCL by doxygen1.2.18