libpniio
get_generator.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2015 DESY, Eugen Wintersberger <eugen.wintersberger@desy.de>
3 //
4 // This file is part of libpniio.
5 //
6 // libpniio is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // libpniio is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with libpniio. If not, see <http://www.gnu.org/licenses/>.
18 // ===========================================================================
19 //
20 // Created on: Feb 11, 2015
21 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
22 //
23 //
24 #pragma once
25 
26 #include <pni/core/types.hpp>
27 #include <boost/spirit/include/karma.hpp>
28 
29 #include "primitive_generators.hpp"
30 #include "value_generator.hpp"
31 
32 namespace pni{
33 namespace io{
34 
44  template<typename ITERT, typename T> struct get_generator
45  {
47  typedef typename boost::mpl::at<primitive_generators<ITERT>,T>::type type;
48  };
49 
50 
51  //-------------------------------------------------------------------------
58  template<typename ITERT> struct get_generator<ITERT,pni::core::value>
59  {
62  };
63 
64  //-------------------------------------------------------------------------
71  template<typename ITERT> struct get_generator<ITERT,pni::core::value_ref>
72  {
75  };
76 
77 
78 
79 //end of namespace
80 }
81 }
generator for scalar type erasures
Definition: value_generator.hpp:55
Definition: cbf_reader.hpp:41
get generator for type
Definition: get_generator.hpp:44
value_generator< ITERT, pni::core::value_ref > type
generator type
Definition: get_generator.hpp:74
value_generator< ITERT, pni::core::value > type
generator type
Definition: get_generator.hpp:61
boost::mpl::at< primitive_generators< iterator_type >, T >::type type
generator type
Definition: get_generator.hpp:47