| 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%4209BA4C03B8.cm preserve=no
|
|
|
7 |
//## end module%4209BA4C03B8.cm
|
|
|
8 |
|
|
|
9 |
//## begin module%4209BA4C03B8.cp preserve=no
|
|
|
10 |
// C O P Y R I G H T N O T I C E
|
| 2226 |
sbetterm |
11 |
// This material is confidential to ERG and may not be
|
|
|
12 |
// disclosed in whole
|
|
|
13 |
// or in part to any third party nor used in any manner
|
|
|
14 |
// whatsoever other
|
|
|
15 |
// than for the purposes expressly consented to by ERG in
|
|
|
16 |
// writing.
|
| 2218 |
sbetterm |
17 |
//
|
| 2226 |
sbetterm |
18 |
// This material is also copyright and may not be
|
|
|
19 |
// reproduced, stored in a
|
|
|
20 |
// retrieval system or transmitted in any form or by any
|
|
|
21 |
// means in whole or
|
| 2218 |
sbetterm |
22 |
// in part without the express written consent of ERG.
|
|
|
23 |
//## end module%4209BA4C03B8.cp
|
|
|
24 |
|
|
|
25 |
//## Module: UdFileManifest%4209BA4C03B8; Pseudo Package specification
|
|
|
26 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
27 |
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\UdFileManifest.h
|
|
|
28 |
|
|
|
29 |
#ifndef UdFileManifest_h
|
|
|
30 |
#define UdFileManifest_h 1
|
|
|
31 |
|
|
|
32 |
//## begin module%4209BA4C03B8.additionalIncludes preserve=no
|
|
|
33 |
//## end module%4209BA4C03B8.additionalIncludes
|
|
|
34 |
|
|
|
35 |
//## begin module%4209BA4C03B8.includes preserve=yes
|
|
|
36 |
//## end module%4209BA4C03B8.includes
|
|
|
37 |
|
|
|
38 |
//## begin module%4209BA4C03B8.additionalDeclarations preserve=yes
|
|
|
39 |
#include <fstream>
|
|
|
40 |
#include <string>
|
|
|
41 |
//## end module%4209BA4C03B8.additionalDeclarations
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
//## begin UdFileManifest%4209BA4C03B8.preface preserve=yes
|
|
|
45 |
//## end UdFileManifest%4209BA4C03B8.preface
|
|
|
46 |
|
|
|
47 |
//## Class: UdFileManifest%4209BA4C03B8
|
|
|
48 |
// A manifest of UD files.
|
|
|
49 |
//## Category: TransactionTestManager::Transaction Generation%4202F8EE0128
|
|
|
50 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
51 |
//## Persistence: Transient
|
|
|
52 |
//## Cardinality/Multiplicity: n
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
//## Uses: <unnamed>%4209BBCD00AD;TransactionStream { -> }
|
|
|
57 |
|
|
|
58 |
class UdFileManifest
|
|
|
59 |
{
|
|
|
60 |
//## begin UdFileManifest%4209BA4C03B8.initialDeclarations preserve=yes
|
|
|
61 |
//## end UdFileManifest%4209BA4C03B8.initialDeclarations
|
|
|
62 |
|
|
|
63 |
public:
|
|
|
64 |
//## Constructors (specified)
|
|
|
65 |
//## Operation: UdFileManifest%4209BAA8031C
|
|
|
66 |
// The only constructor.
|
| 2226 |
sbetterm |
67 |
UdFileManifest (const std::string &folder, // The folder in the file-system into which to write the
|
|
|
68 |
// transaction stream.
|
|
|
69 |
const std::string &prefix = "udMan", // The prefix given to manifest filenames opened by this
|
|
|
70 |
// instance.
|
|
|
71 |
const std::string &suffix = ".txt", // The suffix given to manifest filenames opened by this
|
|
|
72 |
// instance.
|
|
|
73 |
const std::string &pathmapTarget = "" // The folder in the file-system that shall contain the
|
|
|
74 |
// drain file.
|
| 2218 |
sbetterm |
75 |
);
|
|
|
76 |
|
|
|
77 |
//## Destructor (generated)
|
|
|
78 |
virtual ~UdFileManifest();
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
//## Other Operations (specified)
|
|
|
82 |
//## Operation: addUdFile%4209BAC703E7
|
|
|
83 |
// Add the given file to this manifest.
|
|
|
84 |
void addUdFile (const std::string &file // The file to add.
|
|
|
85 |
);
|
|
|
86 |
|
|
|
87 |
// Additional Public Declarations
|
|
|
88 |
//## begin UdFileManifest%4209BA4C03B8.public preserve=yes
|
|
|
89 |
//## end UdFileManifest%4209BA4C03B8.public
|
|
|
90 |
|
|
|
91 |
protected:
|
|
|
92 |
// Additional Protected Declarations
|
|
|
93 |
//## begin UdFileManifest%4209BA4C03B8.protected preserve=yes
|
|
|
94 |
//## end UdFileManifest%4209BA4C03B8.protected
|
|
|
95 |
|
|
|
96 |
private:
|
|
|
97 |
//## Constructors (generated)
|
|
|
98 |
UdFileManifest();
|
|
|
99 |
|
|
|
100 |
UdFileManifest(const UdFileManifest &right);
|
|
|
101 |
|
|
|
102 |
//## Assignment Operation (generated)
|
|
|
103 |
UdFileManifest & operator=(const UdFileManifest &right);
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
//## Other Operations (specified)
|
|
|
107 |
//## Operation: close%4209BAC10389
|
|
|
108 |
// Close the transaction stream.
|
|
|
109 |
void close ();
|
|
|
110 |
|
|
|
111 |
//## Operation: open%4209BAC10399
|
|
|
112 |
// Open the transaction stream.
|
|
|
113 |
const bool open ();
|
|
|
114 |
|
| 2226 |
sbetterm |
115 |
//## Get and Set Operations for Class Attributes (generated)
|
| 2218 |
sbetterm |
116 |
|
|
|
117 |
//## Attribute: count%4209BCEE02B0
|
|
|
118 |
// The number of files contained in this manifest.
|
| 2226 |
sbetterm |
119 |
const unsigned getCount () const;
|
|
|
120 |
void setCount (unsigned value);
|
|
|
121 |
|
|
|
122 |
//## Attribute: folder%4209BB3403E7
|
|
|
123 |
// The folder in the file-system to which we write the
|
|
|
124 |
// transaction stream.
|
|
|
125 |
const std::string getFolder () const;
|
|
|
126 |
void setFolder (std::string value);
|
|
|
127 |
|
|
|
128 |
//## Attribute: pathmapTarget%425F352E0302
|
|
|
129 |
// The folder in the file-system that shall contain the
|
|
|
130 |
// drain file.
|
|
|
131 |
const std::string getPathmapTarget () const;
|
|
|
132 |
void setPathmapTarget (std::string value);
|
|
|
133 |
|
|
|
134 |
//## Attribute: prefix%4209BB35000E
|
|
|
135 |
// The prefix given to manifest filenames opened by this
|
|
|
136 |
// instance.
|
|
|
137 |
const std::string getPrefix () const;
|
|
|
138 |
void setPrefix (std::string value);
|
|
|
139 |
|
|
|
140 |
//## Attribute: stream%4209BB35002E
|
|
|
141 |
// The underlying stream currently open for writing.
|
|
|
142 |
const std::ofstream getStream () const;
|
|
|
143 |
void setStream (std::ofstream value);
|
|
|
144 |
|
|
|
145 |
//## Attribute: suffix%4209BB35001E
|
|
|
146 |
// The suffix given to manifest filenames opened by this
|
|
|
147 |
// instance.
|
|
|
148 |
const std::string getSuffix () const;
|
|
|
149 |
void setSuffix (std::string value);
|
|
|
150 |
|
|
|
151 |
// Additional Private Declarations
|
|
|
152 |
//## begin UdFileManifest%4209BA4C03B8.private preserve=yes
|
|
|
153 |
//## end UdFileManifest%4209BA4C03B8.private
|
|
|
154 |
|
|
|
155 |
private: //## implementation
|
|
|
156 |
// Data Members for Class Attributes
|
|
|
157 |
|
|
|
158 |
//## begin UdFileManifest::count%4209BCEE02B0.attr preserve=no private: unsigned {V} 0
|
| 2218 |
sbetterm |
159 |
unsigned m_count;
|
|
|
160 |
//## end UdFileManifest::count%4209BCEE02B0.attr
|
|
|
161 |
|
| 2226 |
sbetterm |
162 |
//## begin UdFileManifest::folder%4209BB3403E7.attr preserve=no private: std::string {V} folder
|
| 2218 |
sbetterm |
163 |
std::string m_folder;
|
|
|
164 |
//## end UdFileManifest::folder%4209BB3403E7.attr
|
|
|
165 |
|
| 2226 |
sbetterm |
166 |
//## begin UdFileManifest::pathmapTarget%425F352E0302.attr preserve=no private: std::string {V} pathmapTarget
|
|
|
167 |
std::string m_pathmapTarget;
|
|
|
168 |
//## end UdFileManifest::pathmapTarget%425F352E0302.attr
|
|
|
169 |
|
|
|
170 |
//## begin UdFileManifest::prefix%4209BB35000E.attr preserve=no private: std::string {V} prefix
|
| 2218 |
sbetterm |
171 |
std::string m_prefix;
|
|
|
172 |
//## end UdFileManifest::prefix%4209BB35000E.attr
|
|
|
173 |
|
| 2226 |
sbetterm |
174 |
//## begin UdFileManifest::stream%4209BB35002E.attr preserve=no private: std::ofstream {R} 0
|
| 2218 |
sbetterm |
175 |
std::ofstream *m_stream;
|
|
|
176 |
//## end UdFileManifest::stream%4209BB35002E.attr
|
|
|
177 |
|
| 2226 |
sbetterm |
178 |
//## begin UdFileManifest::suffix%4209BB35001E.attr preserve=no private: std::string {V} suffix
|
| 2218 |
sbetterm |
179 |
std::string m_suffix;
|
|
|
180 |
//## end UdFileManifest::suffix%4209BB35001E.attr
|
|
|
181 |
|
|
|
182 |
// Additional Implementation Declarations
|
|
|
183 |
//## begin UdFileManifest%4209BA4C03B8.implementation preserve=yes
|
|
|
184 |
//## end UdFileManifest%4209BA4C03B8.implementation
|
|
|
185 |
|
|
|
186 |
};
|
|
|
187 |
|
|
|
188 |
//## begin UdFileManifest%4209BA4C03B8.postscript preserve=yes
|
|
|
189 |
//## end UdFileManifest%4209BA4C03B8.postscript
|
|
|
190 |
|
|
|
191 |
// Class UdFileManifest
|
|
|
192 |
|
| 2226 |
sbetterm |
193 |
//## Get and Set Operations for Class Attributes (inline)
|
|
|
194 |
|
|
|
195 |
inline const unsigned UdFileManifest::getCount () const
|
|
|
196 |
{
|
|
|
197 |
//## begin UdFileManifest::getCount%4209BCEE02B0.get preserve=no
|
|
|
198 |
return m_count;
|
|
|
199 |
//## end UdFileManifest::getCount%4209BCEE02B0.get
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
inline void UdFileManifest::setCount (unsigned value)
|
|
|
203 |
{
|
|
|
204 |
//## begin UdFileManifest::setCount%4209BCEE02B0.set preserve=no
|
|
|
205 |
m_count = value;
|
|
|
206 |
//## end UdFileManifest::setCount%4209BCEE02B0.set
|
|
|
207 |
}
|
|
|
208 |
|
|
|
209 |
inline const std::string UdFileManifest::getFolder () const
|
|
|
210 |
{
|
|
|
211 |
//## begin UdFileManifest::getFolder%4209BB3403E7.get preserve=no
|
|
|
212 |
return m_folder;
|
|
|
213 |
//## end UdFileManifest::getFolder%4209BB3403E7.get
|
|
|
214 |
}
|
|
|
215 |
|
|
|
216 |
inline void UdFileManifest::setFolder (std::string value)
|
|
|
217 |
{
|
|
|
218 |
//## begin UdFileManifest::setFolder%4209BB3403E7.set preserve=no
|
|
|
219 |
m_folder = value;
|
|
|
220 |
//## end UdFileManifest::setFolder%4209BB3403E7.set
|
|
|
221 |
}
|
|
|
222 |
|
|
|
223 |
inline const std::string UdFileManifest::getPathmapTarget () const
|
|
|
224 |
{
|
|
|
225 |
//## begin UdFileManifest::getPathmapTarget%425F352E0302.get preserve=no
|
|
|
226 |
return m_pathmapTarget;
|
|
|
227 |
//## end UdFileManifest::getPathmapTarget%425F352E0302.get
|
|
|
228 |
}
|
|
|
229 |
|
|
|
230 |
inline void UdFileManifest::setPathmapTarget (std::string value)
|
|
|
231 |
{
|
|
|
232 |
//## begin UdFileManifest::setPathmapTarget%425F352E0302.set preserve=no
|
|
|
233 |
m_pathmapTarget = value;
|
|
|
234 |
//## end UdFileManifest::setPathmapTarget%425F352E0302.set
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
inline const std::string UdFileManifest::getPrefix () const
|
|
|
238 |
{
|
|
|
239 |
//## begin UdFileManifest::getPrefix%4209BB35000E.get preserve=no
|
|
|
240 |
return m_prefix;
|
|
|
241 |
//## end UdFileManifest::getPrefix%4209BB35000E.get
|
|
|
242 |
}
|
|
|
243 |
|
|
|
244 |
inline void UdFileManifest::setPrefix (std::string value)
|
|
|
245 |
{
|
|
|
246 |
//## begin UdFileManifest::setPrefix%4209BB35000E.set preserve=no
|
|
|
247 |
m_prefix = value;
|
|
|
248 |
//## end UdFileManifest::setPrefix%4209BB35000E.set
|
|
|
249 |
}
|
|
|
250 |
|
|
|
251 |
inline const std::ofstream UdFileManifest::getStream () const
|
|
|
252 |
{
|
|
|
253 |
//## begin UdFileManifest::getStream%4209BB35002E.get preserve=no
|
|
|
254 |
return *m_stream;
|
|
|
255 |
//## end UdFileManifest::getStream%4209BB35002E.get
|
|
|
256 |
}
|
|
|
257 |
|
|
|
258 |
inline void UdFileManifest::setStream (std::ofstream value)
|
|
|
259 |
{
|
|
|
260 |
//## begin UdFileManifest::setStream%4209BB35002E.set preserve=no
|
|
|
261 |
*m_stream = value;
|
|
|
262 |
//## end UdFileManifest::setStream%4209BB35002E.set
|
|
|
263 |
}
|
|
|
264 |
|
|
|
265 |
inline const std::string UdFileManifest::getSuffix () const
|
|
|
266 |
{
|
|
|
267 |
//## begin UdFileManifest::getSuffix%4209BB35001E.get preserve=no
|
|
|
268 |
return m_suffix;
|
|
|
269 |
//## end UdFileManifest::getSuffix%4209BB35001E.get
|
|
|
270 |
}
|
|
|
271 |
|
|
|
272 |
inline void UdFileManifest::setSuffix (std::string value)
|
|
|
273 |
{
|
|
|
274 |
//## begin UdFileManifest::setSuffix%4209BB35001E.set preserve=no
|
|
|
275 |
m_suffix = value;
|
|
|
276 |
//## end UdFileManifest::setSuffix%4209BB35001E.set
|
|
|
277 |
}
|
|
|
278 |
|
| 2218 |
sbetterm |
279 |
//## begin module%4209BA4C03B8.epilog preserve=yes
|
|
|
280 |
//## end module%4209BA4C03B8.epilog
|
|
|
281 |
|
|
|
282 |
|
|
|
283 |
#endif
|