Example #1
0
int Results::numberOfFilesWithViolations()
{
    int numberOfFilesWithViolations = 0;
    for (int setIndex = 0, numberOfSets = numberOfFiles(); setIndex < numberOfSets; setIndex++)
    {
        ViolationSet *violationSet = _collection->at(setIndex);
        if (violationSet->numberOfViolations() > 0)
        {
            numberOfFilesWithViolations++;
        }
    }
    return numberOfFilesWithViolations;
}
Example #2
0
vector<Violation> Results::allViolations()
{
    vector<Violation> violations;
    for (int setIndex = 0, numberOfSets = numberOfFiles(); setIndex < numberOfSets; setIndex++)
    {
        ViolationSet *violationSet = _collection->at(setIndex);
        for (int index = 0, numberOfViolations = violationSet->numberOfViolations();
            index < numberOfViolations; index++)
        {
            Violation violation = violationSet->getViolations().at(index);
            violations.push_back(violation);
        }
    }
    return violations;
}
Example #3
0
void
SgProject::fixupCopy_symbols(SgNode* copy, SgCopyHelp & help) const
   {
#if DEBUG_FIXUP_COPY
     printf ("Inside of SgProject::fixupCopy_symbols() \n");
#endif

     SgProject* project_copy = isSgProject(copy);
     ROSE_ASSERT(project_copy != NULL);

  // Call fixup on all fo the files (SgFile objects)
     for (int i = 0; i < numberOfFiles(); i++)
        {
          SgFile & file = get_file(i);
          SgFile & file_copy = project_copy->get_file(i);
          file.fixupCopy_symbols(&file_copy,help);
        }
   }