本文整理汇总了C++中vfsStream::Read方法的典型用法代码示例。如果您正苦于以下问题:C++ vfsStream::Read方法的具体用法?C++ vfsStream::Read怎么用?C++ vfsStream::Read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vfsStream
的用法示例。
在下文中一共展示了vfsStream::Read方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
void ControlInfo::Load(vfsStream& f)
{
type = Read32(f);
size = Read32(f);
next = Read64(f);
if (type == 1)
{
control_flags.ctrl_flag1 = Read32(f);
control_flags.unknown1 = Read32(f);
control_flags.unknown2 = Read32(f);
control_flags.unknown3 = Read32(f);
control_flags.unknown4 = Read32(f);
control_flags.unknown5 = Read32(f);
control_flags.unknown6 = Read32(f);
control_flags.unknown7 = Read32(f);
}
else if (type == 2)
{
if (size == 0x30)
{
f.Read(file_digest_30.digest, 20);
file_digest_30.unknown = Read64(f);
}
else if (size == 0x40)
{
f.Read(file_digest_40.digest1, 20);
f.Read(file_digest_40.digest2, 20);
file_digest_40.unknown = Read64(f);
}
}
else if (type == 3)
{
npdrm.magic = Read32(f);
npdrm.unknown1 = Read32(f);
npdrm.license = Read32(f);
npdrm.type = Read32(f);
f.Read(npdrm.content_id, 48);
f.Read(npdrm.digest, 16);
f.Read(npdrm.invdigest, 16);
f.Read(npdrm.xordigest, 16);
npdrm.unknown2 = Read64(f);
npdrm.unknown3 = Read64(f);
}
}
示例2: ReadCharNN
static char ReadCharNN(vfsStream& f)
{
char c;
while(!f.Eof())
{
f.Read(&c, 1);
if(c != 0) break;
}
return c;
}
示例3: GoToNN
static void GoToNN(vfsStream& f)
{
while(!f.Eof())
{
char c;
f.Read(&c, 1);
if(c != 0)
{
f.Seek(f.Tell() - 1);
break;
}
}
}
示例4: ReadChar
static char ReadChar(vfsStream& f)
{
char c;
f.Read(&c, 1);
return c;
}
示例5: sizeof
void Elf32_Phdr::LoadLE(vfsStream& f)
{
f.Read(this, sizeof(*this));
}