#include <C4Language.h>
Public Member Functions | |
C4Language () | |
~C4Language () | |
bool | CloseGroup (const char *strPath) |
void | ClearLanguage () |
bool | Init () |
void | Clear () |
int | GetPackCount () |
C4GroupSet | GetPackGroups (C4Group &) |
int | GetInfoCount () |
C4LanguageInfo * | GetInfo (int iIndex) |
C4LanguageInfo * | FindInfo (const char *strCode) |
bool | LoadLanguage (const char *strLanguages) |
bool | HasStringTable () const |
Static Public Member Functions | |
static bool | LoadComponentHost (C4ComponentHost *host, C4Group &hGroup, const char *szFilename, const char *szLanguage) |
Definition at line 40 of file C4Language.h.
C4Language::C4Language | ( | ) |
Definition at line 44 of file C4Language.cpp.
C4Language::~C4Language | ( | ) |
Definition at line 50 of file C4Language.cpp.
References Clear().
void C4Language::Clear | ( | ) |
Definition at line 114 of file C4Language.cpp.
References C4GroupSet::Clear(), and C4Group::Close().
Referenced by C4Application::Clear(), Init(), and ~C4Language().
void C4Language::ClearLanguage | ( | ) |
Definition at line 410 of file C4Language.cpp.
References C4ComponentHost::Clear(), and C4LangStringTable::GetSystemStringTable().
Referenced by C4Application::Clear(), and LoadLanguage().
bool C4Language::CloseGroup | ( | const char * | strPath | ) |
Definition at line 418 of file C4Language.cpp.
References StdStrBuf::getData(), C4Group::GetFullName(), C4GroupSet::GetGroup(), ItemIdentical(), and C4GroupSet::UnregisterGroup().
C4LanguageInfo * C4Language::FindInfo | ( | const char * | strCode | ) |
Definition at line 353 of file C4Language.cpp.
References C4LanguageInfo::Code, and SEqualNoCase().
C4LanguageInfo * C4Language::GetInfo | ( | int | iIndex | ) |
Definition at line 343 of file C4Language.cpp.
int C4Language::GetInfoCount | ( | ) |
Definition at line 138 of file C4Language.cpp.
int C4Language::GetPackCount | ( | ) |
Definition at line 133 of file C4Language.cpp.
References C4GroupSet::GetGroupCount().
C4GroupSet C4Language::GetPackGroups | ( | C4Group & | hGroup | ) |
Definition at line 148 of file C4Language.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4Config::AtRelativePath(), C4Game::C4S, Config, DirectorySeparator, Game, StdStrBuf::getData(), GetExtension(), C4Group::GetFullName(), C4GroupSet::GetGroup(), StdStrBuf::getLength(), GetRelativePathS(), C4Scenario::Head, C4SHead::Origin, SAppend(), SAppendChar(), C4Game::ScenarioFilename, SCopy(), SEqualNoCase(), and SLen().
Referenced by LoadComponentHost().
|
inline |
Definition at line 70 of file C4Language.h.
References C4ComponentHost::GetDataBuf(), C4LangStringTable::GetSystemStringTable(), and StdStrBuf::isNull().
Referenced by C4Game::Clear(), C4Application::Clear(), and C4Application::DoInit().
bool C4Language::Init | ( | ) |
Definition at line 55 of file C4Language.cpp.
References _MAX_FNAME_LEN, C4Reloc::begin(), C4CFN_Languages, C4Group_UnpackDirectory(), C4GSCnt_Language, C4GSPrio_Base, Clear(), StdStrBuf::Copy(), DirectoryExists(), DirSep, C4Reloc::end(), C4Group::FindNextEntry(), StdStrBuf::getData(), C4GroupSet::GetGroup(), ItemExists(), C4Group::Open(), C4GroupSet::RegisterGroup(), Reloc, sprintf, and C4Reloc::PathInfo::strBuf.
Referenced by C4Application::DoInit().
|
static |
Definition at line 232 of file C4Language.cpp.
References GetPackGroups(), Languages, and C4ComponentHost::Load().
Referenced by C4ScenarioListLoader::SubFolder::DoLoadContents(), C4MapFolderData::Load(), C4RankSystem::Load(), C4DefList::Load(), C4ScenarioListLoader::Entry::Load(), C4Game::LoadAdditionalSystemGroup(), C4ScenarioListLoader::Scenario::LoadCustomPre(), C4Game::OpenScenario(), and C4Game::UpdateLanguage().
bool C4Language::LoadLanguage | ( | const char * | strLanguages | ) |
Definition at line 361 of file C4Language.cpp.
References ClearLanguage(), Log(), and SCopySegment().
Referenced by C4Application::DoInit().