#ifndef CGAL_KERNEL_D_CARTESIAN_COMPLETE_H #define CGAL_KERNEL_D_CARTESIAN_COMPLETE_H #include #include #include #include #include #include #include #include #include #include #include #include namespace CGAL { namespace internal { BOOST_MPL_HAS_XXX_TRAIT_DEF(Segment) BOOST_MPL_HAS_XXX_TRAIT_DEF(Ray) BOOST_MPL_HAS_XXX_TRAIT_DEF(Direction) BOOST_MPL_HAS_XXX_TRAIT_DEF(Line) } template struct Cartesian_define_all_functors_ : public R_ { typedef R_ Kernel_base; template struct Functor : Kernel_base::template Functor { }; #define CGAL_Kernel_cons2(F,f) \ template struct Functor { \ typedef CartesianDKernelFunctors::F type; \ }; //type f() const { return type(); } #define CGAL_Kernel_obj2(X,Y) \ template struct Functor ,D> { \ typedef CartesianDKernelFunctors::Construct_##Y type; \ }; #define CGAL_Kernel_pred(F,f) CGAL_Kernel_cons2(F,f) #define CGAL_Kernel_comp2(F,f) CGAL_Kernel_cons2(F,f) #include }; template struct Cartesian_define_all_functors : public Cartesian_per_dimension,Derived_> {}; template struct Cartesian_complete_types : public R_ { CGAL_CONSTEXPR Cartesian_complete_types(){} CGAL_CONSTEXPR Cartesian_complete_types(int d):R_(d){} typedef R_ Kernel_base; typedef typename Default::Get::type Derived; #if 0 template struct Type : Read_tag_type {}; #define CGAL_Kernel_obj2(X,Y) \ template struct Type { \ static const bool inbase = \ Provides_tag_type::value; \ typedef typename Read_tag_type B_; \ typedef typename boost::mpl::if_c >,B_>::type::type type; \ }; //FIXME: move away from Type<> //Implement by chaining things like Define_segment? #endif //FIXME: needs to be conditional!!! #define CGAL_Kernel_obj2(X,Y) \ typedef CGAL::X X; #include }; template struct Cartesian_complete_constructors : public R_ { CGAL_CONSTEXPR Cartesian_complete_constructors(){} CGAL_CONSTEXPR Cartesian_complete_constructors(int d):R_(d){} typedef R_ Kernel_base; typedef typename Default::Get::type Derived; template::type> struct Functor : R_::template Functor {}; template struct Functor { typedef typename Kernel_base::template Functor::type Base_functor; typedef typename boost::mpl::if_c::value, typename Cartesian_define_all_functors::template Functor::type, Base_functor>::type type; }; }; template struct Cartesian_complete_predicates : public R_ { CGAL_CONSTEXPR Cartesian_complete_predicates(){} CGAL_CONSTEXPR Cartesian_complete_predicates(int d):R_(d){} // TODO: this doesn't look like the right place for this typedef... typedef CartesianDKernelFunctors::Flat_orientation Flat_orientation; typedef R_ Kernel_base; typedef typename Default::Get::type Derived; template::type> struct Functor : R_::template Functor {}; template struct Functor { typedef typename Kernel_base::template Functor::type Base_functor; typedef typename boost::mpl::if_c::value, typename Cartesian_define_all_functors::template Functor::type, Base_functor>::type type; }; }; template struct Cartesian_complete_computes : public R_ { CGAL_CONSTEXPR Cartesian_complete_computes(){} CGAL_CONSTEXPR Cartesian_complete_computes(int d):R_(d){} typedef R_ Kernel_base; typedef typename Default::Get::type Derived; template::type> struct Functor : R_::template Functor {}; template struct Functor { typedef typename Kernel_base::template Functor::type Base_functor; typedef typename boost::mpl::if_c::value, typename Cartesian_define_all_functors::template Functor::type, Base_functor>::type type; }; }; } #endif // CGAL_KERNEL_D_CARTESIAN_COMPLETE_H