LCOV - code coverage report
Current view: top level - Core - PipelineGlobalSinkFilter.h (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 1 1 100.0 %
Date: 2021-02-18 20:07:22 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /**
       2             :  * \file PipelineGlobalSinkFilter.h
       3             :  */
       4             : 
       5             : #ifndef ATK_CORE_PIPELINEGLOBALSINKFILTER_H
       6             : #define ATK_CORE_PIPELINEGLOBALSINKFILTER_H
       7             : 
       8             : #include <ATK/Core/BaseFilter.h>
       9             : 
      10             : #include <vector>
      11             : 
      12             : namespace ATK
      13             : {
      14             :   /// Class that can be used to process a pipeline that has more than one final sink. By adding these sinks to this filter, the processing is done for all sinks.
      15             :   class ATK_CORE_EXPORT PipelineGlobalSinkFilter final : public BaseFilter
      16             :   {
      17             :   protected:
      18             :     /// Simplify parent calls
      19             :     using Parent = BaseFilter;
      20             : 
      21             :   public:
      22             :     /// Constructor of the multiple sinks filter
      23             :     PipelineGlobalSinkFilter();
      24             :     /// destructor
      25          13 :     ~PipelineGlobalSinkFilter() override = default;
      26             :     
      27             :     /*!
      28             :      * @brief Adds a filter to the list of filters to process
      29             :      * @param filter is an additional filter
      30             :      */
      31             :     void add_filter(gsl::not_null<BaseFilter*> filter);
      32             :     /*!
      33             :     * @brief Removes a filter from the list of filters to process
      34             :     * @param filter is an additional filter
      35             :     */
      36             :     void remove_filter(gsl::not_null<const BaseFilter*> filter);
      37             : 
      38             :     int get_type() const final;
      39             :     void set_input_port(gsl::index input_port, gsl::not_null<BaseFilter*> filter, gsl::index output_port) final;
      40             :     void set_input_port(gsl::index input_port, BaseFilter& filter, gsl::index output_port) final;
      41             :     /*!
      42             :      * @brief Indicates if we can process the pipeline in parallel
      43             :      */
      44             :     void set_parallel(bool parallel);
      45             : 
      46             :     void dryrun(gsl::index size);
      47             : 
      48             :   protected:
      49             :     void process_impl(gsl::index size) const final;
      50             :     void prepare_process(gsl::index size) final;
      51             :     void prepare_outputs(gsl::index size) final;
      52             : 
      53             :     /// List of filters in this sink
      54             :     std::vector<gsl::not_null<BaseFilter*>> filters;
      55             :     /// Are we in parallel mode?
      56             :     bool activate_parallel = false;
      57             :   };
      58             : }
      59             : 
      60             : #endif

Generated by: LCOV version TK-3.3.0-4-gdba42eea