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


C++ TypeName函数代码示例

本文整理汇总了C++中TypeName函数的典型用法代码示例。如果您正苦于以下问题:C++ TypeName函数的具体用法?C++ TypeName怎么用?C++ TypeName使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TypeName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

bool
ExtremeValueAnalysisAttributes::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const ExtremeValueAnalysisAttributes *tmp = (const ExtremeValueAnalysisAttributes *)atts;
    *this = *tmp;

    return true;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:12,代码来源:ExtremeValueAnalysisAttributes.C

示例2:

bool
PickVarInfo::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const PickVarInfo *tmp = (const PickVarInfo *)atts;
    *this = *tmp;

    return true;
}
开发者ID:OSCCAR-PFM,项目名称:OSCCAR-dev,代码行数:12,代码来源:PickVarInfo.C

示例3: Type2Callback

/**
 * WalkTypeList callback.
 *
 * @returns WR_CONTINUE
 * @param   th          The type handle.
 * @param   _idx        Pointer to the current module index.
 */
static walk_result Type2Callback( type_handle *th, void *_idx )
{
    int             *idx = (int *)_idx;
    char            buff[2048];
    unsigned        len;
    symbol_type     tag;
    dip_type_info   tinfo;
    dip_status      rc;

    printf( "%5d  ", ++*idx );

/** @todo all this needs some serious work */

    /* type name. */
    len = TypeName( th, 0, &tag, buff, sizeof( buff ) );
    if( len > 0 ) {
        printf( "tag=%d %-13s  name=%s\n"
                "       ",
                tag, GetTypeTag( tag ), buff );
    }

    /* type info */
    rc = TypeInfo( th, NULL, &tinfo );
    if( rc == DS_OK ) {
        printf( "size=%#06lx  kind=%2d %-12s  modifier=%#04x %s\n",
                tinfo.size,
                tinfo.kind, GetTypeKind( tinfo.kind ),
                tinfo.modifier, GetTypeModifier( tinfo.modifier, tinfo.kind ) );

        switch( tinfo.kind ) {
        case TK_ARRAY: {
                array_info ainfo;
                rc = TypeArrayInfo( th, NULL, &ainfo, NULL );
                if( rc == DS_OK ) {
                    printf( "       "
                            "low_bound=%ld num_elts=%lu stride=%lu num_dims=%u column_major=%d\n",
                            ainfo.low_bound, ainfo.num_elts, ainfo.stride,
                            ainfo.num_dims, ainfo.column_major );
                } else {
                    printf( "TypeArrayInfo -> %d\n", rc );
                }
            }
            break;
        case TK_FUNCTION: {
            }
            break;
        }
    } else {
        printf( "TypeInfo -> %d\n", rc );
    }

    return( WR_CONTINUE );
}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:60,代码来源:dipdump.c

示例4:

bool
SimulationCommand::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const SimulationCommand *tmp = (const SimulationCommand *)atts;
    *this = *tmp;

    return true;
}
开发者ID:OSCCAR-PFM,项目名称:OSCCAR-dev,代码行数:12,代码来源:SimulationCommand.C

示例5:

bool
StatisticalTrendsAttributes::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const StatisticalTrendsAttributes *tmp = (const StatisticalTrendsAttributes *)atts;
    *this = *tmp;

    return true;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:12,代码来源:StatisticalTrendsAttributes.C

示例6:

bool
ViewerRPC::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const ViewerRPC *tmp = (const ViewerRPC *)atts;
    *this = *tmp;

    return true;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:12,代码来源:ViewerRPC.C

示例7:

bool
RectilinearProject2DAttributes::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const RectilinearProject2DAttributes *tmp = (const RectilinearProject2DAttributes *)atts;
    *this = *tmp;

    return true;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:12,代码来源:RectilinearProject2DAttributes.C

示例8:

bool
ToroidalPoloidalProjection::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const ToroidalPoloidalProjection *tmp = (const ToroidalPoloidalProjection *)atts;
    *this = *tmp;

    return true;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:12,代码来源:ToroidalPoloidalProjection.C

示例9:

bool
ColorControlPoint::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const ColorControlPoint *tmp = (const ColorControlPoint *)atts;
    *this = *tmp;

    return true;
}
开发者ID:151706061,项目名称:ParaView,代码行数:12,代码来源:ColorControlPoint.cpp

示例10:

bool
CartographicProjectionAttributes::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const CartographicProjectionAttributes *tmp = (const CartographicProjectionAttributes *)atts;
    *this = *tmp;

    return true;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:12,代码来源:CartographicProjectionAttributes.C

示例11: GetUnionField

// Get the value of a union from an object.
static void GetUnionField(const StructDef &struct_def,
                          const FieldDef &field,
                          std::string *code_ptr) {
  std::string &code = *code_ptr;
  GenReceiver(struct_def, code_ptr);
  code += MakeCamel(field.name) + "(self):";
  code += OffsetPrefix(field);

  // TODO(rw): this works and is not the good way to it:
  bool is_native_table = TypeName(field) == "*flatbuffers.Table";
  if (is_native_table) {
    code += Indent + Indent + Indent + "from flatbuffers.table import Table\n";
  } else {
    code += Indent + Indent + Indent;
    code += "from ." + TypeName(field) + " import " + TypeName(field) + "\n";
  }
  code += Indent + Indent + Indent + "obj = Table(bytearray(), 0)\n";
  code += Indent + Indent + Indent + GenGetter(field.value.type);
  code += "obj, o)\n" + Indent + Indent + Indent + "return obj\n";
  code += Indent + Indent + "return None\n\n";
}
开发者ID:TGIshib,项目名称:flatbuffers,代码行数:22,代码来源:idl_gen_python.cpp

示例12: GetStructFieldOfTable

// Get a struct by initializing an existing struct.
// Specific to Table.
static void GetStructFieldOfTable(const StructDef &struct_def,
                                  const FieldDef &field,
                                  std::string *code_ptr) {
  std::string &code = *code_ptr;
  GenReceiver(struct_def, code_ptr);
  code += MakeCamel(field.name);
  code += "(self):";
  code += OffsetPrefix(field);
  if (field.value.type.struct_def->fixed) {
    code += Indent + Indent + Indent + "x = o + self._tab.Pos\n";
  } else {
    code += Indent + Indent + Indent;
    code += "x = self._tab.Indirect(o + self._tab.Pos)\n";
  }
  code += Indent + Indent + Indent;
  code += "from ." + TypeName(field) + " import " + TypeName(field) + "\n";
  code += Indent + Indent + Indent + "obj = " + TypeName(field) + "()\n";
  code += Indent + Indent + Indent + "obj.Init(self._tab.Bytes, x)\n";
  code += Indent + Indent + Indent + "return obj\n";
  code += Indent + Indent + "return None\n\n";
}
开发者ID:TGIshib,项目名称:flatbuffers,代码行数:23,代码来源:idl_gen_python.cpp

示例13: GetStructFieldOfTable

// Get a struct by initializing an existing struct.
// Specific to Table.
static void GetStructFieldOfTable(const StructDef &struct_def,
                                  const FieldDef &field,
                                  std::string *code_ptr) {
  std::string &code = *code_ptr;
  GenReceiver(struct_def, code_ptr);
  code += " " + MakeCamel(field.name);
  code += "(obj *";
  code += TypeName(field);
  code += ") *" + TypeName(field) + " " + OffsetPrefix(field);
  if (field.value.type.struct_def->fixed) {
    code += "\t\tx := o + rcv._tab.Pos\n";
  } else {
    code += "\t\tx := rcv._tab.Indirect(o + rcv._tab.Pos)\n";
  }
  code += "\t\tif obj == nil {\n";
  code += "\t\t\tobj = new(" + TypeName(field) + ")\n";
  code += "\t\t}\n";
  code += "\t\tobj.Init(rcv._tab.Bytes, x)\n";
  code += "\t\treturn obj\n\t}\n\treturn nil\n";
  code += "}\n\n";
}
开发者ID:MarkSwanson,项目名称:flatbuffers,代码行数:23,代码来源:idl_gen_go.cpp

示例14:

bool
DatabaseCorrelation::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const DatabaseCorrelation *tmp = (const DatabaseCorrelation *)atts;
    *this = *tmp;

    return true;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:12,代码来源:DatabaseCorrelation.C

示例15:

bool
avtTensorMetaData::CopyAttributes(const AttributeGroup *atts)
{
    if(TypeName() != atts->TypeName())
        return false;

    // Call assignment operator.
    const avtTensorMetaData *tmp = (const avtTensorMetaData *)atts;
    *this = *tmp;

    return true;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:12,代码来源:avtTensorMetaData.C


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