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;
36 typedef typename std::remove_all_extents< typename boost::mpl::at<v,boost::mpl::int_<T::value> >::type>::type tpy;
39 if (std::is_pointer<tpy>::value ==
true)
40 {ret = PNP::POINTERS;
return;}
43 if (std::is_lvalue_reference<tpy>::value ==
true)
44 {ret = PNP::POINTERS;
return;}
47 if (std::is_rvalue_reference<tpy>::value ==
true)
48 {ret = PNP::POINTERS;
return;}
50 if (std::is_fundamental<tpy>::value ==
true)
58 #ifndef DISABLE_ALL_RTTI 59 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;
276 template<
typename v,
typename vc,
int... prp>
289 template<
typename v,
typename vc,
int p1,
int... prp>
294 typedef typename boost::remove_reference< typename boost::mpl::at< v,boost::mpl::int_<p1> >::type>::type ele_array;
297 typedef typename ele_array::value_type
ele;
300 typedef typename boost::mpl::push_front<vc_step, ele >::type type;
303 template <
typename T>
309 template <
typename type>
316 template <
unsigned int N1, std::
size_t N2,
typename T>
329 template<
typename v,
typename vc,
int prp>
332 typedef typename boost::remove_reference< typename boost::mpl::at< v,boost::mpl::int_<prp> >::type>::type ele_array;
338 typedef typename boost::mpl::push_front<vc, typename ele::type >::type type;
342 template<
typename v,
int... prp>
345 typedef typename boost::fusion::result_of::as_vector<typename object_creator_chunking_impl<v,boost::mpl::vector<>,prp... >::type>::type type;
Implementation of noPointer_sequence_impl.
This is a container to create a general object.
Implementation of object creator.
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.