Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::geometry::tag_cast< Tag, BaseTag, BaseTag2, BaseTag3, BaseTag4, BaseTag5, BaseTag6, BaseTag7 > Struct Template Reference

Metafunction defining a type being either the specified tag, or one of the specified basetags if the type inherits from them. More...

#include <tag_cast.hpp>

Public Types

typedef boost::mpl::if_
< typename boost::is_base_of
< BaseTag, Tag >::type,
BaseTag, typename tag_cast
< Tag, BaseTag2, BaseTag3,
BaseTag4, BaseTag5, BaseTag6,
BaseTag7, void >::type >::type 
type
 

Detailed Description

template<typename Tag, typename BaseTag, typename BaseTag2 = void, typename BaseTag3 = void, typename BaseTag4 = void, typename BaseTag5 = void, typename BaseTag6 = void, typename BaseTag7 = void>
struct boost::geometry::tag_cast< Tag, BaseTag, BaseTag2, BaseTag3, BaseTag4, BaseTag5, BaseTag6, BaseTag7 >

Metafunction defining a type being either the specified tag, or one of the specified basetags if the type inherits from them.

Tags can inherit each other. A multi_point inherits, for example, both the multi_tag and the pointlike_tag. Often behaviour can be shared between different geometry types. A tag, found by the metafunction tag, can be casted to a more basic tag, and then dispatched by that tag.

Template Parameters
TagThe tag to be casted to one of the base tags
BaseTagFirst base tag
BaseTag2Optional second base tag
BaseTag3Optional third base tag
BaseTag4Optional fourth base tag
BaseTag5Optional fifth base tag
BaseTag6Optional sixth base tag
BaseTag7Optional seventh base tag

{[include reference/core/tag_cast.qbk]}

Member Typedef Documentation

template<typename Tag , typename BaseTag , typename BaseTag2 = void, typename BaseTag3 = void, typename BaseTag4 = void, typename BaseTag5 = void, typename BaseTag6 = void, typename BaseTag7 = void>
typedef boost::mpl::if_< typename boost::is_base_of<BaseTag, Tag>::type, BaseTag, typename tag_cast < Tag, BaseTag2, BaseTag3, BaseTag4, BaseTag5, BaseTag6, BaseTag7, void >::type >::type boost::geometry::tag_cast< Tag, BaseTag, BaseTag2, BaseTag3, BaseTag4, BaseTag5, BaseTag6, BaseTag7 >::type

The documentation for this struct was generated from the following file: