SFCGAL  2.3.0
Public Types | Public Member Functions | Public Attributes | List of all members
SFCGAL::detail::PrimitiveHandle< Dim > Struct Template Reference

Primitive handle. More...

#include <GeometrySet.h>

Public Types

using Type = boost::variant< const typename Point_d< Dim >::Type *, const typename Segment_d< Dim >::Type *, const typename Surface_d< Dim >::Type *, const typename Volume_d< Dim >::Type * >
 Variant type holding a pointer to one of the primitive types (Point, Segment, Surface, or Volume) More...
 

Public Member Functions

template<class T >
 PrimitiveHandle (const T *primitivePointer)
 Constructor from primitive pointer. More...
 
template<class T >
auto as () const -> const T *
 Cast handle to specific type. More...
 

Public Attributes

Type handle
 The stored primitive handle. More...
 

Detailed Description

template<int Dim>
struct SFCGAL::detail::PrimitiveHandle< Dim >

Primitive handle.

Holds a pointer to a primitive, through the 'handle' member

Member Typedef Documentation

template<int Dim>
using SFCGAL::detail::PrimitiveHandle< Dim >::Type = boost::variant<const typename Point_d<Dim>::Type *, const typename Segment_d<Dim>::Type *, const typename Surface_d<Dim>::Type *, const typename Volume_d<Dim>::Type *>

Variant type holding a pointer to one of the primitive types (Point, Segment, Surface, or Volume)

Constructor & Destructor Documentation

template<int Dim>
template<class T >
SFCGAL::detail::PrimitiveHandle< Dim >::PrimitiveHandle ( const T *  primitivePointer)
inline

Constructor from primitive pointer.

Parameters
primitivePointerPointer to the primitive to store

Member Function Documentation

template<int Dim>
template<class T >
auto SFCGAL::detail::PrimitiveHandle< Dim >::as ( ) const -> const T *
inline

Cast handle to specific type.

Returns
Pointer to primitive of specified type

Member Data Documentation

template<int Dim>
Type SFCGAL::detail::PrimitiveHandle< Dim >::handle

The stored primitive handle.