]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/core/interior_type.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
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)
11 //`Shows how to use the interior_type metafunction
16 #include <boost/geometry.hpp>
17 #include <boost/geometry/geometries/polygon.hpp>
18 #include <boost/geometry/geometries/ring.hpp>
19 #include <boost/geometry/geometries/adapted/boost_array.hpp>
21 BOOST_GEOMETRY_REGISTER_BOOST_ARRAY_CS(cs::cartesian
)
25 // Define a polygon storing points in a deque and storing interior rings
26 // in a list (note that std::list is not supported by most algorithms
27 // because not supporting a random access iterator)
28 typedef boost::geometry::model::polygon
30 boost::array
<short, 3>,
35 std::cout
<< typeid(boost::geometry::interior_type
<polygon
>::type
).name() << std::endl
;
42 //[interior_type_output
44 Output (using MSVC) is a long story (part manually replaced with ellipsis):
46 class std::list<class boost::geometry::model::ring<class boost::array<short,3>,1,1,class std::deque,class std::allocator>,class std::allocator<...> > >