Ignore:
Timestamp:
05/12/20 16:36:29 (4 years ago)
Author:
yushan
Message:

trunk : Bug fixed in workflow graph. wrong connection happens when a chain of arithmetic operations is applied on a field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/filter/ternary_arithmetic_filter.cpp

    r1768 r1876  
    1212    , value2(value2) 
    1313  {  
    14     expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 
    1514    /* Nothing to do */  
    1615  }; 
     
    2625      CWorkflowGraph::allocNodeEdge(); 
    2726 
    28       size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 
     27      size_t filterhash = std::hash<StdString>{}(this->field->content+to_string(data[0]->timestamp)+this->field->getId()); 
    2928 
    3029      // first round 
     
    3534        int edgeID = InvalidableObject::edgeIdGenerator++; 
    3635 
    37         CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 
     36        CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+this->field->content+")", 3, 1, 0, data[0]); 
    3837        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 
    3938        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
     
    101100    , value2(value2) 
    102101  {  
    103     expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 
    104102    /* Nothing to do */  
    105103  }; 
     
    115113      CWorkflowGraph::allocNodeEdge(); 
    116114 
    117       size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 
     115      size_t filterhash = std::hash<StdString>{}(this->field->content+to_string(data[0]->timestamp)+this->field->getId()); 
    118116 
    119117      // first round 
     
    124122        int edgeID = InvalidableObject::edgeIdGenerator++; 
    125123 
    126         CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 
     124        CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+this->field->content+")", 3, 1, 0, data[0]); 
    127125        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 
    128126        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
     
    189187    , value(value) 
    190188  {  
    191     expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 
    192189    /* Nothing to do */  
    193190  }; 
     
    204201      CWorkflowGraph::allocNodeEdge(); 
    205202 
    206       size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 
     203      size_t filterhash = std::hash<StdString>{}(this->field->content+to_string(data[0]->timestamp)+this->field->getId()); 
    207204 
    208205      // first round 
     
    213210        int edgeID = InvalidableObject::edgeIdGenerator++; 
    214211     
    215         CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 
     212        CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+this->field->content+")", 3, 1, 0, data[0]); 
    216213        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
    217214        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
     
    301298    , value2(value2) 
    302299  {  
    303     expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 
    304300    /* Nothing to do */  
    305301  }; 
     
    315311      CWorkflowGraph::allocNodeEdge(); 
    316312 
    317       size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 
     313      size_t filterhash = std::hash<StdString>{}(this->field->content+to_string(data[0]->timestamp)+this->field->getId()); 
    318314 
    319315      // first round 
     
    324320        int edgeID = InvalidableObject::edgeIdGenerator++; 
    325321 
    326         CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 
     322        CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+this->field->content+")", 3, 1, 0, data[0]); 
    327323        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 
    328324        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
     
    390386    , value(value) 
    391387  {  
    392     expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 
    393388    /* Nothing to do */  
    394389  }; 
     
    405400      CWorkflowGraph::allocNodeEdge(); 
    406401 
    407       size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 
     402      size_t filterhash = std::hash<StdString>{}(this->field->content+to_string(data[0]->timestamp)+this->field->getId()); 
    408403 
    409404      // first round 
     
    414409        int edgeID = InvalidableObject::edgeIdGenerator++; 
    415410     
    416         CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 
     411        CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+this->field->content+")", 3, 1, 0, data[0]); 
    417412        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
    418413        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
     
    499494    , value(value) 
    500495  {  
    501     expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 
    502496    /* Nothing to do */  
    503497  }; 
     
    514508      CWorkflowGraph::allocNodeEdge(); 
    515509 
    516       size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 
     510      size_t filterhash = std::hash<StdString>{}(this->field->content+to_string(data[0]->timestamp)+this->field->getId()); 
    517511 
    518512      // first round 
     
    523517        int edgeID = InvalidableObject::edgeIdGenerator++; 
    524518     
    525         CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 
     519        CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+this->field->content+")", 3, 1, 0, data[0]); 
    526520        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
    527521        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
     
    608602    , op(operatorExpr.getOpFieldFieldField(op)) 
    609603  {  
    610     expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 
    611604    /* Nothing to do */  
    612605  }; 
     
    623616      CWorkflowGraph::allocNodeEdge(); 
    624617 
    625       size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 
     618      size_t filterhash = std::hash<StdString>{}(this->field->content+to_string(data[0]->timestamp)+this->field->getId()); 
    626619 
    627620      // first round 
     
    632625        int edgeID = InvalidableObject::edgeIdGenerator++; 
    633626     
    634         CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 
     627        CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+this->field->content+")", 3, 1, 0, data[0]); 
    635628        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
    636629        (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
Note: See TracChangeset for help on using the changeset viewer.