DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CDrawableWithBoard2D.h
1
16
17
#pragma once
18
32
33
#if defined(CDrawableWithBoard2D_RECURSES)
34
#error Recursive header files inclusion detected in CDrawableWithBoard2D.h
35
#else
// defined(CDrawableWithBoard2D_RECURSES)
37
#define CDrawableWithBoard2D_RECURSES
38
39
#if !defined CDrawableWithBoard2D_h
41
#define CDrawableWithBoard2D_h
42
44
// Inclusions
45
46
#include <iostream>
47
#include "DGtal/base/Common.h"
48
#include "DGtal/io/Display2DFactory.h"
50
51
namespace
DGtal
52
{
54
class
Board2D
;
55
namespace
concepts
56
{
57
59
// class CDrawableWithBoard2D
103
template
<
typename
T>
104
struct
CDrawableWithBoard2D
105
{
106
// ----------------------- Concept checks ------------------------------
107
public
:
108
BOOST_CONCEPT_USAGE
(
CDrawableWithBoard2D
)
109
{
110
//Drawable model should have a className() returning a string
111
concepts::ConceptUtils::sameType
(
myS
,
myT
.className() );
112
113
//Drawable model should be associated to global functions draw and defaultStyle.
114
DGtal::Display2DFactory::draw
(
myB
,
myT
);
115
concepts::ConceptUtils::sameType
(
myD
, defaultStyle(
myT
) );
116
}
117
118
// ------------------------- Private Data --------------------------------
119
private
:
120
T
myT
;
121
DrawableWithBoard2D
*
myD
;
122
Board2D
myB
;
123
std::string
myS
;
124
125
// ------------------------- Internals ------------------------------------
126
private
:
127
128
};
// end of concept CDrawableWithBoard2D
129
}
// namespace concepts
130
}
// namespace DGtal
131
132
133
// //
135
136
#endif
// !defined CDrawableWithBoard2D_h
137
138
#undef CDrawableWithBoard2D_RECURSES
139
#endif
// else defined(CDrawableWithBoard2D_RECURSES)
DGtal::Board2D
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition
Board2D.h:71
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::Display2DFactory::draw
static void draw(DGtal::Board2D &board, const DGtal::DiscreteExteriorCalculus< dimEmbedded, dimAmbient, TLinearAlgebraBackend, TInteger > &calculus)
DGtal::DrawableWithBoard2D
Definition
Common.h:151
DGtal::concepts::CDrawableWithBoard2D
Aim: The concept CDrawableWithBoard2D specifies what are the classes that admit an export with Board2...
Definition
CDrawableWithBoard2D.h:105
DGtal::concepts::CDrawableWithBoard2D::myT
T myT
Definition
CDrawableWithBoard2D.h:120
DGtal::concepts::CDrawableWithBoard2D::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CDrawableWithBoard2D)
Definition
CDrawableWithBoard2D.h:108
DGtal::concepts::CDrawableWithBoard2D::myD
DrawableWithBoard2D * myD
Definition
CDrawableWithBoard2D.h:121
DGtal::concepts::CDrawableWithBoard2D::myB
Board2D myB
Definition
CDrawableWithBoard2D.h:122
DGtal::concepts::CDrawableWithBoard2D::myS
std::string myS
Definition
CDrawableWithBoard2D.h:123
src
DGtal
io
boards
CDrawableWithBoard2D.h
Generated on
for DGtal by
1.18.0