// Copyright (c) 2019 GeometryFactory // // This file is part of CGAL (www.cgal.org); // // $URL$ // $Id$ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno #ifndef CGAL_INTERNAL_IO_GENERIC_FACEGRAPH_BUILDER_H #define CGAL_INTERNAL_IO_GENERIC_FACEGRAPH_BUILDER_H #include #include #include #include #include namespace CGAL{ namespace internal { namespace IO{ template class Generic_facegraph_builder { protected: typedef P Point_3; typedef std::deque Points_3; typedef std::vector Facet; typedef std::deque Surface; public: std::string name, color; Generic_facegraph_builder(std::istream& is_) : is(is_), counter(0) {} void do_construct(){} //specific to Facegraph (declared in BGL) void read(std::istream&, Points_3&, Surface&) {} void operator()( Facegraph& graph) { static_cast(this)->read(this->is, this->meshPoints, this->mesh); static_cast(this)->do_construct(graph); } protected: std::istream& is; int counter; Points_3 meshPoints; Surface mesh; }; } //end IO }//end internal }//end CGAL #endif // CGAL_INTERNAL_IO_GENERIC_FACEGRAPH_BUILDER_H