User Manual, Developers Guide and API Documentation

wns::SmartPtrBase Class Reference

Base class to SmartPtr for debugging purpose. More...

#include <SmartPtrBase.hpp>

Collaboration diagram for wns::SmartPtrBase:

Collaboration graph
[legend]

List of all members.

Public Types

typedef long long int Id
 Identifier type.

Public Member Functions

std::string getBacktrace ()
 SmartPtrBase ()
 Does bookkeeping for all SmartPtr for debugging support.
virtual ~SmartPtrBase ()
 Does bookkeeping for all SmartPtr for debugging support.

Static Public Member Functions

static void printAllExistingPointers ()
 Prints information about all SmartPtr instances currently existing.

Private Types

typedef std::list< SmartPtrBase * > SmartPtrBaseContainer

Private Member Functions

virtual Id getId () const =0
 Provides ID for SmartPtr instances. IDs are unique within different SmartPtr types.
virtual wns::TypeInfo getTypeInfo () const =0
 Provide type information on the SmartPtr.

Static Private Member Functions

static SmartPtrBaseContainergetAllPointers ()
 Stores all currently existing SmartPtr instances.
static IdgetCounter ()
 Counter to provide the unique IDs.

Private Attributes

std::string backtrace
 To record the backtrace for all created SmartPtrs.
Id globalId
 Global identifier.


Detailed Description

This class extends the debugging support of SmartPtr. It is basically here in order to be able to put all SmartPtr into _one_ container. Additionally this class provides a ID for each SmartPtrBase that has ever been allocated. This helps to identify each pointer and trap its time/point of creation. Furthermore the SmartPtr is forced to provide an ID for each distinct TYPE of SmartPtr.

Note:
The bookkeeping is rather expensive and will definetly slow down your simulation.

Definition at line 53 of file SmartPtrBase.hpp.


Member Typedef Documentation

typedef long long int wns::SmartPtrBase::Id

Definition at line 60 of file SmartPtrBase.hpp.

Definition at line 55 of file SmartPtrBase.hpp.


Constructor & Destructor Documentation

wns::SmartPtrBase::SmartPtrBase (  )  [inline]

Definition at line 65 of file SmartPtrBase.hpp.

virtual wns::SmartPtrBase::~SmartPtrBase (  )  [inline, virtual]

Definition at line 78 of file SmartPtrBase.hpp.


Member Function Documentation

static SmartPtrBaseContainer& wns::SmartPtrBase::getAllPointers (  )  [inline, static, private]

Definition at line 138 of file SmartPtrBase.hpp.

std::string wns::SmartPtrBase::getBacktrace (  )  [inline]

Definition at line 106 of file SmartPtrBase.hpp.

static Id& wns::SmartPtrBase::getCounter (  )  [inline, static, private]

Definition at line 128 of file SmartPtrBase.hpp.

virtual Id wns::SmartPtrBase::getId (  )  const [private, pure virtual]

virtual wns::TypeInfo wns::SmartPtrBase::getTypeInfo (  )  const [private, pure virtual]

static void wns::SmartPtrBase::printAllExistingPointers (  )  [inline, static]

This class keeps track of all currently existing SmartPtr. This method will print information about these SmartPtr (like the pointer type, it's id and it's global id).

Definition at line 92 of file SmartPtrBase.hpp.


Member Data Documentation

std::string wns::SmartPtrBase::backtrace [private]

Definition at line 152 of file SmartPtrBase.hpp.

Definition at line 147 of file SmartPtrBase.hpp.


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

Generated on Sat May 26 03:32:51 2012 for openWNS by  doxygen 1.5.5