OpenClonk
C4PropertyCollection Class Reference

#include <C4PropertyPath.h>

Classes

struct  Entry
 

Public Member Functions

void Clear ()
 
void CollectPropLists (C4PropertyName prop, const C4Value &val)
 
const std::vector< Entry > & GetEntries () const
 

Detailed Description

Definition at line 68 of file C4PropertyPath.h.

Member Function Documentation

◆ Clear()

void C4PropertyCollection::Clear ( )

Definition at line 155 of file C4PropertyPath.cpp.

156 {
157  entries.clear();
158  checked_values.clear();
159 }

Referenced by CollectPropLists().

Here is the caller graph for this function:

◆ CollectPropLists()

void C4PropertyCollection::CollectPropLists ( C4PropertyName  prop,
const C4Value val 
)

Definition at line 235 of file C4PropertyPath.cpp.

236 {
237  Clear();
238  // Walk over game content and search for matching prop lists
239  // Walk in reverse because prop lists of more permanent objects are often assigned to temporary objects
240  for (C4Object *obj : ::Objects.reverse())
241  {
242  CollectPropLists(obj, C4PropertyPath(obj), prop, val, obj->GetName());
243  for (C4Effect *fx = obj->pEffects; fx; fx = fx->pNext)
244  {
245  CollectPropLists(fx, C4PropertyPath(fx, obj), prop, val, fx->GetName());
246  }
247  }
248  for (C4Effect *fx = ::ScriptEngine.pGlobalEffects; fx; fx = fx->pNext)
249  {
250  CollectPropLists(fx, C4PropertyPath(fx, nullptr), prop, val, fx->GetName());
251  }
252 }
C4AulScriptEngine ScriptEngine
Definition: C4Globals.cpp:43
C4GameObjects Objects
Definition: C4Globals.cpp:48
C4Effect * pGlobalEffects
Definition: C4Aul.h:144
C4Effect * pNext
Definition: C4Effect.h:75
const ReverseView reverse() const
Definition: C4ObjectList.h:104

References Clear(), Objects, C4AulScriptEngine::pGlobalEffects, C4Effect::pNext, C4ObjectList::reverse(), and ScriptEngine.

Here is the call graph for this function:

◆ GetEntries()

const std::vector<Entry>& C4PropertyCollection::GetEntries ( ) const
inline

Definition at line 96 of file C4PropertyPath.h.

96 { return entries; }

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