本文整理汇总了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;
}
示例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;
}
示例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 );
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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";
}
示例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";
}
示例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";
}
示例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;
}
示例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;
}