Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
box.hpp File Reference

Macros

#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS(Box, Point, MinCorner, MaxCorner)
 
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_TEMPLATED(Box, MinCorner, MaxCorner)
 
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES(Box, Point, Left, Bottom, Right, Top)
 
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS(Box, PointType)
 
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS_TEMPLATED(Box)
 
#define BOOST_GEOMETRY_REGISTER_BOX(Box, Point, MinCorner, MaxCorner)
 {box} More...
 
#define BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED(Box, MinCorner, MaxCorner)
 {box} More...
 
#define BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES(Box, Point, Left, Bottom, Right, Top)
 {box} More...
 

Macro Definition Documentation

#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS (   Box,
  Point,
  MinCorner,
  MaxCorner 
)
Value:
template <size_t D> \
struct indexed_access<Box, min_corner, D> \
{ \
typedef typename coordinate_type<Point>::type ct; \
static inline ct get(Box const& b) \
{ return geometry::get<D>(b. MinCorner); } \
static inline void set(Box& b, ct const& value) \
{ geometry::set<D>(b. MinCorner, value); } \
}; \
template <size_t D> \
struct indexed_access<Box, max_corner, D> \
{ \
typedef typename coordinate_type<Point>::type ct; \
static inline ct get(Box const& b) \
{ return geometry::get<D>(b. MaxCorner); } \
static inline void set(Box& b, ct const& value) \
{ geometry::set<D>(b. MaxCorner, value); } \
};
detail::set_initializer_type const set
Used to create character sets.
Definition: regex_primitives.hpp:513
typed_value< T > * value()
Creates a typed_value instance.
basic_streambuf< Allocator > & b
Definition: read.hpp:555
adjacency_iterator typedef T::adjacency_iterator type
Definition: graph_traits.hpp:42
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES (   Box,
  Point,
  Left,
  Bottom,
  Right,
  Top 
)
Value:
template <> struct indexed_access<Box, min_corner, 0> \
{ \
static inline ct get(Box const& b) { return b. Left; } \
static inline void set(Box& b, ct const& value) { b. Left = value; } \
}; \
template <> struct indexed_access<Box, min_corner, 1> \
{ \
static inline ct get(Box const& b) { return b. Bottom; } \
static inline void set(Box& b, ct const& value) { b. Bottom = value; } \
}; \
template <> struct indexed_access<Box, max_corner, 0> \
{ \
static inline ct get(Box const& b) { return b. Right; } \
static inline void set(Box& b, ct const& value) { b. Right = value; } \
}; \
template <> struct indexed_access<Box, max_corner, 1> \
{ \
static inline ct get(Box const& b) { return b. Top; } \
static inline void set(Box& b, ct const& value) { b. Top = value; } \
};
int const max_corner
Index of maximum corner of the box.
Definition: access.hpp:37
detail::set_initializer_type const set
Used to create character sets.
Definition: regex_primitives.hpp:513
typed_value< T > * value()
Creates a typed_value instance.
int const min_corner
Index of minimum corner of the box.
Definition: access.hpp:34
basic_streambuf< Allocator > & b
Definition: read.hpp:555
adjacency_iterator typedef T::adjacency_iterator type
Definition: graph_traits.hpp:42
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_TEMPLATED (   Box,
  MinCorner,
  MaxCorner 
)
Value:
template <typename P, size_t D> \
struct indexed_access<Box<P>, min_corner, D> \
{ \
typedef typename coordinate_type<P>::type ct; \
static inline ct get(Box<P> const& b) \
{ return geometry::get<D>(b. MinCorner); } \
static inline void set(Box<P>& b, ct const& value) \
{ geometry::set<D>(b. MinCorner, value); } \
}; \
template <typename P, size_t D> \
struct indexed_access<Box<P>, max_corner, D> \
{ \
typedef typename coordinate_type<P>::type ct; \
static inline ct get(Box<P> const& b) \
{ return geometry::get<D>(b. MaxCorner); } \
static inline void set(Box<P>& b, ct const& value) \
{ geometry::set<D>(b. MaxCorner, value); } \
};
int const max_corner
Index of maximum corner of the box.
Definition: access.hpp:37
detail::set_initializer_type const set
Used to create character sets.
Definition: regex_primitives.hpp:513
typed_value< T > * value()
Creates a typed_value instance.
int const min_corner
Index of minimum corner of the box.
Definition: access.hpp:34
basic_streambuf< Allocator > & b
Definition: read.hpp:555
adjacency_iterator typedef T::adjacency_iterator type
Definition: graph_traits.hpp:42
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS (   Box,
  PointType 
)
Value:
template<> struct tag<Box > { typedef box_tag type; }; \
template<> struct point_type<Box > { typedef PointType type; };
boost_foreach_argument_dependent_lookup_hack tag
Definition: foreach_fwd.hpp:31
adjacency_iterator typedef T::adjacency_iterator type
Definition: graph_traits.hpp:42
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS_TEMPLATED (   Box)
Value:
template<typename P> struct tag<Box<P> > { typedef box_tag type; }; \
template<typename P> struct point_type<Box<P> > { typedef P type; };
boost_foreach_argument_dependent_lookup_hack tag
Definition: foreach_fwd.hpp:31
adjacency_iterator typedef T::adjacency_iterator type
Definition: graph_traits.hpp:42
#define BOOST_GEOMETRY_REGISTER_BOX (   Box,
  Point,
  MinCorner,
  MaxCorner 
)
Value:
namespace boost { namespace geometry { namespace traits { \
BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS(Box, Point, MinCorner, MaxCorner) \
}}}
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS(Box, Point, MinCorner, MaxCorner)
Definition: box.hpp:22
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS(Box, PointType)
Definition: box.hpp:93

{box}

{BOOST_GEOMETRY_REGISTER_BOX, box} The box may contain template parameters, which must be specified then.

Parameters
Box{Box}
PointPoint type on which box is based. Might be two or three-dimensional
MinCornerminimum corner (should be public member or method)
MaxCornermaximum corner (should be public member or method)

{ [heading Example] [register_box] [register_box_output] }

#define BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES (   Box,
  Point,
  Left,
  Bottom,
  Right,
  Top 
)
Value:
namespace boost { namespace geometry { namespace traits { \
BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES(Box, Point, Left, Bottom, Right, Top) \
}}}
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES(Box, Point, Left, Bottom, Right, Top)
Definition: box.hpp:64
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS(Box, PointType)
Definition: box.hpp:93

{box}

{BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES, box}

Parameters
Box{Box}
PointPoint type reported as point_type by box. Must be two dimensional. Note that these box tyeps do not contain points, but they must have a related point_type
LeftLeft side (must be public member or method)
BottomBottom side (must be public member or method)
RightRight side (must be public member or method)
TopTop side (must be public member or method)

{ [heading Example] [register_box_2d_4values] [register_box_2d_4values_output] }

#define BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED (   Box,
  MinCorner,
  MaxCorner 
)
Value:
namespace boost { namespace geometry { namespace traits { \
}}}
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_TEMPLATED(Box, MinCorner, MaxCorner)
Definition: box.hpp:43
#define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS_TEMPLATED(Box)
Definition: box.hpp:97

{box}

{BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED, box} {box, point}

Parameters
Box{Box}
MinCornerminimum corner (should be public member or method)
MaxCornermaximum corner (should be public member or method)

{ [heading Example] [register_box_templated] [register_box_templated_output] }