DGtal
1.3.beta
src
DGtal
geometry
curves
CSegmentFactory.h
1
17
#pragma once
18
31
#if defined(CSegmentFactory_RECURSES)
32
#error Recursive header files inclusion detected in CSegmentFactory.h
33
#else // defined(CSegmentFactory_RECURSES)
34
35
#define CSegmentFactory_RECURSES
36
37
#if !defined CSegmentFactory_h
38
39
#define CSegmentFactory_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/geometry/curves/CSegment.h"
47
48
namespace
DGtal
49
{
50
namespace
concepts
51
{
53
// class CSegmentFactory
91
template
<
typename
T>
92
struct
CSegmentFactory
:
concepts::CSegment
<T>
93
{
94
// ----------------------- Concept checks ------------------------------
95
public
:
96
// Inner types
97
typedef
typename
T::Self
Self
;
98
BOOST_STATIC_ASSERT
(( boost::is_same< T, Self >::value ));
99
typedef
typename
T::Reverse
Reverse
;
100
// Methods
101
BOOST_CONCEPT_USAGE
(
CSegmentFactory
)
102
{
103
concepts::ConceptUtils::sameType
(
myT
,
myT
.getSelf() );
104
concepts::ConceptUtils::sameType
(
myRT
,
myT
.getReverse() );
105
}
106
// ------------------------- Private Datas --------------------------------
107
private
:
108
T
myT
;
// only if T is default constructible.
109
Reverse
myRT
;
110
111
// ------------------------- Internals ------------------------------------
112
private
:
113
114
};
// end of concept CSegmentFactory
115
}
116
}
// namespace DGtal
117
118
// //
120
121
#endif // !defined CSegmentFactory_h
122
123
#undef CSegmentFactory_RECURSES
124
#endif // else defined(CSegmentFactory_RECURSES)
DGtal::concepts::CSegment
Aim: Defines the concept describing a segment, ie. a valid and not empty range.
Definition:
CSegment.h:101
DGtal::concepts::CSegmentFactory::Reverse
T::Reverse Reverse
Definition:
CSegmentFactory.h:99
DGtal::concepts::CSegmentFactory::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((boost::is_same< T, Self >::value))
DGtal::concepts::CSegmentFactory
Aim: Defines the concept describing a segment ie. a valid and not empty subrange, which can construct...
Definition:
CSegmentFactory.h:92
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CSegmentFactory::myRT
Reverse myRT
Definition:
CSegmentFactory.h:109
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CSegmentFactory::Self
T::Self Self
Definition:
CSegmentFactory.h:97
DGtal::concepts::CSegmentFactory::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CSegmentFactory)
Definition:
CSegmentFactory.h:101
DGtal::concepts::CSegmentFactory::myT
T myT
Definition:
CSegmentFactory.h:108
Generated on Mon Jun 20 2022 18:23:27 for DGtal by
1.8.17