cgma
|
#include <TDUPtr.hpp>
Public Member Functions | |
virtual | ~TDPtr () |
Static Public Member Functions | |
static void | add_to_TD (TDUPtrListNode *add, ToolDataUser *to) |
static void | remove_from_TD (TDUPtrListNode *remove, ToolDataUser *from) |
Private Member Functions | |
TDPtr () | |
Static Private Member Functions | |
static int | is_ptr (const ToolData *td) |
Private Attributes | |
TDUPtrListNode * | listHead |
Definition at line 106 of file TDUPtr.hpp.
TDPtr::~TDPtr | ( | ) | [virtual] |
Definition at line 46 of file TDUPtr.cpp.
TDPtr::TDPtr | ( | ) | [inline, private] |
Definition at line 116 of file TDUPtr.hpp.
: listHead(0) { }
void TDPtr::add_to_TD | ( | TDUPtrListNode * | add, |
ToolDataUser * | to | ||
) | [static] |
static int TDPtr::is_ptr | ( | const ToolData * | td | ) | [inline, static, private] |
Definition at line 118 of file TDUPtr.hpp.
{ return dynamic_cast<const TDPtr*>(td) != 0; }
void TDPtr::remove_from_TD | ( | TDUPtrListNode * | remove, |
ToolDataUser * | from | ||
) | [static] |
Definition at line 5 of file TDUPtr.cpp.
{ if ( !tdu ) return; TDPtr* td = (TDPtr*)(tdu->get_TD(&is_ptr)); assert(td != NULL); if (ptr == td->listHead) { td->listHead = ptr->nextInTD; if (!td->listHead ) { delete tdu->remove_TD(&is_ptr); } } else { TDUPtrListNode* prev = td->listHead; while (prev->nextInTD != ptr) { prev = prev->nextInTD; assert(prev != NULL); } prev->nextInTD = ptr->nextInTD; } ptr->nextInTD = 0; }
TDUPtrListNode* TDPtr::listHead [private] |
Definition at line 121 of file TDUPtr.hpp.