本文整理汇总了C++中SgVariableDeclaration::unparseToString方法的典型用法代码示例。如果您正苦于以下问题:C++ SgVariableDeclaration::unparseToString方法的具体用法?C++ SgVariableDeclaration::unparseToString怎么用?C++ SgVariableDeclaration::unparseToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SgVariableDeclaration
的用法示例。
在下文中一共展示了SgVariableDeclaration::unparseToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void
visitorTraversal::visit (SgNode * n)
{
ROSE_ASSERT (n != NULL);
switch (n->variantT())
{
//some of SgScopeStatement
case V_SgGlobal:
case V_SgBasicBlock:
case V_SgNamespaceDefinitionStatement:
case V_SgClassDefinition:
case V_SgFunctionDefinition:
case V_SgTemplateInstantiationDefn:
{
GET_QUALIFIED_NAME(ScopeStatement)
break;
}
//Some of SgDeclarationStatement
case V_SgFunctionDeclaration:
{
GET_QUALIFIED_NAME(FunctionDeclaration)
break;
}
case V_SgClassDeclaration:
{
GET_QUALIFIED_NAME(ClassDeclaration)
break;
}
case V_SgEnumDeclaration:
{
GET_QUALIFIED_NAME(EnumDeclaration)
break;
}
case V_SgNamespaceDeclarationStatement:
{
GET_QUALIFIED_NAME(NamespaceDeclarationStatement)
break;
}
case V_SgTemplateDeclaration:
{
GET_QUALIFIED_NAME(TemplateDeclaration)
break;
}
case V_SgTemplateInstantiationDecl:
{
GET_QUALIFIED_NAME(TemplateInstantiationDecl)
break;
}
case V_SgMemberFunctionDeclaration:
{
GET_QUALIFIED_NAME(MemberFunctionDeclaration)
break;
}
case V_SgTypedefDeclaration:
{
GET_QUALIFIED_NAME(TypedefDeclaration)
break;
}
// special case here
case V_SgVariableDeclaration:
{
SgVariableDeclaration * target = isSgVariableDeclaration(n);
SgQualifiedNamePtrList & n_list = target-> get_qualifiedNameList ();
SgQualifiedNamePtrList::const_iterator iter = n_list.begin();
for (; iter!=n_list.end(); iter++)
{
SgQualifiedName * q_name = *iter;
ROSE_ASSERT (q_name != NULL);
cout<< target->class_name()<<endl;
cout<<"\tunparsed string is "<< target->unparseToString()<<endl;
}
break;
}
//Others
case V_SgInitializedName:
{
GET_QUALIFIED_NAME(InitializedName)
break;
}
case V_SgNamedType:
{
GET_QUALIFIED_NAME(NamedType)
break;
}
default:
{
break;
}
} // end switch
}