Subversion Repositories DevTools

Rev

Rev 2263 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2263 kivins 1
//## begin module%1.7%.codegen_version preserve=yes
2
//   Read the documentation to learn more about C++ code generator
3
//   versioning.
4
//## end module%1.7%.codegen_version
5
 
6
//## begin module%42116B3700AD.cm preserve=no
7
//## end module%42116B3700AD.cm
8
 
9
//## begin module%42116B3700AD.cp preserve=no
10
//	C O P Y R I G H T   N O T I C E
11
//	This material is confidential to ERG and may not be disclosed in whole
12
//	or in part to any third party nor used in any manner whatsoever other
13
//	than for the purposes expressly consented to by ERG in writing.
14
//
15
//	This material is also copyright and may not be reproduced, stored in a
16
//	retrieval system or transmitted in any form or by any means in whole or
17
//	in part without the express written consent of ERG.
18
//## end module%42116B3700AD.cp
19
 
20
//## Module: EvaluationContext%42116B3700AD; Pseudo Package body
21
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
22
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\EvaluationContext.cpp
23
 
24
//## begin module%42116B3700AD.additionalIncludes preserve=no
25
//## end module%42116B3700AD.additionalIncludes
26
 
27
//## begin module%42116B3700AD.includes preserve=yes
28
//## end module%42116B3700AD.includes
29
 
30
// DefinedVariableTable
31
#include "DefinedVariableTable.h"
32
// SequenceCollection
33
#include "SequenceCollection.h"
34
// TimeEstimate
35
#include "TimeEstimate.h"
36
// ProgressBar
37
#include "ProgressBar.h"
38
// IXmlSchemaWrapperElement
39
#include "IXmlSchemaWrapperElement.h"
40
// TransactionSpecification
41
#include "TransactionSpecification.h"
42
// EvaluationContext
43
#include "EvaluationContext.h"
44
// IHash
45
#include "IHash.h"
46
// ICryptographicServerProxy
47
#include "ICryptographicServerProxy.h"
48
// IMessageDigest
49
#include "IMessageDigest.h"
50
//## begin module%42116B3700AD.additionalDeclarations preserve=yes
51
//## end module%42116B3700AD.additionalDeclarations
52
 
53
 
54
// Class EvaluationContext 
55
 
56
//## Operation: EvaluationContext%42116FD901D9
57
EvaluationContext::EvaluationContext (DefinedVariableTable& symbolTable, SequenceCollection& sequences, ProgressBar& progressBar, IMessageDigest* messageDigest, IHash *hash, ICryptographicServerProxy* cryptographicServer, TimeEstimate& timeEstimate)
58
  //## begin EvaluationContext::EvaluationContext%42116FD901D9.hasinit preserve=no
59
	  : m_scenarioIndex(0),
60
		m_transaction(0),
61
		m_symbolTable(0),
62
		m_progressBar(0),
63
		m_sequences(0),
64
		m_estimate(0),
65
		m_digest(0),
66
		m_schemaElement(0),
67
		m_cryptographicServer(0),
68
		m_hash(0)
69
  //## end EvaluationContext::EvaluationContext%42116FD901D9.hasinit
70
  //## begin EvaluationContext::EvaluationContext%42116FD901D9.initialization preserve=yes
71
  //## end EvaluationContext::EvaluationContext%42116FD901D9.initialization
72
{
73
  //## begin EvaluationContext::EvaluationContext%42116FD901D9.body preserve=yes
74
 
75
	m_cryptographicServer	= cryptographicServer;
76
	m_digest				= messageDigest;
77
	m_estimate				= &timeEstimate;
78
	m_hash					= hash;
79
	m_symbolTable			= &symbolTable;
80
	m_progressBar			= &progressBar;
81
	m_sequences				= &sequences;
82
 
83
  //## end EvaluationContext::EvaluationContext%42116FD901D9.body
84
}
85
 
86
 
87
EvaluationContext::~EvaluationContext()
88
{
89
  //## begin EvaluationContext::~EvaluationContext%42116B3700AD_dest.body preserve=yes
90
 
91
	m_transaction			= 0;	// We don't own this.
92
	m_symbolTable			= 0;	// We don't own this.
93
	m_schemaElement			= 0;	// We don't own this.
94
	m_progressBar			= 0;	// We don't own this.
95
	m_hash					= 0;	// We don't own this.
96
	m_estimate				= 0;    // We don't own this.
97
	m_digest				= 0;	// We don't own this.
98
	m_cryptographicServer	= 0;	// We don't own this.
99
 
100
  //## end EvaluationContext::~EvaluationContext%42116B3700AD_dest.body
101
}
102
 
103
 
104
 
105
//## Other Operations (implementation)
106
//## Operation: getCryptographicServer%422EAADF0074
107
ICryptographicServerProxy& EvaluationContext::getCryptographicServer ()
108
{
109
  //## begin EvaluationContext::getCryptographicServer%422EAADF0074.body preserve=yes
110
 
111
	return ( *m_cryptographicServer );
112
 
113
  //## end EvaluationContext::getCryptographicServer%422EAADF0074.body
114
}
115
 
116
//## Operation: getHash%4288378902B6
117
IHash & EvaluationContext::getHash ()
118
{
119
  //## begin EvaluationContext::getHash%4288378902B6.body preserve=yes
120
 
121
	return ( *m_hash );
122
 
123
  //## end EvaluationContext::getHash%4288378902B6.body
124
}
125
 
126
//## Operation: getMessageDigest%4211C6C901B5
127
IMessageDigest& EvaluationContext::getMessageDigest ()
128
{
129
  //## begin EvaluationContext::getMessageDigest%4211C6C901B5.body preserve=yes
130
 
131
	return ( *m_digest );
132
 
133
  //## end EvaluationContext::getMessageDigest%4211C6C901B5.body
134
}
135
 
136
//## Operation: getProgressBar%42116CAA0204
137
ProgressBar& EvaluationContext::getProgressBar ()
138
{
139
  //## begin EvaluationContext::getProgressBar%42116CAA0204.body preserve=yes
140
 
141
	return ( *m_progressBar );
142
 
143
  //## end EvaluationContext::getProgressBar%42116CAA0204.body
144
}
145
 
146
//## Operation: getScenarioIndex%4236AD17026A
147
const unsigned & EvaluationContext::getScenarioIndex () const
148
{
149
  //## begin EvaluationContext::getScenarioIndex%4236AD17026A.body preserve=yes
150
 
151
	return ( m_scenarioIndex );
152
 
153
  //## end EvaluationContext::getScenarioIndex%4236AD17026A.body
154
}
155
 
156
//## Operation: getSchemaElement%4212D7B702C1
157
XMLSchema::IXmlSchemaWrapperElement & EvaluationContext::getSchemaElement ()
158
{
159
  //## begin EvaluationContext::getSchemaElement%4212D7B702C1.body preserve=yes
160
 
161
	return ( *m_schemaElement );
162
 
163
  //## end EvaluationContext::getSchemaElement%4212D7B702C1.body
164
}
165
 
166
//## Operation: getSequenceCollection%421170BF0053
167
SequenceCollection& EvaluationContext::getSequenceCollection ()
168
{
169
  //## begin EvaluationContext::getSequenceCollection%421170BF0053.body preserve=yes
170
 
171
	return ( *m_sequences );
172
 
173
  //## end EvaluationContext::getSequenceCollection%421170BF0053.body
174
}
175
 
176
//## Operation: getSymbolTable%42116CA901D6
177
DefinedVariableTable& EvaluationContext::getSymbolTable ()
178
{
179
  //## begin EvaluationContext::getSymbolTable%42116CA901D6.body preserve=yes
180
 
181
	return ( *m_symbolTable );
182
 
183
  //## end EvaluationContext::getSymbolTable%42116CA901D6.body
184
}
185
 
186
//## Operation: getTimeEstimate%4211D01E02E6
187
TimeEstimate& EvaluationContext::getTimeEstimate ()
188
{
189
  //## begin EvaluationContext::getTimeEstimate%4211D01E02E6.body preserve=yes
190
 
191
	return ( *m_estimate );  
192
 
193
  //## end EvaluationContext::getTimeEstimate%4211D01E02E6.body
194
}
195
 
196
//## Operation: getTransaction%42116C8703D9
197
TransactionSpecification& EvaluationContext::getTransaction ()
198
{
199
  //## begin EvaluationContext::getTransaction%42116C8703D9.body preserve=yes
200
 
201
	return ( *m_transaction );
202
 
203
  //## end EvaluationContext::getTransaction%42116C8703D9.body
204
}
205
 
206
//## Operation: haveCryptographicServer%422EAADF00B2
207
const bool EvaluationContext::haveCryptographicServer () const
208
{
209
  //## begin EvaluationContext::haveCryptographicServer%422EAADF00B2.body preserve=yes
210
 
211
	return ( m_cryptographicServer != 0 );
212
 
213
  //## end EvaluationContext::haveCryptographicServer%422EAADF00B2.body
214
}
215
 
216
//## Operation: haveHash%4288378902F4
217
const bool EvaluationContext::haveHash () const
218
{
219
  //## begin EvaluationContext::haveHash%4288378902F4.body preserve=yes
220
 
221
	return ( m_hash != 0 );
222
 
223
  //## end EvaluationContext::haveHash%4288378902F4.body
224
}
225
 
226
//## Operation: haveMessageDigest%4211C6ED01C4
227
const bool EvaluationContext::haveMessageDigest () const
228
{
229
  //## begin EvaluationContext::haveMessageDigest%4211C6ED01C4.body preserve=yes
230
 
231
	return ( m_digest != 0 );
232
 
233
  //## end EvaluationContext::haveMessageDigest%4211C6ED01C4.body
234
}
235
 
236
//## Operation: haveProgressBar%42116E850298
237
const bool EvaluationContext::haveProgressBar () const
238
{
239
  //## begin EvaluationContext::haveProgressBar%42116E850298.body preserve=yes
240
 
241
	return ( m_progressBar != 0 );
242
 
243
  //## end EvaluationContext::haveProgressBar%42116E850298.body
244
}
245
 
246
//## Operation: haveSchemaElement%4212D7B702FF
247
const bool EvaluationContext::haveSchemaElement () const
248
{
249
  //## begin EvaluationContext::haveSchemaElement%4212D7B702FF.body preserve=yes
250
 
251
	return ( m_schemaElement != 0 );
252
 
253
  //## end EvaluationContext::haveSchemaElement%4212D7B702FF.body
254
}
255
 
256
//## Operation: haveSequenceCollection%421170BF0081
257
const bool EvaluationContext::haveSequenceCollection () const
258
{
259
  //## begin EvaluationContext::haveSequenceCollection%421170BF0081.body preserve=yes
260
 
261
	return ( m_sequences != 0 );
262
 
263
  //## end EvaluationContext::haveSequenceCollection%421170BF0081.body
264
}
265
 
266
//## Operation: haveSymbolTable%42116E8502B8
267
const bool EvaluationContext::haveSymbolTable () const
268
{
269
  //## begin EvaluationContext::haveSymbolTable%42116E8502B8.body preserve=yes
270
 
271
	return ( m_symbolTable != 0 );
272
 
273
  //## end EvaluationContext::haveSymbolTable%42116E8502B8.body
274
}
275
 
276
//## Operation: haveTransaction%42116E8502D7
277
const bool EvaluationContext::haveTransaction ()
278
{
279
  //## begin EvaluationContext::haveTransaction%42116E8502D7.body preserve=yes
280
 
281
	return ( m_transaction != 0 );
282
 
283
  //## end EvaluationContext::haveTransaction%42116E8502D7.body
284
}
285
 
286
//## Operation: setProgressBar%42116CAA01E5
287
void EvaluationContext::setProgressBar (ProgressBar& progressBar)
288
{
289
  //## begin EvaluationContext::setProgressBar%42116CAA01E5.body preserve=yes
290
 
291
	m_progressBar = &progressBar;
292
 
293
  //## end EvaluationContext::setProgressBar%42116CAA01E5.body
294
}
295
 
296
//## Operation: setScenarioIndex%4236AD170299
297
void EvaluationContext::setScenarioIndex (const unsigned &value)
298
{
299
  //## begin EvaluationContext::setScenarioIndex%4236AD170299.body preserve=yes
300
 
301
	m_scenarioIndex = value;
302
 
303
  //## end EvaluationContext::setScenarioIndex%4236AD170299.body
304
}
305
 
306
//## Operation: setSchemaElement%4212D7B7031F
307
void EvaluationContext::setSchemaElement (XMLSchema::IXmlSchemaWrapperElement &schemaElement)
308
{
309
  //## begin EvaluationContext::setSchemaElement%4212D7B7031F.body preserve=yes
310
 
311
	m_schemaElement = &schemaElement;
312
 
313
  //## end EvaluationContext::setSchemaElement%4212D7B7031F.body
314
}
315
 
316
//## Operation: setSequenceCollection%421170BF0091
317
void EvaluationContext::setSequenceCollection (SequenceCollection& sequenceCollection)
318
{
319
  //## begin EvaluationContext::setSequenceCollection%421170BF0091.body preserve=yes
320
 
321
	m_sequences = &sequenceCollection;
322
 
323
  //## end EvaluationContext::setSequenceCollection%421170BF0091.body
324
}
325
 
326
//## Operation: setSymbolTable%42116CA901B6
327
void EvaluationContext::setSymbolTable (DefinedVariableTable& symbolTable)
328
{
329
  //## begin EvaluationContext::setSymbolTable%42116CA901B6.body preserve=yes
330
 
331
	m_symbolTable = &symbolTable;
332
 
333
  //## end EvaluationContext::setSymbolTable%42116CA901B6.body
334
}
335
 
336
//## Operation: setTransaction%42116C60036C
337
void EvaluationContext::setTransaction (TransactionSpecification& transaction)
338
{
339
  //## begin EvaluationContext::setTransaction%42116C60036C.body preserve=yes
340
 
341
	m_transaction = &transaction;
342
 
343
  //## end EvaluationContext::setTransaction%42116C60036C.body
344
}
345
 
346
// Additional Declarations
347
  //## begin EvaluationContext%42116B3700AD.declarations preserve=yes
2267 kivins 348
const std::string & EvaluationContext::getStartTime ( ) const
349
{
350
   return(m_shiftStartTime);
351
} 
352
void EvaluationContext::setStartTime (const std::string &startTime	)
353
{
354
    m_shiftStartTime = startTime;
355
}
2263 kivins 356
  //## end EvaluationContext%42116B3700AD.declarations
357
 
358
//## begin module%42116B3700AD.epilog preserve=yes
359
//## end module%42116B3700AD.epilog