cgal/Packages/Polygon/include/CGAL/IO/polygon_Window_stream.h

57 lines
1.5 KiB
C++

// ============================================================================
//
// 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-0.9-I-06 $
// release_date : $CGAL_Date: 1998/03/11 $
//
// file : include/CGAL/IO/polygon_Window_stream.h
// source :
// revision : 1.8a
// revision_date : 13 Mar 1998
// author(s) : Wieger Wesselink <wieger@cs.ruu.nl>
//
// coordinator : Utrecht University
// ============================================================================
// Window_stream I/O operators
// ===========================
// Polygon_2
// ---------
#ifdef CGAL_POLYGON_2_H
#ifndef CGAL_WINDOW_STREAM_POLYGON_2_H
#define CGAL_WINDOW_STREAM_POLYGON_2_H
CGAL_BEGIN_NAMESPACE
template <class Traits, class Container>
Window_stream&
operator<<(Window_stream& ws,
const Polygon_2<Traits,Container> &polygon)
{
typedef typename Polygon_2<Traits,Container>::Edge_const_circulator EI;
EI e = polygon.edges_circulator();
if (e != NULL) {
EI end = e;
do {
ws << *e;
ws << (*e).source();
++e;
} while (e != end);
}
return ws;
}
CGAL_END_NAMESPACE
#endif // CGAL_WINDOW_STREAM_POLYGON_2_H
#endif // CGAL_POLYGON_2_H