SFCGAL 2.3.0
SFCGAL::detail::CollectionElement< Primitive > Class Template Reference

CollectionElement, a Primitive with flags Primitive : Point_d, Segment_d, Surface_d, Volume_d. More...

#include <GeometrySet.h>

Public Member Functions

auto flags () const -> int
 Get element flags.
auto setFlags (int flags) -> void
 Set element flags.
auto primitive () -> Primitive &
 Get mutable reference to primitive.
auto primitive () const -> const Primitive &
 Get const reference to primitive.
 CollectionElement ()
 Default constructor.
 CollectionElement (const Primitive &primitive)
 Constructor from primitive.
 CollectionElement (const Primitive &primitive, int flags)
 Constructor from primitive with flags.
 CollectionElement (const CollectionElement &other)
 Copy constructor.
auto operator= (const CollectionElement &other) -> CollectionElement &=default
 Copy assignment operator.
auto operator< (const CollectionElement &other) const -> bool
 Less-than comparison operator.

Detailed Description

template<class Primitive>
class SFCGAL::detail::CollectionElement< Primitive >

CollectionElement, a Primitive with flags Primitive : Point_d, Segment_d, Surface_d, Volume_d.

Constructor & Destructor Documentation

◆ CollectionElement() [1/4]

template<class Primitive>
SFCGAL::detail::CollectionElement< Primitive >::CollectionElement ( )
inline

Default constructor.

◆ CollectionElement() [2/4]

template<class Primitive>
SFCGAL::detail::CollectionElement< Primitive >::CollectionElement ( const Primitive & primitive)
inline

Constructor from primitive.

Parameters
primitiveThe primitive to wrap

◆ CollectionElement() [3/4]

template<class Primitive>
SFCGAL::detail::CollectionElement< Primitive >::CollectionElement ( const Primitive & primitive,
int flags )
inline

Constructor from primitive with flags.

Parameters
primitiveThe primitive to wrap
flagsThe initial flags

◆ CollectionElement() [4/4]

template<class Primitive>
SFCGAL::detail::CollectionElement< Primitive >::CollectionElement ( const CollectionElement< Primitive > & other)
inline

Copy constructor.

Parameters
otherThe element to copy from

Member Function Documentation

◆ flags()

template<class Primitive>
auto SFCGAL::detail::CollectionElement< Primitive >::flags ( ) const -> int
inlinenodiscard

Get element flags.

Returns
The flags associated with this element

◆ operator<()

template<class Primitive>
auto SFCGAL::detail::CollectionElement< Primitive >::operator< ( const CollectionElement< Primitive > & other) const -> bool
inline

Less-than comparison operator.

Parameters
otherThe element to compare with
Returns
True if this element is less than other

◆ operator=()

template<class Primitive>
auto SFCGAL::detail::CollectionElement< Primitive >::operator= ( const CollectionElement< Primitive > & other) -> CollectionElement &=default
default

Copy assignment operator.

Parameters
otherThe element to copy from
Returns
Reference to this

◆ primitive() [1/2]

template<class Primitive>
auto SFCGAL::detail::CollectionElement< Primitive >::primitive ( ) -> Primitive &
inlinenodiscard

Get mutable reference to primitive.

Returns
Reference to the underlying primitive

◆ primitive() [2/2]

template<class Primitive>
auto SFCGAL::detail::CollectionElement< Primitive >::primitive ( ) const -> const Primitive &
inlinenodiscard

Get const reference to primitive.

Returns
Const reference to the underlying primitive

◆ setFlags()

template<class Primitive>
auto SFCGAL::detail::CollectionElement< Primitive >::setFlags ( int flags) -> void
inline

Set element flags.

Parameters
flagsThe flags to set for this element