#include <C4IDList.h>
Public Member Functions | |
C4IDList () | |
C4IDList (const C4IDList &rCopy) | |
C4IDList & | operator= (const C4IDList &rCopy) |
~C4IDList () | |
bool | operator== (const C4IDList &rhs) const |
void | Default () |
void | Clear () |
bool | IsClear () const |
C4ID | GetID (size_t index, int32_t *ipCount=nullptr) const |
int32_t | GetCount (size_t index) const |
bool | SetCount (size_t index, int32_t iCount) |
int32_t | GetIDCount (C4ID c_id, int32_t iZeroDefVal=0) const |
bool | SetIDCount (C4ID c_id, int32_t iCount, bool fAddNewID=false) |
bool | IncreaseIDCount (C4ID c_id, bool fAddNewID=true, int32_t IncreaseBy=1, bool fRemoveEmpty=false) |
bool | DecreaseIDCount (C4ID c_id, bool fRemoveEmptyID=true) |
int32_t | GetNumberOfIDs () const |
int32_t | GetIndex (C4ID c_id) const |
C4ID | GetID (C4DefList &rDefs, int32_t dwCategory, int32_t index, int32_t *ipCount=nullptr) const |
int32_t | GetCount (C4DefList &rDefs, int32_t dwCategory, int32_t index) const |
bool | SetCount (C4DefList &rDefs, int32_t dwCategory, int32_t index, int32_t iCount) |
int32_t | GetNumberOfIDs (C4DefList &rDefs, int32_t dwCategory) const |
bool | Add (C4IDList &rList) |
bool | ConsolidateValids (C4DefList &rDefs, int32_t dwCategory=0) |
bool | DeleteItem (size_t iIndex) |
void | Draw (C4Facet &cgo, int32_t iSelection, C4DefList &rDefs, DWORD dwCategory, bool fCounts=true, int32_t iAlign=0) const |
void | CompileFunc (StdCompiler *pComp, bool fValues=true) |
Protected Attributes | |
size_t | Count |
C4ID | id [C4IDListChunkSize] |
C4IDListChunk * | pNext |
Definition at line 46 of file C4IDList.h.
C4IDList::C4IDList | ( | ) |
Definition at line 61 of file stub-handle.cpp.
C4IDList::C4IDList | ( | const C4IDList & | rCopy | ) |
Definition at line 60 of file C4IDList.cpp.
References Default().
C4IDList::~C4IDList | ( | ) |
Definition at line 62 of file stub-handle.cpp.
bool C4IDList::Add | ( | C4IDList & | rList | ) |
Definition at line 422 of file C4IDList.cpp.
References C4IDListChunkSize, C4IDListChunk::Count, Count, C4IDListChunk::id, IncreaseIDCount(), and C4IDListChunk::pNext.
void C4IDList::Clear | ( | ) |
Definition at line 64 of file stub-handle.cpp.
Referenced by C4GameParameters::Clear(), C4RoundResults::Clear(), C4SGame::Default(), C4SAnimals::Default(), C4SEnvironment::Default(), C4Def::DefaultDefCore(), and C4RoundResults::EvaluateGoals().
void C4IDList::CompileFunc | ( | StdCompiler * | pComp, |
bool | fValues = true |
||
) |
Definition at line 69 of file stub-handle.cpp.
bool C4IDList::ConsolidateValids | ( | C4DefList & | rDefs, |
int32_t | dwCategory = 0 |
||
) |
Definition at line 439 of file C4IDList.cpp.
References C4IDListChunkSize, C4Def::Category, Count, DeleteItem(), C4IDListChunk::id, C4DefList::ID2Def(), and C4IDListChunk::pNext.
Referenced by C4Player::ScenarioInit().
|
inline |
Definition at line 69 of file C4IDList.h.
References IncreaseIDCount().
void C4IDList::Default | ( | ) |
Definition at line 63 of file stub-handle.cpp.
Referenced by C4IDList(), C4SDefinitions::Default(), C4SRealism::Default(), C4SPlrStart::Default(), C4SLandscape::Default(), and C4Player::DefaultRuntimeData().
bool C4IDList::DeleteItem | ( | size_t | iIndex | ) |
Definition at line 498 of file C4IDList.cpp.
References C4IDListChunkSize, C4IDListChunk::Count, Count, C4IDListChunk::id, and C4IDListChunk::pNext.
Referenced by ConsolidateValids(), IncreaseIDCount(), and C4Player::SetKnowledge().
void C4IDList::Draw | ( | C4Facet & | cgo, |
int32_t | iSelection, | ||
C4DefList & | rDefs, | ||
DWORD | dwCategory, | ||
bool | fCounts = true , |
||
int32_t | iAlign = 0 |
||
) | const |
Definition at line 467 of file C4IDList.cpp.
References ARight, C4Draw::DEFAULT_MESSAGE_COLOR, C4DefList::Draw(), C4GraphicsResource::FontRegular, GetID(), CStdFont::GetLineHeight(), GetNumberOfIDs(), C4Facet::GetSectionCount(), GraphicsResource, C4Facet::Hgt, pDraw, sprintf, C4Facet::Surface, C4Draw::TextOut(), C4Facet::TruncateSection(), C4Facet::Wdt, C4Facet::X, and C4Facet::Y.
int32_t C4IDList::GetCount | ( | C4DefList & | rDefs, |
int32_t | dwCategory, | ||
int32_t | index | ||
) | const |
Definition at line 346 of file C4IDList.cpp.
References C4D_All, C4IDListChunkSize, C4Def::Category, C4IDListChunk::Count, Count, C4IDListChunk::id, C4DefList::ID2Def(), and C4IDListChunk::pNext.
int32_t C4IDList::GetCount | ( | size_t | index | ) | const |
Definition at line 125 of file C4IDList.cpp.
References C4IDListChunkSize, C4IDListChunk::Count, Count, and C4IDListChunk::pNext.
Referenced by C4Object::CreateContentsByList(), C4Player::ExecBaseProduction(), C4Player::PlaceReadyBase(), C4Player::PlaceReadyMaterial(), and C4Player::PlaceReadyVehic().
C4ID C4IDList::GetID | ( | C4DefList & | rDefs, |
int32_t | dwCategory, | ||
int32_t | index, | ||
int32_t * | ipCount = nullptr |
||
) | const |
Definition at line 311 of file C4IDList.cpp.
References C4D_All, C4IDListChunkSize, C4Def::Category, C4IDListChunk::Count, Count, C4IDListChunk::id, C4DefList::ID2Def(), C4ID::None, and C4IDListChunk::pNext.
C4ID C4IDList::GetID | ( | size_t | index, |
int32_t * | ipCount = nullptr |
||
) | const |
Definition at line 103 of file C4IDList.cpp.
References C4IDListChunkSize, C4IDListChunk::Count, Count, C4IDListChunk::id, C4ID::None, and C4IDListChunk::pNext.
Referenced by C4MainMenu::ActivateGoals(), C4DefList::CheckRequireDef(), C4Object::CreateContentsByList(), Draw(), C4Player::ExecBaseProduction(), C4GameParameters::GetGameGoalString(), C4Game::InitAnimals(), C4Game::InitEnvironment(), C4Game::InitGoals(), C4Game::InitRules(), C4Game::InitValueOverloads(), ListExpandValids(), C4Player::PlaceReadyBase(), C4Player::PlaceReadyCrew(), C4Player::PlaceReadyMaterial(), C4Player::PlaceReadyVehic(), and C4GoalDisplay::SetGoals().
int32_t C4IDList::GetIDCount | ( | C4ID | c_id, |
int32_t | iZeroDefVal = 0 |
||
) | const |
Definition at line 67 of file stub-handle.cpp.
Referenced by C4MainMenu::ActivateGoals(), C4Player::ExecBaseProduction(), C4Game::InitValueOverloads(), and C4GoalDisplay::SetGoals().
int32_t C4IDList::GetIndex | ( | C4ID | c_id | ) | const |
Definition at line 236 of file C4IDList.cpp.
References C4IDListChunkSize, Count, C4IDListChunk::id, and C4IDListChunk::pNext.
Referenced by C4Player::SetKnowledge().
int32_t C4IDList::GetNumberOfIDs | ( | ) | const |
Definition at line 231 of file C4IDList.cpp.
References Count.
Referenced by C4MainMenu::ActivateGoals(), C4GameOverDlg::C4GameOverDlg(), C4DefList::CheckRequireDef(), Draw(), C4GameParameters::GetGameGoalString(), and C4GoalDisplay::SetGoals().
int32_t C4IDList::GetNumberOfIDs | ( | C4DefList & | rDefs, |
int32_t | dwCategory | ||
) | const |
Definition at line 399 of file C4IDList.cpp.
References C4D_All, C4IDListChunkSize, C4Def::Category, Count, C4IDListChunk::id, C4DefList::ID2Def(), and C4IDListChunk::pNext.
bool C4IDList::IncreaseIDCount | ( | C4ID | c_id, |
bool | fAddNewID = true , |
||
int32_t | IncreaseBy = 1 , |
||
bool | fRemoveEmpty = false |
||
) |
Definition at line 258 of file C4IDList.cpp.
References C4IDListChunk::C4IDListChunk(), C4IDListChunkSize, C4IDListChunk::Count, Count, DeleteItem(), C4IDListChunk::id, and C4IDListChunk::pNext.
Referenced by Add(), DecreaseIDCount(), and C4Player::ExecBaseProduction().
bool C4IDList::IsClear | ( | ) | const |
Definition at line 65 of file stub-handle.cpp.
bool C4IDList::operator== | ( | const C4IDList & | rhs | ) | const |
Definition at line 66 of file stub-handle.cpp.
bool C4IDList::SetCount | ( | C4DefList & | rDefs, |
int32_t | dwCategory, | ||
int32_t | index, | ||
int32_t | iCount | ||
) |
Definition at line 372 of file C4IDList.cpp.
References C4D_All, C4IDListChunkSize, C4Def::Category, C4IDListChunk::Count, Count, C4IDListChunk::id, C4DefList::ID2Def(), and C4IDListChunk::pNext.
bool C4IDList::SetCount | ( | size_t | index, |
int32_t | iCount | ||
) |
Definition at line 143 of file C4IDList.cpp.
References C4IDListChunkSize, C4IDListChunk::Count, Count, and C4IDListChunk::pNext.
bool C4IDList::SetIDCount | ( | C4ID | c_id, |
int32_t | iCount, | ||
bool | fAddNewID = false |
||
) |
Definition at line 68 of file stub-handle.cpp.
Referenced by C4SPlrStart::CompileFunc(), C4RoundResults::EvaluateGoals(), and C4Player::SetKnowledge().
|
protected |
Definition at line 55 of file C4IDList.h.
Referenced by Add(), ConsolidateValids(), DeleteItem(), GetCount(), GetID(), GetIndex(), GetNumberOfIDs(), IncreaseIDCount(), IsClear(), and SetCount().
|
inherited |
Definition at line 33 of file C4IDList.h.
Referenced by Add(), ConsolidateValids(), DeleteItem(), GetCount(), GetID(), GetIndex(), GetNumberOfIDs(), IncreaseIDCount(), and SetCount().
|
inherited |
Definition at line 36 of file C4IDList.h.
Referenced by Add(), C4IDListChunk::Clear(), ConsolidateValids(), DeleteItem(), GetCount(), GetID(), GetIndex(), GetNumberOfIDs(), IncreaseIDCount(), and SetCount().