Bazaar developer reference

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

Defined in
CvGlobals.cpp, line 6177
Class
CvGlobals
Hook name
CivHooks::CvGlobals_getDefineValue_with_const_char_CvString_bool

Hooks

static bool BeforeCvGlobals_getDefineValue_with_const_char_CvString_bool(CvGlobals* self, const char* szName, CvString& strValue, bool bReportErrors, bool& result);static void AfterCvGlobals_getDefineValue_with_const_char_CvString_bool(CvGlobals* self, const char* szName, CvString& strValue, bool bReportErrors, bool& result);static bool ReplaceCvGlobals_getDefineValue_with_const_char_CvString_bool(bool (*original)(CvGlobals*, const char*, CvString&, bool), CvGlobals* self, const char* szName, CvString& strValue, bool bReportErrors);CivRegisterBefore<CivHooks::CvGlobals_getDefineValue_with_const_char_CvString_bool>(host, &BeforeCvGlobals_getDefineValue_with_const_char_CvString_bool);CivRegisterAfter<CivHooks::CvGlobals_getDefineValue_with_const_char_CvString_bool>(host, &AfterCvGlobals_getDefineValue_with_const_char_CvString_bool);CivRegisterReplace<CivHooks::CvGlobals_getDefineValue_with_const_char_CvString_bool>(host, &ReplaceCvGlobals_getDefineValue_with_const_char_CvString_bool);

Code

6177bool CvGlobals::getDefineValue(const char* szName, CvString& strValue, bool bReportErrors)6178{6179	bool bSuccess = false;6180	if(m_kGlobalDefinesLookup.Bind(1, szName))6181	{6182		if(m_kGlobalDefinesLookup.Step())6183		{6184			strValue = m_kGlobalDefinesLookup.GetText(0);6185			bSuccess = true;6186		}6187	}61886189	m_kGlobalDefinesLookup.Reset();61906191	if(bReportErrors)6192	{6193		CvAssertFmt(bSuccess, "String Define Value not found for %s", szName);6194	}61956196	return bSuccess;6197}

Calls

Called by