mirror of https://github.com/CGAL/cgal
More Get_functor.
This commit is contained in:
parent
e4b8499c36
commit
7c17e3cc07
|
|
@ -81,7 +81,7 @@ struct Cartesian_change_FT_base : public
|
|||
};
|
||||
|
||||
template<class T,class U=void,class=typename map_functor_type<T>::type> struct Functor :
|
||||
Kernel_base::template Functor<T,U> { };
|
||||
Get_functor<Kernel_base,T,U> { };
|
||||
template<class T,class U> struct Functor<T,U,Compute_tag>
|
||||
{ typedef Null_functor type; };
|
||||
template<class T,class U> struct Functor<T,U,Predicate_tag>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ template<class R_,class Derived_> struct Cartesian_define_all_functors_
|
|||
{
|
||||
typedef R_ Kernel_base;
|
||||
template<class F, class D=void> struct Functor
|
||||
: Kernel_base::template Functor<F,D>
|
||||
: Get_functor<Kernel_base,F,D>
|
||||
{ };
|
||||
#define CGAL_Kernel_cons2(F,f) \
|
||||
template<class D> struct Functor <F##_tag,D> { \
|
||||
|
|
@ -85,7 +85,7 @@ template<class R_,bool force_=false,class Derived_=Default> struct Cartesian_com
|
|||
typedef R_ Kernel_base;
|
||||
typedef typename Default::Get<Derived_,Cartesian_complete_constructors>::type Derived;
|
||||
template<class F,class D=void,class=typename map_functor_type<F>::type> struct Functor :
|
||||
R_::template Functor<F,D> {};
|
||||
Get_functor<R_,F,D> {};
|
||||
template<class F,class D> struct Functor<F,D,Construct_tag> {
|
||||
typedef typename Get_functor<Kernel_base, F>::type Base_functor;
|
||||
typedef typename boost::mpl::if_c<force_||boost::is_same<Base_functor,Null_functor>::value,
|
||||
|
|
@ -107,7 +107,7 @@ template<class R_,bool force_=false,class Derived_=Default> struct Cartesian_com
|
|||
typedef R_ Kernel_base;
|
||||
typedef typename Default::Get<Derived_,Cartesian_complete_predicates>::type Derived;
|
||||
template<class F,class D=void,class=typename map_functor_type<F>::type> struct Functor :
|
||||
R_::template Functor<F,D> {};
|
||||
Get_functor<R_,F,D> {};
|
||||
template<class F,class D> struct Functor<F,D,Predicate_tag> {
|
||||
typedef typename Get_functor<Kernel_base, F>::type Base_functor;
|
||||
typedef typename boost::mpl::if_c<force_||boost::is_same<Base_functor,Null_functor>::value,
|
||||
|
|
@ -126,7 +126,7 @@ template<class R_,bool force_=false,class Derived_=Default> struct Cartesian_com
|
|||
typedef R_ Kernel_base;
|
||||
typedef typename Default::Get<Derived_,Cartesian_complete_computes>::type Derived;
|
||||
template<class F,class D=void,class=typename map_functor_type<F>::type> struct Functor :
|
||||
R_::template Functor<F,D> {};
|
||||
Get_functor<R_,F,D> {};
|
||||
template<class F,class D> struct Functor<F,D,Compute_tag> {
|
||||
typedef typename Get_functor<Kernel_base, F>::type Base_functor;
|
||||
typedef typename boost::mpl::if_c<force_||boost::is_same<Base_functor,Null_functor>::value,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ struct Cartesian_filter_K : public Base_,
|
|||
typedef KernelD_converter<Kernel_base,EK> C2E;
|
||||
|
||||
template<class T,class D=void,class=typename map_functor_type<T>::type> struct Functor :
|
||||
Kernel_base::template Functor<T,D> {};
|
||||
Get_functor<Kernel_base,T,D> {};
|
||||
template<class T,class D> struct Functor<T,D,Predicate_tag> {
|
||||
typedef typename Get_functor<AK, T>::type AP;
|
||||
typedef typename Get_functor<EK, T>::type EP;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ struct Cartesian_filter_NT : public Base_
|
|||
typedef Cartesian_change_FT<Kernel_base,Exact_nt> K2;
|
||||
|
||||
template<class T,class D=void,class=typename map_functor_type<T>::type> struct Functor :
|
||||
Kernel_base::template Functor<T,D> {};
|
||||
Get_functor<Kernel_base,T,D> {};
|
||||
template<class T,class D> struct Functor<T,D,Predicate_tag> {
|
||||
struct type {
|
||||
//TODO: use compression (derive from a compressed_pair?)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ namespace CGAL {
|
|||
|
||||
template <class K, class T> struct Get_type
|
||||
: K::template Type<T> {};
|
||||
template <class K, class F> struct Get_functor
|
||||
: K::template Functor<F> {};
|
||||
template <class K, class F, class O=void> struct Get_functor
|
||||
: K::template Functor<F, O> {};
|
||||
|
||||
class Null_type {~Null_type();}; // no such object should be created
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ void test2(){
|
|||
typedef typename K1::Construct_point_d CP;
|
||||
typedef typename K1::Construct_vector_d CV;
|
||||
typedef typename K1::Construct_segment_d CS;
|
||||
typedef typename K1::template Functor<CGAL::Segment_extremity_tag>::type CSE;
|
||||
typedef typename CGAL::Get_functor<K1, CGAL::Segment_extremity_tag>::type CSE;
|
||||
typedef typename K1::Construct_cartesian_const_iterator_d CCI;
|
||||
typedef typename K1::Orientation_d PO;
|
||||
typedef typename K1::Side_of_oriented_sphere_d SOS;
|
||||
|
|
@ -160,7 +160,7 @@ void test3(){
|
|||
typedef typename K1::Construct_point_d CP_;
|
||||
typedef typename K1::Construct_vector_d CV;
|
||||
typedef typename K1::Construct_segment_d CS;
|
||||
typedef typename K1::template Functor<CGAL::Segment_extremity_tag>::type CSE;
|
||||
typedef typename CGAL::Get_functor<K1, CGAL::Segment_extremity_tag>::type CSE;
|
||||
typedef typename K1::Construct_cartesian_const_iterator_d CCI;
|
||||
typedef typename K1::Orientation_d PO;
|
||||
typedef typename K1::Side_of_oriented_sphere_d SOS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue