libpniio
nxfilter.hpp
Go to the documentation of this file.
1 //
2 // Declaration of the basic NXFilter template
3 //
4 // (c) Copyright 2011 DESY, Eugen Wintersberger <eugen.wintersberger@desy.de>
5 //
6 // This file is part of libpniio.
7 //
8 // libpniio is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation, either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // libpniio is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with libpniio. If not, see <http://www.gnu.org/licenses/>.
20 // ===========================================================================
21 //
22 // Created on: Aug 8, 2011
23 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
24 //
25 
26 #pragma once
27 
28 #include <pni/core/types.hpp>
29 #include "nximp_map.hpp"
30 
31 
32 namespace pni{
33 namespace io{
34 namespace nx{
35 
42  template<typename FIMP> class nxfilter
43  {
44  public:
46  typedef FIMP imp_type;
49  private:
50  imp_type _imp;
51  protected:
52 
64  imp_type &imp()
65  {
66  return _imp;
67  }
68  public:
69  //================constructors and destructor======================
73  explicit nxfilter() noexcept:_imp() { }
74 
75  //------------------------------------------------------------------
77  nxfilter(const imp_type &i) noexcept:_imp(i) { }
78 
79  //-----------------------------------------------------------------
81  virtual ~nxfilter() { }
82 
83  //-----------------------------------------------------------------
92  const imp_type& imp() const noexcept { return _imp; }
93 
94  };
95 
96  //end of namespace
97 }
98 }
99 }
100 
101 
Filter object.
Definition: nxfilter.hpp:42
FIMP imp_type
implementation type
Definition: nxfilter.hpp:46
nxfilter(const imp_type &i) noexcept
copy implementation constructor
Definition: nxfilter.hpp:77
const imp_type & imp() const noexcept
return const ref to implementation
Definition: nxfilter.hpp:92
Definition: cbf_reader.hpp:41
imp_type & imp()
get non-const ref
Definition: nxfilter.hpp:64
nxfilter< imp_type > filter_type
the actual filter type
Definition: nxfilter.hpp:48
virtual ~nxfilter()
destructor
Definition: nxfilter.hpp:81
imp_type _imp
filter implementation object
Definition: nxfilter.hpp:50
nxfilter() noexcept
default constructor
Definition: nxfilter.hpp:73