Bazaar developer reference

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

Defined in
CvGlobals.cpp, line 6155
Class
CvGlobals
Hook name
CivHooks::CvGlobals_getDefineValue_with_const_char_float_bool

Hooks

static bool BeforeCvGlobals_getDefineValue_with_const_char_float_bool(CvGlobals* self, const char* szName, float& fValue, bool bReportErrors, bool& result);static void AfterCvGlobals_getDefineValue_with_const_char_float_bool(CvGlobals* self, const char* szName, float& fValue, bool bReportErrors, bool& result);static bool ReplaceCvGlobals_getDefineValue_with_const_char_float_bool(bool (*original)(CvGlobals*, const char*, float&, bool), CvGlobals* self, const char* szName, float& fValue, bool bReportErrors);CivRegisterBefore<CivHooks::CvGlobals_getDefineValue_with_const_char_float_bool>(host, &BeforeCvGlobals_getDefineValue_with_const_char_float_bool);CivRegisterAfter<CivHooks::CvGlobals_getDefineValue_with_const_char_float_bool>(host, &AfterCvGlobals_getDefineValue_with_const_char_float_bool);CivRegisterReplace<CivHooks::CvGlobals_getDefineValue_with_const_char_float_bool>(host, &ReplaceCvGlobals_getDefineValue_with_const_char_float_bool);

Code

6155bool CvGlobals::getDefineValue(const char* szName, float& fValue, bool bReportErrors)6156{6157	bool bSuccess = false;6158	if(m_kGlobalDefinesLookup.Bind(1, szName))6159	{6160		if(m_kGlobalDefinesLookup.Step())6161		{6162			fValue = m_kGlobalDefinesLookup.GetFloat(0);6163			bSuccess = true;6164		}6165	}61666167	m_kGlobalDefinesLookup.Reset();61686169	if(bReportErrors)6170	{6171		CvAssertFmt(bSuccess, "Float Define Value not found for %s", szName);6172	}61736174	return bSuccess;6175}

Calls

Called by