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 147 of file C4MapCreatorS2.cpp.

References pFirst, and C4MCCallbackArray::pNext.

Referenced by C4MCCallbackArray::C4MCCallbackArray().

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

Here is the caller graph for this function:

void C4MCCallbackArrayList::Clear ( )

Definition at line 159 of file C4MapCreatorS2.cpp.

References pFirst, and C4MCCallbackArray::pNext.

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

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

Here is the caller graph for this function:

void C4MCCallbackArrayList::Execute ( int32_t  iMapZoom)

Definition at line 172 of file C4MapCreatorS2.cpp.

References pFirst, and C4MCCallbackArray::pNext.

Referenced by C4MapCreatorS2::ExecuteCallbacks().

173 {
174  // execute all arrays
175  for (C4MCCallbackArray *pArray = pFirst; pArray; pArray=pArray->pNext)
176  pArray->Execute(iMapZoom);
177 }
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: