DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CBackInsertable.h
1
16
17
#pragma once
18
30
31
#if defined(CBackInsertable_RECURSES)
32
#error Recursive header files inclusion detected in CBackInsertable.h
33
#else
// defined(CBackInsertable_RECURSES)
35
#define CBackInsertable_RECURSES
36
37
#if !defined CBackInsertable_h
39
#define CBackInsertable_h
40
42
// Inclusions
43
#include "DGtal/base/Common.h"
45
46
namespace
DGtal
47
{
48
49
namespace
concepts
50
{
51
53
// class CBackInsertable
93
template
<
typename
T>
94
struct
CBackInsertable
95
{
96
// ----------------------- Concept checks ------------------------------
97
public
:
98
typedef
typename
T::value_type
value_type
;
99
BOOST_CONCEPT_USAGE
(
CBackInsertable
)
100
{
101
myX
.push_back(
myV
);
102
checkConstConstraints
();
103
}
104
void
checkConstConstraints
()
const
105
{
106
}
107
// ------------------------- Private Data --------------------------------
108
private
:
109
T
myX
;
// do not require T to be default constructible.
110
value_type
myV
;
111
112
// ------------------------- Internals ------------------------------------
113
private
:
114
115
};
// end of concept CBackInsertable
116
117
}
// namespace concepts
118
119
}
// namespace DGtal
120
121
// //
123
124
#endif
// !defined CBackInsertable_h
125
126
#undef CBackInsertable_RECURSES
127
#endif
// else defined(CBackInsertable_RECURSES)
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::CBackInsertable
Aim: Represents types for which a std::back_insert_iterator can be constructed with std::back_inserte...
Definition
CBackInsertable.h:95
DGtal::concepts::CBackInsertable::myX
T myX
Definition
CBackInsertable.h:109
DGtal::concepts::CBackInsertable::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CBackInsertable)
Definition
CBackInsertable.h:99
DGtal::concepts::CBackInsertable::checkConstConstraints
void checkConstConstraints() const
Definition
CBackInsertable.h:104
DGtal::concepts::CBackInsertable::myV
value_type myV
Definition
CBackInsertable.h:110
DGtal::concepts::CBackInsertable::value_type
T::value_type value_type
Definition
CBackInsertable.h:98
src
DGtal
base
CBackInsertable.h
Generated on
for DGtal by
1.18.0