CGAL 5.0.2 - 2D Polygons
CGAL::General_polygon_with_holes_2< Polygon_ > Class Template Reference

#include <CGAL/General_polygon_with_holes_2.h>

## Definition

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.

Template Parameters
 Polygon_ must have input and output operators.
Is Model Of:
GeneralPolygonWithHoles_2

## 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

## ◆ operator>>()

template<class Polygon_ >
 std::istream & operator>> ( std::istream & is, General_polygon_with_holes_2< Polygon_ > & p )
related

This operator imports a General_polygon_with_holes_2 from the input stream in.

An ASCII and a binary format exist. The stream detects the format automatically and can read both.

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.