source: XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_writer_store_filter.cpp @ 1960

Last change on this file since 1960 was 1935, checked in by ymipsl, 4 years ago

XIOS coupling.
Reorganize filters, update of the day.

YM

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 704 bytes
Line 
1#include "file_writer_store_filter.hpp"
2#include "exception.hpp"
3#include "field.hpp"
4
5namespace xios
6{
7  CFileWriterStoreFilter::CFileWriterStoreFilter(CGarbageCollector& gc, CField* field)
8    : CInputPin(gc, 1)
9    , field(field)
10  {
11    if (!field)
12      ERROR("CFileWriterStoreFilter::CFileWriterStoreFilter(CField* field)",
13            "The field cannot be null.");
14  }
15
16  void CFileWriterStoreFilter::onInputReady(std::vector<CDataPacketPtr> data)
17  {
18    field->writeUpdateData(data[0]->data);
19  }
20
21  bool CFileWriterStoreFilter::mustAutoTrigger() const
22  {
23    return true;
24  }
25
26  bool CFileWriterStoreFilter::isDataExpected(const CDate& date) const
27  {
28    return true;
29  }
30} // namespace xios
Note: See TracBrowser for help on using the repository browser.