libpniio
insert.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2014 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: Aug 22, 2014
21 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
22 //
23 #pragma once
24 
25 #include <boost/spirit/home/phoenix/function/function.hpp>
26 
27 namespace pni{
28 namespace io{
29 namespace nx{
30 
31  namespace stl
32  {
43  struct insert
44  {
56  template <
57  typename C
58  , typename Arg1
59  , typename Arg2
60  , typename Arg3
61  >
62  class result
63  {
64 
65  public:
66 
67  typedef void type;
68  };
69 
70  //----------------------------------------------------------------
87  template <
88  typename C,
89  typename Arg1,
90  typename Arg2,
91  typename Arg3
92  >
93  void operator()( C& c, Arg1 const& arg1, Arg2 const& arg2, Arg3 const& arg3) const
94  {
95  c.insert(arg1, arg2, arg3);
96  }
97  };
98  }
99 
100  //create function object
101  boost::phoenix::function<stl::insert> const insert = stl::insert();
102 //end of namespace
103 }
104 }
105 }
boost::phoenix::function< stl::insert > const insert
Definition: insert.hpp:101
void operator()(C &c, Arg1 const &arg1, Arg2 const &arg2, Arg3 const &arg3) const
insert implementation
Definition: insert.hpp:93
Definition: cbf_reader.hpp:41
void type
result type
Definition: insert.hpp:67
custom inserter
Definition: insert.hpp:43
result type
Definition: insert.hpp:62