Exemplo n.º 1
0
bool
AstDOTGeneration::commentOutNodeInGraph(SgNode* node)
   {
  // return an empty string for default implementation
     bool resultValue = false;

  // 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);

            // Turn it ON if there is an attribute to do so, but don't turn it off (for attribute to be changed)
               if (resultValue == false)
                    resultValue = attribute->commentOutNodeInGraph();
             }
        }

     return resultValue;
   }