Boost.Geometry    Boost C++ Libraries
Defines
register: Macros for registration

Defines

#define BOOST_GEOMETRY_REGISTER_BOX(Box, Point, MinCorner, MaxCorner)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES(Box, Point, Left, Bottom, Right, Top)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED(Box, MinCorner, MaxCorner)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_LINESTRING(Linestring)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(Linestring)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING(MultiLineString)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING_TEMPLATED(MultiLineString)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_MULTI_POINT(MultiPoint)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(MultiPoint)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_MULTI_POLYGON(MultiPolygon)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_MULTI_POLYGON_TEMPLATED(MultiPolygon)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_POINT_2D(Point, CoordinateType, CoordinateSystem, Field0, Field1)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_POINT_2D_CONST(Point, CoordinateType, CoordinateSystem, Field0, Field1)
 Macro to register a \1 (const version)
#define BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(Point, CoordinateType, CoordinateSystem, Get0, Get1, Set0, Set1)
 Macro to register a \1 (having separate get/set methods)
#define BOOST_GEOMETRY_REGISTER_POINT_3D(Point, CoordinateType, CoordinateSystem, Field0, Field1, Field2)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_POINT_3D_CONST(Point, CoordinateType, CoordinateSystem, Field0, Field1, Field2)
 Macro to register a \1 (const version)
#define BOOST_GEOMETRY_REGISTER_POINT_3D_GET_SET(Point, CoordinateType, CoordinateSystem, Get0, Get1, Get2, Set0, Set1, Set2)
 Macro to register a \1 (having separate get/set methods)
#define BOOST_GEOMETRY_REGISTER_RING(Ring)
 Macro to register a \1.
#define BOOST_GEOMETRY_REGISTER_RING_TEMPLATED(Ring)
 Macro to register a \1.

Define Documentation

#define BOOST_GEOMETRY_REGISTER_BOX (   Box,
  Point,
  MinCorner,
  MaxCorner 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS(Box, Point) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS(Box, Point, MinCorner, MaxCorner) \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_BOX registers a box such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The box may contain template parameters, which must be specified then.

Parameters:
BoxBox type to be registered
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)
Examples:
c02_custom_box_example.cpp.
#define BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED (   Box,
  MinCorner,
  MaxCorner 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_TRAITS_TEMPLATED(Box) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_TEMPLATED(Box, MinCorner, MaxCorner) \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED registers a box such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The type must have one template parameter, which should be a point type, and should not be specified. Boost.Geometry takes care of inserting the template parameter. Hence all types of this templated box are registered, regardless of their point type.

Parameters:
BoxBox type to be registered
MinCornerminimum corner (should be public member or method)
MaxCornermaximum corner (should be public member or method)
Examples:
c02_custom_box_example.cpp.
#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_TRAITS(Box, Point) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES(Box, Point, Left, Bottom, Right, Top) \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES registers a box such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type.

Parameters:
BoxBox type to be registered
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)
Examples:
c02_custom_box_example.cpp.
#define BOOST_GEOMETRY_REGISTER_LINESTRING (   Linestring)
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<> struct tag<Linestring> { typedef linestring_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_LINESTRING registers a linestring such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The linestring may contain template parameters, which must be specified then.

Parameters:
Linestringlinestring type to be registered
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<typename P> struct tag< Linestring<P> > { typedef linestring_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED registers a templated linestring such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The type must have one template parameter, which should be a point type, and should not be specified. Boost.Geometry takes care of inserting the template parameter. Hence all types of this templated linestring are registered, regardless of their point type.

Parameters:
Linestringlinestring (without template parameters) type to be registered
Examples:
02_linestring_example.cpp, and c05_custom_point_pointer_example.cpp.
#define BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING (   MultiLineString)
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<> struct tag<MultiLineString> { typedef multi_linestring_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING registers a multi_linestring such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The multi_linestring may contain template parameters, which must be specified then.

Parameters:
MultiLineStringmulti_linestring type to be registered
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<typename LineString> struct tag< MultiLineString<LineString> > { typedef multi_linestring_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING_TEMPLATED registers a templated multi_linestring such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The type must have one template parameter, which should be a linestring type, and should not be specified. Boost.Geometry takes care of inserting the template parameter. Hence all types of this templated multi_linestring are registered, regardless of their point type.

Parameters:
MultiLineStringmulti_linestring (without template parameters) type to be registered
#define BOOST_GEOMETRY_REGISTER_MULTI_POINT (   MultiPoint)
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<> struct tag<MultiPoint> { typedef multi_point_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_MULTI_POINT registers a multi_point such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The multi_point may contain template parameters, which must be specified then.

Parameters:
MultiPointmulti_point type to be registered
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<typename Point> struct tag< MultiPoint<Point> > { typedef multi_point_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED registers a templated multi_point such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The type must have one template parameter, which should be a point type, and should not be specified. Boost.Geometry takes care of inserting the template parameter. Hence all types of this templated multi_point are registered, regardless of their point type.

Parameters:
MultiPointmulti_point (without template parameters) type to be registered
#define BOOST_GEOMETRY_REGISTER_MULTI_POLYGON (   MultiPolygon)
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<> struct tag<MultiPolygon> { typedef multi_polygon_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_MULTI_POLYGON registers a multi_polygon such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The multi_polygon may contain template parameters, which must be specified then.

Parameters:
MultiPolygonmulti_polygon type to be registered
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<typename Polygon> struct tag< MultiPolygon<Polygon> > { typedef multi_polygon_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_MULTI_POLYGON_TEMPLATED registers a templated multi_polygon such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The type must have one template parameter, which should be a polygon type, and should not be specified. Boost.Geometry takes care of inserting the template parameter. Hence all types of this templated multi_polygon are registered, regardless of their point type.

Parameters:
MultiPolygonmulti_polygon (without template parameters) type to be registered
#define BOOST_GEOMETRY_REGISTER_POINT_2D (   Point,
  CoordinateType,
  CoordinateSystem,
  Field0,
  Field1 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, 2, CoordinateType, CoordinateSystem) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, 0, CoordinateType, Field0, Field0) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, 1, CoordinateType, Field1, Field1) \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_POINT_2D registers a two-dimensional point type such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type.

Parameters:
PointPoint type to be registered
CoordinateTypeType of the coordinates of the point (e.g. double)
CoordinateSystemCoordinate system (e.g. cs::cartesian)
Field0Member containing first (usually x) coordinate
Field1Member containing second (usually y) coordinate
Examples:
c01_custom_point_example.cpp, c02_custom_box_example.cpp, and c06_custom_polygon_example.cpp.
#define BOOST_GEOMETRY_REGISTER_POINT_3D (   Point,
  CoordinateType,
  CoordinateSystem,
  Field0,
  Field1,
  Field2 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, 3, CoordinateType, CoordinateSystem) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, 0, CoordinateType, Field0, Field0) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, 1, CoordinateType, Field1, Field1) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, 2, CoordinateType, Field2, Field2) \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_POINT_3D registers a three-dimensional point type such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type.

Parameters:
PointPoint type to be registered
CoordinateTypeType of the coordinates of the point (e.g. double)
CoordinateSystemCoordinate system (e.g. cs::cartesian)
Field0Member containing first (usually x) coordinate
Field1Member containing second (usually y) coordinate
Field2Member containing third (usually z) coordinate
Examples:
c01_custom_point_example.cpp.
#define BOOST_GEOMETRY_REGISTER_POINT_2D_CONST (   Point,
  CoordinateType,
  CoordinateSystem,
  Field0,
  Field1 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, 2, CoordinateType, CoordinateSystem) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_CONST(Point, 0, CoordinateType, Field0) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_CONST(Point, 1, CoordinateType, Field1) \
}}}

Macro to register a \1 (const version)

The macro BOOST_GEOMETRY_REGISTER_POINT_2D_CONST registers a two-dimensional point type such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type.. The const version registers only read access to the fields, the point type is therefore read-only

Parameters:
PointPoint type to be registered
CoordinateTypeType of the coordinates of the point (e.g. double)
CoordinateSystemCoordinate system (e.g. cs::cartesian)
Field0Member containing first (usually x) coordinate
Field1Member containing second (usually y) coordinate
Examples:
c01_custom_point_example.cpp.
#define BOOST_GEOMETRY_REGISTER_POINT_3D_CONST (   Point,
  CoordinateType,
  CoordinateSystem,
  Field0,
  Field1,
  Field2 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, 3, CoordinateType, CoordinateSystem) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_CONST(Point, 0, CoordinateType, Field0) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_CONST(Point, 1, CoordinateType, Field1) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_CONST(Point, 2, CoordinateType, Field2) \
}}}

Macro to register a \1 (const version)

The macro BOOST_GEOMETRY_REGISTER_POINT_3D_CONST registers a three-dimensional point type such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type.. The const version registers only read access to the fields, the point type is therefore read-only

Parameters:
PointPoint type to be registered
CoordinateTypeType of the coordinates of the point (e.g. double)
CoordinateSystemCoordinate system (e.g. cs::cartesian)
Field0Member containing first (usually x) coordinate
Field1Member containing second (usually y) coordinate
Field2Member containing third (usually z) coordinate
#define BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET (   Point,
  CoordinateType,
  CoordinateSystem,
  Get0,
  Get1,
  Set0,
  Set1 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, 2, CoordinateType, CoordinateSystem) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_GET_SET(Point, 0, CoordinateType, Get0, Set0) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_GET_SET(Point, 1, CoordinateType, Get1, Set1) \
}}}

Macro to register a \1 (having separate get/set methods)

The macro BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET registers a two-dimensional point type such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type.. The get/set version registers get and set methods separately and can be used for classes with protected member variables and get/set methods to change coordinates

Parameters:
PointPoint type to be registered
CoordinateTypeType of the coordinates of the point (e.g. double)
CoordinateSystemCoordinate system (e.g. cs::cartesian)
Get0Method to get the first (usually x) coordinate
Get1Method to get the second (usually y) coordinate
Set0Method to set the first (usually x) coordinate
Set1Method to set the second (usually y) coordinate
Examples:
c01_custom_point_example.cpp, and x01_qt_example.cpp.
#define BOOST_GEOMETRY_REGISTER_POINT_3D_GET_SET (   Point,
  CoordinateType,
  CoordinateSystem,
  Get0,
  Get1,
  Get2,
  Set0,
  Set1,
  Set2 
)
Value:
namespace boost { namespace geometry { namespace traits {  \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, 3, CoordinateType, CoordinateSystem) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_GET_SET(Point, 0, CoordinateType, Get0, Set0) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_GET_SET(Point, 1, CoordinateType, Get1, Set1) \
    BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS_GET_SET(Point, 2, CoordinateType, Get2, Set2) \
}}}

Macro to register a \1 (having separate get/set methods)

The macro BOOST_GEOMETRY_REGISTER_POINT_3D_GET_SET registers a three-dimensional point type such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type.. The get/set version registers get and set methods separately and can be used for classes with protected member variables and get/set methods to change coordinates

Parameters:
PointPoint type to be registered
CoordinateTypeType of the coordinates of the point (e.g. double)
CoordinateSystemCoordinate system (e.g. cs::cartesian)
Get0Method to get the first (usually x) coordinate
Get1Method to get the second (usually y) coordinate
Get2Method to get the third (usually z) coordinate
Set0Method to set the first (usually x) coordinate
Set1Method to set the second (usually y) coordinate
Set2Method to set the third (usually z) coordinate
#define BOOST_GEOMETRY_REGISTER_RING (   Ring)
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<> struct tag<Ring> { typedef ring_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_RING registers a ring such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The ring may contain template parameters, which must be specified then.

Parameters:
Ringring type to be registered
Examples:
c04_a_custom_triangle_example.cpp, c06_custom_polygon_example.cpp, and x01_qt_example.cpp.
Value:
namespace boost { namespace geometry { namespace traits {  \
    template<typename P> struct tag< Ring<P> > { typedef ring_tag type; }; \
}}}

Macro to register a \1.

The macro BOOST_GEOMETRY_REGISTER_RING_TEMPLATED registers a templated ring such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type. The type must have one template parameter, which should be a point type, and should not be specified. Boost.Geometry takes care of inserting the template parameter. Hence all types of this templated ring are registered, regardless of their point type.

Parameters:
Ringring (without template parameters) type to be registered
Examples:
c04_b_custom_triangle_example.cpp.

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