// Copyright (c) 1999,2000,2001,2002,2003 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL: https://github.com/CGAL/cgal/blob/v5.2/TDS_3/include/CGAL/Triangulation_ds_vertex_base_3.h $ // $Id: Triangulation_ds_vertex_base_3.h d1a323c 2020-03-26T19:24:14+01:00 Sébastien Loriot // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud #ifndef CGAL_TRIANGULATION_DS_VERTEX_BASE_3_H #define CGAL_TRIANGULATION_DS_VERTEX_BASE_3_H #include #include #include namespace CGAL { template < typename TDS = void > class Triangulation_ds_vertex_base_3 { public: typedef TDS Triangulation_data_structure; typedef typename TDS::Vertex_handle Vertex_handle; typedef typename TDS::Cell_handle Cell_handle; template struct Rebind_TDS { typedef Triangulation_ds_vertex_base_3 Other; }; Triangulation_ds_vertex_base_3() : _c(), visited_for_vertex_extractor(false) {} Triangulation_ds_vertex_base_3(Cell_handle c) : _c(c), visited_for_vertex_extractor(false) {} Cell_handle cell() const { return _c; } void set_cell(Cell_handle c) { _c = c; } // the following trivial is_valid allows // the user of derived cell base classes // to add their own purpose checking bool is_valid(bool = false, int = 0) const { return cell() != Cell_handle(); } // For use by the Compact_container. void * for_compact_container() const { return _c.for_compact_container(); } void for_compact_container(void* p) { _c.for_compact_container(p); } private: Cell_handle _c; // The typedef and the bool are used by Triangulation_data_structure::Vertex_extractor // The names are chooses complicated so that we do not have to document them // (privacy by obfuscation) public: typedef bool Has_visited_for_vertex_extractor; bool visited_for_vertex_extractor; }; template < class TDS > inline std::istream& operator>>(std::istream &is, Triangulation_ds_vertex_base_3 &) // no combinatorial information. { return is; } template < class TDS > inline std::ostream& operator<<(std::ostream &os, const Triangulation_ds_vertex_base_3 &) // no combinatorial information. { return os; } // Specialization for void. template <> class Triangulation_ds_vertex_base_3 { public: typedef internal::Dummy_tds_3 Triangulation_data_structure; typedef Triangulation_data_structure::Vertex_handle Vertex_handle; typedef Triangulation_data_structure::Cell_handle Cell_handle; template struct Rebind_TDS { typedef Triangulation_ds_vertex_base_3 Other; }; }; } //namespace CGAL #endif // CGAL_TRIANGULATION_DS_VERTEX_BASE_3_H