// Copyright (c) 2005 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 3 of the License, // or (at your option) any later version. // // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // // $URL$ // $Id$ // SPDX-License-Identifier: LGPL-3.0+ // // // Author(s) : Laurent RINEAU #ifndef CGAL_MESHER_LEVEL_VISITORS_H #define CGAL_MESHER_LEVEL_VISITORS_H #include namespace CGAL { template class Null_mesh_visitor_level { Previous_level& previous; public: typedef Previous_level Previous_visitor; Null_mesh_visitor_level(Previous_level& p) : previous(p) { } Previous_level& previous_level() { return previous; } template void before_conflicts(E, P) const {} template void before_insertion(E, P, Z) const {} template void after_insertion(V) const {} template void after_no_insertion(E, P, Z) const {} }; // end class Null_mesh_visitor_level class Null_mesh_visitor { public: typedef Null_mesh_visitor Previous_visitor; const Null_mesh_visitor& previous_level() const { return *this; } template void before_conflicts(E, P) const {} template void before_insertion(E, P, Z) const {} template void after_insertion(V) const {} template void after_no_insertion(E, P, Z) const {} }; // end class Null_mesh_visitor template struct Combine_mesh_visitor { typedef Combine_mesh_visitor Previous_visitor; V1 v1; V2 v2; Combine_mesh_visitor(V1 v1_, V2 v2_) : v1(v1_), v2(v2_) { } Previous_visitor previous_level() { return Previous_visitor(v1.previous_level(), v2.previous_level()); } template void before_conflicts(E e, P p) { v1.before_conflicts(e, p); v2.before_conflicts(e, p); } template void before_insertion(E e, P p, Z z) { v1.before_insertion(e, p, z); v2.before_insertion(e, p, z); } template void after_insertion(V v) { v1.after_insertion(v); v2.after_insertion(v); } template void after_no_insertion(E e, P p, Z z) { v1.after_no_insertion(e, p, z); v2.after_no_insertion(e, p, z); } }; // end class Combine_mesh_visitor } // end namespace CGAL #include #endif // CGAL_MESHER_LEVEL_VISITORS_H