OpenClonk
C4LSector Class Reference

#include <C4Sector.h>

Collaboration diagram for C4LSector:
[legend]

Public Member Functions

 C4LSector ()=default
 
 ~C4LSector ()
 
void CompileFunc (StdCompiler *pComp, C4ValueNumbers *numbers)
 
void ClearObjects ()
 

Public Attributes

int x
 
int y
 
C4ObjectList Objects
 
C4ObjectList ObjectShapes
 

Protected Member Functions

void Init (int ix, int iy)
 
void Clear ()
 

Friends

class C4LSectors
 

Detailed Description

Definition at line 35 of file C4Sector.h.

Constructor & Destructor Documentation

◆ C4LSector()

C4LSector::C4LSector ( )
default

◆ ~C4LSector()

C4LSector::~C4LSector ( )
inline

Definition at line 39 of file C4Sector.h.

39 { Clear(); } // destructor
void Clear()
Definition: C4Sector.cpp:35

References Clear().

Here is the call graph for this function:

Member Function Documentation

◆ Clear()

void C4LSector::Clear ( )
protected

Definition at line 35 of file C4Sector.cpp.

36 {
37  // clear objects
38  ClearObjects();
39 }
void ClearObjects()
Definition: C4Sector.cpp:49

References ClearObjects().

Referenced by C4LSectors::Clear(), Init(), and ~C4LSector().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearObjects()

void C4LSector::ClearObjects ( )

Definition at line 49 of file C4Sector.cpp.

50 {
51  // clear objects
52  Objects.Clear();
54 }
C4ObjectList ObjectShapes
Definition: C4Sector.h:49
C4ObjectList Objects
Definition: C4Sector.h:48
virtual void Clear()

References C4ObjectList::Clear(), Objects, and ObjectShapes.

Referenced by Clear(), and C4LSectors::ClearObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileFunc()

void C4LSector::CompileFunc ( StdCompiler pComp,
C4ValueNumbers numbers 
)

Definition at line 41 of file C4Sector.cpp.

42 {
43  pComp->Value(mkNamingAdapt(mkIntAdapt(x), "x"));
44  pComp->Value(mkNamingAdapt(mkIntAdapt(y), "y"));
45  pComp->Value(mkNamingAdapt(mkParAdapt(Objects, numbers), "Objects"));
46  pComp->Value(mkNamingAdapt(mkParAdapt(ObjectShapes, numbers), "ObjectShapes"));
47 }
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
Definition: StdAdaptors.h:490
StdIntAdapt< T > mkIntAdapt(T &rValue)
Definition: StdAdaptors.h:255
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:92
int y
Definition: C4Sector.h:46
int x
Definition: C4Sector.h:46
void Value(const T &rStruct)
Definition: StdCompiler.h:161

References mkIntAdapt(), mkNamingAdapt(), mkParAdapt(), Objects, ObjectShapes, StdCompiler::Value(), x, and y.

Here is the call graph for this function:

◆ Init()

void C4LSector::Init ( int  ix,
int  iy 
)
protected

Definition at line 27 of file C4Sector.cpp.

28 {
29  // clear any previous initialization
30  Clear();
31  // store class members
32  x=ix; y=iy;
33 }

References Clear(), x, and y.

Referenced by C4LSectors::Init().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ C4LSectors

friend class C4LSectors
friend

Definition at line 54 of file C4Sector.h.

Member Data Documentation

◆ Objects

◆ ObjectShapes

◆ x

int C4LSector::x

Definition at line 46 of file C4Sector.h.

Referenced by CompileFunc(), C4LArea::Contains(), C4LArea::DebugRec(), Init(), and C4LArea::Next().

◆ y

int C4LSector::y

Definition at line 46 of file C4Sector.h.

Referenced by CompileFunc(), C4LArea::Contains(), Init(), and C4LArea::Next().


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