Last change
on this file since 1984 was
1984,
checked in by ymipsl, 4 years ago
|
intermediate commit for new tranformation engine?
YM
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
935 bytes
|
Rev | Line | |
---|
[1984] | 1 | #include "transform_filter.hpp" |
---|
| 2 | |
---|
| 3 | namespace xios |
---|
| 4 | { |
---|
| 5 | |
---|
| 6 | CTransformFilter::CTransformFilter( CGarbageCollector& gc, CGenericAlgorithmTransformation* algo, int dimBefore, int dimAfter, |
---|
| 7 | bool detectMissingValues, double defaultValue) |
---|
| 8 | : CFilter(gc, 1, this), algorithm_(algo), dimBefore_(dimBefore), dimAfter_(dimAfter), |
---|
| 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(dimBefore_, dimAfter_, data[0]->data, packet->data); |
---|
| 23 | return packet; |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.