Subversion Repositories DevTools

Rev

Rev 2218 | Details | Compare with Previous | 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 { -> }
2222 sbetterm 64
//## Uses: <unnamed>%422EB8C202B5;ICryptographicServerProxy { -> }
2218 sbetterm 65
 
66
class FieldExpression 
67
{
68
  //## begin FieldExpression%420AC16002C1.initialDeclarations preserve=yes
69
  //## end FieldExpression%420AC16002C1.initialDeclarations
70
 
71
  public:
72
    //## Constructors (generated)
73
      FieldExpression();
74
 
75
    //## Constructors (specified)
76
      //## Operation: FieldExpression%42105AAC0084
77
      //	A constructor that takes an expression.
78
      FieldExpression (const std::string &expression	// The expression.
79
      );
80
 
81
    //## Destructor (generated)
82
      virtual ~FieldExpression();
83
 
84
 
85
    //## Other Operations (specified)
86
      //## Operation: evaluate%420456630303
87
      //	Evaluate the expression of this field, and evaluate to true, or to false
88
      //	when any expression cannot be evaluated.
89
      const bool evaluate (std::string &value, 	// The resulting value.
90
      const bool &sideEffect, 	// When true, evaluation is allowed to have side effects, otherwise side
91
      	// effects must be suppressed.  For example, when true, a call to a sequence
92
      	// generator may allocate a new number from the sequence: when false, the call
93
      	// must not change the sate of the sequence generator.
94
      	// 
95
      	// One usage of this: when generating a transaction side effects are allowed,
96
      	// when rendering the hint to display for a field value side effects are not
97
      	// allowed.
98
      EvaluationContext& evaluationContext, 	// The evaluation context.
99
      std::vector< DefinedVariable * > &path, 	// The evaluation path.
100
      bool &postponed	// Set the actual argument to true when evaluation is postponed, and to false
101
      	// otherwise.
102
      );
103
 
104
      //## Operation: getExpression%420AC68F02E4
105
      //	Evaluate to the expression of this instance.
106
      const std::string & getExpression () const;
107
 
108
      //## Operation: isFunctor%4209B773036F
109
      //	Evaluate to true when the given string is a functor, and to false when it is
110
      //	not.
111
      static const bool isFunctor (const std::string &string	// The string.
112
      );
113
 
114
      //## Operation: setExpression%420AC68F02F3
115
      //	Set the expression of this instance, and evaluate to the resulting value.
116
      const std::string & setExpression (const std::string &value	// The value.
117
      );
118
 
119
    // Additional Public Declarations
120
      //## begin FieldExpression%420AC16002C1.public preserve=yes
121
      //## end FieldExpression%420AC16002C1.public
122
 
123
  protected:
124
    // Additional Protected Declarations
125
      //## begin FieldExpression%420AC16002C1.protected preserve=yes
126
      //## end FieldExpression%420AC16002C1.protected
127
 
128
  private:
129
    //## Constructors (generated)
130
      FieldExpression(const FieldExpression &right);
131
 
132
    //## Assignment Operation (generated)
133
      FieldExpression & operator=(const FieldExpression &right);
134
 
135
 
136
    //## Other Operations (specified)
137
      //## Operation: evaluateFunction%4208AE9D0216
138
      //	Evaluate the given function.
139
      const bool evaluateFunction (std::istream &is, 	// The input stream.
140
      std::string &value, 	// The resulting value.
141
      std::string &symbol, 	// The variable.
142
      const bool &sideEffect, 	// When true, evaluation is allowed to have side effects, otherwise side
143
      	// effects must be suppressed.  For example, when true, a call to a sequence
144
      	// generator may allocate a new number from the sequence: when false, the call
145
      	// must not change the sate of the sequence generator.
146
      	// 
147
      	// One usage of this: when generating a transaction side effects are allowed,
148
      	// when rendering the hint to display for a field value side effects are not
149
      	// allowed.
150
      EvaluationContext& evaluationContext, 	// The evaluation context.
151
      std::vector< DefinedVariable * > &path, 	// The evaluation path.
152
      bool &postponed	// Set the actual argument to true when evaluation is postponed, and to false
153
      	// otherwise.
154
      );
155
 
156
      //## Operation: evaluateVariable%420AE22101D7
157
      //	Evaluate the given variable.
158
      const bool evaluateVariable (std::istream &is, 	// The input stream.
159
      std::string &value, 	// The resulting value.
160
      std::string &symbol, 	// The variable.
161
      const bool &sideEffect, 	// When true, evaluation is allowed to have side effects, otherwise side
162
      	// effects must be suppressed.  For example, when true, a call to a sequence
163
      	// generator may allocate a new number from the sequence: when false, the call
164
      	// must not change the sate of the sequence generator.
165
      	// 
166
      	// One usage of this: when generating a transaction side effects are allowed,
167
      	// when rendering the hint to display for a field value side effects are not
168
      	// allowed.
169
      EvaluationContext& evaluationContext, 	// The evaluation context.
170
      std::vector< DefinedVariable * > &path, 	// The evaluation path.
171
      bool &postponed	// Set the actual argument to true when evaluation is postponed, and to false
172
      	// otherwise.
173
      );
174
 
175
      //## Operation: readIdentifier%42102FB70219
176
      //	Read an identifier from the input stream and evaluate to true, or to false
177
      //	when an identifier cannot be read.
178
      static const bool readIdentifier (std::istream &is, 	// The input stream.
179
      std::string &identifier	// The identifier.
180
      );
181
 
182
      //## Operation: readTerm%420B0EB603D2
183
      //	Read a term from the input stream and evaluate to true, or to false when a
184
      //	term cannot be read.
185
      static const bool readTerm (std::istream &is, 	// The input stream.
186
      std::string &term	// The term.
187
      );
188
 
189
      //## Operation: skipCharacter%420B100701E7
190
      //	Skip the given character from the input stream and evaluate to true, or to
191
      //	false when the given character is not found next in the input stream.
192
      static const bool skipCharacter (std::istream &is, 	// The input stream.
193
      const char &character	// The character.
194
      );
195
 
196
    // Data Members for Class Attributes
197
 
198
      //## Attribute: cachedValue%420B24A402FC
199
      //	The evaluated value of this expression.  We can cache some expressions
200
      //	because their value is deterministic, so we do to speed up generation.
201
      //## begin FieldExpression::cachedValue%420B24A402FC.attr preserve=no  private: std::string {VA} 
202
      std::string m_cachedValue;
203
      //## end FieldExpression::cachedValue%420B24A402FC.attr
204
 
205
      //## Attribute: expression%420AC5F30189
206
      //	The expression.
207
      //## begin FieldExpression::expression%420AC5F30189.attr preserve=no  private: std::string {VA} 
208
      std::string m_expression;
209
      //## end FieldExpression::expression%420AC5F30189.attr
210
 
211
    // Additional Private Declarations
212
      //## begin FieldExpression%420AC16002C1.private preserve=yes
213
      //## end FieldExpression%420AC16002C1.private
214
 
215
  private: //## implementation
216
    // Additional Implementation Declarations
217
      //## begin FieldExpression%420AC16002C1.implementation preserve=yes
218
      //## end FieldExpression%420AC16002C1.implementation
219
 
220
};
221
 
222
//## begin FieldExpression%420AC16002C1.postscript preserve=yes
223
//## end FieldExpression%420AC16002C1.postscript
224
 
225
// Class FieldExpression 
226
 
227
//## begin module%420AC16002C1.epilog preserve=yes
228
//## end module%420AC16002C1.epilog
229
 
230
 
231
#endif