The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MyStatusReporter Class Reference
+ Inheritance diagram for MyStatusReporter:
+ Collaboration diagram for MyStatusReporter:

Public Member Functions

virtual SWDEPRECATED void statusUpdate (double dtTotal, double dlNow)
 

Private Member Functions

virtual void preStatus (long totalBytes, long completedBytes, const char *message)
 
virtual void update (unsigned long totalBytes, unsigned long completedBytes)
 

Private Attributes

int last
 

Detailed Description

Definition at line 134 of file installmgr.cpp.

Member Function Documentation

virtual void MyStatusReporter::preStatus ( long  totalBytes,
long  completedBytes,
const char *  message 
)
inlineprivatevirtual

Messages before stages of a batch download

Reimplemented from StatusReporter.

Definition at line 150 of file installmgr.cpp.

150  {
151  SWBuf output;
152  output.setFormatted("[ Total Bytes: %ld; Completed Bytes: %ld", totalBytes, completedBytes);
153  while (output.size() < 75) output += " ";
154  output += "]";
155  cout << "\n" << output.c_str() << "\n ";
156  int p = (int)(74.0 * (double)completedBytes/totalBytes);
157  for (int i = 0; i < p; ++i) { cout << "="; }
158  cout << "\n\n" << message << "\n";
159  last = 0;
160  }
void StatusReporter::statusUpdate ( double  dtTotal,
double  dlNow 
)
virtualinherited
Deprecated:
Use override update instead, receive sttaus updates

Definition at line 58 of file remotetrans.cpp.

58  {
59 }
virtual void MyStatusReporter::update ( unsigned long  totalBytes,
unsigned long  completedBytes 
)
inlineprivatevirtual

frequently called throughout a download, to report status override to receive status information

Reimplemented from StatusReporter.

Definition at line 136 of file installmgr.cpp.

136  {
137  int p = (totalBytes > 0) ? (int)(74.0 * ((double)completedBytes / (double)totalBytes)) : 0;
138  for (;last < p; ++last) {
139  if (!last) {
140  SWBuf output;
141  output.setFormatted("[ File Bytes: %ld", totalBytes);
142  while (output.size() < 75) output += " ";
143  output += "]";
144  cout << output.c_str() << "\n ";
145  }
146  cout << "-";
147  }
148  cout.flush();
149  }

Member Data Documentation

int MyStatusReporter::last
private

Definition at line 135 of file installmgr.cpp.


The documentation for this class was generated from the following file: