DGtal
1.1.0
src
DGtal
kernel
CSignedNumber.h
1
17
#pragma once
18
33
#if defined(CSignedNumber_RECURSES)
34
#error Recursive header files inclusion detected in CSignedNumber.h
35
#else // defined(CSignedNumber_RECURSES)
36
37
#define CSignedNumber_RECURSES
38
39
#if !defined CSignedNumber_h
40
41
#define CSignedNumber_h
42
44
// Inclusions
45
#include <iostream>
46
#include "DGtal/base/Common.h"
47
#include "DGtal/base/ConceptUtils.h"
48
#include "DGtal/kernel/NumberTraits.h"
49
#include "DGtal/base/CQuantity.h"
51
52
namespace
DGtal
53
{
54
namespace
concepts
55
{
57
// class CSignedNumber
96
template
<
typename
T>
97
struct
CSignedNumber
:
CQuantity
<T>
98
{
99
// ----------------------- Concept checks ------------------------------
100
public
:
101
BOOST_CONCEPT_USAGE
(
CSignedNumber
)
102
{
103
// Will compile iff Signed.
104
ConceptUtils::checkTrue
(
myIsSigned
);
105
}
106
107
// ------------------------- Private Datas --------------------------------
108
private
:
109
110
// ------------------------- Internals ------------------------------------
111
private
:
112
typename
NumberTraits<T>::IsSigned
myIsSigned
;
113
114
};
// end of concept CSignedNumber
115
}
116
}
// namespace DGtal
117
118
119
// //
121
122
#endif // !defined CSignedNumber_h
123
124
#undef CSignedNumber_RECURSES
125
#endif // else defined(CSignedNumber_RECURSES)
DGtal::concepts::ConceptUtils::checkTrue
void checkTrue(const TagTrue &tag)
DGtal::concepts::CSignedNumber::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CSignedNumber)
Definition:
CSignedNumber.h:101
DGtal::concepts::CSignedNumber
Aim: Concept checking for Signed Numbers. Models of this concept should be listed in NumberTraits cla...
Definition:
CSignedNumber.h:98
DGtal::TagUnknown
Definition:
ConceptUtils.h:63
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CQuantity
Aim: defines the concept of quantity in DGtal.
Definition:
CQuantity.h:93
DGtal::concepts::CSignedNumber::myIsSigned
NumberTraits< T >::IsSigned myIsSigned
Definition:
CSignedNumber.h:112
Generated on Fri Oct 9 2020 08:57:48 for DGtal by
1.8.20