Bazaar developer reference

CvGlobals::getDefineValue(const char *, int &, bool)

Defined in
CvGlobals.cpp, line 6133
Class
CvGlobals
Hook name
CivHooks::CvGlobals_getDefineValue

Hooks

static bool BeforeCvGlobals_getDefineValue(CvGlobals* self, const char* szName, int& iValue, bool bReportErrors, bool& result);static void AfterCvGlobals_getDefineValue(CvGlobals* self, const char* szName, int& iValue, bool bReportErrors, bool& result);static bool ReplaceCvGlobals_getDefineValue(bool (*original)(CvGlobals*, const char*, int&, bool), CvGlobals* self, const char* szName, int& iValue, bool bReportErrors);CivRegisterBefore<CivHooks::CvGlobals_getDefineValue>(host, &BeforeCvGlobals_getDefineValue);CivRegisterAfter<CivHooks::CvGlobals_getDefineValue>(host, &AfterCvGlobals_getDefineValue);CivRegisterReplace<CivHooks::CvGlobals_getDefineValue>(host, &ReplaceCvGlobals_getDefineValue);

Code

6133bool CvGlobals::getDefineValue(const char* szName, int& iValue, bool bReportErrors)6134{6135	bool bSuccess = false;6136	if(m_kGlobalDefinesLookup.Bind(1, szName))6137	{6138		if(m_kGlobalDefinesLookup.Step())6139		{6140			iValue = m_kGlobalDefinesLookup.GetInt(0);6141			bSuccess = true;6142		}6143	}61446145	m_kGlobalDefinesLookup.Reset();61466147	if(bReportErrors)6148	{6149		CvAssertFmt(bSuccess, "Integer Define Value not found for %s", szName);6150	}61516152	return bSuccess;6153}

Calls

Called by