当前位置: 首页>>代码示例>>C++>>正文


C++ DataWriter::put16方法代码示例

本文整理汇总了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();
}
开发者ID:adjustive,项目名称:ucjvm-manager,代码行数:11,代码来源:Struct_Class.cpp

示例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");
}
开发者ID:adjustive,项目名称:ucjvm-manager,代码行数:47,代码来源:Struct_Method.cpp

示例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");
}
开发者ID:adjustive,项目名称:ucjvm-manager,代码行数:8,代码来源:Struct_CP_Table.cpp


注:本文中的DataWriter::put16方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。