source: XIOS/trunk/src/filter/output_pin.hpp @ 827

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

Add the base classes for the new filter framework.

File size: 1022 bytes
Line 
1#ifndef __XIOS_COutputPin__
2#define __XIOS_COutputPin__
3
4#include "input_pin.hpp"
5
6namespace xios
7{
8  /*!
9   * An output pin handles the connections with downstream filters.
10   */
11  class COutputPin
12  {
13    public:
14      /*!
15       * Connects to a specific slot of the input pin of a downstream filter.
16       * Note that the output pin holds a reference on the downstream filter.
17       *
18       * \param inputPin the input pin to connect
19       * \param inputSlot the input slot number
20       */
21      void connectOutput(boost::shared_ptr<CInputPin> inputPin, size_t inputSlot);
22
23    protected:
24      /*!
25       * Delivers an output packet to the downstreams filter.
26       *
27       * \param packet the packet to output
28       */
29      void deliverOuput(CDataPacketPtr packet);
30
31    private:
32      //!< The list of connected filters and the corresponding slot numbers
33      std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> > outputs;
34  }; // class COutputPin
35} // namespace xios
36
37#endif //__XIOS_COutputPin__
Note: See TracBrowser for help on using the repository browser.