1 // Boost.Geometry (aka GGL, Generic Geometry Library) 2 3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. 4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. 5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. 6 7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library 8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. 9 10 // Use, modification and distribution is subject to the Boost Software License, 11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 12 // http://www.boost.org/LICENSE_1_0.txt) 13 14 15 #ifndef BOOST_GEOMETRY_CORE_IS_AREAL_HPP 16 #define BOOST_GEOMETRY_CORE_IS_AREAL_HPP 17 18 19 #include <boost/type_traits/integral_constant.hpp> 20 21 #include <boost/geometry/core/tag.hpp> 22 #include <boost/geometry/core/tags.hpp> 23 24 25 namespace boost { namespace geometry 26 { 27 28 29 #ifndef DOXYGEN_NO_DISPATCH 30 namespace core_dispatch 31 { 32 33 template <typename GeometryTag> struct is_areal : boost::false_type {}; 34 35 template <> struct is_areal<ring_tag> : boost::true_type {}; 36 template <> struct is_areal<box_tag> : boost::true_type {}; 37 template <> struct is_areal<polygon_tag> : boost::true_type {}; 38 template <> struct is_areal<multi_polygon_tag> : boost::true_type {}; 39 40 } // namespace core_dispatch 41 #endif 42 43 44 45 /*! 46 \brief Meta-function defining "true" for areal types (box, (multi)polygon, ring), 47 \note Used for tag dispatching and meta-function finetuning 48 \note Also a "ring" has areal properties within Boost.Geometry 49 \ingroup core 50 */ 51 template <typename Geometry> 52 struct is_areal : core_dispatch::is_areal<typename tag<Geometry>::type> 53 {}; 54 55 56 }} // namespace boost::geometry 57 58 59 #endif // BOOST_GEOMETRY_CORE_IS_AREAL_HPP 60