本文整理汇总了C++中common::File::writeByte方法的典型用法代码示例。如果您正苦于以下问题:C++ File::writeByte方法的具体用法?C++ File::writeByte怎么用?C++ File::writeByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::File
的用法示例。
在下文中一共展示了File::writeByte方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeResponseTree
void writeResponseTree() {
outputFile.seek(dataOffset);
const uint OFFSETS[3] = { 0x619520, 0x618340, 0x617380 };
for (int idx = 0; idx < 1022; ++idx) {
inputFile.seek(OFFSETS[_version] - FILE_DIFF[_version] + idx * 8);
uint id = inputFile.readLong();
uint offset = inputFile.readLong();
outputFile.writeLong(id);
if (!id) {
// An end of list id
} else if (offset >= OFFSETS[_version] && offset <= (OFFSETS[_version] + 0x1FF0)) {
// Offset to another table
outputFile.writeByte(0);
outputFile.writeLong((offset - OFFSETS[_version]) / 8);
} else {
// Offset to ASCIIZ string
outputFile.writeByte(1);
writeString(offset);
}
}
uint size = outputFile.size() - dataOffset;
writeEntryHeader("TEXT/TREE", dataOffset, size);
dataOffset += size;
}
示例2: writeString
void writeString(uint offset) {
inputFile.seek(offset - FILE_DIFF[_version]);
char c;
do {
c = inputFile.readByte();
outputFile.writeByte(c);
} while (c);
}
示例3: writeEmptyHeader
/*! \brief Write an empty header to the STK archive
* \param stk STK/ITK archive file
* \param chunkCount Number of chunks to be written in the archive file
*
* This function writes an empty header in the STK archive. This is required as
* the header length is variable and depends on the number of chunks to be written
* in the archive file.
*
* This header will be overwritten just before the end of the program execution
*/
void CompressGob::writeEmptyHeader(Common::File &stk, uint16 chunkCount) {
for (uint32 count = 0; count < 2 + (uint32) (chunkCount * 22); count++)
stk.writeByte(0);
return;
}