41 ASSERT(m_pParent ==
nullptr || pParent ==
nullptr || m_pParent == pParent);
76 if (m_pParent !=
nullptr)
81 DEBUG_CHECK(m_pNext ==
nullptr && m_pPrev ==
nullptr);
87 void RemoveFromParent();
144 InsertListNode(pNodeNew, (pNodeNext !=
nullptr) ? (pNodeNext->
get_Prev()) : get_Tail());
148 InsertListNode(pNodeNew,
nullptr);
152 InsertListNode(pNodeNew, get_Tail());
172 return get_Count() == 0;
180 if (pNode ==
nullptr)
182 return pNode->get_Parent() ==
this;
193 if (m_pParent !=
nullptr)
203 template<
class _TYPE_REC = cListNodeBase>
222 template<
class _TYPE_REC >
#define GRAYCORE_LINK
Definition: GrayCore.h:47
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define ASSERT(exp)
Definition: cDebugAssert.h:87
#define DEBUG_CHECK(exp)
Definition: cDebugAssert.h:90
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
Definition: cHeapObject.h:38
cListNodeBase * get_Head(void) const noexcept
Definition: cList.h:158
virtual void RemoveListNode(cListNodeBase *pNode)
allow Override of this. called when child pObRec removed from list.
Definition: cList.cpp:52
bool IsMyChild(const cListNodeBase *pNode) const noexcept
Definition: cList.h:178
ITERATE_t get_Count() const noexcept
Definition: cList.h:166
virtual ~cListBase()
Definition: cList.h:128
cListBase() noexcept
Definition: cList.h:122
void InsertBefore(cListNodeBase *pNodeNew, const cListNodeBase *pNodeNext)
Definition: cList.h:141
bool isEmpty() const noexcept
Definition: cList.h:170
void InsertTail(cListNodeBase *pNodeNew)
Definition: cList.h:150
cListNodeBase * get_Tail(void) const noexcept
Definition: cList.h:162
void InsertHead(cListNodeBase *pNodeNew)
Definition: cList.h:146
cListNodeBase * GetAt(ITERATE_t index) const
iterate the linked list.
Definition: cList.cpp:156
ITERATE_t m_iCount
how many children? nice to get read only direct access to this for scripting.
Definition: cList.h:111
cListBase * get_Parent() const noexcept
Definition: cList.h:60
cListNodeBase * get_Next() const noexcept
Definition: cList.h:64
virtual ~cListNodeBase()
Definition: cList.h:54
cListNodeBase * get_Prev() const noexcept
Definition: cList.h:68
bool hasParent() const noexcept
Definition: cList.h:73
virtual HRESULT DisposeThis()
Definition: cList.h:89
cListNodeBase() noexcept
Definition: cList.h:46
void RemoveFromParent()
Definition: cList.h:190
virtual void put_Parent(cListBase *pParent)
Definition: cList.h:38
_TYPE_REC * get_Next() const
Definition: cList.h:210
_TYPE_REC * get_Prev() const
Definition: cList.h:215
_TYPE_REC * GetAt(ITERATE_t index) const
Definition: cList.h:231
_TYPE_REC * get_Head() const
Definition: cList.h:236
_TYPE_REC * get_Tail() const
Definition: cList.h:240
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
int ITERATE_t
like size_t but signed
Definition: Index.h:28
uint16 index
Definition: sample3.cpp:29