OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4MCCallbackArrayList Class Reference

#include <C4MapCreatorS2.h>

Collaboration diagram for C4MCCallbackArrayList:
[legend]

Public Member Functions

 C4MCCallbackArrayList ()
 
 ~C4MCCallbackArrayList ()
 
void Add (C4MCCallbackArray *pNewArray)
 
void Clear ()
 
void Execute (int32_t iMapZoom)
 

Protected Attributes

C4MCCallbackArraypFirst
 

Detailed Description

Definition at line 127 of file C4MapCreatorS2.h.

Constructor & Destructor Documentation

C4MCCallbackArrayList::C4MCCallbackArrayList ( )
inline

Definition at line 130 of file C4MapCreatorS2.h.

References pFirst.

130 { pFirst=nullptr; } // ctor
C4MCCallbackArray * pFirst
C4MCCallbackArrayList::~C4MCCallbackArrayList ( )
inline

Definition at line 131 of file C4MapCreatorS2.h.

References Clear().

131 { Clear(); } // ctor

Here is the call graph for this function:

Member Function Documentation

void C4MCCallbackArrayList::Add ( C4MCCallbackArray pNewArray)

Definition at line 146 of file C4MapCreatorS2.cpp.

References pFirst, and C4MCCallbackArray::pNext.

Referenced by C4MCCallbackArray::C4MCCallbackArray().

147 {
148  // add to end
149  if (pFirst)
150  {
151  C4MCCallbackArray *pLast = pFirst;
152  while (pLast->pNext) pLast=pLast->pNext;
153  pLast->pNext=pNewArray;
154  }
155  else pFirst=pNewArray;
156 }
C4MCCallbackArray * pNext
C4MCCallbackArray * pFirst

Here is the caller graph for this function:

void C4MCCallbackArrayList::Clear ( )

Definition at line 158 of file C4MapCreatorS2.cpp.

References pFirst, and C4MCCallbackArray::pNext.

Referenced by C4MapCreatorS2::Clear(), and ~C4MCCallbackArrayList().

159 {
160  // remove all arrays
161  C4MCCallbackArray *pArray, *pNext=pFirst;
162  while ((pArray=pNext))
163  {
164  pNext=pArray->pNext;
165  delete pArray;
166  }
167  // zero first-field
168  pFirst=nullptr;
169 }
C4MCCallbackArray * pNext
C4MCCallbackArray * pFirst

Here is the caller graph for this function:

void C4MCCallbackArrayList::Execute ( int32_t  iMapZoom)

Definition at line 171 of file C4MapCreatorS2.cpp.

References pFirst, and C4MCCallbackArray::pNext.

Referenced by C4MapCreatorS2::ExecuteCallbacks().

172 {
173  // execute all arrays
174  for (C4MCCallbackArray *pArray = pFirst; pArray; pArray=pArray->pNext)
175  pArray->Execute(iMapZoom);
176 }
C4MCCallbackArray * pNext
C4MCCallbackArray * pFirst

Here is the caller graph for this function:

Member Data Documentation

C4MCCallbackArray* C4MCCallbackArrayList::pFirst
protected

Definition at line 134 of file C4MapCreatorS2.h.

Referenced by Add(), C4MCCallbackArrayList(), Clear(), and Execute().


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