#ifndef CGAL_KERNEL_D_LAZY_CARTESIAN_H #define CGAL_KERNEL_D_LAZY_CARTESIAN_H #include #include #include #include #include namespace CGAL { template struct Lazy_cartesian : Dimension_base { //CGAL_CONSTEXPR Lazy_cartesian(){} //CGAL_CONSTEXPR Lazy_cartesian(int d):Base_(d){} //TODO: Do we want to store an AK and an EK? Or just references? //FIXME: references would be better I guess. //TODO: In any case, make sure that we don't end up storing this kernel for //nothing (it is not empty but references empty kernels or something) AK_ ak; EK_ ek; AK_ const& approximate_kernel()const{return ak;} EK_ const& exact_kernel()const{return ek;} typedef Lazy_cartesian Self; //typedef typename Default::Get::type Kernel; typedef Self Kernel; typedef AK_ Approximate_kernel; typedef EK_ Exact_kernel; typedef E2A_ E2A; typedef Approx_converter C2A; typedef Exact_converter C2E; typedef CGAL::Lazy_exact_nt FT; typedef FT RT; typedef typename Exact_kernel::Rep_tag Rep_tag; typedef typename Exact_kernel::Kernel_tag Kernel_tag; typedef typename Exact_kernel::Default_ambient_dimension Default_ambient_dimension; typedef typename Exact_kernel::Max_ambient_dimension Max_ambient_dimension; 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; // Doesn't look like we need an explicit list. template struct Type { typedef Lazy< typename Approximate_kernel::template Type::type, typename Exact_kernel::template Type::type, typename Exact_kernel::FT, E2A> type; }; typedef typename typeset_intersection< typename Approximate_kernel::Object_list, typename Exact_kernel::Object_list >::type Object_list; template::type> struct Functor { typedef Null_functor type; }; //FIXME: what do we do with D here? template struct Functor { typedef typename Approximate_kernel::template Functor::type FA; typedef typename Exact_kernel::template Functor::type FE; typedef Filtered_predicate type; }; template struct Functor { typedef typename Approximate_kernel::template Functor::type FA; typedef typename Exact_kernel::template Functor::type FE; typedef Lazy_construction_nt type; }; template struct Functor { typedef typename Approximate_kernel::template Functor::type FA; typedef typename Exact_kernel::template Functor::type FE; typedef Lazy_construction type; }; typedef Iterator_from_indices::type, const FT, FT, typename Functor::type> Point_cartesian_const_iterator; typedef Iterator_from_indices::type, const FT, FT, typename Functor::type> Vector_cartesian_const_iterator; template struct Construct_iter : private Store_kernel { Construct_iter(){} Construct_iter(Kernel const&k):Store_kernel(k){} //FIXME: pass the kernel to the functor in the iterator typedef U result_type; template result_type operator()(T const& t,Begin_tag)const{ return result_type(t,0,this->kernel()); } template result_type operator()(T const& t,End_tag)const{ return result_type(t,Self().dimension(),this->kernel()); } }; template struct Functor { typedef Construct_iter type; }; template struct Functor { typedef Construct_iter type; }; //TODO: what about other functors of the Misc category? }; } //namespace CGAL #endif // CGAL_KERNEL_D_LAZY_CARTESIAN_H