#include <Progress.h>

Public Types | |
| enum | information { show_nothing = 0x000, show_status = 0x001, timing = 0x0f0, show_time = 0x010, show_average = 0x020, show_left = 0x040, memory = 0xf00, show_memory = 0x100 } |
| Information to be show. More... | |
Public Member Functions | |
| Progress (double a=0., double b=0., int opt=show_status|show_average) | |
| Constructor. | |
| Progress (const Progress &p) | |
| Copy constructor. | |
| virtual | ~Progress () |
| Destructor. | |
| void | start () |
| Starts monitoring. | |
| void | stop () |
| Stops monitoring. | |
| virtual void | show () |
| Defines the way the activity is shown. | |
| void | update (double x) |
| Updates the current value. | |
| void | reset (double a, double b) |
| Redefines the range. | |
| double | Vmin () const |
| returns the lower limit of the range | |
| double | Vmax () const |
| returns the upper limit of the range | |
| double | Value () const |
| returns the current value | |
| double | Percent () const |
| returns the percentage of the progress made so far | |
| void | timer_start () |
| starts the timer | |
| void | timer_stop () |
| stops the timer | |
| void | timer_reset () |
| resets the timer | |
| double | time () const |
| returns the time elapsed | |
| double | mem () const |
| Memory. | |
| void | set_update (unsigned long t) |
| sets the update time | |
| void | set_options (unsigned int o) |
| sets flags | |
| std::string | str () const |
| returns a string representation of Progress that depends on the values of flags | |
| void | update () |
| Updates some values. | |
Static Public Member Functions | |
| static void * | _loop (void *) |
| Internal. | |
Private Member Functions | |
| int | read_file () const |
| Reads the /proc file corresponding to this process and gets the relevant information. | |
Private Attributes | |
| unsigned int | flg |
| flag indicating what to show | |
| double | vmin |
| lower limit of the range | |
| double | vmax |
| maximum value of the range | |
| double | value |
| current value | |
| unsigned long | usec |
| frequency of of update of the progress display | |
| PrgThread | thread |
| Instance of PrgThread. | |
| bool | ss |
| flag set internally to true if the Progress monitor is running | |
| double | last_value |
| internal variables | |
| double | last_update |
| internal variables | |
| const char * | proc_file |
| Other utilities Monitoring process memory. | |
| float | mm0 |
| struct timeval | _start |
| for timing | |
| bool | active |
| Says if th eprogress instance is active. | |
Static Private Attributes | |
| static int | page_k_shift = 0 |
Classes | |
| class | PrgThread |
| Class to for the thread of the show method. More... | |
This class is used to show the progress of a given activity. It is a generic class and the way the progress is shown depends on how the show method is implemented.
Information to be show.
| show_nothing | Show nothing. |
| show_status | Shows progress. |
| show_time | Shows total time elapsed. |
| show_average | Shows average time from one update to the next. |
| show_left | Shows time left for completion. |
| show_memory | Shows memory used by the process. |
| Progress::Progress | ( | double | a = 0., |
|
| double | b = 0., |
|||
| int | opt = show_status | show_average | |||
| ) |
Constructor.
| a | lower limit of range | |
| b | upper limit of range | |
| opt | says waht to show. It is an OR of options in information |
References reset().
| void Progress::show | ( | ) | [virtual] |
Defines the way the activity is shown.
This method is the responsible of showing the progress. It has to be implemented.
References flg, show_nothing, str(), and update().
Referenced by DAQpp::Progress::PrgThread::run().
1.5.5