DGtal
1.3.beta
src
DGtal
graph
CVertexMap.h
1
17
#pragma once
18
32
#if defined(CVertexMap_RECURSES)
33
#error Recursive header files inclusion detected in CVertexMap.h
34
#else // defined(CVertexMap_RECURSES)
35
36
#define CVertexMap_RECURSES
37
38
#if !defined CVertexMap_h
39
40
#define CVertexMap_h
41
43
// Inclusions
44
#include <iostream>
45
#include "DGtal/base/Common.h"
46
#include "DGtal/base/CPredicate.h"
47
#include "boost/concept_check.hpp"
49
50
// @since 0.8 In DGtal::concepts
51
namespace
DGtal
{
52
namespace
concepts {
53
55
// class CVertexMap
95
template
<
typename
T>
96
struct
CVertexMap
:
97
boost::Assignable
<T>
98
{
99
// ----------------------- Concept checks ------------------------------
100
public
:
101
// 1. define first provided types (i.e. inner types), like
102
typedef
typename
T::Vertex
Vertex
;
103
typedef
typename
T::Value
Value
;
104
105
// 2. then check the presence of data members, operators and methods with
106
BOOST_CONCEPT_USAGE
(
CVertexMap
)
107
{
108
ConceptUtils::sameType
(
myValue
,
myX
.operator()(
myVertex
) );
109
myX
.setValue(
myVertex
,
myValue
);
110
}
111
112
// ------------------------- Private Datas --------------------------------
113
private
:
114
T
myX
;
115
Vertex
myVertex
;
116
Value
myValue
;
117
118
};
// end of concept CVertexMap
119
120
}
// namespace concepts
121
}
// namespace DGtal
122
123
// //
125
126
#endif // !defined CVertexMap_h
127
128
#undef CVertexMap_RECURSES
129
#endif // else defined(CVertexMap_RECURSES)
DGtal::concepts::CVertexMap::Vertex
T::Vertex Vertex
Definition:
CVertexMap.h:102
Vertex
TriMesh::Vertex Vertex
Definition:
testTriangulatedSurface.cpp:57
DGtal::concepts::CVertexMap::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CVertexMap)
Definition:
CVertexMap.h:106
DGtal::concepts::CVertexMap::myValue
Value myValue
Definition:
CVertexMap.h:116
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CVertexMap::Value
T::Value Value
Definition:
CVertexMap.h:103
DGtal::concepts::CVertexMap::myX
T myX
Definition:
CVertexMap.h:114
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CVertexMap::myVertex
Vertex myVertex
Definition:
CVertexMap.h:115
DGtal::concepts::CVertexMap
Aim: models of CVertexMap concept implement mapping between graph vertices and values.
Definition:
CVertexMap.h:96
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition:
Boost.dox:32
Value
double Value
Definition:
testSimpleRandomAccessRangeFromPoint.cpp:38
Generated on Mon Jun 20 2022 18:23:27 for DGtal by
1.8.17