DGtal
1.3.beta
src
DGtal
kernel
CBoundedNumber.h
1
17
#pragma once
18
31
#if defined(CBoundedInteger_RECURSES)
32
#error Recursive header files inclusion detected in CBoundedInteger.h
33
#else // defined(CBoundedInteger_RECURSES)
34
35
#define CBoundedInteger_RECURSES
36
37
#if !defined CBoundedInteger_h
38
39
#define CBoundedInteger_h
40
42
// Inclusions
43
#include <iostream>
44
#include "boost/concept_check.hpp"
45
#include "DGtal/base/ConceptUtils.h"
46
#include "DGtal/base/Common.h"
47
#include "DGtal/kernel/NumberTraits.h"
48
#include "DGtal/base/CQuantity.h"
50
51
namespace
DGtal
52
{
53
namespace
concepts
54
{
56
// class CBoundedNumber
95
template
<
typename
T>
96
struct
CBoundedNumber
:
CQuantity
<T>
97
{
98
// ----------------------- Concept checks ------------------------------
99
public
:
100
BOOST_CONCEPT_USAGE
(
CBoundedNumber
)
101
{
102
103
// Bounded Number should have a TagTrue tag to IsBounded type.
104
ConceptUtils::checkTrue
(
myIsBounded
);
105
106
}
107
108
// ------------------------- Private Datas --------------------------------
109
private
:
110
T
myX
;
111
typename
NumberTraits<T>::IsBounded
myIsBounded
;
112
113
// ------------------------- Internals ------------------------------------
114
private
:
115
116
};
// end of concept CBoundedNumber
117
}
118
}
// namespace DGtal
119
120
// //
122
123
#endif // !defined CBoundedNumber_h
124
125
#undef CBoundedNumber_RECURSES
126
#endif // else defined(CBoundedNumber_RECURSES)
DGtal::concepts::ConceptUtils::checkTrue
void checkTrue(const TagTrue &tag)
DGtal::concepts::CBoundedNumber
Aim: The concept CBoundedNumber specifies what are the bounded numbers. Models of this concept should...
Definition:
CBoundedNumber.h:96
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::CBoundedNumber::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CBoundedNumber)
Definition:
CBoundedNumber.h:100
DGtal::concepts::CBoundedNumber::myX
T myX
Definition:
CBoundedNumber.h:110
DGtal::concepts::CBoundedNumber::myIsBounded
NumberTraits< T >::IsBounded myIsBounded
Definition:
CBoundedNumber.h:111
Generated on Mon Jun 20 2022 18:23:22 for DGtal by
1.8.17