Changeset 756 for XIOS/trunk/src/filter
- Timestamp:
- 10/23/15 10:49:19 (9 years ago)
- Location:
- XIOS/trunk/src/filter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/filter/source_filter.cpp
r650 r756 2 2 #include "grid.hpp" 3 3 #include "exception.hpp" 4 #include "calendar_util.hpp" 4 5 5 6 namespace xios 6 7 { 7 CSourceFilter::CSourceFilter(CGrid* grid )8 CSourceFilter::CSourceFilter(CGrid* grid, const CDuration offset /*= NoneDu*/) 8 9 : grid(grid) 10 , offset(offset) 9 11 { 10 12 if (!grid) … … 16 18 void CSourceFilter::streamData(CDate date, const CArray<double, N>& data) 17 19 { 20 date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter 21 18 22 CDataPacketPtr packet(new CDataPacket); 19 23 packet->date = date; … … 33 37 void CSourceFilter::streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data) 34 38 { 39 date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter 40 35 41 CDataPacketPtr packet(new CDataPacket); 36 42 packet->date = date; -
XIOS/trunk/src/filter/source_filter.hpp
r643 r756 20 20 * 21 21 * \param grid the grid to which the data is attached 22 * \param offset the offset applied to the timestamp of all packets 22 23 */ 23 CSourceFilter(CGrid* grid );24 CSourceFilter(CGrid* grid, const CDuration offset = NoneDu); 24 25 25 26 /*! … … 53 54 private: 54 55 CGrid* grid; //!< The grid attached to the data the filter can accept 56 const CDuration offset; //!< The offset applied to the timestamp of all packets 55 57 }; // class CSourceFilter 56 58 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.