Bazaar developer reference

CvHotKeyInfo::CacheResults(Database::Results &, CvDatabaseUtility &)

Defined in
CvInfos.cpp, line 491
Class
CvHotKeyInfo
Hook name
CivHooks::CvHotKeyInfo_CacheResults
Overrides
CvBaseInfo::CacheResults(Database::Results &, CvDatabaseUtility &)
Overridden by
CvAutomateInfo::CacheResults(Database::Results &, CvDatabaseUtility &), CvBuildInfo::CacheResults(Database::Results &, CvDatabaseUtility &), CvCommandInfo::CacheResults(Database::Results &, CvDatabaseUtility &), CvInterfaceModeInfo::CacheResults(Database::Results &, CvDatabaseUtility &), CvMissionInfo::CacheResults(Database::Results &, CvDatabaseUtility &), CvPromotionEntry::CacheResults(Database::Results &, CvDatabaseUtility &), CvSpecialistInfo::CacheResults(Database::Results &, CvDatabaseUtility &)

Hooks

static bool BeforeCvHotKeyInfo_CacheResults(CvHotKeyInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static void AfterCvHotKeyInfo_CacheResults(CvHotKeyInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static bool ReplaceCvHotKeyInfo_CacheResults(bool (*original)(CvHotKeyInfo*, Database::Results&, CvDatabaseUtility&), CvHotKeyInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility);CivRegisterBefore<CivHooks::CvHotKeyInfo_CacheResults>(host, &BeforeCvHotKeyInfo_CacheResults);CivRegisterAfter<CivHooks::CvHotKeyInfo_CacheResults>(host, &AfterCvHotKeyInfo_CacheResults);CivRegisterReplace<CivHooks::CvHotKeyInfo_CacheResults>(host, &ReplaceCvHotKeyInfo_CacheResults);

Code

491bool CvHotKeyInfo::CacheResults(Database::Results& kResults, CvDatabaseUtility& kUtility)492{493	if(!CvBaseInfo::CacheResults(kResults, kUtility))494		return false;495496	setHotKey(kResults.GetText("HotKey"));497	const int iHotKeyVal = GetHotKeyInt(kResults.GetText("HotKey"));498	setHotKeyVal(iHotKeyVal);499	setHotKeyPriority(kResults.GetInt("HotKeyPriority"));500501	const int iHotKeyValAlt = GetHotKeyInt(kResults.GetText("HotKeyAlt"));502	setHotKeyValAlt(iHotKeyValAlt);503	setHotKeyPriorityAlt(kResults.GetInt("HotKeyPriorityAlt"));504505	setAltDown(kResults.GetBool("AltDown"));506	setAltDownAlt(kResults.GetBool("AltDownAlt"));507508	setShiftDown(kResults.GetBool("ShiftDown"));509	setShiftDownAlt(kResults.GetBool("ShiftDownAlt"));510511	setCtrlDown(kResults.GetBool("CtrlDown"));512	setCtrlDownAlt(kResults.GetBool("CtrlDownAlt"));513514	setOrderPriority(kResults.GetInt("OrderPriority"));515516	const char* szHelp = kResults.GetText("Help");517	if(szHelp)518		m_strHelp = szHelp;519520	const char* szDisabledHelp = kResults.GetText("DisabledHelp");521	if(szDisabledHelp)522		m_strDisabledHelp = szDisabledHelp;523524525	setHotKeyDescription(GetTextKey(), NULL, CreateHotKeyFromDescription(getHotKey(), m_bShiftDown, m_bAltDown, m_bCtrlDown));526527	return true;528}

Calls

Called by