#include <C4GroupSet.h>
Public Member Functions | |
bool | UnregisterGroup (int32_t iIndex) |
void | Clear () |
void | Default () |
C4GroupSet () | |
C4GroupSet (const C4GroupSet &rCopy) | |
~C4GroupSet () | |
bool | RegisterGroup (C4Group &rGroup, bool fOwnGrp, int32_t Priority, int32_t Contents, bool fCheckContent=true) |
bool | RegisterGroups (const C4GroupSet &rCopy, int32_t Contents, const char *szFilename=nullptr, int32_t iMaxSkipID=0) |
C4Group * | FindGroup (int32_t Contents, C4Group *pAfter=nullptr, bool fSamePrio=false) |
C4Group * | FindEntry (const char *szWildcard, int32_t *pPriority=nullptr, int32_t *pID=nullptr) |
C4Group * | FindSuitableFile (const char *szName, const char *const extensions[], char *szFileName, int32_t *pID=nullptr) |
int32_t | GetGroupCount () |
C4Group * | GetGroup (int32_t iIndex) |
bool | LoadEntry (const char *szEntryName, char **lpbpBuf, size_t *ipSize=nullptr, int32_t iAppendZeros=0) |
bool | LoadEntryString (const char *szEntryName, StdStrBuf *rBuf) |
bool | LoadEntryString (const StdStrBuf &name, StdStrBuf *Buf) |
C4Group * | RegisterParentFolders (const char *szScenFilename) |
int32_t | PreCacheEntries (const char *szEntryMask) |
int32_t | GetLastID () |
bool | CloseFolders () |
Static Public Member Functions | |
static int32_t | CheckGroupContents (C4Group &rGroup, int32_t Contents) |
Protected Attributes | |
C4GroupSetNode * | pFirst |
C4GroupSetNode * | pLast |
int32_t | iIndex |
Friends | |
class | C4GroupSetNode |
Definition at line 76 of file C4GroupSet.h.
C4GroupSet::C4GroupSet | ( | ) |
Definition at line 66 of file C4GroupSet.cpp.
References Default(), and iIndex.
C4GroupSet::C4GroupSet | ( | const C4GroupSet & | rCopy | ) |
Definition at line 73 of file C4GroupSet.cpp.
References C4GSCnt_All, Default(), iIndex, and RegisterGroups().
C4GroupSet::~C4GroupSet | ( | ) |
Definition at line 82 of file C4GroupSet.cpp.
References Clear().
|
static |
Definition at line 106 of file C4GroupSet.cpp.
References C4CFN_DefFiles, C4CFN_FontFiles, C4CFN_Graphics, C4CFN_Material, C4CFN_Music, C4GSCnt_Definitions, C4GSCnt_FontDefs, C4GSCnt_Graphics, C4GSCnt_Loaders, C4GSCnt_Material, C4GSCnt_Music, and C4Group::FindEntry().
Referenced by C4GameResList::LoadFoldersWithLocalDefs(), and RegisterGroup().
void C4GroupSet::Clear | ( | ) |
Definition at line 50 of file C4GroupSet.cpp.
References pFirst.
Referenced by C4Language::Clear(), C4Game::Clear(), C4GraphicsResource::CloseFiles(), and ~C4GroupSet().
bool C4GroupSet::CloseFolders | ( | ) |
Definition at line 235 of file C4GroupSet.cpp.
References C4GSPrio_Folder, C4GSPrio_Folder2, C4GSPrio_Scenario, and pFirst.
Referenced by C4Game::CloseScenario().
void C4GroupSet::Default | ( | ) |
Definition at line 57 of file C4GroupSet.cpp.
Referenced by C4GroupSet(), and C4Game::Default().
C4Group * C4GroupSet::FindEntry | ( | const char * | szWildcard, |
int32_t * | pPriority = nullptr , |
||
int32_t * | pID = nullptr |
||
) |
Definition at line 175 of file C4GroupSet.cpp.
References pFirst, and C4GroupSetNode::pNext.
Referenced by FindSuitableFile(), C4AchievementGraphics::Init(), C4ComponentHost::Load(), C4Surface::LoadAny(), LoadEntry(), and LoadEntryString().
C4Group * C4GroupSet::FindGroup | ( | int32_t | Contents, |
C4Group * | pAfter = nullptr , |
||
bool | fSamePrio = false |
||
) |
Definition at line 155 of file C4GroupSet.cpp.
References pFirst, and C4GroupSetNode::pNext.
Referenced by C4LoaderScreen::Init(), C4MusicSystem::InitForScenario(), and C4GameResList::Load().
C4Group * C4GroupSet::FindSuitableFile | ( | const char * | szName, |
const char *const | extensions[], | ||
char * | szFileName, | ||
int32_t * | pID = nullptr |
||
) |
Definition at line 191 of file C4GroupSet.cpp.
References _MAX_FNAME, EnforceExtension(), FindEntry(), and SCopy().
Referenced by C4FontLoader::InitFont().
C4Group * C4GroupSet::GetGroup | ( | int32_t | iIndex | ) |
Definition at line 259 of file C4GroupSet.cpp.
References iIndex, pFirst, and C4GroupSetNode::pNext.
Referenced by C4Language::CloseGroup(), C4Language::GetPackGroups(), C4Language::Init(), and C4ComponentHost::Load().
int32_t C4GroupSet::GetGroupCount | ( | ) |
Definition at line 251 of file C4GroupSet.cpp.
References pFirst, and C4GroupSetNode::pNext.
Referenced by C4Language::GetPackCount().
|
inline |
Definition at line 105 of file C4GroupSet.h.
References iIndex.
Referenced by C4GraphicsResource::RegisterMainGroups().
bool C4GroupSet::LoadEntry | ( | const char * | szEntryName, |
char ** | lpbpBuf, | ||
size_t * | ipSize = nullptr , |
||
int32_t | iAppendZeros = 0 |
||
) |
Definition at line 215 of file C4GroupSet.cpp.
References FindEntry(), and C4Group::LoadEntry().
bool C4GroupSet::LoadEntryString | ( | const char * | szEntryName, |
StdStrBuf * | rBuf | ||
) |
Definition at line 225 of file C4GroupSet.cpp.
References FindEntry(), and C4Group::LoadEntryString().
Referenced by C4ComponentHost::Load().
Definition at line 100 of file C4GroupSet.h.
References StdStrBuf::getData(), and LoadEntryString().
Referenced by LoadEntryString().
int32_t C4GroupSet::PreCacheEntries | ( | const char * | szEntryMask | ) |
Definition at line 375 of file C4GroupSet.cpp.
References pFirst, and C4GroupSetNode::pNext.
Referenced by C4GraphicsResource::Init().
bool C4GroupSet::RegisterGroup | ( | C4Group & | rGroup, |
bool | fOwnGrp, | ||
int32_t | Priority, | ||
int32_t | Contents, | ||
bool | fCheckContent = true |
||
) |
Definition at line 88 of file C4GroupSet.cpp.
References C4GroupSetNode, CheckGroupContents(), C4GroupSetNode::Contents, iIndex, pLast, C4GroupSetNode::pPrev, and C4GroupSetNode::Priority.
Referenced by C4Language::Init(), C4Extra::LoadDef(), C4Game::OpenScenario(), C4GraphicsResource::RegisterGlobalGraphics(), RegisterGroups(), and RegisterParentFolders().
bool C4GroupSet::RegisterGroups | ( | const C4GroupSet & | rCopy, |
int32_t | Contents, | ||
const char * | szFilename = nullptr , |
||
int32_t | iMaxSkipID = 0 |
||
) |
Definition at line 128 of file C4GroupSet.cpp.
References C4Group::OpenAsChild(), pFirst, C4GroupSetNode::pNext, and RegisterGroup().
Referenced by C4GroupSet(), and C4GraphicsResource::RegisterMainGroups().
C4Group * C4GroupSet::RegisterParentFolders | ( | const char * | szScenFilename | ) |
Definition at line 294 of file C4GroupSet.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4CFN_FolderFiles, C4GSCnt_Directory, C4GSCnt_Folder, C4GSPrio_Folder, DirectorySeparator, FormatString(), GetExtension(), C4Group::GetName(), GetParentPath(), LoadResStr(), LogFatal(), C4Reloc::Open(), C4Group::OpenAsChild(), RegisterGroup(), Reloc, SCopy(), SEqualNoCase(), SLen(), and WildcardMatch().
Referenced by C4Game::OpenScenario().
bool C4GroupSet::UnregisterGroup | ( | int32_t | iIndex | ) |
Definition at line 274 of file C4GroupSet.cpp.
References iIndex, pFirst, and C4GroupSetNode::pNext.
Referenced by C4Language::CloseGroup().
|
friend |
Definition at line 109 of file C4GroupSet.h.
Referenced by RegisterGroup().
|
protected |
Definition at line 80 of file C4GroupSet.h.
Referenced by C4GroupSet(), GetGroup(), GetLastID(), RegisterGroup(), and UnregisterGroup().
|
protected |
Definition at line 79 of file C4GroupSet.h.
Referenced by C4GroupSetNode::C4GroupSetNode(), Clear(), CloseFolders(), Default(), FindEntry(), FindGroup(), GetGroup(), GetGroupCount(), PreCacheEntries(), RegisterGroups(), UnregisterGroup(), and C4GroupSetNode::~C4GroupSetNode().
|
protected |
Definition at line 79 of file C4GroupSet.h.
Referenced by C4GroupSetNode::C4GroupSetNode(), Default(), RegisterGroup(), and C4GroupSetNode::~C4GroupSetNode().