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

#include <C4FindObject.h>

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

Public Member Functions

 C4FindObjectOwner (int32_t iOwner)
 
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
 
bool IsImpossible () override
 
virtual C4RectGetBounds ()
 
virtual bool UseShapes ()
 
virtual bool IsEnsured ()
 

Detailed Description

Definition at line 344 of file C4FindObject.h.

Constructor & Destructor Documentation

C4FindObjectOwner::C4FindObjectOwner ( int32_t  iOwner)
inline

Definition at line 347 of file C4FindObject.h.

348  : iOwner(iOwner) { }

Member Function Documentation

bool C4FindObjectOwner::Check ( C4Object pObj)
overrideprotectedvirtual

Implements C4FindObject.

Definition at line 757 of file C4FindObject.cpp.

References C4Object::Owner.

758 {
759  return pObj->Owner == iOwner;
760 }
int32_t Owner
Definition: C4Object.h:110
int32_t C4FindObject::Count ( const C4ObjectList Objs)
inherited

Definition at line 253 of file C4FindObject.cpp.

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

Referenced by C4FindObject::Count().

254 {
255  // Trivial cases
256  if (IsImpossible())
257  return 0;
258  if (IsEnsured())
259  return Objs.ObjectCount();
260  // Count
261  int32_t iCount = 0;
262  for (C4Object *obj : Objs)
263  if (obj->Status && Check(obj))
264  iCount++;
265  return iCount;
266 }
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 320 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().

321 {
322  // Trivial cases
323  if (IsImpossible())
324  return 0;
325  if (IsEnsured())
326  return Objs.ObjectCount();
327  // Check bounds
328  C4Rect *pBounds = GetBounds();
329  if (!pBounds)
330  return Count(Objs);
331  else if (UseShapes())
332  {
333  // Get area
334  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
335  C4ObjectList *pLst = Area.FirstObjectShapes(&pSct);
336  // Check if a single-sector check is enough
337  if (!Area.Next(pSct))
338  return Count(pSct->ObjectShapes);
339  // Create marker, count over all areas
340  uint32_t iMarker = ::Objects.GetNextMarker();
341  int32_t iCount = 0;
342  for (; pLst; pLst=Area.NextObjectShapes(pLst, &pSct))
343  for (C4Object *obj : Objs)
344  if (obj->Status)
345  if (obj->Marker != iMarker)
346  {
347  obj->Marker = iMarker;
348  if (Check(obj))
349  iCount++;
350  }
351  return iCount;
352  }
353  else
354  {
355  // Count objects per area
356  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
357  int32_t iCount = 0;
358  for (C4ObjectList *pLst=Area.FirstObjects(&pSct); pLst; pLst=Area.NextObjects(pLst, &pSct))
359  iCount += Count(*pLst);
360  return iCount;
361  }
362 }
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  return new C4FindObjectExclude(Data[1].getObj());
88 
89  case C4FO_ID:
90  return new C4FindObjectDef(Data[1].getPropList());
91 
92 
93  // #973: For all criteria using coordinates: If FindObject et al. are called in object context, offset by object center
94  case C4FO_InRect:
95  {
96  int32_t x = Data[1].getInt();
97  int32_t y = Data[2].getInt();
98  int32_t w = Data[3].getInt();
99  int32_t h = Data[4].getInt();
100  if (context)
101  {
102  x += context->GetX();
103  y += context->GetY();
104  }
105  return new C4FindObjectInRect(C4Rect(x, y, w, h));
106  }
107 
108  case C4FO_AtPoint:
109  {
110  int32_t x = Data[1].getInt();
111  int32_t y = Data[2].getInt();
112  if (context)
113  {
114  x += context->GetX();
115  y += context->GetY();
116  }
117  return new C4FindObjectAtPoint(x, y);
118  }
119 
120  case C4FO_AtRect:
121  {
122  int32_t x = Data[1].getInt();
123  int32_t y = Data[2].getInt();
124  int32_t w = Data[3].getInt();
125  int32_t h = Data[4].getInt();
126  if (context)
127  {
128  x += context->GetX();
129  y += context->GetY();
130  }
131  return new C4FindObjectAtRect(x, y, w, h);
132  }
133 
134  case C4FO_OnLine:
135  {
136  int32_t x1 = Data[1].getInt();
137  int32_t y1 = Data[2].getInt();
138  int32_t x2 = Data[3].getInt();
139  int32_t y2 = Data[4].getInt();
140  if (context)
141  {
142  x1 += context->GetX();
143  x2 += context->GetX();
144  y1 += context->GetY();
145  y2 += context->GetY();
146  }
147  return new C4FindObjectOnLine(x1, y1, x2, y2);
148  }
149 
150  case C4FO_Distance:
151  {
152  int32_t x = Data[1].getInt();
153  int32_t y = Data[2].getInt();
154  if (context)
155  {
156  x += context->GetX();
157  y += context->GetY();
158  }
159  return new C4FindObjectDistance(x, y, Data[3].getInt());
160  }
161 
162  case C4FO_Cone:
163  {
164  int32_t x = Data[1].getInt();
165  int32_t y = Data[2].getInt();
166  if (context)
167  {
168  x += context->GetX();
169  y += context->GetY();
170  }
171  return new C4FindObjectCone(x, y, Data[3].getInt(), Data[4].getInt(), Data[5].getInt(), Data[6].getInt());
172  }
173 
174  case C4FO_OCF:
175  return new C4FindObjectOCF(Data[1].getInt());
176 
177  case C4FO_Category:
178  return new C4FindObjectCategory(Data[1].getInt());
179 
180  case C4FO_Action:
181  {
182  C4String *pStr = Data[1].getStr();
183  if (!pStr) return nullptr;
184  // Don't copy, it should be safe
185  return new C4FindObjectAction(pStr->GetCStr());
186  }
187 
188  case C4FO_Func:
189  {
190  // Get function name
191  C4String *pStr = Data[1].getStr();
192  if (!pStr) return nullptr;
193  // Construct
194  C4FindObjectFunc *pFO = new C4FindObjectFunc(pStr);
195  // Add parameters
196  for (int i = 2; i < Data.GetSize(); i++)
197  pFO->SetPar(i - 2, Data[i]);
198  // Done
199  return pFO;
200  }
201 
202  case C4FO_ActionTarget:
203  {
204  int index = 0;
205  if (Data.GetSize() >= 3)
206  index = Clamp(Data[2].getInt(), 0, 1);
207  return new C4FindObjectActionTarget(Data[1].getObj(), index);
208  }
209 
210  case C4FO_Procedure:
211  return new C4FindObjectProcedure(Data[1].getStr());
212 
213  case C4FO_Container:
214  return new C4FindObjectContainer(Data[1].getObj());
215 
216  case C4FO_AnyContainer:
217  return new C4FindObjectAnyContainer();
218 
219  case C4FO_Owner:
220  return new C4FindObjectOwner(Data[1].getInt());
221 
222  case C4FO_Controller:
223  return new C4FindObjectController(Data[1].getInt());
224 
225  case C4FO_Layer:
226  // explicit layer check given. do not add implicit layer check
227  if (has_layer_check) *has_layer_check = true;
228  return new C4FindObjectLayer(Data[1].getObj());
229 
230  case C4FO_InArray:
231  return new C4FindObjectInArray(Data[1].getArray());
232 
233  case C4FO_Property:
234  {
235  // Get property name
236  C4String *pStr = Data[1].getStr();
237  if (!pStr) return nullptr;
238  // Construct
240  // Done
241  return pFO;
242  }
243 
244  case C4FO_AnyLayer:
245  // do not add implicit layer check
246  if (has_layer_check) *has_layer_check = true;
247  return nullptr;
248 
249  }
250  return nullptr;
251 }
int32_t GetY() const
Definition: C4Object.h:287
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:286
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 268 of file C4FindObject.cpp.

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

Referenced by C4FindObject::Find().

269 {
270  // Trivial case
271  if (IsImpossible())
272  return nullptr;
273  // Search
274  // Double-check object status, as object might be deleted after Check()!
275  C4Object *pBestResult = nullptr;
276  for (C4Object *obj : Objs)
277  if (obj->Status)
278  if (Check(obj))
279  if (obj->Status)
280  {
281  // no sorting: Use first object found
282  if (!pSort) return obj;
283  // Sorting: Check if found object is better
284  if (!pBestResult || pSort->Compare(obj, pBestResult) > 0)
285  if (obj->Status)
286  pBestResult = obj;
287  }
288  return pBestResult;
289 }
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 364 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().

365 {
366  // Trivial case
367  if (IsImpossible())
368  return nullptr;
369  C4Object *pBestResult = nullptr;
370  // Check bounds
371  C4Rect *pBounds = GetBounds();
372  if (!pBounds)
373  return Find(Objs);
374  // Traverse areas, return first matching object w/o sort or best with sort
375  else if (UseShapes())
376  {
377  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
378  C4Object *pObj;
379  for (C4ObjectList *pLst=Area.FirstObjectShapes(&pSct); pLst; pLst=Area.NextObjectShapes(pLst, &pSct))
380  if ((pObj = Find(*pLst)))
381  {
382  if (!pSort)
383  return pObj;
384  else if (!pBestResult || pSort->Compare(pObj, pBestResult) > 0)
385  if (pObj->Status)
386  pBestResult = pObj;
387  }
388  }
389  else
390  {
391  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
392  C4Object *pObj;
393  for (C4ObjectList *pLst=Area.FirstObjects(&pSct); pLst; pLst=Area.NextObjects(pLst, &pSct))
394  {
395  if ((pObj = Find(*pLst)))
396  {
397  if (!pSort)
398  return pObj;
399  else if (!pBestResult || pSort->Compare(pObj, pBestResult) > 0)
400  if (pObj->Status)
401  pBestResult = pObj;
402  }
403  }
404  }
405  return pBestResult;
406 }
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 292 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().

293 {
294  // Trivial case
295  if (IsImpossible())
296  return new C4ValueArray();
297  // Set up array
298  C4ValueArray *pArray = new C4ValueArray(32);
299  int32_t iSize = 0;
300  // Search
301  for (C4Object *obj : Objs)
302  if (obj->Status)
303  if (Check(obj))
304  {
305  // Grow the array, if neccessary
306  if (iSize >= pArray->GetSize())
307  pArray->SetSize(iSize * 2);
308  // Add object
309  (*pArray)[iSize++] = C4VObj(obj);
310  }
311  // Shrink array
312  pArray->SetSize(iSize);
313  // Recheck object status (may shrink array again)
314  CheckObjectStatus(pArray);
315  // Apply sorting
316  if (pSort) pSort->SortObjects(pArray);
317  return pArray;
318 }
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 409 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().

410 {
411  // Trivial case
412  if (IsImpossible())
413  return new C4ValueArray();
414  C4Rect *pBounds = GetBounds();
415  if (!pBounds)
416  return FindMany(Objs);
417  // Prepare for array that may be generated
418  C4ValueArray *pArray; int32_t iSize;
419  // Check shape lists?
420  if (UseShapes())
421  {
422  // Get area
423  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
424  C4ObjectList *pLst = Area.FirstObjectShapes(&pSct);
425  // Check if a single-sector check is enough
426  if (!Area.Next(pSct))
427  return FindMany(pSct->ObjectShapes);
428  // Set up array
429  pArray = new C4ValueArray(32); iSize = 0;
430  // Create marker, search all areas
431  uint32_t iMarker = ::Objects.GetNextMarker();
432  for (; pLst; pLst=Area.NextObjectShapes(pLst, &pSct))
433  for (C4Object *obj : *pLst)
434  if (obj->Status)
435  if (obj->Marker != iMarker)
436  {
437  obj->Marker = iMarker;
438  if (Check(obj))
439  {
440  // Grow the array, if neccessary
441  if (iSize >= pArray->GetSize())
442  pArray->SetSize(iSize * 2);
443  // Add object
444  (*pArray)[iSize++] = C4VObj(obj);
445  }
446  }
447  }
448  else
449  {
450  // Set up array
451  pArray = new C4ValueArray(32); iSize = 0;
452  // Search
453  C4LArea Area(&::Objects.Sectors, *pBounds); C4LSector *pSct;
454  for (C4ObjectList *pLst=Area.FirstObjects(&pSct); pLst; pLst=Area.NextObjects(pLst, &pSct))
455  for (C4Object *obj : *pLst)
456  if (obj->Status)
457  if (Check(obj))
458  {
459  // Grow the array, if neccessary
460  if (iSize >= pArray->GetSize())
461  pArray->SetSize(iSize * 2);
462  // Add object
463  (*pArray)[iSize++] = C4VObj(obj);
464  }
465  }
466  // Shrink array
467  pArray->SetSize(iSize);
468  // Recheck object status (may shrink array again)
469  CheckObjectStatus(pArray);
470  // Apply sorting
471  if (pSort) pSort->SortObjects(pArray);
472  return pArray;
473 }
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:

bool C4FindObjectOwner::IsImpossible ( )
overrideprotectedvirtual

Reimplemented from C4FindObject.

Definition at line 762 of file C4FindObject.cpp.

References NO_OWNER, and ValidPlr().

763 {
764  return iOwner != NO_OWNER && !ValidPlr(iOwner);
765 }
const int NO_OWNER
Definition: C4Constants.h:137
int32_t ValidPlr(int32_t plr)

Here is the call graph for this function:

void C4FindObject::SetSort ( C4SortObject pToSort)
inherited

Definition at line 492 of file C4FindObject.cpp.

Referenced by CreateCriterionsFromPars().

493 {
494  delete pSort;
495  pSort = pToSort;
496 }

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: