#ifndef CGAL_KERNEL_D_CARTESIAN_CHANGE_FT_H #define CGAL_KERNEL_D_CARTESIAN_CHANGE_FT_H #include #include #include #include namespace CGAL { template < typename Base_, typename FT_> struct Cartesian_change_FT_base : public Base_ { CGAL_CONSTEXPR Cartesian_change_FT_base(){} CGAL_CONSTEXPR Cartesian_change_FT_base(int d):Base_(d){} typedef Base_ Kernel_base; typedef FT_ RT; typedef FT_ FT; typedef CGAL::LA_eigen LA; typedef typename Same_uncertainty_nt::type Boolean; typedef typename Same_uncertainty_nt::type Sign; typedef typename Same_uncertainty_nt::type Comparison_result; typedef typename Same_uncertainty_nt::type Orientation; typedef typename Same_uncertainty_nt::type Oriented_side; typedef typename Same_uncertainty_nt::type Bounded_side; typedef typename Same_uncertainty_nt::type Angle; typedef NT_converter FT_converter; typedef transforming_iterator Cartesian_const_iterator; //FIXME: what if the functor's constructor takes a kernel as argument? struct Construct_cartesian_const_iterator { typedef typename Kernel_base::template Construct::type Functor_base; Functor_base f; typedef Cartesian_const_iterator result_type; template result_type begin(T const& v)const{ return make_transforming_iterator(f.begin(v),FT_converter()); } template result_type end(T const& v)const{ return make_transforming_iterator(f.end(v),FT_converter()); } }; struct Compute_cartesian_coordinate { typedef typename Kernel_base::template Compute::type Functor_base; Functor_base f; typedef FT result_type; template result_type operator()(Obj_ const& v,int i)const{ return FT_converter()(f(v,i)); } }; template struct Compute { typedef Null_functor type; }; template struct Compute { typedef Compute_cartesian_coordinate type; }; template struct Predicate { typedef Null_functor type; }; template struct Construct : Kernel_base::template Construct { }; template struct Construct { typedef Construct_cartesian_const_iterator type; }; }; template < typename Base_, typename FT_> struct Cartesian_change_FT : public Cartesian_complete_predicates< Cartesian_complete_computes< Cartesian_change_FT_base , true, Cartesian_change_FT > , true, Cartesian_change_FT > { CGAL_CONSTEXPR Cartesian_change_FT(){} CGAL_CONSTEXPR Cartesian_change_FT(int d):Cartesian_change_FT_base(d){} }; } //namespace CGAL #endif // CGAL_KERNEL_D_CARTESIAN_CHANGE_FT_H