libpniio
default.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 // Created on: Dec 2, 2014
20 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
21 //
22 #pragma once
23 
24 #include "../nxobject.hpp"
25 #include <boost/mpl/map.hpp>
26 #include <map>
27 
28 namespace pni{
29 namespace io{
30 namespace nx{
31 namespace xml{
40  {
53  template<
54  typename GTYPE,
55  typename FTYPE,
56  typename ATYPE,
57  typename LTYPE
58  >
60  {
61  return false;
62  }
63  };
64 
65  //------------------------------------------------------------------------
73  typedef boost::mpl::map<
74  boost::mpl::pair<pni::core::uint8,pni::core::uint64>,
75  boost::mpl::pair<pni::core::uint16,pni::core::uint64>,
76  boost::mpl::pair<pni::core::uint32,pni::core::uint64>,
77  boost::mpl::pair<pni::core::uint64,pni::core::uint64>,
78  boost::mpl::pair<pni::core::int8,pni::core::int64>,
79  boost::mpl::pair<pni::core::int16,pni::core::int64>,
80  boost::mpl::pair<pni::core::int32,pni::core::int64>,
81  boost::mpl::pair<pni::core::int64,pni::core::int64>,
82  boost::mpl::pair<pni::core::float32,pni::core::float128>,
83  boost::mpl::pair<pni::core::float64,pni::core::float128>,
84  boost::mpl::pair<pni::core::float128,pni::core::float128>,
85  boost::mpl::pair<pni::core::complex32,pni::core::complex128>,
86  boost::mpl::pair<pni::core::complex64,pni::core::complex128>,
87  boost::mpl::pair<pni::core::complex128,pni::core::complex128>> max_type_map;
88 
89  //------------------------------------------------------------------------
96  static const std::map<pni::core::string,bool> bool_string_map{
97  {"1",true},{"0",false},
98  {"True",true},{"False",false},
99  {"true",true},{"false",false}
100  };
101 //end of namespace
102 }
103 }
104 }
105 }
bool operator()(const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &)
predicate function
Definition: default.hpp:59
Definition: cbf_reader.hpp:41
static const std::map< pni::core::string, bool > bool_string_map
bool representation map
Definition: default.hpp:97
default data predicate
Definition: default.hpp:39
boost::mpl::map< boost::mpl::pair< pni::core::uint8, pni::core::uint64 >, boost::mpl::pair< pni::core::uint16, pni::core::uint64 >, boost::mpl::pair< pni::core::uint32, pni::core::uint64 >, boost::mpl::pair< pni::core::uint64, pni::core::uint64 >, boost::mpl::pair< pni::core::int8, pni::core::int64 >, boost::mpl::pair< pni::core::int16, pni::core::int64 >, boost::mpl::pair< pni::core::int32, pni::core::int64 >, boost::mpl::pair< pni::core::int64, pni::core::int64 >, boost::mpl::pair< pni::core::float32, pni::core::float128 >, boost::mpl::pair< pni::core::float64, pni::core::float128 >, boost::mpl::pair< pni::core::float128, pni::core::float128 >, boost::mpl::pair< pni::core::complex32, pni::core::complex128 >, boost::mpl::pair< pni::core::complex64, pni::core::complex128 >, boost::mpl::pair< pni::core::complex128, pni::core::complex128 > > max_type_map
maximum type maps
Definition: default.hpp:87
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44