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

Last change on this file since 2230 was 2143, checked in by yushan, 3 years ago

Big commit on graph functionality. Add buildWorkflowGraph function for filters

  • 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      void buildWorkflowGraph(CDataPacketPtr packet);
40
41
42      /*!
43       * Transforms the data received from the server into a packet and send it
44       * in the filter graph. The array containing the data can safely be reused
45       * immediately after this method returns.
46       *
47       * \param date the date associated to the data
48       * \param data an array containing the data
49       */
50
51    private:
52      CGrid* grid_;             //!< The grid attached to the data the filter can accept
53      const bool hasMissingValue_;
54      const double defaultValue_;
55  }; // class CSourceFilter
56} // namespace xios
57
58#endif // __XIOS_MODEL_TO_CLIENT_SOURCE_FILTER_HPP__
Note: See TracBrowser for help on using the repository browser.