- Use Pointer<> directly, no need for Triangulation_*_handle_3<>.

This commit is contained in:
Sylvain Pion 2001-09-11 15:45:51 +00:00
parent abdd13d718
commit 87a160c8b6
4 changed files with 8 additions and 107 deletions

View File

@ -1,3 +1,6 @@
Version 1.88 (?? September 01)
- Use Pointer<> directly, no need for Triangulation_*_handle_3<>.
Version 1.87 (11 September 01)
- Remove deprecated code.
- Internal classes now templated either by Tds or Tr so they are more easily

View File

@ -42,14 +42,13 @@
#include <CGAL/triangulation_assertions.h>
#include <CGAL/Triangulation_utils_3.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Pointer.h>
#include <CGAL/Triangulation_ds_cell_3.h>
#include <CGAL/Triangulation_ds_vertex_3.h>
#include <CGAL/Triangulation_ds_iterators_3.h>
#include <CGAL/Triangulation_ds_circulators_3.h>
#include <CGAL/Triangulation_handles_3.h>
#include <CGAL/DS_Container.h>
@ -59,7 +58,6 @@ template <class Vb, class Cb>
class Triangulation_data_structure_3
: public Triangulation_utils_3
{
typedef Triangulation_data_structure_3<Vb, Cb> Self;
public:
typedef Triangulation_data_structure_3<Vb,Cb> Tds;
@ -69,13 +67,10 @@ public:
typedef Triangulation_ds_vertex_3<Tds> Vertex;
typedef Triangulation_ds_cell_3<Tds> Cell;
typedef Triangulation_cell_handle_3<Self> Cell_handle;
typedef Triangulation_vertex_handle_3<Self> Vertex_handle;
// TODO : The following (simpler), should work. One day...
//typedef Pointer<Cell> Cell_handle;
//typedef Pointer<Vertex> Vertex_handle;
//typedef Cell * Cell_handle;
//typedef Vertex * Vertex_handle;
typedef Pointer<Cell> Cell_handle;
typedef Pointer<Vertex> Vertex_handle;
// typedef Cell * Cell_handle;
// typedef Vertex * Vertex_handle;
typedef std::pair<Cell_handle, int> Facet;
typedef triple<Cell_handle, int, int> Edge;

View File

@ -1,92 +0,0 @@
// ============================================================================
//
// Copyright (c) 1999 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/Triangulation_handles_3.h
// revision : $Revision$
// author(s) : Monique Teillaud <Monique.Teillaud@sophia.inria.fr>
//
// coordinator : INRIA Sophia Antipolis (<Mariette.Yvinec@sophia.inria.fr>)
//
// ============================================================================
#ifndef CGAL_TRIANGULATION_HANDLES_3_H
#define CGAL_TRIANGULATION_HANDLES_3_H
#include <CGAL/Triangulation_short_names_3.h>
#include <CGAL/Pointer.h>
CGAL_BEGIN_NAMESPACE
template <class Tr>
class Triangulation_vertex_handle_3
: public Pointer<CGAL_TYPENAME_MSVC_NULL Tr::Vertex>
{
typedef typename Tr::Vertex Vertex;
typedef Pointer<Vertex> Ptr;
typedef Triangulation_vertex_handle_3<Tr> Vertex_handle;
public:
Triangulation_vertex_handle_3()
: Ptr(NULL)
{}
Triangulation_vertex_handle_3(const Vertex * v)
: Ptr(const_cast<Vertex*>(v))
{}
Vertex_handle & operator=(Vertex * v)
{
ptr() = v;
return *this;
}
Vertex_handle & operator=(const Vertex_handle & v)
{
ptr() = v.ptr();
return *this;
}
};
template <class Tr>
class Triangulation_cell_handle_3
: public Pointer<CGAL_TYPENAME_MSVC_NULL Tr::Cell>
{
typedef typename Tr::Cell Cell;
typedef Pointer<Cell> Ptr;
typedef Triangulation_cell_handle_3<Tr> Cell_handle;
public:
Triangulation_cell_handle_3()
: Ptr(NULL)
{}
Triangulation_cell_handle_3(const Cell * c)
: Ptr(const_cast<Cell*>(c))
{}
Cell_handle & operator=(Cell * c)
{
ptr() = c;
return *this;
}
Cell_handle & operator=(const Cell_handle & c)
{
ptr() = c.ptr();
return *this;
}
};
CGAL_END_NAMESPACE
#endif // CGAL_TRIANGULATION_HANDLES_3_H

View File

@ -26,8 +26,6 @@
#define Triangulation_vertex_base_3 T_vb
#define Triangulation_cell_base_3 T_cb
#define Triangulation_geom_traits_3 T_gt
#define Triangulation_data_structure_3 TDS
#define Triangulation_ds_vertex_3 TDS_v
@ -41,9 +39,6 @@
#define Triangulation_3 TR
#define Triangulation_vertex_handle_3 T_vh
#define Triangulation_cell_handle_3 T_ch
#define Triangulation_finite_iterator_3 T_Fit
#define Triangulation_finite_iterator2_3 T_Fit2