DGtal
1.3.beta
src
DGtal
kernel
CIntegralNumber.h
1
17
#pragma once
18
33
#if defined(CIntegralNumber_RECURSES)
34
#error Recursive header files inclusion detected in CIntegralNumber.h
35
#else // defined(CIntegralNumber_RECURSES)
36
37
#define CIntegralNumber_RECURSES
38
39
#if !defined CIntegralNumber_h
40
41
#define CIntegralNumber_h
42
44
// Inclusions
45
#include <iostream>
46
#include "boost/concept_check.hpp"
47
#include "DGtal/base/Common.h"
48
#include "DGtal/base/ConceptUtils.h"
49
#include "DGtal/kernel/NumberTraits.h"
50
#include "DGtal/base/CQuantity.h"
52
53
namespace
DGtal
54
{
55
namespace
concepts
56
{
58
// class CIntegralNumber
100
template
<
typename
T>
101
struct
CIntegralNumber
:
CQuantity
<T>
102
{
103
// ----------------------- Concept checks ------------------------------
104
public
:
105
BOOST_CONCEPT_USAGE
(
CIntegralNumber
)
106
{
107
// Will compile iff Integral.
108
ConceptUtils::checkTrue
(
myIsIntegral
);
109
}
110
111
// ------------------------- Internals ------------------------------------
112
private
:
113
typename
NumberTraits<T>::IsIntegral
myIsIntegral
;
114
115
};
// end of concept CIntegralNumber
116
}
117
}
// namespace DGtal
118
119
120
// //
122
123
#endif // !defined CIntegralNumber_h
124
125
#undef CIntegralNumber_RECURSES
126
#endif // else defined(CIntegralNumber_RECURSES)
DGtal::concepts::ConceptUtils::checkTrue
void checkTrue(const TagTrue &tag)
DGtal::concepts::CIntegralNumber::myIsIntegral
NumberTraits< T >::IsIntegral myIsIntegral
Definition:
CIntegralNumber.h:113
DGtal::concepts::CIntegralNumber::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CIntegralNumber)
Definition:
CIntegralNumber.h:105
DGtal::TagUnknown
Definition:
ConceptUtils.h:63
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CQuantity
Aim: defines the concept of quantity in DGtal.
Definition:
CQuantity.h:92
DGtal::concepts::CIntegralNumber
Aim: Concept checking for Integral Numbers. Models of this concept should be listed in NumberTraits c...
Definition:
CIntegralNumber.h:101
Generated on Mon Jun 20 2022 18:23:25 for DGtal by
1.8.17