BOSS
7.1.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Commissioner.h
Go to the documentation of this file.
1
//## begin module.cm preserve=no
2
// %X% %Q% %Z% %W%
3
//## end module.cm
4
5
//## Module: Commissioner; Package specification
6
// Implementation of the Commissioner class
7
//## Subsystem: utilities
8
//## Source file: d:\code\glastsim\utilities\Commissioner.h
9
10
#ifndef Commissioner_h
11
#define Commissioner_h 1
12
13
#include "
Adapter.h
"
14
//## begin module.declarations preserve=no
15
//## end module.declarations
16
17
18
//## Class: Commissioner; Parameterized Class
19
// Class used to select other classes based on some
20
// specific attribute within those classes. This is
21
// implemented by setting some parameter within this class
22
// of type _Ty and creating an Action object, of return
23
// type _Ty and encapsulated within the Subject class which
24
// gives access to that object.
25
//## Category: utilities
26
//## Subsystem: utilities
27
//## Persistence: Transient
28
//## Cardinality/Multiplicity: n
29
30
template
<
class
Commissionee,
class
Criteria>
31
class
Commissioner
32
{
33
//## begin Commissioner.initialDeclarations preserve=yes
34
//## end Commissioner.initialDeclarations
35
36
public
:
37
//## Constructors (specified)
38
//## Operation: Commissioner%894312587
39
// constructor
40
Commissioner
(
Action<Commissionee, Criteria>
aSelector,
Criteria
aCriteria)
41
//## begin Commissioner::Commissioner%894312587.hasinit preserve=no
42
//## end Commissioner::Commissioner%894312587.hasinit
43
//## begin Commissioner::Commissioner%894312587.initialization preserve=yes
44
: itsSelector(aSelector), itsCriteria(aCriteria)
45
//## end Commissioner::Commissioner%894312587.initialization
46
{
47
//## begin Commissioner::Commissioner%894312587.body preserve=yes
48
//## end Commissioner::Commissioner%894312587.body
49
}
50
51
52
//## Other Operations (specified)
53
//## Operation: select%894312588
54
// executes its selection criteria on the object passed to
55
// it.
56
bool
select
(Commissionee* aCommissionee)
57
{
58
//## begin Commissioner::select%894312588.body preserve=yes
59
return
(itsCriteria == itsSelector.execute(aCommissionee));
60
//## end Commissioner::select%894312588.body
61
}
62
63
//## Operation: select%894312589
64
// performs its selection using the criteria passed in to
65
// the funciton
66
bool
select
(Commissionee* aCommissionee,
Criteria
aCriteria)
const
67
{
68
//## begin Commissioner::select%894312589.body preserve=yes
69
return
(aCriteria == itsSelector.execute(aCommissionee));
70
//## end Commissioner::select%894312589.body
71
}
72
73
// Additional Public Declarations
74
//## begin Commissioner.public preserve=yes
75
//## end Commissioner.public
76
77
protected
:
78
// Additional Protected Declarations
79
//## begin Commissioner.protected preserve=yes
80
//## end Commissioner.protected
81
82
private
:
83
// Additional Private Declarations
84
//## begin Commissioner.private preserve=yes
85
//## end Commissioner.private
86
87
private
:
//## implementation
88
// Data Members for Associations
89
90
//## Association: utilities::<unnamed>%3550EE700380
91
//## Role: Commissioner::itsSelector
92
// action function used to select Subjects
93
//## begin Commissioner::itsSelector.role preserve=no private: Action { -> VHN}
94
Action<Commissionee, Criteria>
itsSelector;
95
//## end Commissioner::itsSelector.role
96
97
//## Association: utilities::<unnamed>%3550F03B007D
98
//## Role: Commissioner::<the_Command>
99
//## begin Commissioner::<the_Command>.role preserve=no public: Command {0..1 -> RHG}
100
//## end Commissioner::<the_Command>.role
101
102
// Additional Implementation Declarations
103
//## begin Commissioner.implementation preserve=yes
104
Criteria
itsCriteria;
105
//## end Commissioner.implementation
106
107
};
108
109
//## begin Commissioner.postscript preserve=yes
110
//## end Commissioner.postscript
111
112
113
114
#endif
Adapter.h
Action
Definition
Adapter.h:80
Commissioner::select
bool select(Commissionee *aCommissionee)
Definition
Commissioner.h:56
Commissioner::select
bool select(Commissionee *aCommissionee, Criteria aCriteria) const
Definition
Commissioner.h:66
Commissioner::Commissioner
Commissioner(Action< Commissionee, Criteria > aSelector, Criteria aCriteria)
Definition
Commissioner.h:40
Criteria
Definition
Criteria.h:53
7.1.3
Calibration
facilities
facilities-00-00-04
facilities
Commissioner.h
Generated by
1.13.2