class Geo GeoProgress

This is the documentation for Enlighten.

class Geo GeoProgress

class Geo::GeoProgress

    └>Geo::IGeoProgressProxy

Helper class to manage an IGeoProgressProxy.

Task that take a long time to complete should use an instance of this class to inform clients (through the IGeoProgressProxy interface) of the current progress. Notes on usage: a GeoProgress represents an interval of the total amount of work done. It can be split into bits using CreateSubProgress: it is normally convenient to do this when calling the subfunction.

All the splits retain pointers to the same float giving the overall progress, so any can be interrogated.

Creating a subprogress automatically sets the elapsed progress to the start of that interval. But deleting it doesn't set it to the end - unfortunately we have temporaries that get deleted, so it is a useful convention to call SetProportionDone(1.0f) at the end of progress-tracking functions.

Note that progress is always in the range 0 <= progress <= 1.

Functions

Name

Description

Name

Description

~IGeoProgressProxy()

Virtual destructor.

CreateProgress()

Create a progress object updates nothing.

CreateProgress(IGeoProgressProxy *)

Create a progress object that will use this proxy.

CreateSubProgress(float, float)

Create a subinterval of the current progress.

CreateSubProgress(float, float, const void *)

Create a subinterval of the current progress.

GeoProgress()

Constructor.

GetState()

Gets/sets user-defined state information.

ReportError(const GeoError &)

Forwards errors to the underlying proxy.

ReportError(const GeoError &)

Called when an error (or warning) is encountered by the task.

SetProgressString(const char *)

Set message.

SetProgressString(const char *)

Called by progress tracked tasks to inform clients of the current (sub) task.

SetProportionDone(float)

Set proportion of the current function's task done.

SetProportionDone(float)

Called when a further chunk of work has been performed on the current (sub) task.

SetState(const void *)

Gets/sets user-defined state information.

ShouldCancel()

Should we cancel?

ShouldCancel()

Request a cancel of the current task.



virtual Geo::IGeoProgressProxy::~IGeoProgressProxy


protected: virtual ~IGeoProgressProxy()


Virtual destructor.



static GeoProgress Geo::GeoProgress::CreateProgress


public: GeoProgress CreateProgress()


Create a progress object updates nothing.



static GeoProgress Geo::GeoProgress::CreateProgress


public: GeoProgress CreateProgress
(
    IGeoProgressProxy * proxy
)


Create a progress object that will use this proxy.