| 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%42103A8C03B7.cm preserve=no
|
|
|
7 |
//## end module%42103A8C03B7.cm
|
|
|
8 |
|
|
|
9 |
//## begin module%42103A8C03B7.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%42103A8C03B7.cp
|
|
|
19 |
|
|
|
20 |
//## Module: Sequence%42103A8C03B7; Pseudo Package specification
|
|
|
21 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
22 |
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\Sequence.h
|
|
|
23 |
|
|
|
24 |
#ifndef Sequence_h
|
|
|
25 |
#define Sequence_h 1
|
|
|
26 |
|
|
|
27 |
//## begin module%42103A8C03B7.additionalIncludes preserve=no
|
|
|
28 |
//## end module%42103A8C03B7.additionalIncludes
|
|
|
29 |
|
|
|
30 |
//## begin module%42103A8C03B7.includes preserve=yes
|
|
|
31 |
//## end module%42103A8C03B7.includes
|
|
|
32 |
|
|
|
33 |
//## begin module%42103A8C03B7.additionalDeclarations preserve=yes
|
|
|
34 |
#include <string>
|
|
|
35 |
//## end module%42103A8C03B7.additionalDeclarations
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
//## begin Sequence%42103A8C03B7.preface preserve=yes
|
|
|
39 |
//## end Sequence%42103A8C03B7.preface
|
|
|
40 |
|
|
|
41 |
//## Class: Sequence%42103A8C03B7; private
|
|
|
42 |
// A class for representing a sequence.
|
|
|
43 |
//## Category: TransactionTestManager::Sequence Generators%42103A59009B
|
|
|
44 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
45 |
//## Persistence: Transient
|
|
|
46 |
//## Cardinality/Multiplicity: n
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
class Sequence
|
|
|
51 |
{
|
|
|
52 |
//## begin Sequence%42103A8C03B7.initialDeclarations preserve=yes
|
|
|
53 |
//## end Sequence%42103A8C03B7.initialDeclarations
|
|
|
54 |
|
|
|
55 |
public:
|
|
|
56 |
//## Constructors (specified)
|
|
|
57 |
//## Operation: Sequence%421052120266
|
|
|
58 |
// The only constructor.
|
|
|
59 |
Sequence (const std::string &name, // The name of this sequence.
|
|
|
60 |
const int &first // The first value in the sequence.
|
|
|
61 |
);
|
|
|
62 |
|
|
|
63 |
//## Destructor (generated)
|
|
|
64 |
virtual ~Sequence();
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
//## Other Operations (specified)
|
|
|
68 |
//## Operation: getName%4210536E010E
|
|
|
69 |
// Evaluate to the name of this sequence.
|
|
|
70 |
const std::string & getName () const;
|
|
|
71 |
|
|
|
72 |
//## Operation: getValue%421052480350
|
|
|
73 |
// Evaluate to the current value of this sequence.
|
|
|
74 |
const int & getValue () const;
|
|
|
75 |
|
|
|
76 |
//## Operation: incrementValue%4210525D0208
|
|
|
77 |
// Increment the current value and evaluate to it.
|
|
|
78 |
const int & incrementValue (const int &first, // The lower bound of the range of this sequence.
|
|
|
79 |
const int &last, // The upper bound of the range of this sequence.
|
|
|
80 |
const int &increment = 1 // The value by which to increment the sequence.
|
|
|
81 |
);
|
|
|
82 |
|
|
|
83 |
//## Operation: isDirty%421199D5032E
|
|
|
84 |
// Evaluate to true when the sequence is dirty and needs to be asserted into
|
|
|
85 |
// the database, and to false otherwise.
|
|
|
86 |
const bool isDirty () const;
|
|
|
87 |
|
|
|
88 |
//## Operation: isPersisted%4210531902B4
|
|
|
89 |
// Evalaute to true when this sequence is persisted, and to false when it is
|
|
|
90 |
// transient.
|
|
|
91 |
const bool & isPersisted () const;
|
|
|
92 |
|
|
|
93 |
//## Operation: isUpdate%421053450227
|
|
|
94 |
// Evaluate to true when the sequence exists and must be updated, and to false
|
|
|
95 |
// when it is new and must be created.
|
|
|
96 |
const bool & isUpdate () const;
|
|
|
97 |
|
|
|
98 |
//## Operation: setDirty%42119A580277
|
|
|
99 |
// Set the dirty bit.
|
|
|
100 |
void setDirty (const bool &value // The new value of the dirty bit.
|
|
|
101 |
);
|
|
|
102 |
|
|
|
103 |
//## Operation: setPersist%421053B501D9
|
|
|
104 |
// Define whether this sequence is persisted or whether it is transient.
|
|
|
105 |
const bool & setPersist (const bool &value // The value.
|
|
|
106 |
);
|
|
|
107 |
|
|
|
108 |
//## Operation: setUpdate%42105401020D
|
|
|
109 |
// Define whether this sequence exists and must be updated or whether it is new
|
|
|
110 |
// and must be created.
|
|
|
111 |
const bool & setUpdate (const bool &value // The value.
|
|
|
112 |
);
|
|
|
113 |
|
|
|
114 |
//## Operation: setValue%421053980341
|
|
|
115 |
// Set the current value of this sequence and evaluate to it.
|
|
|
116 |
const int & setValue (const int &value // The value.
|
|
|
117 |
);
|
|
|
118 |
|
|
|
119 |
// Additional Public Declarations
|
|
|
120 |
//## begin Sequence%42103A8C03B7.public preserve=yes
|
|
|
121 |
//## end Sequence%42103A8C03B7.public
|
|
|
122 |
|
|
|
123 |
protected:
|
|
|
124 |
// Additional Protected Declarations
|
|
|
125 |
//## begin Sequence%42103A8C03B7.protected preserve=yes
|
|
|
126 |
//## end Sequence%42103A8C03B7.protected
|
|
|
127 |
|
|
|
128 |
private:
|
|
|
129 |
//## Constructors (generated)
|
|
|
130 |
Sequence();
|
|
|
131 |
|
|
|
132 |
Sequence(const Sequence &right);
|
|
|
133 |
|
|
|
134 |
//## Assignment Operation (generated)
|
|
|
135 |
Sequence & operator=(const Sequence &right);
|
|
|
136 |
|
|
|
137 |
// Data Members for Class Attributes
|
|
|
138 |
|
|
|
139 |
//## Attribute: dirty%421199A60050
|
|
|
140 |
// Of value true when the sequence is dirty and needs to be asserted into the
|
|
|
141 |
// database, and false otherwise.
|
|
|
142 |
//## begin Sequence::dirty%421199A60050.attr preserve=no private: bool {VA} true
|
|
|
143 |
bool m_dirty;
|
|
|
144 |
//## end Sequence::dirty%421199A60050.attr
|
|
|
145 |
|
|
|
146 |
//## Attribute: name%42104040027A
|
|
|
147 |
// The name of this sequence.
|
|
|
148 |
//## begin Sequence::name%42104040027A.attr preserve=no private: std::string {VAC} name
|
|
|
149 |
const std::string m_name;
|
|
|
150 |
//## end Sequence::name%42104040027A.attr
|
|
|
151 |
|
|
|
152 |
//## Attribute: persisted%42104074023B
|
|
|
153 |
// Of value true when this sequence is persisted, and false otherwise.
|
|
|
154 |
//## begin Sequence::persisted%42104074023B.attr preserve=no private: bool {VA} false
|
|
|
155 |
bool m_persisted;
|
|
|
156 |
//## end Sequence::persisted%42104074023B.attr
|
|
|
157 |
|
|
|
158 |
//## Attribute: update%421040DC0383
|
|
|
159 |
// When true, the sequence already exists in the database and must be updated.
|
|
|
160 |
// When false, the sequence is new and must be created in the database.
|
|
|
161 |
//## begin Sequence::update%421040DC0383.attr preserve=no private: bool {VA} false
|
|
|
162 |
bool m_update;
|
|
|
163 |
//## end Sequence::update%421040DC0383.attr
|
|
|
164 |
|
|
|
165 |
//## Attribute: value%42104051025B
|
|
|
166 |
// The current value of this sequence.
|
|
|
167 |
//## begin Sequence::value%42104051025B.attr preserve=no private: int {VA} 0
|
|
|
168 |
int m_value;
|
|
|
169 |
//## end Sequence::value%42104051025B.attr
|
|
|
170 |
|
|
|
171 |
// Additional Private Declarations
|
|
|
172 |
//## begin Sequence%42103A8C03B7.private preserve=yes
|
|
|
173 |
//## end Sequence%42103A8C03B7.private
|
|
|
174 |
|
|
|
175 |
private: //## implementation
|
|
|
176 |
// Additional Implementation Declarations
|
|
|
177 |
//## begin Sequence%42103A8C03B7.implementation preserve=yes
|
|
|
178 |
//## end Sequence%42103A8C03B7.implementation
|
|
|
179 |
|
|
|
180 |
};
|
|
|
181 |
|
|
|
182 |
//## begin Sequence%42103A8C03B7.postscript preserve=yes
|
|
|
183 |
//## end Sequence%42103A8C03B7.postscript
|
|
|
184 |
|
|
|
185 |
// Class Sequence
|
|
|
186 |
|
|
|
187 |
//## begin module%42103A8C03B7.epilog preserve=yes
|
|
|
188 |
//## end module%42103A8C03B7.epilog
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
#endif
|