CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iProgressMeter Struct Reference

This is a general interface for a progress meter. More...

#include <pmeter.h>

Inheritance diagram for iProgressMeter:

iBase csTextProgressMeter List of all members.

Public Methods

virtual void SetProgressDescription (const char *id, const char *description,...)=0
 Set the id and description of what we are currently monitoring.

virtual void SetProgressDescriptionV (const char *id, const char *description, va_list)=0
 Set the id and description of what we are currently monitoring.

virtual void Step ()=0
 Increment the meter by one unit.

virtual void Reset ()=0
 Reset the meter to 0%.

virtual void Restart ()=0
 Reset the meter and print the initial tick mark ("0%").

virtual void Abort ()=0
 Abort the meter.

virtual void Finalize ()=0
 Finalize the meter (i.e. we completed the task sooner than expected).

virtual void SetTotal (int n)=0
 Set the total element count represented by the meter and perform a reset.

virtual int GetTotal () const=0
 Get the total element count represented by the meter.

virtual int GetCurrent () const=0
 Get the current value of the meter (<= total).

virtual void SetGranularity (int)=0
 Set the refresh granularity.

virtual int GetGranularity () const=0
 Get the refresh granularity.


Detailed Description

This is a general interface for a progress meter.

The engine needs an implementation of this to be able to report progress on calculating lighting and other stuff.

Definition at line 32 of file pmeter.h.


Member Function Documentation

virtual void iProgressMeter::Abort   [pure virtual]
 

Abort the meter.

Implemented in csTextProgressMeter.

virtual void iProgressMeter::Finalize   [pure virtual]
 

Finalize the meter (i.e. we completed the task sooner than expected).

Implemented in csTextProgressMeter.

virtual int iProgressMeter::GetCurrent   [pure virtual]
 

Get the current value of the meter (<= total).

Implemented in csTextProgressMeter.

virtual int iProgressMeter::GetGranularity   [pure virtual]
 

Get the refresh granularity.

Implemented in csTextProgressMeter.

virtual int iProgressMeter::GetTotal   [pure virtual]
 

Get the total element count represented by the meter.

Implemented in csTextProgressMeter.

virtual void iProgressMeter::Reset   [pure virtual]
 

Reset the meter to 0%.

Implemented in csTextProgressMeter.

virtual void iProgressMeter::Restart   [pure virtual]
 

Reset the meter and print the initial tick mark ("0%").

Implemented in csTextProgressMeter.

virtual void iProgressMeter::SetGranularity int    [pure virtual]
 

Set the refresh granularity.

Valid values are 1-100, inclusive. Default is 10. The meter is only refreshed after each "granularity" * number of units have passed. For instance, if granularity is 20, then * the meter will only be updated at most 5 times, or every 20%.

Implemented in csTextProgressMeter.

virtual void iProgressMeter::SetProgressDescription const char *    id,
const char *    description,
...   
[pure virtual]
 

Set the id and description of what we are currently monitoring.

An id can be something like "crystalspace.engine.lighting.calculation".

Implemented in csTextProgressMeter.

virtual void iProgressMeter::SetProgressDescriptionV const char *    id,
const char *    description,
va_list   
[pure virtual]
 

Set the id and description of what we are currently monitoring.

An id can be something like "crystalspace.engine.lighting.calculation".

Implemented in csTextProgressMeter.

virtual void iProgressMeter::SetTotal int    n [pure virtual]
 

Set the total element count represented by the meter and perform a reset.

Implemented in csTextProgressMeter.

virtual void iProgressMeter::Step   [pure virtual]
 

Increment the meter by one unit.

If the meter reaches 100% it should automatically stop itself.

Implemented in csTextProgressMeter.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18