Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cListNodeBase Class Reference

#include <cList.h>

Inheritance diagram for Gray::cListNodeBase:
Gray::cHeapObject Gray::IHeapObject Gray::cListNodeT< cXmlNode > Gray::cListNodeT< _TYPE_REC > Gray::cListNodeT< cOctreeObject > Gray::cListNodeT< _TYPE_REC > GrayLib::cXmlNode Gray::cListNodeRef< _TYPE_REC > Gray3D::cOctreeObject Gray::cListNodeRef< cUnitTestListRef > GrayLib::cXmlComment GrayLib::cXmlDeclaration GrayLib::cXmlDocument GrayLib::cXmlElement GrayLib::cXmlText GrayLib::cXmlUnknown

Public Member Functions

virtual ~cListNodeBase ()
 
cListBaseget_Parent () const noexcept
 
cListNodeBaseget_Next () const noexcept
 
cListNodeBaseget_Prev () const noexcept
 
bool hasParent () const noexcept
 
void RemoveFromParent ()
 
virtual HRESULT DisposeThis ()
 
- Public Member Functions inherited from Gray::cHeapObject
 cHeapObject ()
 
virtual ~cHeapObject ()
 
bool IsValidInsideN (INT_PTR index) const
 
bool IsValidInsidePtr (void const *pTest) const
 
virtual size_t GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const
 
virtual bool isValidCheck () const noexcept
 

Protected Member Functions

virtual void put_Parent (cListBase *pParent)
 
 cListNodeBase () noexcept
 
- Protected Member Functions inherited from Gray::cHeapObject
const void * get_HeapPtr () const noexcept override
 Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More...
 

Friends

class cListBase
 

Detailed Description

base class for a single node in a cListBase. derive a class from cListNodeBase to be a node member in a cListBase. Single owner = This item belongs to JUST ONE cListBase (m_pParent) Double linked list. NOT circular. head and tail are nullptr.

Constructor & Destructor Documentation

◆ cListNodeBase()

Gray::cListNodeBase::cListNodeBase ( )
inlineprotectednoexcept

◆ ~cListNodeBase()

virtual Gray::cListNodeBase::~cListNodeBase ( )
inlinevirtual

ASSUME: RemoveFromParent() was already called! (virtuals don't work in destruct!)

Member Function Documentation

◆ DisposeThis()

virtual HRESULT Gray::cListNodeBase::DisposeThis ( )
inlinevirtual

Pre-destructor cleanup things can be done since virtuals don't work in destructors.

Note
this does not free the memory. override to do this.

◆ get_Next()

cListNodeBase* Gray::cListNodeBase::get_Next ( ) const
inlinenoexcept

◆ get_Parent()

cListBase* Gray::cListNodeBase::get_Parent ( ) const
inlinenoexcept

◆ get_Prev()

cListNodeBase* Gray::cListNodeBase::get_Prev ( ) const
inlinenoexcept

◆ hasParent()

bool Gray::cListNodeBase::hasParent ( ) const
inlinenoexcept

is this in a list?

◆ put_Parent()

virtual void Gray::cListNodeBase::put_Parent ( cListBase pParent)
inlineprotectedvirtual

I am being added to a list. (or nullptr = no list)

◆ RemoveFromParent()

void Gray::cListNodeBase::RemoveFromParent ( )
inline

remove ListNode from List.

Note
Must define body of this function after cListBase has been defined.

Remove this(myself) from my parent list (if i have one)

Friends And Related Function Documentation

◆ cListBase

friend class cListBase
friend

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