| 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%4209C5FB02C3.cm preserve=no
|
|
|
7 |
//## end module%4209C5FB02C3.cm
|
|
|
8 |
|
|
|
9 |
//## begin module%4209C5FB02C3.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%4209C5FB02C3.cp
|
|
|
19 |
|
|
|
20 |
//## Module: DefinedVariableTable%4209C5FB02C3; Pseudo Package specification
|
|
|
21 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
22 |
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\DefinedVariableTable.h
|
|
|
23 |
|
|
|
24 |
#ifndef DefinedVariableTable_h
|
|
|
25 |
#define DefinedVariableTable_h 1
|
|
|
26 |
|
|
|
27 |
//## begin module%4209C5FB02C3.additionalIncludes preserve=no
|
|
|
28 |
//## end module%4209C5FB02C3.additionalIncludes
|
|
|
29 |
|
|
|
30 |
//## begin module%4209C5FB02C3.includes preserve=yes
|
|
|
31 |
#include <map>
|
|
|
32 |
#include <string>
|
|
|
33 |
//## end module%4209C5FB02C3.includes
|
|
|
34 |
|
|
|
35 |
|
| 2224 |
sbetterm |
36 |
class TestScenario;
|
|
|
37 |
class EvaluationContext;
|
| 2218 |
sbetterm |
38 |
class DefinedVariable;
|
|
|
39 |
|
|
|
40 |
//## begin module%4209C5FB02C3.additionalDeclarations preserve=yes
|
|
|
41 |
//## end module%4209C5FB02C3.additionalDeclarations
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
//## begin DefinedVariableTable%4209C5FB02C3.preface preserve=yes
|
|
|
45 |
//## end DefinedVariableTable%4209C5FB02C3.preface
|
|
|
46 |
|
|
|
47 |
//## Class: DefinedVariableTable%4209C5FB02C3
|
|
|
48 |
// The table of defined variables and their values.
|
|
|
49 |
//## Category: TransactionTestManager::Symbol Table%4209C5C30033
|
|
|
50 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
51 |
//## Persistence: Transient
|
|
|
52 |
//## Cardinality/Multiplicity: n
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
| 2224 |
sbetterm |
56 |
//## Uses: <unnamed>%425B4A730208;EvaluationContext { -> F}
|
|
|
57 |
//## Uses: <unnamed>%425B4DE70183;TransactionSpecification { -> }
|
|
|
58 |
|
| 2218 |
sbetterm |
59 |
class DefinedVariableTable
|
|
|
60 |
{
|
|
|
61 |
//## begin DefinedVariableTable%4209C5FB02C3.initialDeclarations preserve=yes
|
|
|
62 |
//## end DefinedVariableTable%4209C5FB02C3.initialDeclarations
|
|
|
63 |
|
|
|
64 |
public:
|
|
|
65 |
//## Constructors (generated)
|
|
|
66 |
DefinedVariableTable();
|
|
|
67 |
|
|
|
68 |
//## Destructor (generated)
|
|
|
69 |
virtual ~DefinedVariableTable();
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
//## Other Operations (specified)
|
|
|
73 |
//## Operation: clear%4209C916032F
|
|
|
74 |
// Clear the table.
|
|
|
75 |
void clear ();
|
|
|
76 |
|
| 2224 |
sbetterm |
77 |
//## Operation: defineVariable%425B4483019F
|
|
|
78 |
// Define the given variable and evaluate to it.
|
|
|
79 |
DefinedVariable& defineVariable (const std::string &variableName // The name of the variable.
|
| 2218 |
sbetterm |
80 |
);
|
|
|
81 |
|
| 2224 |
sbetterm |
82 |
//## Operation: defineVariable%425B461402A1
|
|
|
83 |
// Define the given variable and evaluate to it.
|
|
|
84 |
DefinedVariable& defineVariable (const std::string &variableName, // The name of the variable.
|
|
|
85 |
TestScenario &testScenario // The test scenario. While we do not accept ownership over this object, we
|
|
|
86 |
// do assume its validity for the remainder of our lifetime.
|
|
|
87 |
);
|
|
|
88 |
|
|
|
89 |
//## Operation: getVariable%4209C7770264
|
|
|
90 |
// Evaluate to the given variable.
|
|
|
91 |
DefinedVariable& getVariable (const std::string &variableName, // The name of the variable.
|
|
|
92 |
EvaluationContext& context // The context of this query.
|
|
|
93 |
);
|
|
|
94 |
|
| 2218 |
sbetterm |
95 |
//## Operation: isVariable%420ACFBB01CE
|
|
|
96 |
// Evaluate to true when the given symbol is a variable, otherwise evaluate to
|
|
|
97 |
// false.
|
| 2224 |
sbetterm |
98 |
const bool isVariable (const std::string &symbol, // The symbol.
|
|
|
99 |
EvaluationContext& context // The context of this query.
|
| 2218 |
sbetterm |
100 |
) const;
|
|
|
101 |
|
|
|
102 |
// Additional Public Declarations
|
|
|
103 |
//## begin DefinedVariableTable%4209C5FB02C3.public preserve=yes
|
|
|
104 |
//## end DefinedVariableTable%4209C5FB02C3.public
|
|
|
105 |
|
|
|
106 |
protected:
|
|
|
107 |
// Additional Protected Declarations
|
|
|
108 |
//## begin DefinedVariableTable%4209C5FB02C3.protected preserve=yes
|
|
|
109 |
//## end DefinedVariableTable%4209C5FB02C3.protected
|
|
|
110 |
|
|
|
111 |
private:
|
|
|
112 |
//## Constructors (generated)
|
|
|
113 |
DefinedVariableTable(const DefinedVariableTable &right);
|
|
|
114 |
|
|
|
115 |
//## Assignment Operation (generated)
|
|
|
116 |
DefinedVariableTable & operator=(const DefinedVariableTable &right);
|
|
|
117 |
|
|
|
118 |
// Data Members for Associations
|
|
|
119 |
|
|
|
120 |
//## Association: TransactionTestManager::Symbol Table::<unnamed>%4209C65E02D3
|
|
|
121 |
//## Role: DefinedVariableTable::variable%4209C65F0013
|
|
|
122 |
// The collection of defined variables.
|
|
|
123 |
//## Qualifier: variableName%4209C66701AA; std::string
|
|
|
124 |
// The name of the variable.
|
|
|
125 |
//## begin DefinedVariableTable::variable%4209C65F0013.role preserve=no private: DefinedVariable {1 -> 1RFHgAN}
|
|
|
126 |
std::map<std::string, DefinedVariable *> m_variable;
|
|
|
127 |
//## end DefinedVariableTable::variable%4209C65F0013.role
|
|
|
128 |
|
| 2224 |
sbetterm |
129 |
//## Association: TransactionTestManager::Symbol Table::<unnamed>%425B3802027D
|
|
|
130 |
//## Role: DefinedVariableTable::scenario%425B380203D5
|
|
|
131 |
// The collection of scenarios for which scenario-specific variables are
|
|
|
132 |
// defined.
|
|
|
133 |
//## Qualifier: testScenario%425B380900E7; int
|
|
|
134 |
// The test scenario to which this variable applies.
|
|
|
135 |
//## begin DefinedVariableTable::scenario%425B380203D5.role preserve=no private: TestScenario {1 -> 1RFHAN}
|
|
|
136 |
std::map<int, TestScenario *> m_scenario;
|
|
|
137 |
//## end DefinedVariableTable::scenario%425B380203D5.role
|
|
|
138 |
|
| 2218 |
sbetterm |
139 |
// Additional Private Declarations
|
|
|
140 |
//## begin DefinedVariableTable%4209C5FB02C3.private preserve=yes
|
|
|
141 |
//## end DefinedVariableTable%4209C5FB02C3.private
|
|
|
142 |
|
|
|
143 |
private: //## implementation
|
|
|
144 |
// Additional Implementation Declarations
|
|
|
145 |
//## begin DefinedVariableTable%4209C5FB02C3.implementation preserve=yes
|
|
|
146 |
//## end DefinedVariableTable%4209C5FB02C3.implementation
|
|
|
147 |
|
|
|
148 |
};
|
|
|
149 |
|
|
|
150 |
//## begin DefinedVariableTable%4209C5FB02C3.postscript preserve=yes
|
|
|
151 |
//## end DefinedVariableTable%4209C5FB02C3.postscript
|
|
|
152 |
|
|
|
153 |
// Class DefinedVariableTable
|
|
|
154 |
|
|
|
155 |
//## begin module%4209C5FB02C3.epilog preserve=yes
|
|
|
156 |
//## end module%4209C5FB02C3.epilog
|
|
|
157 |
|
|
|
158 |
|
|
|
159 |
#endif
|