28 #ifndef itkConceptChecking_h
29 #define itkConceptChecking_h
36 #ifndef ITK_CONCEPT_NO_CHECKING
37 #if defined( _MSC_VER ) && !defined( __ICL )
38 #define ITK_CONCEPT_IMPLEMENTATION_VTABLE
42 #define ITK_CONCEPT_IMPLEMENTATION_STANDARD
47 #if defined( ITK_CONCEPT_IMPLEMENTATION_STANDARD )
59 #define itkConceptConstraintsMacro() \
60 template< void (Constraints::*) ( ) > \
62 typedef Enforcer< & Constraints::constraints > EnforcerInstantiation
63 #define itkConceptMacro(name, concept) enum { name = sizeof concept }
65 #elif defined( ITK_CONCEPT_IMPLEMENTATION_VTABLE )
72 #define itkConceptConstraintsMacro() \
73 virtual void Enforcer() { &Constraints::constraints; }
74 #define itkConceptMacro(name, concept) enum { name = sizeof concept }
77 #elif defined( ITK_CONCEPT_IMPLEMENTATION_CALL )
80 #define itkConceptConstraintsMacro()
81 #define itkConceptMacro(name, concept) enum { name = 0 }
86 #define itkConceptConstraintsMacro()
87 #define itkConceptMacro(name, concept) enum { name = 0 }
107 template<
typename T >
111 template<
unsigned int >
121 template<
typename T >
129 template<
typename T >
139 template<
typename T >
154 template<
typename T >
183 template<
typename T1,
typename T2 >
188 T2 b =
static_cast< T2
>(
a );
199 template<
typename T >
222 template<
typename T1,
typename T2 = T1 >
241 template<
typename T1,
typename T2 = T1 >
260 template<
typename T1,
typename T2 = T1 >
279 template<
typename T1,
typename T2 = T1 >
302 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
307 a =
static_cast< T3
>(
b +
c );
308 a =
static_cast< T3
>(
b -
c );
315 a =
static_cast< T3
>( d +
e );
316 a =
static_cast< T3
>( d -
e );
330 template<
typename T1,
typename T2 = T1>
355 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
360 a =
static_cast< T3
>(
b *
c );
367 a =
static_cast< T3
>( d *
e );
378 template<
typename T1,
typename T2 = T1 >
401 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
406 a =
static_cast< T3
>(
b /
c );
413 a =
static_cast< T3
>( d /
e );
426 template<
typename T1,
typename T2 = T1 >
451 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
456 a =
static_cast< T3
>(
b &
c );
457 a =
static_cast< T3
>(
b |
c );
458 a =
static_cast< T3
>(
b ^
c );
459 a &=
static_cast< T3
>(
c );
460 a |=
static_cast< T3
>(
c );
461 a ^=
static_cast< T3
>(
c );
468 a =
static_cast< T3
>( d &
e );
469 a =
static_cast< T3
>( d |
e );
470 a =
static_cast< T3
>( d ^
e );
471 a &=
static_cast< T3
>(
e );
472 a |=
static_cast< T3
>(
e );
473 a ^=
static_cast< T3
>(
e );
485 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
490 a =
static_cast< T3
>(
b[
c] );
497 a =
static_cast< T3
>( d[
e] );
509 template<
typename T >
524 template<
typename T >
542 template<
typename T >
557 template<
typename T >
577 template<
typename T1,
typename T2 >
591 template<
unsigned int D1,
unsigned int D2 >
608 template<
typename T >
643 template<
typename T >
659 template<
typename T >
673 template<
typename T >
689 template<
typename T1,
typename T2 >
703 template<
unsigned int D1,
unsigned int D2 >
722 template<
unsigned int D1,
unsigned int D2 >
743 template<
typename T >
764 template<
typename T >
785 template<
typename T >
805 template<
typename T >
829 template<
typename T >
itkConceptConstraintsMacro()
Detail::UniqueType_bool< itkGetStaticConstMacro(IsExact) > ExactT
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
void const_constraints(const T1 &d)
itkConceptConstraintsMacro()
Detail::UniqueType_bool< false > FalseT
Detail::UniqueType_unsigned_int< D1-1 > Type2
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_bool< itkGetStaticConstMacro(Integral) > IntegralT
Detail::UniqueType_unsigned_int< D1 > DT1
void const_constraints(const T1 &d, const T2 &e)
itkConceptConstraintsMacro()
void f(Type3, int=0, int=0)
itkConceptConstraintsMacro()
void const_constraints(const T1 &d, const T2 &e)
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
void const_constraints(const T1 &d)
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_bool< true > TrueT
Detail::UniqueType_bool< true > TrueT
void const_constraints(const T1 &d)
itkConceptConstraintsMacro()
Detail::UniqueType_unsigned_int< D1-2 > Type3
void const_constraints(const T1 &d, const T2 &e)
static const double e
The base of the natural logarithm or Euler's number
itkConceptConstraintsMacro()
static bool IsPositive(T val)
itkConceptConstraintsMacro()
Traits for a pixel that define the dimension and component type.
void RequireBooleanExpression(const T &t)
Detail::UniqueType_bool< itkGetStaticConstMacro(Integral) > IntegralT
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
static bool IsNonnegative(T val)
static const bool Integral
static const bool IsSigned
itkConceptConstraintsMacro()
void IgnoreUnusedVariable(T)
void const_constraints(const T &a)
static const bool IsExact
static const bool Integral
static const bool NonIntegral
itkConceptConstraintsMacro()
Detail::UniqueType_bool< true > TrueT
Detail::UniqueType_unsigned_int< D2 > DT2
static bool IsNegative(T val)
void const_constraints(const T1 &d, const T2 &e)
void const_constraints(const T &b)
static const bool IsExact
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_bool< itkGetStaticConstMacro(IsExact) > ExactT
void const_constraints(const T1 &d, const T2 &e)
Detail::UniqueType_bool< itkGetStaticConstMacro(Unsigned) > UnsignedT
Detail::UniqueType_bool< false > FalseT
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_unsigned_int< D1 > Type1
Detail::UniqueType_bool< itkGetStaticConstMacro(NonIntegral) > NonIntegralT
static bool IsNonpositive(T val)
static const bool Integral
Detail::UniqueType_unsigned_int< D1 > Type1
Detail::UniqueType_bool< true > TrueT
static const bool Unsigned
itkConceptConstraintsMacro()
Detail::UniqueType_bool< false > FalseT
Detail::UniqueType_bool< itkGetStaticConstMacro(Integral) > IntegralT
static T NonpositiveMin()
Detail::UniqueType_unsigned_int< D1-1 > Type2
Define additional traits for native types such as int or float.
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_bool< itkGetStaticConstMacro(IsSigned) > SignedT
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()