DGtal  1.3.beta
Public Types | Public Member Functions | Static Public Member Functions
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
Examples
geometry/tools/checkLatticeBallQuickHull.cpp.

Definition at line 117 of file IntegerConverter.h.

Member Typedef Documentation

◆ Integer

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

Definition at line 119 of file IntegerConverter.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ cast() [1/2]

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

◆ cast() [2/2]

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

Conversion of a lattice point.

Parameters
pany point
Returns
the same point

Definition at line 134 of file IntegerConverter.h.

135  {
136  return p;
137  }

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