PCL
|
Abstract base class of file progress objects. More...
#include <File.h>
Public Member Functions | |
Progress (fsize_type total, const String &initialText=String(), fsize_type initialValue=0) | |
virtual | ~Progress () |
void | Add (fsize_type delta) |
bool | IsAborted () const |
void | SetText (const String &text) |
void | SetValue (fsize_type current) |
const String & | Text () const |
fsize_type | Total () const |
fsize_type | Value () const |
Protected Member Functions | |
virtual bool | TextChanged ()=0 |
virtual bool | ValueChanged ()=0 |
The purpose of a file progress object is to provide feedback to the user during potentially long file tasks, such as copying, moving and deleting large files or file sets. The File::Progress class provides a simple template with a text line, an increasing counter, and the possibility to abort a long operation.
|
inline |
Constructs a File::Progress object.
total | Total progress count (for example, the total size in bytes of a file being copied, or the total number of files being deleted). |
initialText | Initial progress text. The default value is an empty string. |
initialValue | Initial progress value. The default value is zero. |
|
inlinevirtual |
|
inline |
Adds delta items to the current progress count.
This member function can abort the ongoing task. In such case, a ProcessAborted exception is thrown and the IsAborted() member function returns true.
|
inline |
|
inline |
Changes the current progress text.
This member function can abort the ongoing task. In such case, a ProcessAborted exception is thrown and the IsAborted() member function returns true.
|
inline |
Sets the current progress count.
This member function can abort the ongoing task. In such case, a ProcessAborted exception is thrown and the IsAborted() member function returns true.
|
inline |
|
protectedpure virtual |
Function called when the current progress text has been changed. Returns true to continue the running task; false to abort.
This is a pure virtual function that must be reimplemented by derived classes.
|
inline |
|
inline |
|
protectedpure virtual |
Function called when the current progress count has been changed. Returns true to continue the running task; false to abort.
This is a pure virtual function that must be reimplemented by derived classes.