Ignore:
Timestamp:
07/17/15 13:58:13 (9 years ago)
Author:
rlacroix
Message:

Use the filter infrastructure to handle the temporal operations.

Add a temporal filter to do so.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/parse_expr/filter_expr_node.cpp

    r642 r643  
    3232 
    3333    return outputPin; 
     34  } 
     35 
     36  CFilterTemporalFieldExprNode::CFilterTemporalFieldExprNode(const std::string& fieldId) 
     37    : fieldId(fieldId) 
     38  { /* Nothing to do */ } 
     39 
     40  boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     41  { 
     42    if (!CField::has(fieldId)) 
     43      ERROR("boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     44            << "The field " << fieldId << " does not exist."); 
     45 
     46    CField* field = CField::get(fieldId); 
     47    if (field == &thisField) 
     48      ERROR("boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     49            << "The field " << fieldId << " has an invalid reference to itself."); 
     50 
     51    field->buildFilterGraph(gc, false); 
     52    return field->getTemporalDataFilter(gc, thisField.freq_op.isEmpty() ? TimeStep : thisField.freq_op); 
    3453  } 
    3554 
Note: See TracChangeset for help on using the changeset viewer.