DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CBoundedNumber.h
1
16
17
#pragma once
18
30
31
#if defined(CBoundedInteger_RECURSES)
32
#error Recursive header files inclusion detected in CBoundedInteger.h
33
#else
// defined(CBoundedInteger_RECURSES)
35
#define CBoundedInteger_RECURSES
36
37
#if !defined CBoundedInteger_h
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 Data --------------------------------
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
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::NumberTraitsImpl< std::decay< T >::type >::IsBounded
TagUnknown IsBounded
Definition
NumberTraits.h:84
DGtal::concepts::CBoundedNumber
Aim: The concept CBoundedNumber specifies what are the bounded numbers. Models of this concept should...
Definition
CBoundedNumber.h:97
DGtal::concepts::CBoundedNumber::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CBoundedNumber)
Definition
CBoundedNumber.h:100
DGtal::concepts::CBoundedNumber::myIsBounded
NumberTraits< T >::IsBounded myIsBounded
Definition
CBoundedNumber.h:111
DGtal::concepts::CBoundedNumber::myX
T myX
Definition
CBoundedNumber.h:110
DGtal::concepts::CQuantity
Aim: defines the concept of quantity in DGtal.
Definition
CQuantity.h:93
src
DGtal
kernel
CBoundedNumber.h
Generated on
for DGtal by
1.18.0