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 | |
---|
8 | namespace 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__ |
---|