- - Use New_delete_allocator.

This commit is contained in:
Sylvain Pion 2001-10-05 14:10:08 +00:00
parent a093ca87ba
commit 480eacb60a
4 changed files with 20 additions and 17 deletions

View File

@ -1,5 +1,6 @@
2.40 (?? October 2001)
2.40 (5 October 2001)
- Cleanup use of ptr in AffH2.
- Use New_delete_allocator.
2.39 (2 October 2001)
- Access functions of objects (like .x() ) now return const references.

View File

@ -591,37 +591,37 @@ class Aff_transformationH2
template < class R >
Aff_transformationH2<R>::Aff_transformationH2()
{ ptr = new Aff_transformation_repH2<R>(); }
{ initialize_with(Aff_transformation_repH2<R>()); }
template < class R >
Aff_transformationH2<R>::
Aff_transformationH2(const Identity_transformation)
{ ptr = new Identity_repH2<R>(); }
{ initialize_with(Identity_repH2<R>()); }
template < class R >
Aff_transformationH2<R>::
Aff_transformationH2(const Translation,const VectorH2<R>& v)
{ ptr = new Translation_repH2<R>( v ); }
{ initialize_with(Translation_repH2<R>( v )); }
template < class R >
Aff_transformationH2<R>::
Aff_transformationH2(const Scaling, const RT& a, const RT& b)
{ ptr = new Scaling_repH2<R>( a, b); }
{ initialize_with(Scaling_repH2<R>( a, b)); }
template < class R >
Aff_transformationH2<R>::
Aff_transformationH2( const Scaling, const RT& xa, const RT& xb,
const RT& ya, const RT& yb)
{
ptr = new Aff_transformation_repH2<R>(xa*yb, RT(0), RT(0),
initialize_with(Aff_transformation_repH2<R>(xa*yb, RT(0), RT(0),
RT(0), ya*xb, RT(0),
xb*yb );
xb*yb ));
}
template < class R >
Aff_transformationH2<R>::
Aff_transformationH2(const Reflection, const LineH2<R>& l)
{ ptr = new Reflection_repH2<R>( l); }
{ initialize_with(Reflection_repH2<R>( l)); }
template < class R >
Aff_transformationH2<R>::
@ -629,7 +629,7 @@ Aff_transformationH2(const Rotation,
const RT& sine,
const RT& cosine,
const RT& denominator)
{ ptr = new Rotation_repH2<R>(sine, cosine, denominator); }
{ initialize_with(Rotation_repH2<R>(sine, cosine, denominator)); }
template < class R >
Aff_transformationH2<R>::Aff_transformationH2(const Rotation,
@ -645,7 +645,7 @@ Aff_transformationH2<R>::Aff_transformationH2(const Rotation,
RT den;
rational_rotation_approximation(dir.x(), dir.y(), sin, cos, den, n, d);
ptr = new Rotation_repH2<R>( sin, cos, den );
initialize_with(Rotation_repH2<R>( sin, cos, den ));
}
template < class R >
@ -654,9 +654,9 @@ Aff_transformationH2( const RT& a, const RT& b, const RT& c,
const RT& d, const RT& e, const RT& f,
const RT& g)
{
ptr = new Aff_transformation_repH2<R>( a, b, c,
initialize_with(Aff_transformation_repH2<R>( a, b, c,
d, e, f,
g );
g ));
}
template < class R >
@ -665,9 +665,9 @@ Aff_transformationH2( const RT& a, const RT& b,
const RT& d, const RT& e,
const RT& g)
{
ptr = new Aff_transformation_repH2<R>( a, b, RT(0),
initialize_with(Aff_transformation_repH2<R>( a, b, RT(0),
d, e, RT(0),
g );
g ));
}
template < class R >

View File

@ -36,6 +36,7 @@
#include <CGAL/representation_tags.h>
#include <CGAL/predicate_objects_on_points_2.h>
#include <CGAL/Kernel/function_objects.h>
#include <CGAL/New_delete_allocator.h>
CGAL_BEGIN_NAMESPACE
@ -83,7 +84,7 @@ class Homogeneous_base
typedef CGAL::Handle_for< Threetuple<RT> > Line_handle_2;
typedef CGAL::Handle_for< Segment_repH2<R_> > Segment_handle_2;
typedef CGAL::Handle_for< Aff_transformation_rep_baseH2<R_>,
No_op_allocator< Aff_transformation_rep_baseH2<R_> > >
New_delete_allocator< Aff_transformation_rep_baseH2<R_> > >
Aff_transformation_handle_2;
typedef CGAL::Handle_for< RepH3<RT> > Point_handle_3;

View File

@ -36,6 +36,7 @@
#include <CGAL/representation_tags.h>
#include <CGAL/predicate_objects_on_points_2.h>
#include <CGAL/Kernel/function_objects.h>
#include <CGAL/New_delete_allocator.h>
CGAL_BEGIN_NAMESPACE
@ -91,8 +92,8 @@ class Simple_homogeneous_base
Line_handle_2;
typedef CGAL::Simple_Handle_for< Simple_Segment_repH2<R_> >
Segment_handle_2;
typedef CGAL::Handle_for< Aff_transformation_rep_baseH2<R_>, // Simple ???
No_op_allocator< Aff_transformation_rep_baseH2<R_> > >
typedef CGAL::Handle_for< Aff_transformation_rep_baseH2<R_>,
New_delete_allocator< Aff_transformation_rep_baseH2<R_> > >
Aff_transformation_handle_2;
typedef CGAL::Simple_Handle_for< Simple_RepH3<RT> >