1 // Boost.Geometry (aka GGL, Generic Geometry Library)
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.
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
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)
14 #ifndef BOOST_GEOMETRY_CORE_TAG_HPP
15 #define BOOST_GEOMETRY_CORE_TAG_HPP
18 #include <boost/geometry/core/tags.hpp>
19 #include <boost/geometry/util/bare_type.hpp>
22 namespace boost { namespace geometry
29 \brief Traits class to attach a tag to a geometry
30 \details All geometries should implement a traits::tag<G>::type metafunction to indicate their
35 \par Specializations should provide:
36 - typedef XXX_tag type; (point_tag, box_tag, ...)
37 \tparam Geometry geometry
39 template <typename Geometry, typename Enable = void>
50 \brief \brief_meta{type, tag, \meta_geometry_type}
51 \details With Boost.Geometry, tags are the driving force of the tag dispatching
52 mechanism. The tag metafunction is therefore used in every free function.
53 \tparam Geometry \tparam_geometry
56 \qbk{[include reference/core/tag.qbk]}
58 template <typename Geometry>
61 typedef typename traits::tag
63 typename geometry::util::bare_type<Geometry>::type
67 }} // namespace boost::geometry
69 #endif // BOOST_GEOMETRY_CORE_TAG_HPP