SFCGAL 2.3.0
SFCGAL::detail::PrimitiveHandle< Dim > Struct Template Reference

Primitive handle. More...

#include <GeometrySet.h>

Public Types

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

Public Member Functions

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

Public Attributes

Type handle
 The stored primitive handle.

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

◆ Type

template<int Dim>
using SFCGAL::detail::PrimitiveHandle< Dim >::Type
Initial value:
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 *>
typename TypeForDimension< Dim >::Segment Type
Segment type for given dimension.
Definition TypeForDimension.h:93
typename TypeForDimension< Dim >::Surface Type
Surface type for given dimension.
Definition TypeForDimension.h:99
typename TypeForDimension< Dim >::Volume Type
Volume type for given dimension.
Definition TypeForDimension.h:105

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

Constructor & Destructor Documentation

◆ PrimitiveHandle()

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

◆ as()

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

Cast handle to specific type.

Returns
Pointer to primitive of specified type

Member Data Documentation

◆ handle

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

The stored primitive handle.