ReactOS  0.4.12-dev-102-g4b7f1e0
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 17 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 26 of file atlcoll.h.

31  {
32  CAtlPlex* Block;
33 
34  ATLASSERT(MaxElements > 0);
35  ATLASSERT(ElementSize > 0);
36 
37  size_t BufferSize = sizeof(CAtlPlex) + (MaxElements * ElementSize);
38 
39  void *Buffer = HeapAlloc(GetProcessHeap(), 0, BufferSize);
40  if (Buffer == NULL) return NULL;
41 
42  Block = static_cast< CAtlPlex* >(Buffer);
43  Block->m_Next = Entry;
44  Entry = Block;
45 
46  return Block;
47  }
struct _Entry Entry
Definition: kefuncs.h:640
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define BufferSize
Definition: classpnp.h:419
CAtlPlex * m_Next
Definition: atlcoll.h:20
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
base of all file and directory entries
Definition: entries.h:82

◆ Destroy()

void ATL::CAtlPlex::Destroy ( )
inline

Definition at line 54 of file atlcoll.h.

55  {
56  CAtlPlex* Block;
57  CAtlPlex* Next;
58 
59  Block = this;
60  while (Block != NULL)
61  {
62  Next = Block->m_Next;
63  HeapFree(GetProcessHeap(), 0, Block);
64  Block = Next;
65  }
66  }
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
CAtlPlex * m_Next
Definition: atlcoll.h:20
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ GetData()

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

Definition at line 49 of file atlcoll.h.

Referenced by ATL::CAtlList< CAvailableApplicationInfo *>::GetFreeNode().

50  {
51  return (this + 1);
52  }

Member Data Documentation

◆ m_Next

CAtlPlex* ATL::CAtlPlex::m_Next

Definition at line 20 of file atlcoll.h.

Referenced by Create(), and Destroy().


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