#include <C4ComponentHost.h>
Public Member Functions | |
C4ComponentHost ()=default | |
virtual | ~C4ComponentHost () |
const char * | GetFilePath () const |
void | Clear () |
const char * | GetData () const |
const StdStrBuf & | GetDataBuf () const |
size_t | GetDataSize () const |
bool | Load (C4Group &hGroup, const char *szFilename, const char *szLanguage=nullptr) |
bool | Load (C4GroupSet &hGroupSet, const char *szFilename, const char *szLanguage=nullptr) |
bool | GetLanguageString (const char *szLanguage, StdStrBuf &rTarget) |
Protected Member Functions | |
virtual void | OnLoad () |
void | CopyFilePathFromGroup (const C4Group &hGroup) |
void | FinishLoad (const StdStrBuf &, C4Group &hGroup) |
Protected Attributes | |
StdCopyStrBuf | Data |
StdCopyStrBuf | Filename |
StdCopyStrBuf | FilePath |
Definition at line 23 of file C4ComponentHost.h.
|
default |
|
inlinevirtual |
Definition at line 27 of file C4ComponentHost.h.
References Clear().
|
inline |
Definition at line 29 of file C4ComponentHost.h.
References StdStrBuf::Clear(), Data, and OnLoad().
Referenced by C4Game::Clear(), C4Def::Clear(), C4ScriptHost::Clear(), C4Language::ClearLanguage(), C4Def::Default(), Load(), and ~C4ComponentHost().
|
protected |
Definition at line 120 of file C4ComponentHost.cpp.
References StdStrBuf::Append(), StdStrBuf::AppendBackslash(), C4Config::AtRelativePath(), Config, StdStrBuf::Copy(), Filename, FilePath, StdStrBuf::getData(), and C4Group::GetFullName().
Referenced by FinishLoad(), and Load().
Definition at line 99 of file C4ComponentHost.cpp.
References CopyFilePathFromGroup(), Data, StdStrBuf::EnsureUnicode(), Filename, FilePath, C4Group::FindEntry(), StdStrBuf::getData(), StdStrBuf::getSize(), LogF(), StdStrBuf::Move(), OnLoad(), and StdStrBuf::Shrink().
Referenced by Load().
|
inline |
Definition at line 30 of file C4ComponentHost.h.
References Data, and StdStrBuf::getData().
Referenced by C4Game::CompileRuntimeData(), C4RankSystem::Load(), C4ScenarioListLoader::Entry::Load(), C4Player::LoadRuntimeData(), C4ObjectInfoList::New(), and C4Game::OpenScenario().
|
inline |
Definition at line 31 of file C4ComponentHost.h.
References Data.
Referenced by C4Game::CompileRuntimeData(), C4Language::HasStringTable(), and C4ScriptHost::MakeScript().
|
inline |
Definition at line 32 of file C4ComponentHost.h.
References Data, and StdStrBuf::getLength().
Referenced by C4RankSystem::Load().
|
inline |
Definition at line 28 of file C4ComponentHost.h.
References FilePath, and StdStrBuf::getData().
Referenced by C4ScriptHost::Load(), C4Player::LoadRuntimeData(), C4ScriptHost::ReloadScript(), and C4LangStringTable::ReplaceStrings().
bool C4ComponentHost::GetLanguageString | ( | const char * | szLanguage, |
StdStrBuf & | rTarget | ||
) |
Definition at line 127 of file C4ComponentHost.cpp.
References StdStrBuf::Copy(), Data, StdStrBuf::getData(), SAppend(), SCharPos(), SCopySegment(), and SSearch().
Referenced by C4DefList::Load(), C4ScenarioListLoader::Entry::Load(), and C4Game::OpenScenario().
bool C4ComponentHost::Load | ( | C4Group & | hGroup, |
const char * | szFilename, | ||
const char * | szLanguage = nullptr |
||
) |
Definition at line 23 of file C4ComponentHost.cpp.
References _MAX_FNAME_LEN, Clear(), StdStrBuf::Copy(), CopyFilePathFromGroup(), Data, Filename, FinishLoad(), StdStrBuf::Format(), StdStrBuf::getData(), StdStrBuf::getMData(), C4Group::LoadEntryString(), SCopySegment(), SReplaceChar(), and SSearch().
Referenced by C4Game::CompileRuntimeData(), C4Game::InitScriptEngine(), C4ScriptHost::Load(), C4ScenarioListLoader::Entry::Load(), C4Language::LoadComponentHost(), and C4Game::LoadScenarioComponents().
bool C4ComponentHost::Load | ( | C4GroupSet & | hGroupSet, |
const char * | szFilename, | ||
const char * | szLanguage = nullptr |
||
) |
Definition at line 60 of file C4ComponentHost.cpp.
References _MAX_FNAME_LEN, Clear(), StdStrBuf::Copy(), CopyFilePathFromGroup(), Data, Filename, C4GroupSet::FindEntry(), FinishLoad(), StdStrBuf::Format(), StdStrBuf::getData(), C4GroupSet::GetGroup(), StdStrBuf::getMData(), C4GroupSet::LoadEntryString(), SCopySegment(), SReplaceChar(), and SSearch().
|
inlineprotectedvirtual |
Reimplemented in C4LangStringTable.
Definition at line 39 of file C4ComponentHost.h.
Referenced by Clear(), and FinishLoad().
|
protected |
Definition at line 41 of file C4ComponentHost.h.
Referenced by Clear(), FinishLoad(), GetData(), GetDataBuf(), GetDataSize(), GetLanguageString(), Load(), and C4LangStringTable::ReplaceStrings().
|
protected |
Definition at line 42 of file C4ComponentHost.h.
Referenced by CopyFilePathFromGroup(), FinishLoad(), and Load().
|
protected |
Definition at line 43 of file C4ComponentHost.h.
Referenced by CopyFilePathFromGroup(), FinishLoad(), and GetFilePath().