summaryrefslogtreecommitdiff
path: root/bin/FOCUS/specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.spl
blob: a33b90ba255205e4c22c21da0811607ff0d65bf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<?xml version="1.0"?>

<!-- Leader Follower Flushing Strategy Specializations
 *   =================================================
 *   Details all the specialization transformations necessary
 *   to specialize the Flushing Strategy with the concrete
 *   Leader_Follower flushing strategy.
 *
 *   @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
 *   $Id$
-->

<transform>

<module name="TAO/tao">

<!-- Transformations to L/F Flushing Strategy -->
<file name="Leader_Follower_Flushing_Strategy.h">

<!-- Comment out Flushing_Strategy include -->
<remove>#include "Flushing_Strategy.h"</remove>

<!-- Add the forward declarations -->
<add>
 <hook>FLUSHING_STRATEGY_SPL_INCLUDE_ADD_HOOK</hook>
 <data>
class TAO_Transport;
class TAO_Queued_Message;
class ACE_Time_Value;

#include "TAO_Export.h"
 </data>
</add>

<!-- Remove all virtual key words -->
<remove>virtual</remove>

<!-- Remove inheritance from Flushing strategy -->
<remove>: public TAO_Flushing_Strategy</remove>

</file>

<!-- Do not build other Flushing Strategies -->
<file name="tao.mpc">

 <substitute>
  <search>Flushing_Strategy.h</search>
  <replace>// Flushing_Strategy.h</replace>
 </substitute>
 <substitute>
  <search>Flushing_Strategy.cpp</search>
  <replace>// Flushing_Strategy.cpp</replace>
 </substitute>

 <substitute>
  <search>Block_Flushing_Strategy.h</search>
  <replace>// Block_Flushing_Strategy.h</replace>
 </substitute>
 <substitute>
  <search>Block_Flushing_Strategy.cpp</search>
  <replace>// Block_Flushing_Strategy.cpp</replace>
 </substitute>

 <substitute>
  <search>Reactive_Flushing_Strategy.h</search>
  <replace>// Reactive_Flushing_Strategy.h</replace>
 </substitute>
 <substitute>
  <search>Reactive_Flushing_Strategy.cpp</search>
  <replace>// Reactive_Flushing_Strategy.cpp</replace>
 </substitute>

</file>

<file name="default_resource.cpp">

<substitute match-line="yes">
 <search>#include "tao/Reactive_Flushing_Strategy.h"</search>
 <replace> // #include "tao/Reactive_Flushing_Strategy.h"</replace>
</substitute>

<substitute match-line="yes">
 <search>#include "tao/Block_Flushing_Strategy.h"</search>
 <replace>// #include "tao/Block_Flushing_Strategy.h"</replace>
</substitute>

<!-- Replace all occurences of Flushing_Strategy with
     L/F Flushing Strategy -->
<substitute>
 <search>TAO_Flushing_Strategy</search>
 <replace>TAO_Leader_Follower_Flushing_Strategy</replace>
</substitute>

<!-- Comment out region specified by comment hooks -->
<comment>
 <start-hook>FLUSHING_STRATEGY_SPL_COMMENT_HOOK_START</start-hook>
 <end-hook>FLUSHING_STRATEGY_SPL_COMMENT_HOOK_END</end-hook>
</comment>

<!-- Add the L/F specialization after the hook -->
<add>
 <hook>FLUSHING_STRATEGY_SPL_COMMENT_HOOK_END</end-hook>
 <data>this->flushing_strategy_type_ = TAO_LEADER_FOLLOWER_FLUSHING;
 </data>
</add>

<!-- Comment out creation of all other flushing strategies -->
<comment>
 <start-hook>FLUSHING_STRATEGY_CREATION_SPL_HOOK_START</start-hook>
 <end-hook>FLUSHING_STRATEGY_CREATION_SPL_HOOK_END</end-hook>
</comment>

<!-- Create the L/F flushing strategy directly -->
<add>
 <hook>FLUSHING_STRATEGY_CREATION_SPL_HOOK_END</hook>
 <data>ACE_NEW_RETURN (strategy,
                       TAO_Leader_Follower_Flushing_Strategy,
                      0);
 </data>
</add>

</file>

<file name="default_resource.h">

<!-- Replace all occurences of Flushing_Strategy with L/F strategy -->
<substitute>
 <search>TAO_Flushing_Strategy</search>
 <replace>TAO_Leader_Follower_Flushing_Strategy</replace>
</substitute>

</file>

<file name="ORB_Core.h">

<!-- Replace all occurences of base strategy with most
     derived strategy -->
<substitute>
 <search>TAO_Flushing_Strategy</search>
 <replace>TAO_Leader_Follower_Flushing_Strategy</replace>
</substitute>

</file>

<file name="ORB_Core.cpp">

<!-- Replace the Flushing Strategy inclue with L/F
     flushing include -->
<substitute match-line="yes">
 <search>#include "Flushing_Strategy.h"</search>
 <replace>#include "Leader_Follower_Flushing_Strategy</replace>
</substitute>

</file>

<file name="ORB_Core.i">

<!-- Replace all occurences of base strategy with most
     derived strategy -->
<substitute>
 <search>TAO_Flushing_Strategy</search>
 <replace>TAO_Leader_Follower_Flushing_Strategy</replace>
</substitute>

</file>

<file name="Transport.h">

<!-- Remove the friend declaration of Reactive_Flushing -->
<substitute match-line="yes">
 <search>friend class TAO_Reactive_Flushing_Strategy;</search>
 <replace>// friend class TAO_Reactive_Flushing_Strategy;</replace>
</substitute>

<!-- Remove friend declaration of Block Flushing -->
<substitute match-line="yes">
 <search>friend class TAO_Block_Flushing_Strategy;</search>
 <replace>// friend class TAO_Block_Flushing_Strategy;</replace>
</substitute>

</file>

<file name="Transport.cpp">

<substitute match-line="yes">
  <search>#include "Flushing_Strategy.h"</search>
  <replace>#include "Leader_Follower_Flushing_Strategy.h</replace>
</substitute>

<!-- Replace all occurences of TAO_Flushing_Strategy with
     TAO_Leader_Follower_Flushing -->
<substitute>
 <search>TAO_Flushing_Strategy</search>
 <replace>TAO_Leader_Follower_Flushing_strategy</replace>
</substitute>

</file>

<file name="Resource_Factor.h">

<!-- Replace TAO_Flushing_Strategy with L/F version -->
<substitute>
 <search>TAO_Flushing_Strategy</search>
 <replace>TAO_Leader_Follower_Flushing_Strategy</replace>
</substitute>

</file>

</module>

</transform>