DGtal  1.4.beta
DGtal::IntegerConverter< dim, TInteger > Struct Template Reference

----------— INTEGER/POINT CONVERSION SERVICES -----------------— More...

#include <DGtal/kernel/IntegerConverter.h>

Public Types

typedef TInteger Integer

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInteger >))

Static Public Member Functions

static Integer cast (Integer i)
static PointVector< dim, Integercast (PointVector< dim, Integer > p)

Detailed Description

template<DGtal::Dimension dim, typename TInteger>
struct DGtal::IntegerConverter< dim, TInteger >

----------— INTEGER/POINT CONVERSION SERVICES -----------------—

Allows seamless conversion of integral types and lattice points, while checking for errors when going from a more precise to a less precise type.

Generic version allowing only the identity cast.

Template Parameters
dimstatic constant of type DGtal::Dimension that specifies the static dimension of the space and thus the number of elements of the Point or Vector.
TIntegeran integral type, a model of concepts::CInteger

Definition at line 116 of file IntegerConverter.h.

Member Typedef Documentation

◆ Integer

template<DGtal::Dimension dim, typename TInteger >
typedef TInteger DGtal::IntegerConverter< dim, TInteger >::Integer

Definition at line 118 of file IntegerConverter.h.

Member Function Documentation


template<DGtal::Dimension dim, typename TInteger >
DGtal::IntegerConverter< dim, TInteger >::BOOST_CONCEPT_ASSERT ( (concepts::CInteger< TInteger >)  )

◆ cast() [1/2]

◆ cast() [2/2]

template<DGtal::Dimension dim, typename TInteger >
static PointVector< dim, Integer > DGtal::IntegerConverter< dim, TInteger >::cast ( PointVector< dim, Integer p)

Conversion of a lattice point.

pany point
the same point

Definition at line 133 of file IntegerConverter.h.

134  {
135  return p;
136  }

The documentation for this struct was generated from the following file: