Boost.Geometry    Boost C++ Libraries
Public Types
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...

List of all members.

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

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

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen