- Timestamp:
- 06/25/19 16:14:54 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/filter/pass_through_filter.cpp
r1668 r1677 1 1 #include "pass_through_filter.hpp" 2 #include "workflow_graph.hpp" 2 3 3 4 namespace xios … … 5 6 CPassThroughFilter::CPassThroughFilter(CGarbageCollector& gc, bool buildWorkflowGraph /*= false*/) 6 7 : CFilter(gc, 1, this, buildWorkflowGraph) 7 { /* Nothing to do */ } 8 { 9 } 8 10 9 11 CDataPacketPtr CPassThroughFilter::apply(std::vector<CDataPacketPtr> data) 10 12 { 13 if(this->tag) 14 { 15 std::cout<<"CPassThroughFilter::apply tag = "<<this->tag<<std::endl; 16 this->filterID = InvalidableObject::filterIdGenerator++; 17 if(CWorkflowGraph::mapFilters_ptr==0) CWorkflowGraph::mapFilters_ptr = new std::unordered_map <int, StdString>; 18 19 (*CWorkflowGraph::mapFilters_ptr)[this->filterID] = "Pass Through Filter"; 20 21 if(CWorkflowGraph::mapFieldToFilters_ptr==0) CWorkflowGraph::mapFieldToFilters_ptr = new std::unordered_map <StdString, vector <int> >; 22 23 StdString str = data[0]->fieldID + " ts=" + to_string(data[0]->timestamp); 24 (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(data[0]->src_filterID); 25 (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(this->filterID); 26 data[0]->src_filterID=this->filterID; 27 28 } 29 30 data[0]->fieldID = this->output_field_id; 31 32 11 33 return data[0]; 12 34 } 35 13 36 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.