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%420AC16002C1.cm preserve=no
7
//## end module%420AC16002C1.cm
8
 
9
//## begin module%420AC16002C1.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%420AC16002C1.cp
19
 
20
//## Module: FieldExpression%420AC16002C1; Pseudo Package specification
21
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
22
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\FieldExpression.h
23
 
24
#ifndef FieldExpression_h
25
#define FieldExpression_h 1
26
 
27
//## begin module%420AC16002C1.additionalIncludes preserve=no
28
//## end module%420AC16002C1.additionalIncludes
29
 
30
//## begin module%420AC16002C1.includes preserve=yes
31
//## end module%420AC16002C1.includes
32
 
33
 
34
class TransactionSpecification;
35
class EvaluationContext;
36
class DefinedVariable;
37
class DefinedVariableTable;
38
 
39
//## begin module%420AC16002C1.additionalDeclarations preserve=yes
40
#include <vector>
41
//## end module%420AC16002C1.additionalDeclarations
42
 
43
 
44
//## begin FieldExpression%420AC16002C1.preface preserve=yes
45
//## end FieldExpression%420AC16002C1.preface
46
 
47
//## Class: FieldExpression%420AC16002C1; private
48
//	A class for representing expressions.
49
//## Category: TransactionTestManager::Symbol Table%4209C5C30033
50
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
51
//## Persistence: Transient
52
//## Cardinality/Multiplicity: n
53
 
54
 
55
 
56
//## Uses: <unnamed>%420AC4EA00CD;TransactionSpecification { -> F}
57
//## Uses: <unnamed>%420AD933029C;DefinedVariableTable { -> F}
58
//## Uses: <unnamed>%420AE38300AF;DefinedVariable { -> F}
59
//## Uses: <unnamed>%421176AC0366;EvaluationContext { -> F}
60
//## Uses: <unnamed>%421177FE00AB;Sequence { -> }
61
//## Uses: <unnamed>%42117819031C;SequenceCollection { -> }
62
//## Uses: <unnamed>%4211D98E031E;IMessageDigest { -> }
63
//## Uses: <unnamed>%42130E850275;XMLSchema::IXmlSchemaWrapperElement { -> }
64
 
65
class FieldExpression 
66
{
67
  //## begin FieldExpression%420AC16002C1.initialDeclarations preserve=yes
68
  //## end FieldExpression%420AC16002C1.initialDeclarations
69
 
70
  public:
71
    //## Constructors (generated)
72
      FieldExpression();
73
 
74
    //## Constructors (specified)
75
      //## Operation: FieldExpression%42105AAC0084
76
      //	A constructor that takes an expression.
77
      FieldExpression (const std::string &expression	// The expression.
78
      );
79
 
80
    //## Destructor (generated)
81
      virtual ~FieldExpression();
82
 
83
 
84
    //## Other Operations (specified)
85
      //## Operation: evaluate%420456630303
86
      //	Evaluate the expression of this field, and evaluate to true, or to false
87
      //	when any expression cannot be evaluated.
88
      const bool evaluate (std::string &value, 	// The resulting value.
89
      const bool &sideEffect, 	// When true, evaluation is allowed to have side effects, otherwise side
90
      	// effects must be suppressed.  For example, when true, a call to a sequence
91
      	// generator may allocate a new number from the sequence: when false, the call
92
      	// must not change the sate of the sequence generator.
93
      	// 
94
      	// One usage of this: when generating a transaction side effects are allowed,
95
      	// when rendering the hint to display for a field value side effects are not
96
      	// allowed.
97
      EvaluationContext& evaluationContext, 	// The evaluation context.
98
      std::vector< DefinedVariable * > &path, 	// The evaluation path.
99
      bool &postponed	// Set the actual argument to true when evaluation is postponed, and to false
100
      	// otherwise.
101
      );
102
 
103
      //## Operation: getExpression%420AC68F02E4
104
      //	Evaluate to the expression of this instance.
105
      const std::string & getExpression () const;
106
 
107
      //## Operation: isFunctor%4209B773036F
108
      //	Evaluate to true when the given string is a functor, and to false when it is
109
      //	not.
110
      static const bool isFunctor (const std::string &string	// The string.
111
      );
112
 
113
      //## Operation: setExpression%420AC68F02F3
114
      //	Set the expression of this instance, and evaluate to the resulting value.
115
      const std::string & setExpression (const std::string &value	// The value.
116
      );
117
 
118
    // Additional Public Declarations
119
      //## begin FieldExpression%420AC16002C1.public preserve=yes
120
      //## end FieldExpression%420AC16002C1.public
121
 
122
  protected:
123
    // Additional Protected Declarations
124
      //## begin FieldExpression%420AC16002C1.protected preserve=yes
125
      //## end FieldExpression%420AC16002C1.protected
126
 
127
  private:
128
    //## Constructors (generated)
129
      FieldExpression(const FieldExpression &right);
130
 
131
    //## Assignment Operation (generated)
132
      FieldExpression & operator=(const FieldExpression &right);
133
 
134
 
135
    //## Other Operations (specified)
136
      //## Operation: evaluateFunction%4208AE9D0216
137
      //	Evaluate the given function.
138
      const bool evaluateFunction (std::istream &is, 	// The input stream.
139
      std::string &value, 	// The resulting value.
140
      std::string &symbol, 	// The variable.
141
      const bool &sideEffect, 	// When true, evaluation is allowed to have side effects, otherwise side
142
      	// effects must be suppressed.  For example, when true, a call to a sequence
143
      	// generator may allocate a new number from the sequence: when false, the call
144
      	// must not change the sate of the sequence generator.
145
      	// 
146
      	// One usage of this: when generating a transaction side effects are allowed,
147
      	// when rendering the hint to display for a field value side effects are not
148
      	// allowed.
149
      EvaluationContext& evaluationContext, 	// The evaluation context.
150
      std::vector< DefinedVariable * > &path, 	// The evaluation path.
151
      bool &postponed	// Set the actual argument to true when evaluation is postponed, and to false
152
      	// otherwise.
153
      );
154
 
155
      //## Operation: evaluateVariable%420AE22101D7
156
      //	Evaluate the given variable.
157
      const bool evaluateVariable (std::istream &is, 	// The input stream.
158
      std::string &value, 	// The resulting value.
159
      std::string &symbol, 	// The variable.
160
      const bool &sideEffect, 	// When true, evaluation is allowed to have side effects, otherwise side
161
      	// effects must be suppressed.  For example, when true, a call to a sequence
162
      	// generator may allocate a new number from the sequence: when false, the call
163
      	// must not change the sate of the sequence generator.
164
      	// 
165
      	// One usage of this: when generating a transaction side effects are allowed,
166
      	// when rendering the hint to display for a field value side effects are not
167
      	// allowed.
168
      EvaluationContext& evaluationContext, 	// The evaluation context.
169
      std::vector< DefinedVariable * > &path, 	// The evaluation path.
170
      bool &postponed	// Set the actual argument to true when evaluation is postponed, and to false
171
      	// otherwise.
172
      );
173
 
174
      //## Operation: readIdentifier%42102FB70219
175
      //	Read an identifier from the input stream and evaluate to true, or to false
176
      //	when an identifier cannot be read.
177
      static const bool readIdentifier (std::istream &is, 	// The input stream.
178
      std::string &identifier	// The identifier.
179
      );
180
 
181
      //## Operation: readTerm%420B0EB603D2
182
      //	Read a term from the input stream and evaluate to true, or to false when a
183
      //	term cannot be read.
184
      static const bool readTerm (std::istream &is, 	// The input stream.
185
      std::string &term	// The term.
186
      );
187
 
188
      //## Operation: skipCharacter%420B100701E7
189
      //	Skip the given character from the input stream and evaluate to true, or to
190
      //	false when the given character is not found next in the input stream.
191
      static const bool skipCharacter (std::istream &is, 	// The input stream.
192
      const char &character	// The character.
193
      );
194
 
195
    // Data Members for Class Attributes
196
 
197
      //## Attribute: cachedValue%420B24A402FC
198
      //	The evaluated value of this expression.  We can cache some expressions
199
      //	because their value is deterministic, so we do to speed up generation.
200
      //## begin FieldExpression::cachedValue%420B24A402FC.attr preserve=no  private: std::string {VA} 
201
      std::string m_cachedValue;
202
      //## end FieldExpression::cachedValue%420B24A402FC.attr
203
 
204
      //## Attribute: expression%420AC5F30189
205
      //	The expression.
206
      //## begin FieldExpression::expression%420AC5F30189.attr preserve=no  private: std::string {VA} 
207
      std::string m_expression;
208
      //## end FieldExpression::expression%420AC5F30189.attr
209
 
210
    // Additional Private Declarations
211
      //## begin FieldExpression%420AC16002C1.private preserve=yes
212
      //## end FieldExpression%420AC16002C1.private
213
 
214
  private: //## implementation
215
    // Additional Implementation Declarations
216
      //## begin FieldExpression%420AC16002C1.implementation preserve=yes
217
      //## end FieldExpression%420AC16002C1.implementation
218
 
219
};
220
 
221
//## begin FieldExpression%420AC16002C1.postscript preserve=yes
222
//## end FieldExpression%420AC16002C1.postscript
223
 
224
// Class FieldExpression 
225
 
226
//## begin module%420AC16002C1.epilog preserve=yes
227
//## end module%420AC16002C1.epilog
228
 
229
 
230
#endif