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

#include <C4FindObject.h>

Inheritance diagram for C4FindObjectActionTarget:
[legend]
Collaboration diagram for C4FindObjectActionTarget:
[legend]

Public Member Functions

 C4FindObjectActionTarget (C4Object *pActionTarget, int index)
 
int32_t Count (const C4ObjectList &Objs)
 
int32_t Count (const C4ObjectList &Objs, const C4LSectors &Sct)
 
C4ObjectFind (const C4ObjectList &Objs)
 
C4ObjectFind (const C4ObjectList &Objs, const C4LSectors &Sct)
 
C4ValueArrayFindMany (const C4ObjectList &Objs)
 
C4ValueArrayFindMany (const C4ObjectList &Objs, const C4LSectors &Sct)
 
void SetSort (C4SortObject *pToSort)
 

Static Public Member Functions

static C4FindObjectCreateByValue (const C4Value &Data, C4SortObject **ppSortObj=nullptr, const C4Object *context=nullptr, bool *has_layer_check=nullptr)
 

Protected Member Functions

bool Check (C4Object *pObj) override
 
virtual C4RectGetBounds ()
 
virtual bool UseShapes ()
 
virtual bool IsImpossible ()
 
virtual bool IsEnsured ()
 

Detailed Description

Definition at line 301 of file C4FindObject.h.

Constructor & Destructor Documentation

C4FindObjectActionTarget::C4FindObjectActionTarget ( C4Object pActionTarget,
int  index 
)
inline

Definition at line 304 of file C4FindObject.h.

305  : pActionTarget(pActionTarget), index(index) { }

Member Function Documentation

bool C4FindObjectActionTarget::Check ( C4Object pObj)
overrideprotectedvirtual

Implements C4FindObject.

Definition at line 725 of file C4FindObject.cpp.

References C4Object::Action, C4Object::GetAction(), C4Action::Target, and C4Action::Target2.

726 {
727  assert(index >= 0 && index <= 1);
728  assert(pObj);
729  if (!pObj->GetAction()) return false;
730  if (index == 0)
731  return pObj->Action.Target == pActionTarget;
732  else if (index == 1)
733  return pObj->Action.Target2 == pActionTarget;
734  else
735  return false;
736 }
C4PropList * GetAction() const
Definition: C4Object.cpp:2679
C4ObjectPtr Target2
Definition: C4Object.h:87
C4ObjectPtr Target
Definition: C4Object.h:87
C4Action Action
Definition: C4Object.h:147

Here is the call graph for this function:

int32_t C4FindObject::Count ( const C4ObjectList Objs)
inherited

Definition at line 258 of file C4FindObject.cpp.

References C4FindObject::Check(), C4FindObject::IsEnsured(), C4FindObject::IsImpossible(), and C4ObjectList::ObjectCount().

Referenced by C4FindObject::Count().

259 {
260  // Trivial cases
261  if (IsImpossible())
262  return 0;
263  if (IsEnsured())
264  return Objs.ObjectCount();
265  // Count
266  int32_t iCount = 0;
267  for (C4Object *obj : Objs)
268  if (obj->Status && Check(obj))
269  iCount++;
270  return iCount;
271 }
virtual bool IsEnsured()
Definition: C4FindObject.h:98
virtual bool IsImpossible()
Definition: C4FindObject.h:97
int ObjectCount(C4ID id=C4ID::None) const
virtual bool Check(C4Object *pObj)=0

Here is the call graph for this function:

Here is the caller graph for this function:

int32_t C4FindObject::Count ( const C4ObjectList Objs,
const C4LSectors Sct 
)
inherited

Definition at line 325 of file C4FindObject.cpp.

References C4FindObject::Check(), C4FindObject::Count(), C4LArea::FirstObjects(), C4LArea::FirstObjectShapes(), C4FindObject::GetBounds(), C4GameObjects::GetNextMarker(), C4FindObject::IsEnsured(), C4FindObject::IsImpossible(), C4LArea::Next(), C4LArea::NextObjects(), C4LArea::NextObjectShapes(), C4ObjectList::ObjectCount(), Objects, C4LSector::ObjectShapes, C4GameObjects::Sectors, and C4FindObject::UseShapes().

326 {
327  // Trivial cases
328  if (IsImpossible())
329  return 0;
330  if (IsEnsured())
331  return Objs.ObjectCount();
332  // Check bounds
333  C4Rect *pBounds = GetBounds();
334  if (!pBounds)
335  return Count(Objs);
336  else if (UseShapes())
337  {
338  // Get area
339  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
340  C4ObjectList *pLst = Area.FirstObjectShapes(&pSct);
341  // Check if a single-sector check is enough
342  if (!Area.Next(pSct))
343  return Count(pSct->ObjectShapes);
344  // Create marker, count over all areas
345  uint32_t iMarker = ::Objects.GetNextMarker();
346  int32_t iCount = 0;
347  for (; pLst; pLst=Area.NextObjectShapes(pLst, &pSct))
348  for (C4Object *obj : Objs)
349  if (obj->Status)
350  if (obj->Marker != iMarker)
351  {
352  obj->Marker = iMarker;
353  if (Check(obj))
354  iCount++;
355  }
356  return iCount;
357  }
358  else
359  {
360  // Count objects per area
361  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
362  int32_t iCount = 0;
363  for (C4ObjectList *pLst=Area.FirstObjects(&pSct); pLst; pLst=Area.NextObjects(pLst, &pSct))
364  iCount += Count(*pLst);
365  return iCount;
366  }
367 }
virtual bool UseShapes()
Definition: C4FindObject.h:96
virtual bool IsEnsured()
Definition: C4FindObject.h:98
Definition: C4Rect.h:27
virtual C4Rect * GetBounds()
Definition: C4FindObject.h:95
uint32_t GetNextMarker()
virtual bool IsImpossible()
Definition: C4FindObject.h:97
C4ObjectList ObjectShapes
Definition: C4Sector.h:49
int32_t Count(const C4ObjectList &Objs)
C4LSectors Sectors
Definition: C4GameObjects.h:42
int ObjectCount(C4ID id=C4ID::None) const
virtual bool Check(C4Object *pObj)=0
C4GameObjects Objects
Definition: C4Globals.cpp:48

Here is the call graph for this function:

C4FindObject * C4FindObject::CreateByValue ( const C4Value Data,
C4SortObject **  ppSortObj = nullptr,
const C4Object context = nullptr,
bool *  has_layer_check = nullptr 
)
staticinherited

Definition at line 33 of file C4FindObject.cpp.

References C4FindObject::C4FindObjectAnd, C4FindObject::C4FindObjectNot, C4FindObject::C4FindObjectOr, C4FO_Action, C4FO_ActionTarget, C4FO_And, C4FO_AnyContainer, C4FO_AnyLayer, C4FO_AtPoint, C4FO_AtRect, C4FO_Category, C4FO_Cone, C4FO_Container, C4FO_Controller, C4FO_Distance, C4FO_Exclude, C4FO_Func, C4FO_ID, C4FO_InArray, C4FO_InRect, C4FO_Layer, C4FO_Not, C4FO_OCF, C4FO_OnLine, C4FO_Or, C4FO_Owner, C4FO_Procedure, C4FO_Property, C4SO_First, C4SO_Last, Clamp(), C4SortObject::CreateByValue(), C4Value::getArray(), C4String::GetCStr(), C4ValueArray::GetSize(), C4Object::GetX(), C4Object::GetY(), iSize, and C4FindObjectFunc::SetPar().

Referenced by CreateCriterionsFromPars().

34 {
35  // Must be an array
36  C4ValueArray *pArray = C4Value(DataVal).getArray();
37  if (!pArray) return nullptr;
38 
39  const C4ValueArray &Data = *pArray;
40  int32_t iType = Data[0].getInt();
41  if (Inside<int32_t>(iType, C4SO_First, C4SO_Last))
42  {
43  // this is not a FindObject but a sort condition!
44  // sort condition not desired here?
45  if (!ppSortObj) return nullptr;
46  // otherwise, create it!
47  *ppSortObj = C4SortObject::CreateByValue(iType, Data, context);
48  // done
49  return nullptr;
50  }
51 
52  switch (iType)
53  {
54  case C4FO_Not:
55  {
56  // Create child condition
57  C4FindObject *pCond = C4FindObject::CreateByValue(Data[1], nullptr, context, has_layer_check);
58  if (!pCond) return nullptr;
59  // wrap
60  return new C4FindObjectNot(pCond);
61  }
62 
63  case C4FO_And: case C4FO_Or:
64  {
65  // Trivial case (one condition)
66  if (Data.GetSize() == 2)
67  return C4FindObject::CreateByValue(Data[1], nullptr, context, has_layer_check);
68  // Create all childs
69  int32_t i;
70  C4FindObject **ppConds = new C4FindObject *[Data.GetSize() - 1];
71  for (i = 0; i < Data.GetSize() - 1; i++)
72  ppConds[i] = C4FindObject::CreateByValue(Data[i + 1], nullptr, context, has_layer_check);
73  // Count real entries, move them to start of list
74  int32_t iSize = 0;
75  for (i = 0; i < Data.GetSize() - 1; i++)
76  if (ppConds[i])
77  if (iSize++ != i)
78  ppConds[iSize-1] = ppConds[i];
79  // Create
80  if (iType == C4FO_And)
81  return new C4FindObjectAnd(iSize, ppConds);
82  else
83  return new C4FindObjectOr(iSize, ppConds);
84  }
85 
86  case C4FO_Exclude:
87  {
88  C4Object *obj = Data[1].getObj();
89  if (!obj) return nullptr;
90 
91  return new C4FindObjectExclude(obj);
92  }
93 
94  case C4FO_ID:
95  return new C4FindObjectDef(Data[1].getPropList());
96 
97 
98  // #973: For all criteria using coordinates: If FindObject et al. are called in object context, offset by object center
99  case C4FO_InRect:
100  {
101  int32_t x = Data[1].getInt();
102  int32_t y = Data[2].getInt();
103  int32_t w = Data[3].getInt();
104  int32_t h = Data[4].getInt();
105  if (context)
106  {
107  x += context->GetX();
108  y += context->GetY();
109  }
110  return new C4FindObjectInRect(C4Rect(x, y, w, h));
111  }
112 
113  case C4FO_AtPoint:
114  {
115  int32_t x = Data[1].getInt();
116  int32_t y = Data[2].getInt();
117  if (context)
118  {
119  x += context->GetX();
120  y += context->GetY();
121  }
122  return new C4FindObjectAtPoint(x, y);
123  }
124 
125  case C4FO_AtRect:
126  {
127  int32_t x = Data[1].getInt();
128  int32_t y = Data[2].getInt();
129  int32_t w = Data[3].getInt();
130  int32_t h = Data[4].getInt();
131  if (context)
132  {
133  x += context->GetX();
134  y += context->GetY();
135  }
136  return new C4FindObjectAtRect(x, y, w, h);
137  }
138 
139  case C4FO_OnLine:
140  {
141  int32_t x1 = Data[1].getInt();
142  int32_t y1 = Data[2].getInt();
143  int32_t x2 = Data[3].getInt();
144  int32_t y2 = Data[4].getInt();
145  if (context)
146  {
147  x1 += context->GetX();
148  x2 += context->GetX();
149  y1 += context->GetY();
150  y2 += context->GetY();
151  }
152  return new C4FindObjectOnLine(x1, y1, x2, y2);
153  }
154 
155  case C4FO_Distance:
156  {
157  int32_t x = Data[1].getInt();
158  int32_t y = Data[2].getInt();
159  if (context)
160  {
161  x += context->GetX();
162  y += context->GetY();
163  }
164  return new C4FindObjectDistance(x, y, Data[3].getInt());
165  }
166 
167  case C4FO_Cone:
168  {
169  int32_t x = Data[1].getInt();
170  int32_t y = Data[2].getInt();
171  if (context)
172  {
173  x += context->GetX();
174  y += context->GetY();
175  }
176  return new C4FindObjectCone(x, y, Data[3].getInt(), Data[4].getInt(), Data[5].getInt(), Data[6].getInt());
177  }
178 
179  case C4FO_OCF:
180  return new C4FindObjectOCF(Data[1].getInt());
181 
182  case C4FO_Category:
183  return new C4FindObjectCategory(Data[1].getInt());
184 
185  case C4FO_Action:
186  {
187  C4String *pStr = Data[1].getStr();
188  if (!pStr) return nullptr;
189  // Don't copy, it should be safe
190  return new C4FindObjectAction(pStr->GetCStr());
191  }
192 
193  case C4FO_Func:
194  {
195  // Get function name
196  C4String *pStr = Data[1].getStr();
197  if (!pStr) return nullptr;
198  // Construct
199  C4FindObjectFunc *pFO = new C4FindObjectFunc(pStr);
200  // Add parameters
201  for (int i = 2; i < Data.GetSize(); i++)
202  pFO->SetPar(i - 2, Data[i]);
203  // Done
204  return pFO;
205  }
206 
207  case C4FO_ActionTarget:
208  {
209  int index = 0;
210  if (Data.GetSize() >= 3)
211  index = Clamp(Data[2].getInt(), 0, 1);
212  return new C4FindObjectActionTarget(Data[1].getObj(), index);
213  }
214 
215  case C4FO_Procedure:
216  return new C4FindObjectProcedure(Data[1].getStr());
217 
218  case C4FO_Container:
219  return new C4FindObjectContainer(Data[1].getObj());
220 
221  case C4FO_AnyContainer:
222  return new C4FindObjectAnyContainer();
223 
224  case C4FO_Owner:
225  return new C4FindObjectOwner(Data[1].getInt());
226 
227  case C4FO_Controller:
228  return new C4FindObjectController(Data[1].getInt());
229 
230  case C4FO_Layer:
231  // explicit layer check given. do not add implicit layer check
232  if (has_layer_check) *has_layer_check = true;
233  return new C4FindObjectLayer(Data[1].getObj());
234 
235  case C4FO_InArray:
236  return new C4FindObjectInArray(Data[1].getArray());
237 
238  case C4FO_Property:
239  {
240  // Get property name
241  C4String *pStr = Data[1].getStr();
242  if (!pStr) return nullptr;
243  // Construct
245  // Done
246  return pFO;
247  }
248 
249  case C4FO_AnyLayer:
250  // do not add implicit layer check
251  if (has_layer_check) *has_layer_check = true;
252  return nullptr;
253 
254  }
255  return nullptr;
256 }
int32_t GetY() const
Definition: C4Object.h:288
friend class C4FindObjectNot
Definition: C4FindObject.h:71
static C4FindObject * CreateByValue(const C4Value &Data, C4SortObject **ppSortObj=nullptr, const C4Object *context=nullptr, bool *has_layer_check=nullptr)
const char * GetCStr() const
Definition: C4StringTable.h:49
Definition: C4Rect.h:27
T Clamp(T bval, T lbound, T rbound)
Definition: Standard.h:44
friend class C4FindObjectAnd
Definition: C4FindObject.h:72
int32_t GetX() const
Definition: C4Object.h:287
C4ValueArray * getArray() const
Definition: C4Value.h:118
int32_t GetSize() const
Definition: C4ValueArray.h:36
void SetPar(int i, const C4Value &val)
friend class C4FindObjectOr
Definition: C4FindObject.h:73
static C4SortObject * CreateByValue(const C4Value &Data, const C4Object *context=nullptr)
int iSize
Definition: TstC4NetIO.cpp:32

Here is the call graph for this function:

Here is the caller graph for this function:

C4Object * C4FindObject::Find ( const C4ObjectList Objs)
inherited

Definition at line 273 of file C4FindObject.cpp.

References C4FindObject::Check(), C4SortObject::Compare(), and C4FindObject::IsImpossible().

Referenced by C4FindObject::Find().

274 {
275  // Trivial case
276  if (IsImpossible())
277  return nullptr;
278  // Search
279  // Double-check object status, as object might be deleted after Check()!
280  C4Object *pBestResult = nullptr;
281  for (C4Object *obj : Objs)
282  if (obj->Status)
283  if (Check(obj))
284  if (obj->Status)
285  {
286  // no sorting: Use first object found
287  if (!pSort) return obj;
288  // Sorting: Check if found object is better
289  if (!pBestResult || pSort->Compare(obj, pBestResult) > 0)
290  if (obj->Status)
291  pBestResult = obj;
292  }
293  return pBestResult;
294 }
virtual int32_t Compare(C4Object *pObj1, C4Object *pObj2)=0
virtual bool IsImpossible()
Definition: C4FindObject.h:97
virtual bool Check(C4Object *pObj)=0

Here is the call graph for this function:

Here is the caller graph for this function:

C4Object * C4FindObject::Find ( const C4ObjectList Objs,
const C4LSectors Sct 
)
inherited

Definition at line 369 of file C4FindObject.cpp.

References C4SortObject::Compare(), C4FindObject::Find(), C4LArea::FirstObjects(), C4LArea::FirstObjectShapes(), C4FindObject::GetBounds(), C4FindObject::IsImpossible(), C4LArea::NextObjects(), C4LArea::NextObjectShapes(), Objects, C4GameObjects::Sectors, C4PropList::Status, and C4FindObject::UseShapes().

370 {
371  // Trivial case
372  if (IsImpossible())
373  return nullptr;
374  C4Object *pBestResult = nullptr;
375  // Check bounds
376  C4Rect *pBounds = GetBounds();
377  if (!pBounds)
378  return Find(Objs);
379  // Traverse areas, return first matching object w/o sort or best with sort
380  else if (UseShapes())
381  {
382  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
383  C4Object *pObj;
384  for (C4ObjectList *pLst=Area.FirstObjectShapes(&pSct); pLst; pLst=Area.NextObjectShapes(pLst, &pSct))
385  if ((pObj = Find(*pLst)))
386  {
387  if (!pSort)
388  return pObj;
389  else if (!pBestResult || pSort->Compare(pObj, pBestResult) > 0)
390  if (pObj->Status)
391  pBestResult = pObj;
392  }
393  }
394  else
395  {
396  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
397  C4Object *pObj;
398  for (C4ObjectList *pLst=Area.FirstObjects(&pSct); pLst; pLst=Area.NextObjects(pLst, &pSct))
399  {
400  if ((pObj = Find(*pLst)))
401  {
402  if (!pSort)
403  return pObj;
404  else if (!pBestResult || pSort->Compare(pObj, pBestResult) > 0)
405  if (pObj->Status)
406  pBestResult = pObj;
407  }
408  }
409  }
410  return pBestResult;
411 }
virtual bool UseShapes()
Definition: C4FindObject.h:96
Definition: C4Rect.h:27
virtual C4Rect * GetBounds()
Definition: C4FindObject.h:95
virtual int32_t Compare(C4Object *pObj1, C4Object *pObj2)=0
virtual bool IsImpossible()
Definition: C4FindObject.h:97
int32_t Status
Definition: C4PropList.h:168
C4LSectors Sectors
Definition: C4GameObjects.h:42
C4Object * Find(const C4ObjectList &Objs)
C4GameObjects Objects
Definition: C4Globals.cpp:48

Here is the call graph for this function:

C4ValueArray * C4FindObject::FindMany ( const C4ObjectList Objs)
inherited

Definition at line 297 of file C4FindObject.cpp.

References C4VObj(), C4FindObject::Check(), C4ValueArray::GetSize(), C4FindObject::IsImpossible(), iSize, C4ValueArray::SetSize(), and C4SortObject::SortObjects().

Referenced by C4EditCursor::DoContextMenu(), C4FindObject::FindMany(), and C4Landscape::P::PrepareFreeShape().

298 {
299  // Trivial case
300  if (IsImpossible())
301  return new C4ValueArray();
302  // Set up array
303  C4ValueArray *pArray = new C4ValueArray(32);
304  int32_t iSize = 0;
305  // Search
306  for (C4Object *obj : Objs)
307  if (obj->Status)
308  if (Check(obj))
309  {
310  // Grow the array, if neccessary
311  if (iSize >= pArray->GetSize())
312  pArray->SetSize(iSize * 2);
313  // Add object
314  (*pArray)[iSize++] = C4VObj(obj);
315  }
316  // Shrink array
317  pArray->SetSize(iSize);
318  // Recheck object status (may shrink array again)
319  CheckObjectStatus(pArray);
320  // Apply sorting
321  if (pSort) pSort->SortObjects(pArray);
322  return pArray;
323 }
void SortObjects(C4ValueArray *pArray)
C4Value C4VObj(C4Object *pObj)
Definition: C4Value.cpp:88
void SetSize(int32_t inSize)
virtual bool IsImpossible()
Definition: C4FindObject.h:97
int32_t GetSize() const
Definition: C4ValueArray.h:36
virtual bool Check(C4Object *pObj)=0
int iSize
Definition: TstC4NetIO.cpp:32

Here is the call graph for this function:

Here is the caller graph for this function:

C4ValueArray * C4FindObject::FindMany ( const C4ObjectList Objs,
const C4LSectors Sct 
)
inherited

Definition at line 414 of file C4FindObject.cpp.

References C4VObj(), C4FindObject::Check(), C4FindObject::FindMany(), C4LArea::FirstObjects(), C4LArea::FirstObjectShapes(), C4FindObject::GetBounds(), C4GameObjects::GetNextMarker(), C4ValueArray::GetSize(), C4FindObject::IsImpossible(), iSize, C4LArea::Next(), C4LArea::NextObjects(), C4LArea::NextObjectShapes(), Objects, C4LSector::ObjectShapes, C4GameObjects::Sectors, C4ValueArray::SetSize(), C4SortObject::SortObjects(), and C4FindObject::UseShapes().

415 {
416  // Trivial case
417  if (IsImpossible())
418  return new C4ValueArray();
419  C4Rect *pBounds = GetBounds();
420  if (!pBounds)
421  return FindMany(Objs);
422  // Prepare for array that may be generated
423  C4ValueArray *pArray; int32_t iSize;
424  // Check shape lists?
425  if (UseShapes())
426  {
427  // Get area
428  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
429  C4ObjectList *pLst = Area.FirstObjectShapes(&pSct);
430  // Check if a single-sector check is enough
431  if (!Area.Next(pSct))
432  return FindMany(pSct->ObjectShapes);
433  // Set up array
434  pArray = new C4ValueArray(32); iSize = 0;
435  // Create marker, search all areas
436  uint32_t iMarker = ::Objects.GetNextMarker();
437  for (; pLst; pLst=Area.NextObjectShapes(pLst, &pSct))
438  for (C4Object *obj : *pLst)
439  if (obj->Status)
440  if (obj->Marker != iMarker)
441  {
442  obj->Marker = iMarker;
443  if (Check(obj))
444  {
445  // Grow the array, if neccessary
446  if (iSize >= pArray->GetSize())
447  pArray->SetSize(iSize * 2);
448  // Add object
449  (*pArray)[iSize++] = C4VObj(obj);
450  }
451  }
452  }
453  else
454  {
455  // Set up array
456  pArray = new C4ValueArray(32); iSize = 0;
457  // Search
458  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
459  for (C4ObjectList *pLst=Area.FirstObjects(&pSct); pLst; pLst=Area.NextObjects(pLst, &pSct))
460  for (C4Object *obj : *pLst)
461  if (obj->Status)
462  if (Check(obj))
463  {
464  // Grow the array, if neccessary
465  if (iSize >= pArray->GetSize())
466  pArray->SetSize(iSize * 2);
467  // Add object
468  (*pArray)[iSize++] = C4VObj(obj);
469  }
470  }
471  // Shrink array
472  pArray->SetSize(iSize);
473  // Recheck object status (may shrink array again)
474  CheckObjectStatus(pArray);
475  // Apply sorting
476  if (pSort) pSort->SortObjects(pArray);
477  return pArray;
478 }
virtual bool UseShapes()
Definition: C4FindObject.h:96
void SortObjects(C4ValueArray *pArray)
Definition: C4Rect.h:27
virtual C4Rect * GetBounds()
Definition: C4FindObject.h:95
C4Value C4VObj(C4Object *pObj)
Definition: C4Value.cpp:88
C4ValueArray * FindMany(const C4ObjectList &Objs)
uint32_t GetNextMarker()
void SetSize(int32_t inSize)
virtual bool IsImpossible()
Definition: C4FindObject.h:97
C4ObjectList ObjectShapes
Definition: C4Sector.h:49
int32_t GetSize() const
Definition: C4ValueArray.h:36
C4LSectors Sectors
Definition: C4GameObjects.h:42
virtual bool Check(C4Object *pObj)=0
C4GameObjects Objects
Definition: C4Globals.cpp:48
int iSize
Definition: TstC4NetIO.cpp:32

Here is the call graph for this function:

virtual C4Rect* C4FindObject::GetBounds ( )
inlineprotectedvirtualinherited

Reimplemented in C4FindObjectCone, C4FindObjectDistance, C4FindObjectOnLine, C4FindObjectAtRect, C4FindObjectAtPoint, C4FindObjectInRect, C4FindObjectOr, and C4FindObjectAnd.

Definition at line 95 of file C4FindObject.h.

Referenced by C4FindObjectAnd::C4FindObjectAnd(), C4FindObjectOr::C4FindObjectOr(), C4FindObject::Count(), C4FindObject::Find(), and C4FindObject::FindMany().

95 { return nullptr; }

Here is the caller graph for this function:

virtual bool C4FindObject::IsEnsured ( )
inlineprotectedvirtualinherited

Reimplemented in C4FindObjectCategory, C4FindObjectOr, C4FindObjectAnd, and C4FindObjectNot.

Definition at line 98 of file C4FindObject.h.

Referenced by C4FindObject::Count(), and C4FindObjectNot::IsImpossible().

98 { return false; }

Here is the caller graph for this function:

virtual bool C4FindObject::IsImpossible ( )
inlineprotectedvirtualinherited

Reimplemented in C4FindObjectInArray, C4FindObjectLayer, C4FindObjectProperty, C4FindObjectFunc, C4FindObjectController, C4FindObjectOwner, C4FindObjectProcedure, C4FindObjectOCF, C4FindObjectInRect, C4FindObjectDef, C4FindObjectOr, C4FindObjectAnd, and C4FindObjectNot.

Definition at line 97 of file C4FindObject.h.

Referenced by C4FindObject::Count(), C4FindObject::Find(), C4FindObject::FindMany(), and C4FindObjectNot::IsEnsured().

97 { return false; }

Here is the caller graph for this function:

void C4FindObject::SetSort ( C4SortObject pToSort)
inherited

Definition at line 497 of file C4FindObject.cpp.

Referenced by CreateCriterionsFromPars().

498 {
499  delete pSort;
500  pSort = pToSort;
501 }

Here is the caller graph for this function:

virtual bool C4FindObject::UseShapes ( )
inlineprotectedvirtualinherited

Reimplemented in C4FindObjectOnLine, C4FindObjectAtRect, C4FindObjectAtPoint, C4FindObjectOr, and C4FindObjectAnd.

Definition at line 96 of file C4FindObject.h.

Referenced by C4FindObjectAnd::C4FindObjectAnd(), C4FindObjectOr::C4FindObjectOr(), C4FindObject::Count(), C4FindObject::Find(), and C4FindObject::FindMany().

96 { return false; }

Here is the caller graph for this function:


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