DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CSignedNumber.h
1
16
17
#pragma once
18
32
33
#if defined(CSignedNumber_RECURSES)
34
#error Recursive header files inclusion detected in CSignedNumber.h
35
#else
// defined(CSignedNumber_RECURSES)
37
#define CSignedNumber_RECURSES
38
39
#if !defined CSignedNumber_h
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 Data --------------------------------
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
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 >::IsSigned
TagUnknown IsSigned
Definition
NumberTraits.h:86
DGtal::concepts::CQuantity
Aim: defines the concept of quantity in DGtal.
Definition
CQuantity.h:93
DGtal::concepts::CSignedNumber
Aim: Concept checking for Signed Numbers. Models of this concept should be listed in NumberTraits cla...
Definition
CSignedNumber.h:98
DGtal::concepts::CSignedNumber::myIsSigned
NumberTraits< T >::IsSigned myIsSigned
Definition
CSignedNumber.h:112
DGtal::concepts::CSignedNumber::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CSignedNumber)
Definition
CSignedNumber.h:101
src
DGtal
kernel
CSignedNumber.h
Generated on
for DGtal by
1.18.0