本文整理汇总了C++中Stream::Deserialize方法的典型用法代码示例。如果您正苦于以下问题:C++ Stream::Deserialize方法的具体用法?C++ Stream::Deserialize怎么用?C++ Stream::Deserialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stream
的用法示例。
在下文中一共展示了Stream::Deserialize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void IncludeFile::ReadVer81(Stream* stream)
{
Stream* includeFileStream = stream->Deserialize();
includeFileStream->ReadTimestamp();
includeFileStream->ReadDword();
filename = includeFileStream->ReadString();
filepath = includeFileStream->ReadString();
originalFile = includeFileStream->ReadBoolean();
originalFileSize = includeFileStream->ReadDword();
if (includeFileStream->ReadBoolean())
data = includeFileStream->Deserialize(false);
else
data = NULL;
exportKind = includeFileStream->ReadDword();
exportPath = includeFileStream->ReadString();
overwrite = includeFileStream->ReadBoolean();
freeMemory = includeFileStream->ReadBoolean();
removeAtEndOfGame = includeFileStream->ReadBoolean();
delete includeFileStream;
}
示例2:
void Settings::ReadVer81(Stream* stream)
{
CleanMemory();
Stream* settingsStream = stream->Deserialize();
fullscreen = settingsStream->ReadBoolean();
interpolatePixels = settingsStream->ReadBoolean();
noBorder = settingsStream->ReadBoolean();
showCursor = settingsStream->ReadBoolean();
scale = settingsStream->ReadDword();
sizeable = settingsStream->ReadBoolean();
stayOnTop = settingsStream->ReadBoolean();
windowColor = settingsStream->ReadDword();
changeResolution = settingsStream->ReadBoolean();
colorDepth = settingsStream->ReadDword();
resolution = settingsStream->ReadDword();
frequency = settingsStream->ReadDword();
noButtons = settingsStream->ReadBoolean();
vsync = settingsStream->ReadBoolean();
noScreenSaver = settingsStream->ReadBoolean();
fullscreenKey = settingsStream->ReadBoolean();
helpKey = settingsStream->ReadBoolean();
quitKey = settingsStream->ReadBoolean();
saveKey = settingsStream->ReadBoolean();
screenshotKey = settingsStream->ReadBoolean();
closeSecondary = settingsStream->ReadBoolean();
priority = settingsStream->ReadDword();
freeze = settingsStream->ReadBoolean();
showProgress = settingsStream->ReadDword();
if (showProgress == LpbtCustom)
{
backImage = settingsStream->ReadBitmap();
frontImage = settingsStream->ReadBitmap();
}
if (settingsStream->ReadBoolean())
loadImage = settingsStream->ReadBitmap();
loadTransparent = settingsStream->ReadBoolean();
loadAlpha = settingsStream->ReadDword();
scaleProgress = settingsStream->ReadBoolean();
iconImage = settingsStream->Deserialize(false);
displayErrors = settingsStream->ReadBoolean();
writeErrors = settingsStream->ReadBoolean();
abortErrors = settingsStream->ReadBoolean();
unsigned int errorFlags = settingsStream->ReadDword();
treatUninitializedVariablesAsZero = (errorFlags & 0x01) == 0x01;
argumentError = (errorFlags & 0x02) == 0x02;
author = settingsStream->ReadString();
versionString = settingsStream->ReadString();
settingsStream->ReadTimestamp();
information = settingsStream->ReadString();
major = settingsStream->ReadDword();
minor = settingsStream->ReadDword();
release = settingsStream->ReadDword();
build = settingsStream->ReadDword();
company = settingsStream->ReadString();
product = settingsStream->ReadString();
copyright = settingsStream->ReadString();
description = settingsStream->ReadString();
settingsStream->ReadTimestamp();
delete settingsStream;
}