ReactOS  0.4.15-dev-3303-g1ade494
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 }
PVOID Element
Definition: list.h:27
CListNode * Next
Definition: list.h:28
CListNode * Prev
Definition: list.h:29
#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 }
PVOID Element
Definition: list.h:27

◆ GetNext()

CListNode * CListNode::GetNext ( )

Definition at line 85 of file list.cpp.

86 {
87  return Next;
88 }
CListNode * Next
Definition: list.h:28

◆ GetPrev()

CListNode * CListNode::GetPrev ( )

Definition at line 91 of file list.cpp.

92 {
93  return Prev;
94 }
CListNode * Prev
Definition: list.h:29

Referenced by CList< LPSTR >::Insert().

◆ operator delete()

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
BOOL WINAPI HeapDestroy(HANDLE hHeap)
Definition: heapmem.c:85
#define FALSE
Definition: types.h:117
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ operator new()

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 }
DWORD dwAllocationGranularity
Definition: winbase.h:1161
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
Definition: heapmem.c:45
static HANDLE hHeap
Definition: list.h:30
static INT nRef
Definition: list.h:31
GLsizeiptr size
Definition: glext.h:5919
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:142
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902

◆ SetElement()

VOID CListNode::SetElement ( PVOID  element)

Definition at line 61 of file list.cpp.

62 {
63  Element = element;
64 }
PVOID Element
Definition: list.h:27

◆ SetNext()

VOID CListNode::SetNext ( CListNode next)

Definition at line 67 of file list.cpp.

68 {
69  Next = next;
70 }
CListNode * Next
Definition: list.h:28
static unsigned __int64 next
Definition: rand_nt.c:6

Referenced by CList< LPSTR >::Insert().

◆ SetPrev()

VOID CListNode::SetPrev ( CListNode prev)

Definition at line 73 of file list.cpp.

74 {
75  Prev = prev;
76 }
CListNode * Prev
Definition: list.h:29

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: