source: XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/model_to_client_source_filter.hpp @ 1960

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

Big update on on going work related to data distribution and transfer between clients and servers.
Revisite of the source and store filter using "connectors".

YM

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#ifndef __XIOS_MODEL_TO_CLIENT_SOURCE_FILTER_HPP__
2#define __XIOS_MODEL_TO_CLIENT_SOURCE_FILTER_HPP__
3
4#include <map>
5
6#include "output_pin.hpp"
7
8namespace xios
9{
10  class CGrid;
11
12  /*!
13   * A source filter is the entry point of the data in the graph of filters.
14   */
15  class CModelToClientSourceFilter : public COutputPin
16  {
17    public:
18      /*!
19       * Constructs a source filter accepting data attached to the specified grid.
20       *
21       * \param gc the garbage collector associated with this filter
22       * \param grid the grid to which the data is attached
23       * \param hasMissingValue whether data has missing value
24       * \param defaultValue missing value to detect
25       */
26      CModelToClientSourceFilter(CGarbageCollector& gc, CGrid* grid, bool hasMissingValue = false, double defaultValue = 0.0);
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      template <int N>
37      void streamData(CDate date, const CArray<double, N>& data);
38
39      /*!
40       * Transforms the data received from the server into a packet and send it
41       * in the filter graph. The array containing the data can safely be reused
42       * immediately after this method returns.
43       *
44       * \param date the date associated to the data
45       * \param data an array containing the data
46       */
47
48    private:
49      CGrid* grid_;             //!< The grid attached to the data the filter can accept
50      const bool hasMissingValue_;
51      const double defaultValue_;
52  }; // class CSourceFilter
53} // namespace xios
54
55#endif // __XIOS_MODEL_TO_CLIENT_SOURCE_FILTER_HPP__
Note: See TracBrowser for help on using the repository browser.