DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CSegment.h
1
16
17
#pragma once
18
30
31
#if defined(CSegment_RECURSES)
32
#error Recursive header files inclusion detected in CSegment.h
33
#else
// defined(CSegment_RECURSES)
35
#define CSegment_RECURSES
36
37
#if !defined CSegment_h
39
#define CSegment_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "boost/concept_check.hpp"
46
#include "DGtal/base/ConceptUtils.h"
48
49
namespace
DGtal
50
{
51
namespace
concepts
52
{
54
// class CSegment
100
template
<
typename
T>
101
struct
CSegment
:
boost::DefaultConstructible
<T>,
boost::CopyConstructible
<T>,
boost::Assignable
<T>,
boost::EqualityComparable
<T>
102
{
103
// ----------------------- Concept checks ------------------------------
104
public
:
105
// Inner types
106
typedef
typename
T::ConstIterator
ConstIterator
;
107
//Uncomment if all iterators have been cleaned
108
//BOOST_CONCEPT_ASSERT(( boost::BidirectionalIterator<T> ));
109
110
// Methods
111
BOOST_CONCEPT_USAGE
(
CSegment
)
112
{
113
concepts::ConceptUtils::sameType
(
it
,
myX
.begin() );
114
concepts::ConceptUtils::sameType
(
it
,
myX
.end() );
115
}
116
// ------------------------- Private Data --------------------------------
117
private
:
118
T
myX
;
// only if T is default constructible.
119
ConstIterator
it
;
120
121
// ------------------------- Internals ------------------------------------
122
private
:
123
124
};
// end of concept CSegment
125
}
126
}
// namespace DGtal
127
128
// //
130
131
#endif
// !defined CSegment_h
132
133
#undef CSegment_RECURSES
134
#endif
// else defined(CSegment_RECURSES)
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
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::concepts::CSegment
Aim: Defines the concept describing a segment, ie. a valid and not empty range.
Definition
CSegment.h:102
DGtal::concepts::CSegment::it
ConstIterator it
Definition
CSegment.h:119
DGtal::concepts::CSegment::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CSegment)
Definition
CSegment.h:111
DGtal::concepts::CSegment::myX
T myX
Definition
CSegment.h:118
DGtal::concepts::CSegment::ConstIterator
T::ConstIterator ConstIterator
Definition
CSegment.h:106
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition
Boost.dox:32
boost::CopyConstructible
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition
Boost.dox:34
boost::DefaultConstructible
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition
Boost.dox:30
boost::EqualityComparable
Go to http://www.sgi.com/tech/stl/EqualityComparable.html.
Definition
Boost.dox:46
src
DGtal
geometry
curves
CSegment.h
Generated on
for DGtal by
1.18.0