4 #include <boost/fusion/container/vector.hpp>
5 #include <boost/mpl/vector.hpp>
6 #include <boost/mpl/push_back.hpp>
7 #include <boost/type_traits/remove_reference.hpp>
8 #include <boost/mpl/range_c.hpp>
10 #include "util_debug.hpp"
11 #include "check_no_pointers.hpp"
12 #include "util/for_each_ref.hpp"
30 ret = PNP::NO_POINTERS;
38 typedef typename std::remove_all_extents< typename boost::mpl::at<v,boost::mpl::int_<T::value> >::type>::type tpy;
41 if (std::is_pointer<tpy>::value ==
true)
42 {ret = PNP::POINTERS;
return;}
45 if (std::is_lvalue_reference<tpy>::value ==
true)
46 {ret = PNP::POINTERS;
return;}
49 if (std::is_rvalue_reference<tpy>::value ==
true)
50 {ret = PNP::POINTERS;
return;}
52 if (std::is_fundamental<tpy>::value ==
true)
60 std::cerr <<
"Warning: " << __FILE__ <<
":" << __LINE__ <<
" impossible to check the type " << demangle(
typeid(tpy).name()) <<
" please consider to add a static method \"static bool noPointers()\" \n" ;
84 template<
typename v,
typename p_ele,
bool to_push>
87 typedef typename boost::mpl::push_front<v,p_ele>::type type;
97 template<
typename v,
typename p_ele>
112 template<
typename v,
int p1,
int... prp>
116 typedef typename std::remove_reference<typename std::remove_pointer<typename boost::mpl::at< v,boost::mpl::int_<p1> >::type>::type>::type obj_type;
133 template<
typename v,
int p1>
137 typedef typename std::remove_reference< typename std::remove_pointer<typename boost::mpl::at< v,boost::mpl::int_<p1> >::type>::type>::type obj_type;
153 template<
typename v,
int... prp>
175 typedef typename boost::fusion::result_of::size<v>::type size_tpy;
179 static bool noPointers()
184 boost::mpl::for_each_ref< boost::mpl::range_c<int,0, boost::fusion::result_of::size<v>::type::value > > (ct);
189 static const int max_prop = size_tpy::value;
199 template<
typename v,
typename vc,
int... prp>
212 template<
typename v,
typename vc,
int p1,
int... prp>
217 typedef typename boost::remove_reference< typename boost::mpl::at< v,boost::mpl::int_<p1> >::type>::type ele;
220 typedef typename boost::mpl::push_front<vc_step, ele >::type type;
229 template<
typename v,
typename vc,
int prp>
232 typedef typename boost::remove_reference< typename boost::mpl::at< v,boost::mpl::int_<prp> >::type>::type ele;
235 typedef typename boost::mpl::push_front<vc, ele >::type type;
254 template<
typename v,
int... prp>
257 typedef typename boost::fusion::result_of::as_vector<typename object_creator_impl<v,boost::mpl::vector<>,prp... >::type>::type type;
264 typedef typename boost::fusion::vector<> type;
Implementation of noPointer_sequence_impl.
This is a container to create a general object.
This class check if the type T has pointers inside.
functor for for_each algorithm
push p_ele into v only of to_push is true
it return a boost::mpl::vector of integers where each integer identify one object without the method ...
Implementation of object creator.
It create a boost::fusion vector with the selected properties.