source: XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_server_reader_filter.hpp @ 1883

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

XIOS coupling branch
Adopt infrastructure based on filter for reading data on server side and sending it to the client, in a similar way on what is done for other case.

YM

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#ifndef __XIOS_FILE_SERVER_READER_HPP__
2#define __XIOS_FILE_SERVER_READER_HPP__
3
4#include <map>
5
6#include "output_pin.hpp"
7
8namespace xios
9{
10  class CGrid;
11  class CField;
12
13  /*!
14   * A source filter is the entry point of the data in the graph of filters. It is in charge to read data in a file on server side and
15   * injecting it into the workflow
16   */
17  class CFileServerReaderFilter : public COutputPin
18  {
19    public:
20      /*!
21       * Constructs a source filter accepting data attached to the specified grid.
22       *
23       * \param gc the garbage collector associated with this filter
24       * \param associatedField Field associated to the filter
25       */
26       CFileServerReaderFilter(CGarbageCollector& gc, CField* associatedField) ;
27
28      /*!
29       * Transforms the data received from the model into a packet and send it
30       * in the filter graph. The array containing the data can safely be reused
31       * immediately after this method returns.
32       *
33       * \param date the date associated to the data
34       * \param data an array containing the data
35       */
36      void streamData(CDate date, const CArray<double, 1>& data);
37
38      /*!
39       * Signals the filter graph that the end of stream was reached.
40       *
41       * \param date the date at which the end of stream occurred
42       */
43      void signalEndOfStream(CDate date);
44
45    private:
46      CField* field_;             //!< The field attached to the data the filter can accept
47//      const bool hasMissingValue;
48//      const double defaultValue;
49  }; // class CFileServerReaderFilter
50} // namespace xios
51
52#endif //__XIOS_FILE_SERVER_READER__
Note: See TracBrowser for help on using the repository browser.