本文整理汇总了C++中DataWriter::put8方法的典型用法代码示例。如果您正苦于以下问题:C++ DataWriter::put8方法的具体用法?C++ DataWriter::put8怎么用?C++ DataWriter::put8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataWriter
的用法示例。
在下文中一共展示了DataWriter::put8方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeStruct
void Struct_Method::writeStruct(DataWriter &data) const
{
if (!exceptionHandlers.isEmpty())
{
data.putAddress(exceptionHandlerTable, "exceptionHandlerTable");
data.put16(offsetHandlers, "offsetHandlers");
data.put16(lengthHandlers, "lengthHandlers");
}
else
{
data.putAddress(0, "exceptionHandlerTable");
data.put16(0, "offsetHandlers");
data.put16(0, "lengthHandlers");
}
if (!exceptions.isEmpty())
{
data.putAddress(exceptionsTable, "exceptionsTable");
data.put16(offsetExceptions, "offsetExceptions");
data.put16(lengthExceptions, "lengthExceptions");
}
else
{
data.putAddress(0, "exceptionsTable");
data.put16(0, "offsetExceptions");
data.put16(0, "lengthExceptions");
}
data.put16(accessFlags, "accessFlags");
data.put16(nameIndex, "nameIndex");
data.put16(descriptorIndex, "descriptorIndex");
data.put16(maxStacks, "maxStacks");
data.put16(maxLocals, "maxLocals");
if (nativeFunction != NULL)
{
data.put16(nativeFunction->id, "nativeFunctionId");
}
else
{
data.put16(code.length(), "codeLength");
data.putBytes(code, "code");
}
data.put8(parameterTypes.length(), "parameterTypesLength");
data.putBytes(parameterTypes, "parameterTypes");
}