示例#1
0
void MainWindow::tabChanged(int index)
{
    StatisticsFrame *aLeftFrame=(StatisticsFrame *)ui->mainTabWidget->currentWidget();
    StatisticsFrame *aRightFrame=(StatisticsFrame *)ui->cloneTabWidget->currentWidget();

    compareLabels(aLeftFrame->ui->maximumCountResLabel,      aRightFrame->ui->maximumCountResLabel,      false);
    compareLabels(aLeftFrame->ui->timeToAppendResLabel,      aRightFrame->ui->timeToAppendResLabel,      true);
    compareLabels(aLeftFrame->ui->timeToDeleteEndResLabel,   aRightFrame->ui->timeToDeleteEndResLabel,   true);
    compareLabels(aLeftFrame->ui->timeToInsertResLabel,      aRightFrame->ui->timeToInsertResLabel,      true);
    compareLabels(aLeftFrame->ui->timeToDeleteBeginResLabel, aRightFrame->ui->timeToDeleteBeginResLabel, true);
}
示例#2
0
/* look up for a label inside the graph */
t_basic_block * searchLabel(t_cflow_Graph *graph, t_axe_label *label)
{
   t_list *current_element;
   t_basic_block *bblock;
   t_cflow_Node *current_node;
   
   /* preconditions: graph should not be a NULL pointer */
   if (graph == NULL){
      cflow_errorcode = CFLOW_GRAPH_UNDEFINED;
      return NULL;
   }

   /* test if we haven't to search for a label */
   if (label == NULL)
      return NULL;
   
   /* initialize `bblock' */
   bblock = NULL;
   
   current_element = graph->blocks;
   while(current_element != NULL)
   {
      bblock = (t_basic_block *) LDATA(current_element);
      assert(bblock != NULL);
      assert(bblock->nodes != NULL);

      /* retrieve the first node of the basic block */
      current_node = (t_cflow_Node *) LDATA(bblock->nodes);
      assert(current_node != NULL);

      /* if the first node holds a label information, we
       * have to verify if we have found the right label */
      if ((current_node->instr)->labelID != NULL)
      {
         if (compareLabels((current_node->instr)->labelID, label))
            /* we found the correct basic block */
            break;
      }

      /* retrieve the next element */
      current_element = LNEXT(current_element);
   }

   return bblock;
}