DGtal
1.1.0
src
DGtal
base
CBackInsertable.h
1
17
#pragma once
18
31
#if defined(CBackInsertable_RECURSES)
32
#error Recursive header files inclusion detected in CBackInsertable.h
33
#else // defined(CBackInsertable_RECURSES)
34
35
#define CBackInsertable_RECURSES
36
37
#if !defined CBackInsertable_h
38
39
#define CBackInsertable_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
46
47
namespace
DGtal
48
{
49
50
namespace
concepts
51
{
52
54
// class CBackInsertable
94
template
<
typename
T>
95
struct
CBackInsertable
96
{
97
// ----------------------- Concept checks ------------------------------
98
public
:
99
typedef
typename
T::value_type
value_type
;
100
BOOST_CONCEPT_USAGE
(
CBackInsertable
)
101
{
102
myX
.push_back(
myV
);
103
checkConstConstraints
();
104
}
105
void
checkConstConstraints
()
const
106
{
107
}
108
// ------------------------- Private Datas --------------------------------
109
private
:
110
T
myX
;
// do not require T to be default constructible.
111
value_type
myV
;
112
113
// ------------------------- Internals ------------------------------------
114
private
:
115
116
};
// end of concept CBackInsertable
117
118
}
// namespace concepts
119
120
}
// namespace DGtal
121
122
// //
124
125
#endif // !defined CBackInsertable_h
126
127
#undef CBackInsertable_RECURSES
128
#endif // else defined(CBackInsertable_RECURSES)
DGtal::concepts::CBackInsertable
Aim: Represents types for which a std::back_insert_iterator can be constructed with std::back_inserte...
Definition:
CBackInsertable.h:96
DGtal::concepts::CBackInsertable::myV
value_type myV
Definition:
CBackInsertable.h:111
DGtal::concepts::CBackInsertable::checkConstConstraints
void checkConstConstraints() const
Definition:
CBackInsertable.h:105
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CBackInsertable::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CBackInsertable)
Definition:
CBackInsertable.h:100
DGtal::concepts::CBackInsertable::value_type
T::value_type value_type
Definition:
CBackInsertable.h:99
DGtal::concepts::CBackInsertable::myX
T myX
Definition:
CBackInsertable.h:110
Generated on Fri Oct 9 2020 08:57:45 for DGtal by
1.8.20