コード例 #1
0
ファイル: AstDOTGeneration.C プロジェクト: lvpw/edg4x-rose
// DQ (11/1/2003) added mechanism to add additional options (to add color, etc.)
string
AstDOTGeneration::additionalNodeOptions(SgNode* node)
   {
  // return an empty string for default implementation
     ostringstream ss;

  // DQ (7/4/2008): Added support for output of information about attributes
     AstAttributeMechanism* astAttributeContainer = node->get_attributeMechanism();
     if (astAttributeContainer != NULL)
        {
#if 0
          printf ("In AstDOTGeneration::additionalNodeOptions(): astAttributeContainer = %p for node = %p = %s \n",astAttributeContainer,node,node->class_name().c_str());
#endif
          for (AstAttributeMechanism::iterator i = astAttributeContainer->begin(); i != astAttributeContainer->end(); i++)
             {
            // std::string name = i->first;
               AstAttribute* attribute = i->second;
               ROSE_ASSERT(attribute != NULL);

               ss << attribute->additionalNodeOptions();
             }
        }
       else
        {
#if 0
          printf ("In AstDOTGeneration::additionalNodeOptions(): astAttributeContainer == NULL for node = %p = %s \n",node,node->class_name().c_str());
#endif
        }

     return ss.str();
   }
コード例 #2
0
ファイル: AstDOTGeneration.C プロジェクト: LindaLovelace/rose
// DQ (11/1/2003) added mechanism to add additional options (to add color, etc.)
string
AstDOTGeneration::additionalNodeOptions(SgNode* node)
   {
  // return an empty string for default implementation
     ostringstream ss;

  // DQ (7/4/2008): Added support for output of information about attributes
     AstAttributeMechanism* astAttributeContainer = node->get_attributeMechanism();
     if (astAttributeContainer != NULL)
        {
          for (AstAttributeMechanism::iterator i = astAttributeContainer->begin(); i != astAttributeContainer->end(); i++)
             {
            // std::string name = i->first;
               AstAttribute* attribute = i->second;
               ROSE_ASSERT(attribute != NULL);

               ss << attribute->additionalNodeOptions();
             }
        }

     return ss.str();
   }