tCheckedPTRBase Class Reference

#include <tSafePTR.h>

Inheritance diagram for tCheckedPTRBase:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 tCheckedPTRBase (void *x)
 tCheckedPTRBase (const tCheckedPTRBase &x)
 tCheckedPTRBase ()
 ~tCheckedPTRBase ()
tCheckedPTRBaseoperator= (void *x)
 operator bool () const
bool operator! () const

Static Public Member Functions

static void CheckDestructed (void *test)
static void Check ()

Protected Attributes

void * target

Private Attributes

int id

Friends

class tPTRList


Detailed Description

Definition at line 39 of file tSafePTR.h.


Constructor & Destructor Documentation

tCheckedPTRBase::tCheckedPTRBase ( void *  x  ) 

Definition at line 80 of file tSafePTR.cpp.

References tList< T, MALLOC, REFERENCE >::Add().

00080                                        :id(-1),target(x){
00081     tCheckedPTRs.Add(this,id);
00082 }

Here is the call graph for this function:

tCheckedPTRBase::tCheckedPTRBase ( const tCheckedPTRBase x  ) 

Definition at line 84 of file tSafePTR.cpp.

References tList< T, MALLOC, REFERENCE >::Add().

00085         :id(-1),target(x.target){
00086     tCheckedPTRs.Add(this,id);
00087 }

Here is the call graph for this function:

tCheckedPTRBase::tCheckedPTRBase (  ) 

Definition at line 89 of file tSafePTR.cpp.

References tList< T, MALLOC, REFERENCE >::Add().

00089                                 :id(-1),target(NULL){
00090     tCheckedPTRs.Add(this,id);
00091 }

Here is the call graph for this function:

tCheckedPTRBase::~tCheckedPTRBase (  ) 

Definition at line 94 of file tSafePTR.cpp.

References tList< T, MALLOC, REFERENCE >::Remove().

00094                                  {
00095     tCheckedPTRs.Remove(this,id);
00096 }

Here is the call graph for this function:


Member Function Documentation

tCheckedPTRBase& tCheckedPTRBase::operator= ( void *  x  )  [inline]

Definition at line 50 of file tSafePTR.h.

References target.

Referenced by tCheckedPTRConst< T >::operator=(), and tCheckedPTR< T >::operator=().

00050 {target=x; return *this;}

Here is the caller graph for this function:

tCheckedPTRBase::operator bool (  )  const [inline]

Definition at line 54 of file tSafePTR.h.

References NULL, and target.

00054 {return target!=NULL;}

bool tCheckedPTRBase::operator! (  )  const [inline]

Definition at line 55 of file tSafePTR.h.

References target.

00055 {return !target;}

void tCheckedPTRBase::CheckDestructed ( void *  test  )  [static]

Definition at line 178 of file tSafePTRBase.cpp.

References id, target, tCheckedPTRs, and tERR_ERROR.

00178                                                {
00179     for(int i=tCheckedPTRs.Len()-1;i>=0;i--){
00180         tCheckedPTRBase * adr=tCheckedPTRs(i);
00181         if (adr->id!=i)
00182             tERR_ERROR("Checked ptr list screwed! "
00183                        << adr << ":" << adr->id << ":" << adr->target << ":" << i);
00184 
00185         if (adr->target==test){
00186             /*
00187             suspicious(se_rimWalls,adr);
00188             suspicious(sg_netPlayerWalls,adr);
00189             suspicious(gridded_sg_netPlayerWalls,adr);
00190             suspicious(se_cameras,adr);
00191             suspicious(tConfItemBase::tConfItems,adr);
00192             suspicious(eGameObject::gameObjects,adr);
00193             suspicious(eGameObject::gameObjectsInactive,adr);
00194             suspicious(PlayerConfig,adr);
00195             suspicious(se_PlayerNetID,adr);
00196             suspicious(s_playerActions,adr);
00197             suspicious(s_cameraActions,adr);
00198             suspicious(s_globalActions,adr);
00199             suspicious(su_allActions,adr);
00200             suspicious(ePoint::points,adr);
00201             suspicious(eEdge::edges,adr);
00202             suspicious(eFace::faces,adr);
00203             */
00204 
00205             tERR_ERROR("Object destroyed, but pointer at " << adr <<
00206                        " still points to it!");
00207         }
00208     }
00209 
00210 }

void tCheckedPTRBase::Check (  )  [static]

Definition at line 212 of file tSafePTRBase.cpp.

References id, target, tCheckedPTRs, and tERR_ERROR.

00212                            {
00213     for(int i=tCheckedPTRs.Len()-1;i>=0;i--){
00214         tCheckedPTRBase * adr=tCheckedPTRs(i);
00215         if (adr->id!=i)
00216             tERR_ERROR("Checked ptr list screwed! "
00217                        << adr << ":" << adr->id << ":" << adr->target << ":" << i);
00218     }
00219 }


Friends And Related Function Documentation

friend class tPTRList [friend]

Definition at line 40 of file tSafePTR.h.


Member Data Documentation

int tCheckedPTRBase::id [private]

Definition at line 41 of file tSafePTR.h.

Referenced by Check(), and CheckDestructed().

void* tCheckedPTRBase::target [protected]

Definition at line 43 of file tSafePTR.h.

Referenced by Check(), CheckDestructed(), tCheckedPTRConst< T >::Destroy(), tCheckedPTR< T >::Destroy(), tCheckedPTRConst< T >::operator *(), tCheckedPTR< T >::operator *(), operator bool(), tCheckedPTRConst< T >::operator const T *(), tCheckedPTR< T >::operator T *(), operator!(), tCheckedPTRConst< T >::operator!=(), tCheckedPTR< T >::operator!=(), tCheckedPTRConst< T >::operator->(), tCheckedPTR< T >::operator->(), tCheckedPTRConst< T >::operator=(), tCheckedPTR< T >::operator=(), operator=(), tCheckedPTRConst< T >::operator==(), and tCheckedPTR< T >::operator==().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:55:03 2008 for Armagetron Advanced by  doxygen 1.5.4