本文整理汇总了C++中common::ReadStream::readUint32LE方法的典型用法代码示例。如果您正苦于以下问题:C++ ReadStream::readUint32LE方法的具体用法?C++ ReadStream::readUint32LE怎么用?C++ ReadStream::readUint32LE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::ReadStream
的用法示例。
在下文中一共展示了ReadStream::readUint32LE方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: readString
XARCMember::XARCMember(const XARCArchive *xarc, Common::ReadStream &stream, uint32 offset) {
_xarc = xarc;
// Read the information about this archive member
_name = readString(stream);
_offset = offset;
_length = stream.readUint32LE();
debugC(20, kDebugArchive, "Stark::XARC Member: \"%s\" starts at offset=%d and has length=%d", _name.c_str(), _offset, _length);
// Unknown value. English: 0, others: 1
uint32 unknown = stream.readUint32LE();
debugC(kDebugUnknown, "Stark::XARC Member: \"%s\" has unknown=%d", _name.c_str(), unknown);
if (unknown != 0 && unknown != 1) {
warning("Stark::XARC Member: \"%s\" has unknown=%d with unknown meaning", _name.c_str(), unknown);
}
}
示例4: 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();
}
示例5: readBTree
/*-----------------------------------------------------------------------
* BtPage
*-----------------------------------------------------------------------*/
void BtPage::readBTree(Common::ReadStream &s) {
_header._count = s.readUint16LE();
_header._down = s.readUint16LE();
if (_header._down == kBtValNone) {
// Leaf list
for (int i = 0; i < kBtLeafCount; ++i) {
s.read(_leaf[i]._key, kBtKeySize);
_leaf[i]._pos = s.readUint32LE();
_leaf[i]._size = s.readUint16LE();
}
} else {
// Root index
for (int i = 0; i < kBtInnerCount; ++i) {
s.read(_inner[i]._key, kBtKeySize);
_inner[i]._down = s.readUint16LE();
}
}
}
示例6: operator
void operator()(Uint32& i) const {
i = _s->readUint32LE();
}