DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CVertexMap.h
1
16
17
#pragma once
18
31
32
#if defined(CVertexMap_RECURSES)
33
#error Recursive header files inclusion detected in CVertexMap.h
34
#else
// defined(CVertexMap_RECURSES)
36
#define CVertexMap_RECURSES
37
38
#if !defined CVertexMap_h
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 Data --------------------------------
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::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::CVertexMap
Aim: models of CVertexMap concept implement mapping between graph vertices and values.
Definition
CVertexMap.h:98
DGtal::concepts::CVertexMap::Value
T::Value Value
Definition
CVertexMap.h:103
DGtal::concepts::CVertexMap::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CVertexMap)
Definition
CVertexMap.h:106
DGtal::concepts::CVertexMap::myX
T myX
Definition
CVertexMap.h:114
DGtal::concepts::CVertexMap::myVertex
Vertex myVertex
Definition
CVertexMap.h:115
DGtal::concepts::CVertexMap::Vertex
T::Vertex Vertex
Definition
CVertexMap.h:102
DGtal::concepts::CVertexMap::myValue
Value myValue
Definition
CVertexMap.h:116
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition
Boost.dox:32
src
DGtal
graph
CVertexMap.h
Generated on
for DGtal by
1.18.0