mirror of https://github.com/CGAL/cgal
Get rid of File_writer_OFF_impl (merge into header)
This commit is contained in:
parent
944df2c1ae
commit
7a4839e0e9
|
|
@ -15,10 +15,11 @@
|
|||
// Author(s) : Lutz Kettner <kettner@mpi-sb.mpg.de>
|
||||
|
||||
#ifndef CGAL_IO_OFF_FILE_WRITER_OFF_H
|
||||
#define CGAL_IO_OFF_FILE_WRITER_OFF_H 1
|
||||
#define CGAL_IO_OFF_FILE_WRITER_OFF_H
|
||||
|
||||
#include <CGAL/IO/binary_file_io.h>
|
||||
#include <CGAL/IO/OFF/File_header_OFF.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <cstddef>
|
||||
|
||||
|
|
@ -35,11 +36,22 @@ public:
|
|||
File_header_OFF& header() { return m_header; }
|
||||
const File_header_OFF& header() const { return m_header; }
|
||||
|
||||
void write_header( std::ostream& out,
|
||||
void write_header(std::ostream& out,
|
||||
std::size_t vertices,
|
||||
std::size_t halfedges,
|
||||
std::size_t /*halfedges*/,
|
||||
std::size_t facets,
|
||||
bool normals = false);
|
||||
bool normals = false)
|
||||
{
|
||||
m_out = &o;
|
||||
|
||||
m_header.set_vertices(vertices);
|
||||
m_header.set_facets(facets);
|
||||
m_header.set_normals(normals);
|
||||
|
||||
// Print header.
|
||||
out() << m_header;
|
||||
}
|
||||
|
||||
void write_footer() {
|
||||
if ( m_header.ascii() && m_header.comments())
|
||||
out() << "\n\n# End of OFF #";
|
||||
|
|
@ -97,9 +109,4 @@ public:
|
|||
|
||||
} //namespace CGAL
|
||||
|
||||
#ifdef CGAL_HEADER_ONLY
|
||||
#include <CGAL/IO/OFF/File_writer_OFF_impl.h>
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
||||
#endif // CGAL_IO_OFF_FILE_WRITER_OFF_H //
|
||||
// EOF //
|
||||
#endif // CGAL_IO_OFF_FILE_WRITER_OFF_H
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
// 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 <kettner@mpi-sb.mpg.de>
|
||||
|
||||
#ifdef CGAL_HEADER_ONLY
|
||||
#define CGAL_INLINE_FUNCTION inline
|
||||
#else
|
||||
#define CGAL_INLINE_FUNCTION
|
||||
#endif
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <iostream>
|
||||
#include <CGAL/IO/OFF/File_writer_OFF.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
CGAL_INLINE_FUNCTION
|
||||
void
|
||||
File_writer_OFF::
|
||||
write_header( std::ostream& o,
|
||||
std::size_t vertices,
|
||||
std::size_t halfedges,
|
||||
std::size_t facets,
|
||||
bool normals) {
|
||||
m_out = &o;
|
||||
m_header.set_vertices( vertices);
|
||||
// Don't. This halfdges aren't trusted:
|
||||
// m_header.set_halfedges( halfedges);
|
||||
(void)halfedges;
|
||||
m_header.set_facets( facets);
|
||||
m_header.set_normals( normals);
|
||||
// Print header.
|
||||
out() << m_header;
|
||||
}
|
||||
} //namespace CGAL
|
||||
// EOF //
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
// 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 <kettner@mpi-sb.mpg.de>
|
||||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/IO/OFF/File_writer_OFF.h>
|
||||
#include <CGAL/IO/OFF/File_writer_OFF_impl.h>
|
||||
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
||||
// EOF //
|
||||
Loading…
Reference in New Issue