You are here:
Concepts
>
Concepts Web
>
Class documentation
Class documentation of Concepts
Loading...
Searching...
No Matches
geometry
connectorSequence.hh
1
6
#ifndef ConnectorSequence_hh
7
#define ConnectorSequence_hh
8
9
#include "
connector.hh
"
10
#include "
toolbox/sequence.hh
"
11
12
namespace
concepts
{
13
14
// ************************************************** Sequence<const Key*> **
15
16
template
<>
17
class
Sequence
<const
Key
*> :
public
BaseSequence<const Key*>
{
18
public
:
19
Sequence
() :
BaseSequence<const Key*>
() {}
20
template
<
class
F>
21
Sequence
(
const
F&
seq
) :
BaseSequence<const Key*>
(
seq
) {}
22
virtual
~Sequence
() {}
23
24
Sequence<uint>
key()
const
;
25
};
26
27
// ******************************************* Sequence<const Connector0*> **
28
29
template
<>
30
class
Sequence
<const
Connector0
*> :
31
public
BaseSequence<const Connector0*>
{
32
public
:
33
Sequence
() :
BaseSequence<const Connector0*>
() {}
34
template
<
class
F>
35
Sequence
(
const
F&
seq
) :
BaseSequence<const Connector0*>
(
seq
) {}
36
virtual
~Sequence
() {}
37
38
Sequence<const Key*>
key()
const
;
39
};
40
41
// ************************************************* Sequence<Connector0*> **
42
43
template
<>
44
class
Sequence
<
Connector0
*> :
public
BaseSequence<Connector0*>
{
45
public
:
46
Sequence
() :
BaseSequence<Connector0*>
() {}
47
template
<
class
F>
48
Sequence
(
const
F&
seq
) :
BaseSequence<Connector0*>
(
seq
) {}
49
virtual
~Sequence
() {}
50
51
Sequence<const Key*>
key()
const
;
52
};
53
54
// ******************************************* Sequence<const Connector1*> **
55
56
template
<>
57
class
Sequence
<const
Connector1
*> :
58
public
BaseSequence<const Connector1*>
{
59
public
:
60
Sequence
() :
BaseSequence<const Connector1*>
() {}
61
template
<
class
F>
62
Sequence
(
const
F&
seq
) :
BaseSequence<const Connector1*>
(
seq
) {}
63
virtual
~Sequence
() {}
64
65
Sequence<const Key*>
key()
const
;
66
Sequence<Connector0*>
vertex(
uint
i)
const
;
67
Sequence<const Connector1*>
child(
uint
i)
const
;
68
};
69
70
// ************************************************* Sequence<Connector1*> **
71
72
template
<>
73
class
Sequence
<
Connector1
*> :
public
BaseSequence<Connector1*>
{
74
public
:
75
Sequence
() :
BaseSequence<Connector1*>
() {}
76
template
<
class
F>
77
Sequence
(
const
F&
seq
) :
BaseSequence<Connector1*>
(
seq
) {}
78
virtual
~Sequence
() {}
79
80
Sequence<const Key*>
key()
const
;
81
Sequence<Connector0*>
vertex(
uint
i)
const
;
82
Sequence<const Connector1*>
child(
uint
i)
const
;
83
};
84
85
// ******************************************* Sequence<const Connector2*> **
86
87
template
<>
88
class
Sequence
<const
Connector2
*> :
89
public
BaseSequence<const Connector2*>
{
90
public
:
91
Sequence
() :
BaseSequence<const Connector2*>
() {}
92
template
<
class
F>
93
Sequence
(
const
F&
seq
) :
BaseSequence<const Connector2*>
(
seq
) {}
94
virtual
~Sequence
() {}
95
96
Sequence<const Key*>
key()
const
;
97
Sequence<Connector0*>
vertex(
uint
i)
const
;
98
Sequence<Connector1*>
edge(
uint
i)
const
;
99
Sequence<const Connector2*>
child(
uint
i)
const
;
100
};
101
102
// ************************************************* Sequence<Connector2*> **
103
104
template
<>
105
class
Sequence
<
Connector2
*> :
public
BaseSequence<Connector2*>
{
106
public
:
107
Sequence
() :
BaseSequence<Connector2*>
() {}
108
template
<
class
F>
109
Sequence
(
const
F&
seq
) :
BaseSequence<Connector2*>
(
seq
) {}
110
virtual
~Sequence
() {}
111
112
Sequence<const Key*>
key()
const
;
113
Sequence<Connector0*>
vertex(
uint
i)
const
;
114
Sequence<Connector1*>
edge(
uint
i)
const
;
115
Sequence<const Connector2*>
child(
uint
i)
const
;
116
};
117
118
// ********************************************************* allConnectors **
119
125
template
<
class
F,
class
G>
126
Sequence<G*>
allConnectors
(
const
F&
cntr
, G* (F::*
fun
)(
uint
) const) {
127
Sequence<G*>
seq
;
128
G*
cntri
;
// connectors inside cntr
129
uint
i = 0;
130
while
((
cntri
= (
cntr
.*
fun
)(i++)) != 0)
seq
.push_back(
cntri
);
131
return
seq
;
132
}
133
134
}
// namespace concepts
135
136
#endif
// ConnectorSequence_hh
137
concepts::BaseSequence
Definition
sequence.hh:59
concepts::Connector0
Definition
connector.hh:147
concepts::Connector1
Definition
connector.hh:182
concepts::Connector2
Definition
connector.hh:226
concepts::Key
Definition
connector.hh:53
concepts::Sequence
Definition
sequence.hh:39
connector.hh
concepts
Definition
pml_formula.h:16
concepts::allConnectors
Sequence< G * > allConnectors(const F &cntr, G *(F::*fun)(uint) const)
Definition
connectorSequence.hh:126
concepts::makeSet
Set< F > makeSet(uint n, const F &first,...)
Definition
set.hh:320
sequence.hh
Generated on Wed Sep 13 2023 21:06:19 for Concepts by
1.9.8