// Copyright (c) 1997 // Utrecht University (The Netherlands), // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), // Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL$ // $Id$ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Lutz Kettner #ifndef CGAL_IO_GENERIC_WRITER_H #define CGAL_IO_GENERIC_WRITER_H #include #include #include #include #include #include namespace CGAL { template class Generic_writer { public: Generic_writer(Stream& out) : m_out(out) { } Generic_writer(Stream& out, FileWriter writer) : m_out(out), m_writer(writer) { } template bool operator()(const PointRange_3& points, const PolygonRange_3& polygons) { typedef typename PointRange_3::value_type Point_3; typedef typename PolygonRange_3::value_type Polygon_3; if(m_out.fail()) return false; m_writer.write_header(m_out, points.size(), 0, polygons.size()); for(std::size_t i=0, end=points.size(); i