// ====================================================================== // // Copyright (c) 2000,2001,2002,2003 The CGAL Consortium // // This software and related documentation is part of an INTERNAL release // of the Computational Geometry Algorithms Library (CGAL). It is not // intended for general use. // // ---------------------------------------------------------------------- // // release : // release_date : // // file : include/CGAL/Simple_cartesian.h // revision : $Revision$ // revision_date : $Date$ // author(s) : Herve Bronnimann, Sylvain Pion // coordinator : INRIA Sophia-Antipolis // // ====================================================================== #ifndef CGAL_SIMPLE_CARTESIAN_H #define CGAL_SIMPLE_CARTESIAN_H #include #include #include #include CGAL_BEGIN_NAMESPACE template < typename FT_ > class Simple_cartesian : public Type_equality_wrapper< Cartesian_base< Simple_cartesian > > { typedef Simple_cartesian Kernel; public: typedef FT_ RT; typedef FT_ FT; // The mecanism that allows to specify reference-counting or not. template < typename T > struct Handle { typedef Simple_Handle_for type; }; // Undocumented stuff. typedef Data_accessorC2 Data_accessor_2; typedef CGAL::Conic_2 Conic_2; // TODO: cleanup (use Rational_traits<> instead) static FT make_FT(const RT & num, const RT& denom) { return num/denom;} static FT make_FT(const RT & num) { return num;} static RT FT_numerator(const FT &r) { return r;} static RT FT_denominator(const FT &) { return RT(1);} // Functors types and access functions. #define CGAL_Kernel_pred(Y,Z) typedef CGALi::Y Y; \ Y Z() const { return Y(); } #define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z) #include }; CGAL_END_NAMESPACE CGAL_ITERATOR_TRAITS_POINTER_SPEC_TEMPLATE(CGAL::Simple_cartesian) #endif // CGAL_SIMPLE_CARTESIAN_H