#include <C4ObjectList.h>
Public Types | |
enum | SortType { stNone = 0 , stMain , stContents , stReverse } |
typedef int | SortProc(C4Object *, C4Object *) |
Public Member Functions | |
C4NotifyingObjectList ()=default | |
C4NotifyingObjectList (const C4NotifyingObjectList &list)=default | |
C4NotifyingObjectList (const C4ObjectList &list) | |
~C4NotifyingObjectList () override=default | |
iterator | begin () const |
const iterator | end () const |
const ReverseView | reverse () const |
virtual void | Default () |
virtual void | Clear () |
void | Sort () |
void | Copy (const C4ObjectList &list) |
void | DrawIfCategory (C4TargetFacet &cgo, int player, uint32_t dwCategory, bool invert) |
void | Draw (C4TargetFacet &cgo, int player, int MinPlane, int MaxPlane) |
void | DrawSelectMark (C4TargetFacet &cgo) const |
void | CloseMenus () |
void | UpdateGraphics (bool graphics_changed) |
void | UpdateFaces (bool update_shape) |
void | ClearInfo (C4ObjectInfo *info) |
virtual bool | Add (C4Object *new_obj, SortType sort_type, C4ObjectList *sorted_list=nullptr) |
bool | AddSortCustom (C4Object *new_obj, SortProc &pSortProc) |
virtual bool | Remove (C4Object *obj) |
virtual bool | AssignInfo () |
virtual bool | ValidateOwners () |
StdStrBuf | GetNameList (C4DefList &defs) const |
bool | IsClear () const |
bool | DenumeratePointers () |
bool | Write (char *szTarget) |
void | CompileFunc (StdCompiler *pComp, C4ValueNumbers *=nullptr) |
void | CompileFunc (StdCompiler *pComp, bool skip_player_objects, C4ValueNumbers *) |
void | Denumerate (C4ValueNumbers *) |
bool | IsContained (const C4Object *obj) const |
int | ClearPointers (C4Object *obj) |
int | ObjectCount (C4ID id=C4ID::None) const |
int | MassCount () |
int | ListIDCount (int32_t dwCategory) const |
C4Object * | GetObject (int index=0) const |
C4Object * | GetFirstObject () const |
C4Object * | GetLastObject () const |
C4Object * | Find (C4Def *def, int owner=ANY_OWNER, DWORD dwOCF=OCF_All) |
C4Object * | FindOther (C4ID id, int owner=ANY_OWNER) |
const C4ObjectLink * | GetLink (const C4Object *obj) const |
C4ObjectLink * | GetLink (const C4Object *obj) |
C4ID | GetListID (int32_t dwCategory, int index) const |
bool | ShiftContents (C4Object *new_first) |
void | DeleteObjects () |
void | UpdateScriptPointers () |
bool | CheckSort (C4ObjectList *list) |
void | CheckCategorySort () |
Public Attributes | |
C4ObjectLink * | First |
C4ObjectLink * | Last |
int | Mass |
std::list< int32_t > * | pEnumerated |
Protected Member Functions | |
void | InsertLinkBefore (C4ObjectLink *link, C4ObjectLink *before_link) override |
void | InsertLink (C4ObjectLink *link, C4ObjectLink *after_link) override |
void | RemoveLink (C4ObjectLink *link) override |
iterator * | AddIter (iterator *iter) const |
void | RemoveIter (iterator *iter) const |
Protected Attributes | |
iterator * | FirstIter {nullptr} |
Definition at line 172 of file C4ObjectList.h.
Definition at line 118 of file C4ObjectList.h.
|
inherited |
|
default |
|
default |
|
inline |
Definition at line 177 of file C4ObjectList.h.
|
overridedefault |
|
virtualinherited |
Definition at line 164 of file C4ObjectList.cpp.
References C4D_StaticBack, C4Object::Category, C4ObjectList::CheckCategorySort(), C4ObjectList::CheckSort(), C4Object::Def, C4ObjectList::First, C4ObjectList::GetLink(), C4Object::GetPlane(), C4Object::id, C4ObjectList::InsertLink(), C4ObjectList::Last, C4Object::Mass, C4ObjectList::Mass, C4ObjectLink::Next, C4ObjectLink::Obj, C4ObjectLink::Prev, C4PropList::Status, C4ObjectList::stMain, C4ObjectList::stReverse, and C4Object::Unsorted.
Referenced by C4GameObjects::Add(), C4LSectors::Add(), C4ObjectList::CompileFunc(), C4ObjectList::Copy(), C4ObjectList::DenumeratePointers(), C4Object::Enter(), C4Player::MakeCrewMember(), C4Player::PlaceReadyCrew(), C4GameObjects::PostLoad(), C4Object::StatusDeactivate(), C4LSectors::Update(), and C4MouseControl::UpdateSingleSelection().
|
protectedinherited |
Definition at line 1238 of file C4ObjectList.cpp.
References C4ObjectList::FirstIter.
Referenced by C4ObjectList::iterator::iterator().
|
virtualinherited |
Reimplemented in C4GameObjects.
Definition at line 732 of file C4ObjectList.cpp.
References C4Object::AssignInfo(), C4ObjectList::Last, C4ObjectLink::Obj, C4ObjectLink::Prev, and C4PropList::Status.
Referenced by C4GameObjects::AssignInfo().
|
inherited |
Definition at line 1230 of file C4ObjectList.cpp.
References C4ObjectList::First, and C4ObjectList::iterator.
Referenced by C4GameObjects::PostLoad(), and C4Object::ShiftContents().
|
inherited |
Definition at line 1126 of file C4ObjectList.cpp.
References C4ObjectList::First, C4Object::GetPlane(), C4ObjectLink::Next, C4ObjectLink::Obj, C4PropList::Status, and C4Object::Unsorted.
Referenced by C4ObjectList::Add().
|
inherited |
Definition at line 1091 of file C4ObjectList.cpp.
References C4ObjectList::First, Log(), LogSilent(), mkNamingAdapt(), C4ObjectLink::Next, C4ObjectLink::Obj, C4PropList::Status, and C4Object::Unsorted.
Referenced by C4ObjectList::Add(), and C4LSectors::CheckSort().
|
virtualinherited |
Reimplemented in C4GameObjects.
Definition at line 48 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectList::FirstIter, C4ObjectList::Last, C4ObjectLink::Next, and C4ObjectList::pEnumerated.
Referenced by C4MouseControl::Clear(), C4GameObjects::Clear(), C4LSector::ClearObjects(), C4ObjectList::CompileFunc(), C4ObjectList::Copy(), C4GameObjects::DeleteObjects(), C4MouseControl::LeftUpDragNone(), C4GameObjects::PostLoad(), C4MouseControl::UpdateSingleSelection(), and C4ObjectList::~C4ObjectList().
|
inherited |
Definition at line 748 of file C4ObjectList.cpp.
References C4Object::ClearInfo(), C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, and C4PropList::Status.
Referenced by C4ObjectInfoList::DetachFromObjects().
|
inherited |
Definition at line 481 of file C4ObjectList.cpp.
References C4Object::ClearPointers(), C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, and C4ObjectList::Remove().
Referenced by C4Game::ClearPointers(), and C4MouseControl::ClearPointers().
|
inherited |
Definition at line 933 of file C4ObjectList.cpp.
References C4Object::CloseMenu(), C4ObjectList::First, C4ObjectLink::Next, and C4ObjectLink::Obj.
|
inherited |
Definition at line 622 of file C4ObjectList.cpp.
References C4ObjectList::Add(), C4ObjectList::Clear(), StdStrBuf::getData(), StdStrBuf::getLength(), StdCompiler::hasNaming(), StdCompiler::isSerializer(), C4Object::IsUserPlayerObject(), C4ObjectList::Last, LogF(), mkNamingAdapt(), mkNamingCountAdapt(), mkParAdapt(), mkPtrAdaptNoNull(), StdCompiler::Exception::Msg, C4ObjectLink::Obj, C4ObjectList::ObjectCount(), StdCompiler::Exception::Pos, C4ObjectLink::Prev, C4PropList::Status, C4ObjectList::stReverse, and StdCompiler::Value().
|
inherited |
Definition at line 672 of file C4ObjectList.cpp.
References C4ObjectList::First, StdCompiler::isDeserializer(), mkSTLContainerAdapt(), C4ObjectLink::Next, C4PropListNumbered::Number, C4ObjectLink::Obj, C4ObjectList::pEnumerated, StdCompiler::SEP_SEP2, C4PropList::Status, and StdCompiler::Value().
|
inherited |
Definition at line 943 of file C4ObjectList.cpp.
References C4ObjectList::Add(), C4ObjectList::Clear(), C4ObjectList::Default(), C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, and C4ObjectList::stNone.
Referenced by C4ObjectList::C4ObjectList(), C4Object::GrabContents(), and C4GameObjects::PostLoad().
|
virtualinherited |
Reimplemented in C4GameObjects.
Definition at line 953 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectList::Last, C4ObjectList::Mass, and C4ObjectList::pEnumerated.
Referenced by C4ObjectList::C4ObjectList(), C4Player::C4Player(), C4ObjectList::Copy(), C4MouseControl::Default(), C4Object::Default(), and C4GameObjects::Default().
|
inherited |
Definition at line 986 of file C4ObjectList.cpp.
References C4OS_DELETED, C4Game::ClearPointers(), C4ObjectList::First, Game, C4ObjectList::Mass, C4ObjectLink::Obj, C4ObjectList::Remove(), and C4PropList::Status.
Referenced by C4GameObjects::Clear(), and C4GameObjects::DeleteObjects().
|
inherited |
Definition at line 610 of file C4ObjectList.cpp.
References C4Object::Denumerate(), C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, and C4PropList::Status.
Referenced by C4GameObjects::Denumerate().
|
inherited |
Definition at line 577 of file C4ObjectList.cpp.
References C4ObjectList::Add(), C4GameObjects::ObjectPointer(), Objects, C4ObjectList::pEnumerated, and C4ObjectList::stNone.
Referenced by C4Object::Denumerate(), and C4Player::DenumeratePointers().
|
inherited |
Definition at line 499 of file C4ObjectList.cpp.
References C4D_Foreground, C4Object::Category, C4Object::Draw(), C4Object::DrawTopFace(), C4Object::GetPlane(), C4ObjectList::Last, C4ObjectLink::Obj, C4ScriptGuiWindowPropertyName::player, and C4ObjectLink::Prev.
Referenced by C4Viewport::Draw().
|
inherited |
Definition at line 538 of file C4ObjectList.cpp.
References C4Object::Category, C4Object::Draw(), C4Object::DrawTopFace(), C4ObjectList::Last, C4ObjectLink::Obj, C4ScriptGuiWindowPropertyName::player, and C4ObjectLink::Prev.
Referenced by C4Viewport::Draw().
|
inherited |
Definition at line 924 of file C4ObjectList.cpp.
References C4Object::DrawSelectMark(), C4ObjectList::Last, C4ObjectLink::Obj, and C4ObjectLink::Prev.
Referenced by C4MouseControl::Draw().
|
inherited |
Definition at line 1234 of file C4ObjectList.cpp.
References C4ObjectList::iterator.
Referenced by C4ObjectListIterator::GetNext().
|
inherited |
Definition at line 383 of file C4ObjectList.cpp.
References ANY_OWNER, C4Object::Def, C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, C4Object::OCF, C4Object::Owner, and C4PropList::Status.
Referenced by C4Command::Acquire(), C4ObjectMenu::DoRefillInternal(), C4RoundResults::EvaluateGoals(), C4Command::Get(), C4MainMenu::MenuCommand(), and C4Command::Put().
Definition at line 400 of file C4ObjectList.cpp.
References ANY_OWNER, C4Object::Def, C4ObjectList::First, C4Def::id, C4ObjectLink::Next, C4ObjectLink::Obj, C4Object::Owner, and C4PropList::Status.
|
inlineinherited |
Definition at line 141 of file C4ObjectList.h.
References C4ObjectList::First, and C4ObjectLink::Obj.
Referenced by C4Player::CheckElimination().
|
inlineinherited |
Definition at line 142 of file C4ObjectList.h.
References C4ObjectList::Last, and C4ObjectLink::Obj.
Referenced by C4Object::PutAwayUnusedObject().
|
inlineinherited |
Definition at line 147 of file C4ObjectList.h.
References C4ObjectList::GetLink().
|
inherited |
Definition at line 435 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, and C4ObjectLink::Obj.
Referenced by C4ObjectList::Add(), C4Object::AssignInfo(), C4Command::Drop(), C4ObjectList::GetLink(), C4Player::MakeCrewMember(), C4GameObjects::PostLoad(), C4Command::Put(), C4ObjectList::Remove(), C4ObjectList::ShiftContents(), and C4Command::Throw().
|
inherited |
Definition at line 73 of file C4ObjectList.cpp.
References C4D_All, C4Id2Def(), C4Def::Category, C4Object::Def, C4ObjectList::First, C4Def::id, Inside(), MaxTempListID, C4ObjectLink::Next, C4ID::None, C4ObjectLink::Obj, C4PropList::Status, and TempListID.
Referenced by C4MainMenu::ActivateRules(), C4RoundResults::EvaluateGoals(), and C4ObjectList::GetNameList().
Definition at line 699 of file C4ObjectList.cpp.
References StdStrBuf::Append(), StdStrBuf::AppendFormat(), C4D_All, C4ObjectList::GetListID(), C4PropListStatic::GetName(), C4DefList::ID2Def(), and C4ObjectList::ObjectCount().
Referenced by C4Object::GetDataString().
|
inherited |
Definition at line 416 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, and C4PropList::Status.
Referenced by C4Object::AssignDeath(), C4Object::DirectComContents(), C4Object::DoCon(), C4MouseControl::LeftUpDragNone(), ObjectActionThrow(), ObjectComDrop(), ObjectComPut(), ObjectComPutTake(), ObjectComThrow(), C4Command::Put(), C4Player::RemoveCrewObjects(), C4MouseControl::RightUpDragNone(), C4Object::ShiftContents(), and C4MouseControl::UpdateSingleSelection().
|
overrideprotectedvirtual |
Reimplemented from C4ObjectList.
Definition at line 888 of file C4ObjectList.cpp.
References C4ObjectList::InsertLink(), ObjectListChangeListener, and C4ObjectListChangeListener::OnObjectAdded().
|
overrideprotectedvirtual |
Reimplemented from C4ObjectList.
Definition at line 882 of file C4ObjectList.cpp.
References C4ObjectList::InsertLinkBefore(), ObjectListChangeListener, and C4ObjectListChangeListener::OnObjectAdded().
|
inherited |
Definition at line 572 of file C4ObjectList.cpp.
References C4ObjectList::ObjectCount().
|
inherited |
Definition at line 559 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, and C4ObjectLink::Obj.
Referenced by C4LSectors::AssertObjectNotInList(), C4Object::IsPlayerObject(), C4Player::NotifyOwnedObjects(), and C4Player::SetObjectCrewStatus().
|
inherited |
|
inherited |
Definition at line 466 of file C4ObjectList.cpp.
References C4ObjectList::First, C4Object::Mass, C4ObjectList::Mass, C4ObjectLink::Next, C4ObjectLink::Obj, and C4PropList::Status.
Referenced by C4Object::UpdateMass().
|
inherited |
Definition at line 452 of file C4ObjectList.cpp.
References C4Object::Def, C4ObjectList::First, C4Def::id, C4ObjectLink::Next, C4ID::None, C4ObjectLink::Obj, and C4PropList::Status.
Referenced by C4Object::AssignDeath(), C4ObjectList::CompileFunc(), C4Game::CompileRuntimeData(), C4FindObject::Count(), C4EditCursor::DoContextMenu(), C4ObjectMenu::DoRefillInternal(), C4ObjectMenu::Execute(), C4Network2Stats::ExecuteFrame(), C4Object::GetDataString(), C4ObjectList::GetNameList(), C4Game::InitGameFinal(), C4ObjectList::IsClear(), C4GameObjects::PostLoad(), C4ControlSyncCheck::Set(), and C4MouseControl::UpdateSingleSelection().
|
virtualinherited |
Reimplemented in C4GameObjects.
Definition at line 328 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectList::FirstIter, C4ObjectList::GetLink(), C4Object::Mass, C4ObjectList::Mass, C4ObjectLink::Next, C4ObjectLink::Obj, C4ObjectLink::Prev, and C4ObjectList::RemoveLink().
Referenced by C4Object::AssignInfo(), C4Object::AssignRemoval(), C4ObjectList::ClearPointers(), C4Object::ClearPointers(), C4Player::ClearPointers(), C4ObjectList::DeleteObjects(), C4Object::Exit(), C4GameObjects::Remove(), C4LSectors::Remove(), C4Player::SetObjectCrewStatus(), C4Object::StatusActivate(), and C4LSectors::Update().
|
protectedinherited |
|
overrideprotectedvirtual |
Reimplemented from C4ObjectList.
Definition at line 894 of file C4ObjectList.cpp.
References ObjectListChangeListener, C4ObjectListChangeListener::OnObjectRemove(), and C4ObjectList::RemoveLink().
|
inlineinherited |
Definition at line 104 of file C4ObjectList.h.
Referenced by C4GameObjects::AssignLightRange(), C4PropertyCollection::CollectPropLists(), C4Game::ExecObjects(), C4ObjectList::iterator::operator++(), C4ObjectList::iterator::operator=(), C4ObjectList::iterator::operator==(), C4GameObjects::PostLoad(), C4ObjectList::iterator::reset(), and C4Object::ShiftContents().
|
inherited |
Definition at line 960 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectList::GetLink(), C4ObjectList::Last, C4ObjectLink::Next, and C4ObjectLink::Prev.
Referenced by C4Object::DirectComContents().
|
inherited |
Definition at line 760 of file C4ObjectList.cpp.
References C4ObjectList::First, C4Object::id, C4ObjectList::InsertLink(), C4ObjectLink::Next, C4ObjectLink::Obj, and C4ObjectList::RemoveLink().
|
inherited |
Definition at line 912 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, C4PropList::Status, and C4Object::UpdateFace().
Referenced by C4GameObjects::PostLoad().
|
inherited |
Definition at line 900 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, C4PropList::Status, and C4Object::UpdateGraphics().
Referenced by C4GameObjects::PostLoad().
|
inherited |
Definition at line 1073 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, and C4Object::UpdateScriptPointers().
Referenced by C4GameObjects::UpdateScriptPointers().
|
virtualinherited |
Reimplemented in C4GameObjects.
Definition at line 719 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, C4ObjectLink::Obj, C4PropList::Status, and C4Object::ValidateOwner().
Referenced by C4GameObjects::ValidateOwners().
|
inherited |
Definition at line 594 of file C4ObjectList.cpp.
References C4ObjectList::First, C4ObjectLink::Next, C4PropListNumbered::Number, C4ObjectLink::Obj, SAppend(), sprintf, and C4PropList::Status.
|
inherited |
Definition at line 51 of file C4ObjectList.h.
Referenced by C4ObjectList::Add(), C4ObjectList::begin(), C4ObjectList::CheckCategorySort(), C4ObjectList::CheckSort(), C4ObjectList::Clear(), C4ObjectList::ClearInfo(), C4ObjectList::ClearPointers(), C4ObjectList::CloseMenus(), C4ObjectList::CompileFunc(), C4ObjectList::Copy(), C4ObjectList::Default(), C4ObjectList::DeleteObjects(), C4ObjectList::Denumerate(), C4ObjectList::Find(), C4ObjectList::FindOther(), C4GameObjects::FixObjectOrder(), C4ObjectList::GetFirstObject(), C4ObjectList::GetLink(), C4ObjectList::GetListID(), C4ObjectList::GetObject(), C4ObjectList::InsertLink(), C4ObjectList::InsertLinkBefore(), C4ObjectList::IsContained(), C4ObjectList::MassCount(), C4ObjectList::ObjectCount(), C4ObjectList::Remove(), C4ObjectList::RemoveLink(), C4ObjectList::ShiftContents(), C4ObjectList::Sort(), C4ObjectList::UpdateFaces(), C4ObjectList::UpdateGraphics(), C4ObjectList::UpdateScriptPointers(), C4ObjectList::ValidateOwners(), and C4ObjectList::Write().
|
mutableprotectedinherited |
Definition at line 165 of file C4ObjectList.h.
Referenced by C4ObjectList::AddIter(), C4ObjectList::Clear(), C4ObjectList::InsertLink(), C4ObjectList::InsertLinkBefore(), C4ObjectList::Remove(), and C4ObjectList::RemoveIter().
|
inherited |
Definition at line 51 of file C4ObjectList.h.
Referenced by C4ObjectList::Add(), C4ObjectList::AssignInfo(), C4ObjectList::ReverseView::begin(), C4ObjectList::Clear(), C4ObjectList::CompileFunc(), C4ObjectList::Default(), C4ObjectList::Draw(), C4ObjectList::DrawIfCategory(), C4ObjectList::DrawSelectMark(), C4GameObjects::FixObjectOrder(), C4ObjectList::GetLastObject(), C4ObjectList::InsertLink(), C4ObjectList::InsertLinkBefore(), C4ObjectList::RemoveLink(), and C4ObjectList::ShiftContents().
|
inherited |
Definition at line 52 of file C4ObjectList.h.
Referenced by C4ObjectList::Add(), C4ObjectList::Default(), C4ObjectList::DeleteObjects(), C4ObjectList::MassCount(), C4ObjectList::Remove(), and C4Object::UpdateMass().
|
inherited |
Definition at line 53 of file C4ObjectList.h.
Referenced by C4ObjectList::Clear(), C4ObjectList::CompileFunc(), C4ObjectList::Default(), and C4ObjectList::DenumeratePointers().