ReactOS 0.4.15-dev-7934-g1dc8d80
ATL::CAtlPlex Class Reference

#include <atlcoll.h>

Collaboration diagram for ATL::CAtlPlex:

Public Member Functions

voidGetData ()
 
void Destroy ()
 

Static Public Member Functions

static CAtlPlexCreate (_Inout_ CAtlPlex *&Entry, _In_ size_t MaxElements, _In_ size_t ElementSize)
 

Public Attributes

CAtlPlexm_Next
 

Detailed Description

Definition at line 26 of file atlcoll.h.

Member Function Documentation

◆ Create()

static CAtlPlex * ATL::CAtlPlex::Create ( _Inout_ CAtlPlex *&  Entry,
_In_ size_t  MaxElements,
_In_ size_t  ElementSize 
)
inlinestatic

Definition at line 35 of file atlcoll.h.

40 {
41 CAtlPlex* Block;
42
43 ATLASSERT(MaxElements > 0);
44 ATLASSERT(ElementSize > 0);
45
46 size_t BufferSize = sizeof(CAtlPlex) + (MaxElements * ElementSize);
47
49 if (Buffer == NULL) return NULL;
50
51 Block = static_cast< CAtlPlex* >(Buffer);
52 Block->m_Next = Entry;
53 Entry = Block;
54
55 return Block;
56 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
CAtlPlex * m_Next
Definition: atlcoll.h:29
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
base of all file and directory entries
Definition: entries.h:83
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254

Referenced by ATL::CAtlList< E, ETraits >::GetFreeNode().

◆ Destroy()

void ATL::CAtlPlex::Destroy ( )
inline

Definition at line 63 of file atlcoll.h.

64 {
65 CAtlPlex* Block;
66 CAtlPlex* Next;
67
68 Block = this;
69 while (Block != NULL)
70 {
71 Next = Block->m_Next;
72 HeapFree(GetProcessHeap(), 0, Block);
73 Block = Next;
74 }
75 }
#define HeapFree(x, y, z)
Definition: compat.h:735

◆ GetData()

void * ATL::CAtlPlex::GetData ( )
inline

Definition at line 58 of file atlcoll.h.

59 {
60 return (this + 1);
61 }

Referenced by ATL::CAtlList< E, ETraits >::GetFreeNode().

Member Data Documentation

◆ m_Next

CAtlPlex* ATL::CAtlPlex::m_Next

Definition at line 29 of file atlcoll.h.

Referenced by Create(), and Destroy().


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