本文整理汇总了C++中SgType::variant方法的典型用法代码示例。如果您正苦于以下问题:C++ SgType::variant方法的具体用法?C++ SgType::variant怎么用?C++ SgType::variant使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SgType
的用法示例。
在下文中一共展示了SgType::variant方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isSgType
// DQ (8/27/2006): This functionality already exists elsewhere
// It is a shame that it is recreated here as well !!!
NameQuerySynthesizedAttributeType
NameQuery::queryNameTypeName (SgNode * astNode)
{
ROSE_ASSERT (astNode != NULL);
string typeName = "";
Rose_STL_Container< string > returnList;
SgType *type = isSgType (astNode);
// printf ("In TransformationSupport::getTypeName(): type->sage_class_name() = %s \n",type->sage_class_name());
if (type != NULL)
switch (type->variantT ())
{
case V_SgTypeComplex:
typeName = "complex";
break;
case V_SgTypeImaginary:
typeName = "imaginary";
break;
case V_SgTypeBool:
typeName = "bool";
break;
case V_SgEnumType:
typeName = "enum";
break;
case V_SgTypeChar:
typeName = "char";
break;
case V_SgTypeVoid:
typeName = "void";
break;
case V_SgTypeInt:
typeName = "int";
break;
case V_SgTypeDouble:
typeName = "double";
break;
case V_SgTypeFloat:
typeName = "float";
break;
case V_SgTypeLong:
typeName = "long";
break;
case V_SgTypeLongDouble:
typeName = "long double";
break;
case V_SgTypeEllipse:
typeName = "ellipse";
break;
case V_SgTypeGlobalVoid:
typeName = "void";
break;
case V_SgTypeLongLong:
typeName = "long long";
break;
case V_SgTypeShort:
typeName = "short";
break;
case V_SgTypeSignedChar:
typeName = "signed char";
break;
case V_SgTypeSignedInt:
typeName = "signed int";
break;
case V_SgTypeSignedLong:
typeName = "signed long";
break;
case V_SgTypeSignedShort:
typeName = "signed short";
break;
case V_SgTypeString:
typeName = "string";
break;
case V_SgTypeUnknown:
typeName = "unknown";
break;
case V_SgTypeUnsignedChar:
typeName = "unsigned char";
break;
case V_SgTypeUnsignedInt:
typeName = "unsigned int";
break;
case V_SgTypeUnsignedLong:
typeName = "unsigned long";
break;
case V_SgTypeUnsignedShort:
typeName = "unsigned short";
break;
case V_SgTypeUnsignedLongLong:
typeName = "unsigned long long";
break;
case V_SgReferenceType:
{
ROSE_ASSERT (isSgReferenceType (type)->get_base_type () != NULL);
Rose_STL_Container< string > subTypeNames = queryNameTypeName (isSgReferenceType (type)->get_base_type ());
typedef Rose_STL_Container< string >::iterator typeIterator;
//.........这里部分代码省略.........