CGAL 5.4.4  2D Polygons

#include <CGAL/General_polygon_with_holes_2.h>
The class General_polygon_with_holes_2
models the concept GeneralPolygonWithHoles_2
.
It represents a general polygon with holes. It is parameterized with a type Polygon
used to define the exposed type General_polygon_2
. This type represents the outer boundary of the general polygon and the outer boundaries of each hole.
Polygon_  must have input and output operators. 
Related Functions  
(Note that these are not member functions.)  
template<class Polygon_ >  
std::ostream &  operator<< (std::ostream &os, const General_polygon_with_holes_2< Polygon_ > &p) 
This operator exports a General_polygon_with_holes_2 to the output stream out . More...  
template<class Polygon_ >  
std::istream &  operator>> (std::istream &is, General_polygon_with_holes_2< Polygon_ > &p) 
This operator imports a General_polygon_with_holes_2 from the input stream in . More...  
Definition  
typedef Polygon_  General_polygon_2 
polygon without hole type  

related 
This operator exports a General_polygon_with_holes_2 to the output stream out
.
An ASCII and a binary format exist. The format can be selected with the CGAL modifiers for streams, set_ascii_mode(0
and set_binary_mode()
respectively. The modifier set_pretty_mode()
can be used to allow for (a few) structuring comments in the output. Otherwise, the output would be free of comments. The default for writing is ASCII without comments.
The number of curves of the outer boundary is exported followed by the curves themselves. Then, the number of holes is exported, and for each hole, the number of curves on its outer boundary is exported followed by the curves themselves.

related 
This operator imports a General_polygon_with_holes_2 from the input stream in
.
Both ASCII and binary formats are supported, and the format is automatically detected.
The format consists of the number of curves of the outer boundary followed by the curves themselves, followed by the number of holes, and for each hole, the number of curves on its outer boundary is followed by the curves themselves.