source: XIOS/trunk/src/filter/file_writer_filter.hpp @ 638

Last change on this file since 638 was 638, checked in by rlacroix, 9 years ago

Add a source filter and two terminal filters.

File size: 958 bytes
Line 
1#ifndef __XIOS_CFileWriterFilter__
2#define __XIOS_CFileWriterFilter__
3
4#include "input_pin.hpp"
5
6namespace xios
7{
8  class CField;
9
10  /*!
11   * A terminal filter which transmits the packets it receives to a field for writting in a file.
12   */
13  class CFileWriterFilter : public CInputPin
14  {
15    public:
16      /*!
17       * Constructs the filter (with one input slot) associated to the specified field.
18       *
19       * \param field the associated field
20       */
21      CFileWriterFilter(CField* field);
22
23    protected:
24      /*!
25       * Callbacks a field to write a packet to a file.
26       *
27       * \param data a vector of packets corresponding to each slot
28       */
29      void virtual onInputReady(std::vector<CDataPacketPtr> data);
30
31    private:
32      CField* field; //<! The associated field
33      std::map<Time, CDataPacketPtr> packets; //<! The stored packets
34  }; // class CFileWriterFilter
35} // namespace xios
36
37#endif //__XIOS_CFileWriterFilter__
Note: See TracBrowser for help on using the repository browser.