]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/doc/src/examples/core/point_type.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / doc / src / examples / core / point_type.cpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2// QuickBook Example
3
4// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
5
6// Use, modification and distribution is subject to the Boost Software License,
7// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt)
9
10//[point_type
11//` Examine the point type of a multi_polygon
12
13#include <iostream>
14#include <typeinfo>
15
16#include <boost/geometry.hpp>
17#include <boost/geometry/geometries/polygon.hpp>
18#include <boost/geometry/geometries/point_xy.hpp>
19#include <boost/geometry/geometries/multi_polygon.hpp>
20
21int main()
22{
23 typedef boost::geometry::model::d2::point_xy<double> point_type;
24 typedef boost::geometry::model::polygon<point_type> polygon_type;
25 typedef boost::geometry::model::multi_polygon<polygon_type> mp_type;
26
27 typedef boost::geometry::point_type<mp_type>::type ptype;
28
29 std::cout << "point type: " << typeid(ptype).name() << std::endl;
30
31 return 0;
32}
33
34//]
35
36
37//[point_type_output
38/*`
39Output (in MSVC):
40[pre
41point type: class boost::geometry::model::d2::point_xy<double,struct boost::geometry::cs::cartesian>
42]
43*/
44//]