#include <C4FindObject.h>
Public Member Functions | |
C4FindObject ()=default | |
virtual | ~C4FindObject () |
int32_t | Count (const C4ObjectList &Objs) |
C4Object * | Find (const C4ObjectList &Objs) |
C4ValueArray * | FindMany (const C4ObjectList &Objs) |
int32_t | Count (const C4ObjectList &Objs, const C4LSectors &Sct) |
C4Object * | Find (const C4ObjectList &Objs, const C4LSectors &Sct) |
C4ValueArray * | FindMany (const C4ObjectList &Objs, const C4LSectors &Sct) |
void | SetSort (C4SortObject *pToSort) |
Static Public Member Functions | |
static C4FindObject * | CreateByValue (const C4Value &Data, C4SortObject **ppSortObj=nullptr, const C4Object *context=nullptr, bool *has_layer_check=nullptr) |
Protected Member Functions | |
virtual bool | Check (C4Object *pObj)=0 |
virtual C4Rect * | GetBounds () |
virtual bool | UseShapes () |
virtual bool | IsImpossible () |
virtual bool | IsEnsured () |
Friends | |
class | C4FindObjectNot |
class | C4FindObjectAnd |
class | C4FindObjectOr |
Definition at line 69 of file C4FindObject.h.
|
default |
|
virtual |
Definition at line 28 of file C4FindObject.cpp.
|
protectedpure virtual |
Implemented in C4FindObjectInArray, C4FindObjectLayer, C4FindObjectProperty, C4FindObjectFunc, C4FindObjectController, C4FindObjectOwner, C4FindObjectAnyContainer, C4FindObjectContainer, C4FindObjectProcedure, C4FindObjectActionTarget, C4FindObjectAction, C4FindObjectCategory, C4FindObjectOCF, C4FindObjectCone, C4FindObjectDistance, C4FindObjectOnLine, C4FindObjectAtRect, C4FindObjectAtPoint, C4FindObjectInRect, C4FindObjectDef, C4FindObjectExclude, C4FindObjectOr, C4FindObjectAnd, and C4FindObjectNot.
Referenced by C4FindObjectNot::Check(), Count(), Find(), and FindMany().
int32_t C4FindObject::Count | ( | const C4ObjectList & | Objs | ) |
Definition at line 260 of file C4FindObject.cpp.
References Check(), IsEnsured(), IsImpossible(), and C4ObjectList::ObjectCount().
Referenced by Count().
int32_t C4FindObject::Count | ( | const C4ObjectList & | Objs, |
const C4LSectors & | Sct | ||
) |
Definition at line 327 of file C4FindObject.cpp.
References Check(), Count(), C4LArea::FirstObjects(), C4LArea::FirstObjectShapes(), GetBounds(), C4GameObjects::GetNextMarker(), IsEnsured(), IsImpossible(), C4LArea::Next(), C4LArea::NextObjects(), C4LArea::NextObjectShapes(), C4ObjectList::ObjectCount(), Objects, C4LSector::ObjectShapes, C4GameObjects::Sectors, and UseShapes().
|
static |
Definition at line 33 of file C4FindObject.cpp.
References C4FindObjectAnd, C4FindObjectNot, 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().
C4Object * C4FindObject::Find | ( | const C4ObjectList & | Objs | ) |
Definition at line 275 of file C4FindObject.cpp.
References Check(), C4SortObject::Compare(), and IsImpossible().
Referenced by Find().
C4Object * C4FindObject::Find | ( | const C4ObjectList & | Objs, |
const C4LSectors & | Sct | ||
) |
Definition at line 371 of file C4FindObject.cpp.
References C4SortObject::Compare(), Find(), C4LArea::FirstObjects(), C4LArea::FirstObjectShapes(), GetBounds(), IsImpossible(), C4LArea::NextObjects(), C4LArea::NextObjectShapes(), Objects, C4GameObjects::Sectors, C4PropList::Status, and UseShapes().
C4ValueArray * C4FindObject::FindMany | ( | const C4ObjectList & | Objs | ) |
Definition at line 299 of file C4FindObject.cpp.
References C4VObj(), Check(), C4ValueArray::GetSize(), IsImpossible(), iSize, C4ValueArray::SetSize(), and C4SortObject::SortObjects().
Referenced by C4EditCursor::DoContextMenu(), FindMany(), and C4Landscape::P::PrepareFreeShape().
C4ValueArray * C4FindObject::FindMany | ( | const C4ObjectList & | Objs, |
const C4LSectors & | Sct | ||
) |
Definition at line 416 of file C4FindObject.cpp.
References C4VObj(), Check(), FindMany(), C4LArea::FirstObjects(), C4LArea::FirstObjectShapes(), GetBounds(), C4GameObjects::GetNextMarker(), C4ValueArray::GetSize(), IsImpossible(), iSize, C4LArea::Next(), C4LArea::NextObjects(), C4LArea::NextObjectShapes(), Objects, C4LSector::ObjectShapes, C4GameObjects::Sectors, C4ValueArray::SetSize(), C4SortObject::SortObjects(), and UseShapes().
|
inlineprotectedvirtual |
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(), Count(), Find(), and FindMany().
|
inlineprotectedvirtual |
Reimplemented in C4FindObjectCategory, C4FindObjectOr, C4FindObjectAnd, and C4FindObjectNot.
Definition at line 98 of file C4FindObject.h.
Referenced by Count(), and C4FindObjectNot::IsImpossible().
|
inlineprotectedvirtual |
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 Count(), Find(), FindMany(), and C4FindObjectNot::IsEnsured().
void C4FindObject::SetSort | ( | C4SortObject * | pToSort | ) |
Definition at line 499 of file C4FindObject.cpp.
Referenced by CreateCriterionsFromPars().
|
inlineprotectedvirtual |
Reimplemented in C4FindObjectOnLine, C4FindObjectAtRect, C4FindObjectAtPoint, C4FindObjectOr, and C4FindObjectAnd.
Definition at line 96 of file C4FindObject.h.
Referenced by C4FindObjectAnd::C4FindObjectAnd(), C4FindObjectOr::C4FindObjectOr(), Count(), Find(), and FindMany().
|
friend |
Definition at line 72 of file C4FindObject.h.
Referenced by CreateByValue().
|
friend |
Definition at line 71 of file C4FindObject.h.
Referenced by CreateByValue().
|
friend |
Definition at line 73 of file C4FindObject.h.
Referenced by CreateByValue().