ReactOS  0.4.15-dev-499-g1f31905
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  }
struct _Entry Entry
Definition: kefuncs.h:627
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define BufferSize
Definition: classpnp.h:419
CAtlPlex * m_Next
Definition: atlcoll.h:29
base of all file and directory entries
Definition: entries.h:82

◆ 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  }
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:404
CAtlPlex * m_Next
Definition: atlcoll.h:29
#define HeapFree(x, y, z)
Definition: compat.h:403

◆ GetData()

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

Definition at line 58 of file atlcoll.h.

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

Referenced by ATL::CAtlList< CAvailableApplicationInfo * >::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: