| 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%4211C91D02DE.cm preserve=no
|
|
|
7 |
//## end module%4211C91D02DE.cm
|
|
|
8 |
|
|
|
9 |
//## begin module%4211C91D02DE.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%4211C91D02DE.cp
|
|
|
19 |
|
|
|
20 |
//## Module: TimeEstimate%4211C91D02DE; Pseudo Package specification
|
|
|
21 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
22 |
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\TimeEstimate.h
|
|
|
23 |
|
|
|
24 |
#ifndef TimeEstimate_h
|
|
|
25 |
#define TimeEstimate_h 1
|
|
|
26 |
|
|
|
27 |
//## begin module%4211C91D02DE.additionalIncludes preserve=no
|
|
|
28 |
//## end module%4211C91D02DE.additionalIncludes
|
|
|
29 |
|
|
|
30 |
//## begin module%4211C91D02DE.includes preserve=yes
|
|
|
31 |
#include <vcl.h>
|
|
|
32 |
#pragma hdrstop
|
|
|
33 |
|
|
|
34 |
#include <ComCtrls.hpp>
|
|
|
35 |
//## end module%4211C91D02DE.includes
|
|
|
36 |
|
|
|
37 |
//## begin module%4211C91D02DE.additionalDeclarations preserve=yes
|
|
|
38 |
//## end module%4211C91D02DE.additionalDeclarations
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
//## begin TimeEstimate%4211C91D02DE.preface preserve=yes
|
|
|
42 |
//## end TimeEstimate%4211C91D02DE.preface
|
|
|
43 |
|
|
|
44 |
//## Class: TimeEstimate%4211C91D02DE; private
|
|
|
45 |
// This class computes time estimates.
|
|
|
46 |
//## Category: TransactionTestManager::Progress Bar%42007E0B0178
|
|
|
47 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
48 |
//## Persistence: Transient
|
|
|
49 |
//## Cardinality/Multiplicity: n
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
class TimeEstimate
|
|
|
54 |
{
|
|
|
55 |
//## begin TimeEstimate%4211C91D02DE.initialDeclarations preserve=yes
|
|
|
56 |
//## end TimeEstimate%4211C91D02DE.initialDeclarations
|
|
|
57 |
|
|
|
58 |
public:
|
|
|
59 |
//## Constructors (specified)
|
|
|
60 |
//## Operation: TimeEstimate%4211CC9F029D
|
|
|
61 |
// The only constructor.
|
|
|
62 |
TimeEstimate (TStatusPanel &panel // The panel that contains this estimate.
|
|
|
63 |
);
|
|
|
64 |
|
|
|
65 |
//## Destructor (generated)
|
|
|
66 |
virtual ~TimeEstimate();
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
//## Other Operations (specified)
|
|
|
70 |
//## Operation: increment%4211CA05001F
|
|
|
71 |
// Increment the position by the given amount.
|
|
|
72 |
void increment (const unsigned int &delta = 1 // The amount by which to increment, which must be in the range 0..total.
|
|
|
73 |
);
|
|
|
74 |
|
|
|
75 |
//## Operation: start%4211C99F032C
|
|
|
76 |
// Start the estimate.
|
|
|
77 |
void start (const unsigned int &total // The total number of steps in our task.
|
|
|
78 |
);
|
|
|
79 |
|
|
|
80 |
//## Operation: stop%4211C99F031C
|
|
|
81 |
// Stop the estimate.
|
|
|
82 |
void stop ();
|
|
|
83 |
|
|
|
84 |
//## Operation: update%4211CA05002E
|
|
|
85 |
// Update the position of this instance.
|
|
|
86 |
void update (const unsigned int &position // The new position, which must be in the range 0..total.
|
|
|
87 |
);
|
|
|
88 |
|
|
|
89 |
// Additional Public Declarations
|
|
|
90 |
//## begin TimeEstimate%4211C91D02DE.public preserve=yes
|
|
|
91 |
//## end TimeEstimate%4211C91D02DE.public
|
|
|
92 |
|
|
|
93 |
protected:
|
|
|
94 |
// Additional Protected Declarations
|
|
|
95 |
//## begin TimeEstimate%4211C91D02DE.protected preserve=yes
|
|
|
96 |
//## end TimeEstimate%4211C91D02DE.protected
|
|
|
97 |
|
|
|
98 |
private:
|
|
|
99 |
//## Constructors (generated)
|
|
|
100 |
TimeEstimate();
|
|
|
101 |
|
|
|
102 |
TimeEstimate(const TimeEstimate &right);
|
|
|
103 |
|
|
|
104 |
//## Assignment Operation (generated)
|
|
|
105 |
TimeEstimate & operator=(const TimeEstimate &right);
|
|
|
106 |
|
|
|
107 |
// Data Members for Class Attributes
|
|
|
108 |
|
|
|
109 |
//## Attribute: panel%4211CC6201F1
|
|
|
110 |
// The panel that contains the time estimate.
|
|
|
111 |
//## begin TimeEstimate::panel%4211CC6201F1.attr preserve=no private: TStatusPanel {RA} 0
|
|
|
112 |
TStatusPanel *m_panel;
|
|
|
113 |
//## end TimeEstimate::panel%4211CC6201F1.attr
|
|
|
114 |
|
|
|
115 |
//## Attribute: position%4211CA710138
|
|
|
116 |
// The current position.
|
|
|
117 |
//## begin TimeEstimate::position%4211CA710138.attr preserve=no private: unsigned int {VA} 0
|
|
|
118 |
unsigned int m_position;
|
|
|
119 |
//## end TimeEstimate::position%4211CA710138.attr
|
|
|
120 |
|
|
|
121 |
//## Attribute: start%4211C94301D4
|
|
|
122 |
// The time at which the task began.
|
|
|
123 |
//## begin TimeEstimate::start%4211C94301D4.attr preserve=no private: TDateTime {VA}
|
|
|
124 |
TDateTime m_start;
|
|
|
125 |
//## end TimeEstimate::start%4211C94301D4.attr
|
|
|
126 |
|
|
|
127 |
//## Attribute: step%4211CBB602FB
|
|
|
128 |
// The time that must elapse between updates.
|
|
|
129 |
//## begin TimeEstimate::step%4211CBB602FB.attr preserve=no private: TDateTime {VAC} ( 0, 0, 2, 500 )
|
|
|
130 |
const TDateTime m_step;
|
|
|
131 |
//## end TimeEstimate::step%4211CBB602FB.attr
|
|
|
132 |
|
|
|
133 |
//## Attribute: total%4211CA710148
|
|
|
134 |
// The total number of steps in our task.
|
|
|
135 |
//## begin TimeEstimate::total%4211CA710148.attr preserve=no private: unsigned int {VA} 0
|
|
|
136 |
unsigned int m_total;
|
|
|
137 |
//## end TimeEstimate::total%4211CA710148.attr
|
|
|
138 |
|
|
|
139 |
//## Attribute: update%4211C96400EA
|
|
|
140 |
// The last time that we updated our estimate.
|
|
|
141 |
//## begin TimeEstimate::update%4211C96400EA.attr preserve=no private: TDateTime {VA}
|
|
|
142 |
TDateTime m_update;
|
|
|
143 |
//## end TimeEstimate::update%4211C96400EA.attr
|
|
|
144 |
|
|
|
145 |
// Additional Private Declarations
|
|
|
146 |
//## begin TimeEstimate%4211C91D02DE.private preserve=yes
|
|
|
147 |
//## end TimeEstimate%4211C91D02DE.private
|
|
|
148 |
|
|
|
149 |
private: //## implementation
|
|
|
150 |
// Additional Implementation Declarations
|
|
|
151 |
//## begin TimeEstimate%4211C91D02DE.implementation preserve=yes
|
|
|
152 |
//## end TimeEstimate%4211C91D02DE.implementation
|
|
|
153 |
|
|
|
154 |
};
|
|
|
155 |
|
|
|
156 |
//## begin TimeEstimate%4211C91D02DE.postscript preserve=yes
|
|
|
157 |
//## end TimeEstimate%4211C91D02DE.postscript
|
|
|
158 |
|
|
|
159 |
// Class TimeEstimate
|
|
|
160 |
|
|
|
161 |
//## begin module%4211C91D02DE.epilog preserve=yes
|
|
|
162 |
//## end module%4211C91D02DE.epilog
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
#endif
|