CvInfosSerializationHelper::Read(FDataStream &, bool *)
- Defined in
- CvInfosSerializationHelper.cpp, line 138
- Hook name
CivHooks::CvInfosSerializationHelper_Read
Hooks
static bool BeforeCvInfosSerializationHelper_Read(FDataStream& kStream, bool* bValid, int& result);static void AfterCvInfosSerializationHelper_Read(FDataStream& kStream, bool* bValid, int& result);static int ReplaceCvInfosSerializationHelper_Read(int (*original)(FDataStream&, bool*), FDataStream& kStream, bool* bValid);CivRegisterBefore<CivHooks::CvInfosSerializationHelper_Read>(host, &BeforeCvInfosSerializationHelper_Read);CivRegisterAfter<CivHooks::CvInfosSerializationHelper_Read>(host, &AfterCvInfosSerializationHelper_Read);CivRegisterReplace<CivHooks::CvInfosSerializationHelper_Read>(host, &ReplaceCvInfosSerializationHelper_Read);
Code
137/// Helper function to read a single type ID as a string and convert it to an ID138int Read(FDataStream& kStream, bool* bValid /*= NULL*/)139{140 FStringFixedBuffer(sTemp, 256);141 kStream >> sTemp;142 if(bValid) *bValid = true;143 if(sTemp.GetLength() > 0 && sTemp != "NO_TYPE")144 {145 int iType = GC.getInfoTypeForString(sTemp);146 if(iType != -1)147 {148 return iType;149 }150 else151 {152 if(bValid) *bValid = false;153 CvString szError;154 szError.Format("LOAD ERROR: Type not found: %s", sTemp);155 GC.LogMessage(szError.GetCString());156 CvAssertMsg(false, szError);157 }158 }159160 return -1;161}
Calls
- CvGlobals::getInfoTypeForString(const char *, bool) const
- CvGlobals::LogMessage(const char *)
CvString::CvStringCvString::FormatCvString::GetCStringFDataStream::operator>>FStringA::FStringAFStringA::FStringAFStringA::FStringAFixedBuffer::FStringAFixedBufferFStringA::GetLengthFStringA::operator const char *FStringA::operator!=