| Home | Libraries | People | FAQ | More

#### interior_type

Metafunction defining type as the interior_type (container type of inner rings) of the specified geometry type.

###### Description

Interior rings should be organized as a container (std::vector, std::deque, boost::array) with Boost.Range support. This metafunction defines the type of the container.

###### Synopsis

    template<typename Geometry>
    struct interior_type
    {
      // ...
    };

###### Template parameter(s)

Parameter | Description
--- | ---
typename Geometry | A type fullfilling the Polygon or MultiPolygon concept.

###### Header

`#include <boost/geometry/core/interior_type.hpp>`

###### Complexity

Compile time

###### Example

Shows how to use the interior_type metafunction

    #include <iostream>
    #include <typeinfo>

    #include <boost/geometry.hpp>
    #include <boost/geometry/geometries/polygon.hpp>
    #include <boost/geometry/geometries/ring.hpp>
    #include <boost/geometry/geometries/adapted/boost_array.hpp>

    BOOST_GEOMETRY_REGISTER_BOOST_ARRAY_CS(cs::cartesian)

    int main()
    {
        // Define a polygon storing points in a deque and storing interior rings
        // in a list (note that std::list is not supported by most algorithms
        // because not supporting a random access iterator)
        typedef boost::geometry::model::polygon
            <
                boost::array<short, 3>,
                true, true,
                std::deque, std::list
            > polygon;

        std::cout << typeid(boost::geometry::interior_type<polygon>::type).name() << std::endl;

        return 0;
    }

Output (using MSVC) is a long story (part manually replaced with ellipsis):

    class std::list<class boost::geometry::model::ring<class boost::array<short,3>,1,1,class std::deque,class std::allocator>,class std::allocator<...> > >