Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2218 sbetterm 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%42030C2C00B8.cm preserve=no
7
//## end module%42030C2C00B8.cm
8
 
9
//## begin module%42030C2C00B8.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%42030C2C00B8.cp
19
 
20
//## Module: TestScenario%42030C2C00B8; Pseudo Package specification
21
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
22
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\TestScenario.h
23
 
24
#ifndef TestScenario_h
25
#define TestScenario_h 1
26
 
27
//## begin module%42030C2C00B8.additionalIncludes preserve=no
28
//## end module%42030C2C00B8.additionalIncludes
29
 
30
//## begin module%42030C2C00B8.includes preserve=yes
31
#include <map>
32
#include <vector>
33
//## end module%42030C2C00B8.includes
34
 
35
 
36
class TransactionSpecification;
37
class EvaluationContext;
38
class TransactionStream;
39
class Iteration;
40
 
41
//## begin module%42030C2C00B8.additionalDeclarations preserve=yes
42
//## end module%42030C2C00B8.additionalDeclarations
43
 
44
 
45
//## begin TestScenario%42030C2C00B8.preface preserve=yes
46
//## end TestScenario%42030C2C00B8.preface
47
 
48
//## Class: TestScenario%42030C2C00B8; private
49
//	A test scenario.
50
//## Category: TransactionTestManager::Transaction Generation%4202F8EE0128
51
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
52
//## Persistence: Transient
53
//## Cardinality/Multiplicity: n
54
 
55
 
56
 
57
//## Uses: <unnamed>%42081A9901FD;TransactionStream { -> F}
58
//## Uses: <unnamed>%421173580036;EvaluationContext { -> F}
59
 
60
class TestScenario 
61
{
62
  //## begin TestScenario%42030C2C00B8.initialDeclarations preserve=yes
63
  //## end TestScenario%42030C2C00B8.initialDeclarations
64
 
65
  public:
66
    //## Constructors (specified)
67
      //## Operation: TestScenario%4203231D030E
68
      //	The only constructor.
69
      TestScenario (const int &scenario, 	// The primary key of the scenario.
70
      Iteration& iteration	// The iteration for which this object is defined.  While we do not accept
71
      	// ownership over this instance, we do assume its validity for the remainder
72
      	// of our lifetime.
73
      );
74
 
75
    //## Destructor (generated)
76
      virtual ~TestScenario();
77
 
78
 
79
    //## Other Operations (specified)
80
      //## Operation: generate%420455D80390
81
      //	Generate the transactions defined for this scenario and evaluate to true, or
82
      //	to false when any transaction cannot be generated.
83
      const bool generate (TransactionStream& stream, 	// The stream into which to generate.
84
      const bool &generateHeaders, 	// When true, the transaction stream contains transaction header.  Otherwise,
85
      	// the transaction steam does not contain transaction headers.
86
      EvaluationContext& evaluationContext	// The evaluation context.
87
      );
88
 
89
      //## Operation: getBatchSize%42042C5E0029
90
      //	Evaluate to the number of transactions contained in a batch.
91
      const unsigned & getBatchSize () const;
92
 
93
      //## Operation: getIteration%420460EA003C
94
      //	Evaluate to the iteration for which this scenario is defined.
95
      const Iteration& getIteration () const;
96
 
97
      //## Operation: getRepeatCount%42042C5D02F8
98
      //	Evaluate to the number of times that this scenario is played into the
99
      //	transaction stream.
100
      const unsigned & getRepeatCount () const;
101
 
102
      //## Operation: getScenarioName%42084D3A0270
103
      //	Get the scenario name.
104
      const std::string & getScenarioName () const;
105
 
106
      //## Operation: getScenarioNumber%4203252300A6
107
      //	Evaluate to the scenario number of this instance.
108
      const int & getScenarioNumber () const;
109
 
110
      //## Operation: getTransactionCount%420890BF03BE
111
      //	Evaluate to the number of transactions in this scenario multiplied by the
112
      //	repeat count.
113
      const unsigned getTransactionCount () const;
114
 
115
      //## Operation: getTransactionSpecification%420328E00043
116
      //	Evaluate to the given transaction.  When the transaction doesn't already
117
      //	exist, create it.
118
      TransactionSpecification& getTransactionSpecification (const int &transaction, 	// The identity of the transaction.
119
      const std::string &payloadStructureName	// The name of the structure that describes the payload of this transaction.
120
      );
121
 
122
      //## Operation: setBatchSize%42042CF100D5
123
      //	Set the batch size and evaluate to the resulting value.
124
      const unsigned & setBatchSize (const unsigned &value	// The value.
125
      );
126
 
127
      //## Operation: setRepeatCount%42042CF100E5
128
      //	Set the repeat count and evaluate to the resulting value.
129
      const unsigned & setRepeatCount (const unsigned &value	// The value.
130
      );
131
 
132
      //## Operation: setScenarioName%42084D300222
133
      //	Set the scenario name, and evaluate to it.
134
      std::string & setScenarioName (const std::string &value	// The scenario name.
135
      );
136
 
137
    // Additional Public Declarations
138
      //## begin TestScenario%42030C2C00B8.public preserve=yes
139
      //## end TestScenario%42030C2C00B8.public
140
 
141
  protected:
142
    // Additional Protected Declarations
143
      //## begin TestScenario%42030C2C00B8.protected preserve=yes
144
      //## end TestScenario%42030C2C00B8.protected
145
 
146
  private:
147
    //## Constructors (generated)
148
      TestScenario();
149
 
150
      TestScenario(const TestScenario &right);
151
 
152
    //## Assignment Operation (generated)
153
      TestScenario & operator=(const TestScenario &right);
154
 
155
 
156
    //## Other Operations (specified)
157
      //## Operation: buildBatchName%4208537A00B6
158
      //	Build a batch name from the given scenario name and evaluate to it.
159
      std::string & buildBatchName (std::string &batchName, 	// The value to which this method evaluates.
160
      const std::string &scenarioName	// The scenario name.
161
      );
162
 
163
    // Data Members for Class Attributes
164
 
165
      //## Attribute: batchSize%42042D510058
166
      //	The number of transactions in a batch.
167
      //## begin TestScenario::batchSize%42042D510058.attr preserve=no  private: unsigned {VA} 0
168
      unsigned m_batchSize;
169
      //## end TestScenario::batchSize%42042D510058.attr
170
 
171
      //## Attribute: repeatCount%42042D6D0029
172
      //	The number of times that this scenario is played into the transaction stream.
173
      //## begin TestScenario::repeatCount%42042D6D0029.attr preserve=no  private: unsigned {VA} 0
174
      unsigned m_repeatCount;
175
      //## end TestScenario::repeatCount%42042D6D0029.attr
176
 
177
      //## Attribute: scenario%4203255B026B
178
      //	The transaction specification number of this transaction.
179
      //## begin TestScenario::scenario%4203255B026B.attr preserve=no  private: int {VAC} 
180
      const int m_scenario;
181
      //## end TestScenario::scenario%4203255B026B.attr
182
 
183
      //## Attribute: scenarioName%42084D0601B5
184
      //	The name of this scenario.
185
      //## begin TestScenario::scenarioName%42084D0601B5.attr preserve=no  private: std::string {VA} 
186
      std::string m_scenarioName;
187
      //## end TestScenario::scenarioName%42084D0601B5.attr
188
 
189
    // Data Members for Associations
190
 
191
      //## Association: TransactionTestManager::Transaction Generation::<unnamed>%42030C7F020F
192
      //## Role: TestScenario::transaction%42030C7F0396
193
      //	The collection of transactions of this scenario.
194
      //## Qualifier: transaction%42030C89001B; int
195
      //	The primary key of the transaction.
196
      //## begin TestScenario::transaction%42030C7F0396.role preserve=no  private: TransactionSpecification {1 -> 1RFHgAN}
197
      std::map<int, TransactionSpecification *> m_transaction;
198
      //## end TestScenario::transaction%42030C7F0396.role
199
 
200
      //## Association: TransactionTestManager::Transaction Generation::<unnamed>%42044D9F011B
201
      //## Role: TestScenario::iteration%42044DA00060
202
      //	The iteration for which this object is defined.  While we do not accept
203
      //	ownership over this instance, we do assume its validity for the remainder of
204
      //	our lifetime.
205
      //## begin TestScenario::iteration%42044DA00060.role preserve=no  private: Iteration {1 -> 1RFHAN}
206
      Iteration *m_iteration;
207
      //## end TestScenario::iteration%42044DA00060.role
208
 
209
      //## Association: TransactionTestManager::Transaction Generation::<unnamed>%42071055018B
210
      //## Role: TestScenario::orderedTransactionCollection%4207105502F2
211
      //	The collection of transactions in generation order.
212
      //## begin TestScenario::orderedTransactionCollection%4207105502F2.role preserve=no  private: TransactionSpecification {1 -> *RFHAN}
213
      std::vector< TransactionSpecification * > m_orderedTransactionCollection;
214
      //## end TestScenario::orderedTransactionCollection%4207105502F2.role
215
 
216
    // Additional Private Declarations
217
      //## begin TestScenario%42030C2C00B8.private preserve=yes
218
      //## end TestScenario%42030C2C00B8.private
219
 
220
  private: //## implementation
221
    // Additional Implementation Declarations
222
      //## begin TestScenario%42030C2C00B8.implementation preserve=yes
223
      //## end TestScenario%42030C2C00B8.implementation
224
 
225
};
226
 
227
//## begin TestScenario%42030C2C00B8.postscript preserve=yes
228
//## end TestScenario%42030C2C00B8.postscript
229
 
230
// Class TestScenario 
231
 
232
//## begin module%42030C2C00B8.epilog preserve=yes
233
//## end module%42030C2C00B8.epilog
234
 
235
 
236
#endif