本文整理汇总了C++中common::ReadStream::readUint32BE方法的典型用法代码示例。如果您正苦于以下问题:C++ ReadStream::readUint32BE方法的具体用法?C++ ReadStream::readUint32BE怎么用?C++ ReadStream::readUint32BE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::ReadStream
的用法示例。
在下文中一共展示了ReadStream::readUint32BE方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read
bool SaveHeader::read(Common::ReadStream &stream) {
// Read the header and verify the global IDs
if (stream.readUint32BE() != kID1)
return false;
if (stream.readUint32BE() != kID2)
return false;
_type = stream.readUint32BE();
_version = stream.readUint32LE();
_size = stream.readUint32LE();
return !stream.err();
}
示例2: verify
bool SaveHeader::verify(Common::ReadStream &stream) const {
// Compare the header with the stream's content
if (stream.readUint32BE() != kID1)
return false;
if (stream.readUint32BE() != kID2)
return false;
if (stream.readUint32BE() != _type)
return false;
if (stream.readUint32LE() != _version)
return false;
if (stream.readUint32LE() != _size)
return false;
return !stream.err();
}
示例3: verifyReadSize
bool SaveHeader::verifyReadSize(Common::ReadStream &stream) {
// Compare the header with the stream's content, expect for the size
if (stream.readUint32BE() != kID1)
return false;
if (stream.readUint32BE() != kID2)
return false;
if (stream.readUint32BE() != _type)
return false;
if (stream.readUint32LE() != _version)
return false;
// Read the size out of the stream instead
_size = stream.readUint32LE();
return !stream.err();
}