source: XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/transform_filter.cpp @ 1999

Last change on this file since 1999 was 1999, checked in by ymipsl, 3 years ago

Adapt transformation algorithm to new infrastructure (on going...)

YM

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 813 bytes
Line 
1#include "transform_filter.hpp"
2#include "grid_algorithm.hpp"
3
4namespace xios
5{
6 
7  CTransformFilter::CTransformFilter( CGarbageCollector& gc, CGridAlgorithm* algo, bool detectMissingValues, double defaultValue) 
8                                    : CFilter(gc, 1, this), algorithm_(algo), 
9                                      detectMissingValues_(detectMissingValues), defaultValue_(defaultValue)
10  {
11
12  }
13
14  CDataPacketPtr CTransformFilter::apply(std::vector<CDataPacketPtr> data)
15  {
16    // for now, no auxilliairy field
17    CDataPacketPtr packet(new CDataPacket);
18    packet->date = data[0]->date;
19    packet->timestamp = data[0]->timestamp;
20    packet->status = data[0]->status;
21
22    if (packet->status == CDataPacket::NO_ERROR) algorithm_->apply(data[0]->data, packet->data);
23    return packet;
24  }
25
26
27
28}
Note: See TracBrowser for help on using the repository browser.