DGtal
1.3.beta
src
DGtal
geometry
tools
CPolarPointComparator2D.h
1
17
#pragma once
18
31
#if defined(CPolarPointComparator2D_RECURSES)
32
#error Recursive header files inclusion detected in CPolarPointComparator2D.h
33
#else // defined(CPolarPointComparator2D_RECURSES)
34
35
#define CPolarPointComparator2D_RECURSES
36
37
#if !defined CPolarPointComparator2D_h
38
39
#define CPolarPointComparator2D_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
46
47
namespace
DGtal
48
{
49
namespace
concepts
50
{
52
// class CPolarPointComparator2D
95
template
<
typename
T>
96
struct
CPolarPointComparator2D
97
:
boost::DefaultConstructible
<T>,
boost::CopyConstructible
<T>,
boost::Assignable
<T>
98
{
99
// ----------------------- Concept checks ------------------------------
100
public
:
101
typedef
typename
T::Point
Point
;
102
103
BOOST_CONCEPT_USAGE
(
CPolarPointComparator2D
)
104
{
105
myX
.setPole(
myP
);
106
107
checkConstConstraints
();
108
}
109
void
checkConstConstraints
()
const
110
{
111
// const method dummyConst should take parameter myA of type A and return
112
// something of type B
113
concepts::ConceptUtils::sameType
(
myB
,
myX
(
myP
,
myP
) );
114
}
115
// ------------------------- Private Datas --------------------------------
116
private
:
117
T
myX
;
// do not require T to be default constructible.
118
Point
myP
;
119
bool
myB
;
120
121
122
};
// end of concept CPolarPointComparator2D
123
}
124
}
// namespace DGtal
125
126
// //
128
129
#endif // !defined CPolarPointComparator2D_h
130
131
#undef CPolarPointComparator2D_RECURSES
132
#endif // else defined(CPolarPointComparator2D_RECURSES)
DGtal::concepts::CPolarPointComparator2D::checkConstConstraints
void checkConstConstraints() const
Definition:
CPolarPointComparator2D.h:109
boost::DefaultConstructible
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition:
Boost.dox:30
DGtal::concepts::CPolarPointComparator2D::Point
T::Point Point
Definition:
CPolarPointComparator2D.h:101
DGtal::concepts::CPolarPointComparator2D::myB
bool myB
Definition:
CPolarPointComparator2D.h:119
DGtal::concepts::CPolarPointComparator2D::myX
T myX
Definition:
CPolarPointComparator2D.h:117
DGtal::concepts::CPolarPointComparator2D
Aim: This concept gathers classes that are able to compare the position of two given points around a...
Definition:
CPolarPointComparator2D.h:96
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::CopyConstructible
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition:
Boost.dox:34
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CPolarPointComparator2D::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CPolarPointComparator2D)
Definition:
CPolarPointComparator2D.h:103
DGtal::concepts::CPolarPointComparator2D::myP
Point myP
Definition:
CPolarPointComparator2D.h:118
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition:
Boost.dox:32
Point
MyPointD Point
Definition:
testClone2.cpp:383
Generated on Mon Jun 20 2022 18:23:27 for DGtal by
1.8.17