gala_clients/DIS_group/src/GROUPswApp.cxx
// Find violations in the selected groups.
Find violations in the selected groups.
Find violations in the selected groups .
vbool GROUPswApp::findViolations(const symbolArr groups,
                                 const char* fileName,
                                 const vchar* tclBuffer )
{
    Initialize(GROUPswApp::findViolations);
    symbolPtr groupSym;
    FILE* out = OSapi_fopen(fileName, "w");
    if (out) {
      ForEachS(groupSym, groups) {
        groupHdrPtr group = groupHdr::sym_to_groupHdr(groupSym);
        if (group) {
            group->validate_group_with_project(0, out);
        }
      }
      OSapi_fclose(out);
      dis_message(NULL, MSG_INFORM, "Violation report written to file '%s'.",
                    (const char*) fileName);
      if (tclBuffer) {
            vstr* cmdStr = vstrCloneScribed(vcharScribeFormat( (vchar*)
                       "dis_ViewFile {%s} {%s} 0", tclBuffer, fileName) );
            rcall_dis_DISui_eval_async(DISui_app, cmdStr);
            vstrDestroy(cmdStr);
      }
      return(vTRUE);
    } else {
       dis_message(NULL, MSG_ERROR, "Unable to open report file!");
       return(vFALSE);
    }
}
vbool GROUPswApp :: findViolations ( const symbolArr groups , const char * fileName , const vchar * tclBuffer ) { Initialize ( GROUPswApp :: findViolations ) ; symbolPtr groupSym ; FILE * out = OSapi_fopen ( fileName , " " ) ; if ( out ) { ForEachS ( groupSym , groups ) { groupHdrPtr group = groupHdr :: sym_to_groupHdr ( groupSym ) ; if ( group ) { group -> validate_group_with_project ( 0 , out ) ; } } OSapi_fclose ( out ) ; dis_message ( NULL , MSG_INFORM , " " , ( const char * ) fileName ) ; if ( tclBuffer ) { vstr * cmdStr = vstrCloneScribed ( vcharScribeFormat ( ( vchar * ) " " , tclBuffer , fileName ) ) ; rcall_dis_DISui_eval_async ( DISui_app , cmdStr ) ; vstrDestroy ( cmdStr ) ; } return ( vTRUE ) ; } else { dis_message ( NULL , MSG_ERROR , " " ) ; return ( vFALSE ) ; } }
Find violations in the selected groups.
Find violations in the selected groups .
/*=NULL*/ // Open the report file. // Validate each group. // Validate the group. // Close the report file.