ReactOS 0.4.15-dev-8146-gdc0ed6d
CListNode Class Reference

#include <list.h>

Collaboration diagram for CListNode:

Public Member Functions

 CListNode ()
 
 CListNode (VOID *element, CListNode *next, CListNode *prev)
 
 ~CListNode ()
 
voidoperator new (size_t s)
 
VOID operator delete (void *p)
 
VOID SetElement (PVOID element)
 
VOID SetNext (CListNode *next)
 
VOID SetPrev (CListNode *prev)
 
PVOID GetElement ()
 
CListNodeGetNext ()
 
CListNodeGetPrev ()
 

Private Attributes

PVOID Element
 
CListNodeNext
 
CListNodePrev
 

Static Private Attributes

static HANDLE hHeap = NULL
 
static INT nRef = 0
 

Detailed Description

Definition at line 12 of file list.h.

Constructor & Destructor Documentation

◆ CListNode() [1/2]

CListNode::CListNode ( )

Definition at line 22 of file list.cpp.

23{
24 Element = NULL;
25 Next = NULL;
26 Prev = NULL;
27}
CListNode * Prev
Definition: list.h:29
PVOID Element
Definition: list.h:27
CListNode * Next
Definition: list.h:28
#define NULL
Definition: types.h:112

◆ CListNode() [2/2]

CListNode::CListNode ( VOID element,
CListNode next,
CListNode prev 
)

◆ ~CListNode()

CListNode::~CListNode ( )
inline

Definition at line 16 of file list.h.

16{};

Member Function Documentation

◆ GetElement()

PVOID CListNode::GetElement ( )

Definition at line 79 of file list.cpp.

80{
81 return Element;
82}

◆ GetNext()

CListNode * CListNode::GetNext ( )

Definition at line 85 of file list.cpp.

86{
87 return Next;
88}

◆ GetPrev()

CListNode * CListNode::GetPrev ( )

Definition at line 91 of file list.cpp.

92{
93 return Prev;
94}

◆ operator delete()

VOID CListNode::operator delete ( void p)

Definition at line 50 of file list.cpp.

51{
52 if (HeapFree(hHeap, 0, p) != FALSE)
53 nRef--;
54 if (nRef == 0) {
56 hHeap = NULL;
57 }
58}
static HANDLE hHeap
Definition: list.h:30
static INT nRef
Definition: list.h:31
#define FALSE
Definition: types.h:117
#define HeapFree(x, y, z)
Definition: compat.h:735
GLfloat GLfloat p
Definition: glext.h:8902
BOOL WINAPI HeapDestroy(HANDLE hHeap)
Definition: heapmem.c:85

◆ operator new()

void * CListNode::operator new ( size_t  s)

Definition at line 37 of file list.cpp.

38{
39 PVOID p;
40 if (hHeap == NULL) {
41 SYSTEM_INFO inf;
42 GetSystemInfo(&inf);
44 }
45 if ((p = HeapAlloc(hHeap, 0, size)) != NULL)
46 nRef++;
47 return p;
48}
#define HeapAlloc
Definition: compat.h:733
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:143
GLsizeiptr size
Definition: glext.h:5919
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
Definition: heapmem.c:45
DWORD dwAllocationGranularity
Definition: winbase.h:1179

◆ SetElement()

VOID CListNode::SetElement ( PVOID  element)

Definition at line 61 of file list.cpp.

62{
64}

◆ SetNext()

VOID CListNode::SetNext ( CListNode next)

Definition at line 67 of file list.cpp.

68{
69 Next = next;
70}
static unsigned __int64 next
Definition: rand_nt.c:6

◆ SetPrev()

VOID CListNode::SetPrev ( CListNode prev)

Definition at line 73 of file list.cpp.

74{
75 Prev = prev;
76}

Member Data Documentation

◆ Element

PVOID CListNode::Element
private

Definition at line 27 of file list.h.

Referenced by CListNode(), GetElement(), and SetElement().

◆ hHeap

HANDLE CListNode::hHeap = NULL
staticprivate

Definition at line 30 of file list.h.

◆ Next

CListNode* CListNode::Next
private

Definition at line 28 of file list.h.

Referenced by CListNode(), GetNext(), and SetNext().

◆ nRef

INT CListNode::nRef = 0
staticprivate

Definition at line 31 of file list.h.

◆ Prev

CListNode* CListNode::Prev
private

Definition at line 29 of file list.h.

Referenced by CListNode(), GetPrev(), and SetPrev().


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