From 92bc2eeb2c02443199028d14939299224ffcc7d1 Mon Sep 17 00:00:00 2001 From: Ester Ezra Date: Sun, 29 Apr 2001 14:46:34 +0000 Subject: [PATCH] . --- .../include/CGAL/IO/Pm_Geomview_stream.h | 83 +++++++++++++++++ .../CGAL/IO/Pm_Postscript_file_stream.h | 92 +++++++++++++++++++ .../include/CGAL/IO/Pm_Window_stream.h | 76 +++++++++++++++ .../Planar_map/include/CGAL/IO/Pm_iostream.h | 88 ++++++++++++++++++ 4 files changed, 339 insertions(+) create mode 100644 Packages/Planar_map/include/CGAL/IO/Pm_Geomview_stream.h create mode 100644 Packages/Planar_map/include/CGAL/IO/Pm_Postscript_file_stream.h create mode 100644 Packages/Planar_map/include/CGAL/IO/Pm_Window_stream.h create mode 100644 Packages/Planar_map/include/CGAL/IO/Pm_iostream.h diff --git a/Packages/Planar_map/include/CGAL/IO/Pm_Geomview_stream.h b/Packages/Planar_map/include/CGAL/IO/Pm_Geomview_stream.h new file mode 100644 index 00000000000..2ace7eeea1e --- /dev/null +++ b/Packages/Planar_map/include/CGAL/IO/Pm_Geomview_stream.h @@ -0,0 +1,83 @@ +// ====================================================================== +// +// Copyright (c) 1997 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------- +// +// release : $CGAL_Revision: CGAL-2.3-I-44 $ +// release_date : $CGAL_Date: 2001/03/09 $ +// +// file : include/CGAL/IO/Pm_Geomview_stream.h +// package : pm (5.45) +// maintainer : Eyal Flato +// source : +// revision : +// revision_date : +// author(s) : Eti Ezra +// +// +// coordinator : Tel-Aviv University (Dan Halperin ) +// +// Chapter : +// ====================================================================== + + +#ifndef CGAL_IO_PM_GEOMVIEW_STREAM_H +#define CGAL_IO_PM_GEOMVIEW_STREAM_H + +#ifndef CGAL_PLANAR_MAP_2_H +#include +#endif + +/* +#ifndef CGAL_IO_PM_BOUNDING_BOX_BASE_WINDOW_STREAM_H +#include +#endif +*/ + +#ifndef CGAL_IO_PM_DRAWER_H +#include +#endif + +#ifndef CGAL_IO_DRAW_PM_H +#include +#endif + +CGAL_BEGIN_NAMESPACE + +template +Geomview_stream& operator << (Geomview_stream& os, const Planar_map_2 &pm) +{ + Pm_drawer< Planar_map_2, Geomview_stream> drawer(os); + + draw_pm(pm, drawer, os); + + return os; +} + + +/*template + Window_stream& write(Window_stream& os, Planar_map_2 &m) + { + // os << *m.get_bounding_box(); + Halfedge_iterator it = m.halfedges_begin(), end = m.halfedges_end(); + const Traits& traits=m.get_traits(); + while(it != end){ + write(os,it->curve(),traits); + ++it;++it; + } + return os; + } */ + + +CGAL_END_NAMESPACE + +#endif + + + + diff --git a/Packages/Planar_map/include/CGAL/IO/Pm_Postscript_file_stream.h b/Packages/Planar_map/include/CGAL/IO/Pm_Postscript_file_stream.h new file mode 100644 index 00000000000..70f3a692134 --- /dev/null +++ b/Packages/Planar_map/include/CGAL/IO/Pm_Postscript_file_stream.h @@ -0,0 +1,92 @@ +// ====================================================================== +// +// Copyright (c) 1997 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------- +// +// release : $CGAL_Revision: CGAL-2.3-I-44 $ +// release_date : $CGAL_Date: 2001/03/09 $ +// +// file : include/CGAL/IO/Pm_Postscript_file_stream.h +// package : pm (5.45) +// maintainer : Eyal Flato +// source : +// revision : +// revision_date : +// author(s) : Eti Ezra +// +// +// coordinator : Tel-Aviv University (Dan Halperin ) +// +// Chapter : +// ====================================================================== + +#ifndef CGAL_IO_PM_POSTSCRIPT_FILE_STREAM_H +#define CGAL_IO_PM_POSTSCRIPT_FILE_STREAM_H + +#ifndef CGAL_LEDA_WINDOW_H +#include +#endif + +#ifndef CGAL_POSTSCRIPT_FILE_STREAM_H +#include +#endif + +#ifndef CGAL_PLANAR_MAP_2_H +#include +#endif + +/* #ifndef CGAL_IO_PM_BOUNDING_BOX_BASE_WINDOW_STREAM_H + #include + #endif +*/ + +#ifndef CGAL_IO_PM_DRAWER_H +#include +#endif + +#ifndef CGAL_IO_DRAW_PM_H +#include +#endif + +CGAL_BEGIN_NAMESPACE + +template +Postscript_file_stream& operator << (Postscript_file_stream & ps, Planar_map_2 &pm) +{ + Pm_drawer< Planar_map_2 , Postscript_file_stream> drawer(ps); + + draw_pm(pm, drawer, ps); + + return ps; +} + + +/*template + Window_stream& write(Window_stream& os, Planar_map_2 &m) + { + // os << *m.get_bounding_box(); + Halfedge_iterator it = m.halfedges_begin(), end = m.halfedges_end(); + const Traits& traits=m.get_traits(); + while(it != end){ + write(os,it->curve(),traits); + ++it;++it; + } + return os; + } */ + + +CGAL_END_NAMESPACE + +#endif + + + + + + + diff --git a/Packages/Planar_map/include/CGAL/IO/Pm_Window_stream.h b/Packages/Planar_map/include/CGAL/IO/Pm_Window_stream.h new file mode 100644 index 00000000000..5350c65f5ed --- /dev/null +++ b/Packages/Planar_map/include/CGAL/IO/Pm_Window_stream.h @@ -0,0 +1,76 @@ +// ====================================================================== +// +// Copyright (c) 1997 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------- +// +// release : $CGAL_Revision: CGAL-2.3-I-44 $ +// release_date : $CGAL_Date: 2001/03/09 $ +// +// file : include/CGAL/IO/Pm_Window_stream.h +// package : pm (5.45) +// maintainer : Eyal Flato +// source : +// revision : +// revision_date : +// author(s) : Eti Ezra +// +// +// coordinator : Tel-Aviv University (Dan Halperin ) +// +// Chapter : +// ====================================================================== + +#ifndef CGAL_IO_PM_WINDOW_STREAM_H +#define CGAL_IO_PM_WINDOW_STREAM_H + +#ifndef CGAL_PLANAR_MAP_2_H +#include +#endif + +#ifndef CGAL_IO_PM_DRAWER_H +#include +#endif + +#ifndef CGAL_IO_DRAW_PM_H +#include +#endif + +CGAL_BEGIN_NAMESPACE + +template +Window_stream& operator << (Window_stream& os, const Planar_map_2 &pm) +{ + Pm_drawer< Planar_map_2, Window_stream> drawer(os); + + draw_pm(pm, drawer, os); + + return os; +} + + +/*template + Window_stream& write(Window_stream& os, Planar_map_2 &m) + { + // os << *m.get_bounding_box(); + Halfedge_iterator it = m.halfedges_begin(), end = m.halfedges_end(); + const Traits& traits=m.get_traits(); + while(it != end){ + write(os,it->curve(),traits); + ++it;++it; + } + return os; + } */ + + +CGAL_END_NAMESPACE + +#endif + + + + diff --git a/Packages/Planar_map/include/CGAL/IO/Pm_iostream.h b/Packages/Planar_map/include/CGAL/IO/Pm_iostream.h new file mode 100644 index 00000000000..038b4113ca2 --- /dev/null +++ b/Packages/Planar_map/include/CGAL/IO/Pm_iostream.h @@ -0,0 +1,88 @@ +// ====================================================================== +// +// Copyright (c) 1997 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------- +// +// release : $CGAL_Revision: CGAL-2.3-I-44 $ +// release_date : $CGAL_Date: 2001/03/09 $ +// +// file : include/CGAL/IO/Pm_iostream.h +// package : pm (5.45) +// maintainer : Eyal Flato +// source : +// revision : +// revision_date : +// author(s) : Eti Ezra +// +// +// coordinator : Tel-Aviv University (Dan Halperin ) +// +// Chapter : +// ====================================================================== + +#ifndef CGAL_PM_IOSTREAM_H +#define CGAL_PM_IOSTREAM_H + +#ifndef CGAL_BASIC_H +#include +#endif + +#ifndef CGAL_PLANAR_MAP_2_H +#include +#endif + +//#ifndef CGAL_INVERSE_INDEX_H +//#include +//#endif + +#ifndef CGAL_IO_PM_FILE_WRITER_H +#include +#endif // CGAL_IO_PM_FILE_WRITER_H + +#ifndef CGAL_IO_WRITE_PM_H +#include +#endif // CGAL_IO_WRITE_PM_H + +#include + +CGAL_BEGIN_NAMESPACE + +template inline +::std::ostream& operator << (::std::ostream& o, const Planar_map_2& pm) +{ + + Pm_file_writer< Planar_map_2 > writer(o, pm); + + write_pm(pm, writer, o); + + return o; +} + +template inline +::std::istream& operator >> ( std::istream& in, Planar_map_2& pm) { + + pm.read(std::cin); + + return in; +} + +CGAL_END_NAMESPACE + + +#endif + + + + + + + + + + +