本文整理汇总了C++中DataWriter::put16方法的典型用法代码示例。如果您正苦于以下问题:C++ DataWriter::put16方法的具体用法?C++ DataWriter::put16怎么用?C++ DataWriter::put16使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataWriter
的用法示例。
在下文中一共展示了DataWriter::put16方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeStruct
void Struct_Class::writeStruct(DataWriter &data) const
{
data.putAddress(constantPoolTable, "constantPoolTable");
data.putAddress(fieldPoolTable, "fieldPoolTable");
data.putAddress(methodPoolTable, "methodPoolTable");
data.put16(inheritedStaticDataSize + ownStaticDataSize, "staticDataSize");
data.put16(inheritedInstanceDataSize + ownInstanceDataSize, "instanceDataSize");
data.put16(staticDataHandle, "staticDataHandle");
data.pad16();
}
示例2: 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");
}
示例3: writeStruct
void Struct_CP_Table::writeStruct(DataWriter &data) const
{
data.put16(constants.size(), "size");
data.pad16();
foreach (QSharedPointer<Struct_CP> cp, constants)
data.putAddress(cp, "constant");
}