sc98-SCProgressMonitor-class: Class "SCProgressMonitor"

Description Usage Arguments Value Objects from the Class Slots Extends Methods Author(s) See Also Examples

Description

The SCProgressMonitor class represents an attempt to abstract reporting of progress of a task. This class assumes that progress is reported via a progressbar and provides means to get/set values for such a widget.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
SCProgressMonitor(stage="")
is.SCProgressMonitor(x)
getStages()
## S4 method for signature 'SCProgressMonitor'
progressMarquee(object)
## S4 replacement method for signature 'SCProgressMonitor,character'
progressMarquee(object) <- value
## S4 method for signature 'SCProgressMonitor'
progressStage(object)
## S4 replacement method for signature 'SCProgressMonitor,character'
progressStage(object) <- value

Arguments

stage

string specifying current stage of task

x

object of (sub)class SCProgressMonitor

object

object of (sub)class SCProgressMonitor

value

value to be assigned

Value

The SCProgressMonitor generator returns an object of class SCProgressMonitor.

The getStages method returns a named character vector specifying the stages processed by this package.

The is.SCProgressMonitor method returns TRUE if its argument is an object of class SCProgressMonitor.

Objects from the Class

Although objects of the class can be created by a direct call to new, the preferred method is to use the SCProgressMonitor generator function.

Slots

stage:

string specifying current stage of task

marquee:

string specifying marquee for current task

range:

object of class BoundedRange

label:

string specifying detail label for current task

done:

logical scalar specifying if task completed. Default is FALSE.

err:

logical scalar specifying if an error has occurred. Default is FALSE.

Extends

Class DefaultProgressMonitor, directly. Class ProgressMonitor, by class “DefaultProgressMonitor”, distance 2.

Methods

progressStage

signature(object = "SCProgressMonitor"):
Returns string representing current stage of task.

progressStage<-

signature(object = "SCProgressMonitor", value = "character"):
Sets value of the stage slot.

progressMarquee

signature(object = "SCProgressMonitor"):
Returns string representing marquee for current stage.

progressMarquee<-

signature(object = "SCProgressMonitor", value = "character"):
Sets value of the marquee slot.

Author(s)

P. Roebuck [email protected]

See Also

BoundedRange, ElapsedTime, ProgressMonitor, DefaultProgressMonitor

Examples

1
2
3
4
5
6
7
8
showClass("SCProgressMonitor")
niters <- 10
scpm <- SuperCurve:::SCProgressMonitor("input")
progressMarquee(scpm) <- "Read input files"
for (i in seq.int(niters)) {
    ## Perform portion of task
    progressValue(scpm) <- i # Modify current value
}

SuperCurve documentation built on Nov. 17, 2017, 2:28 p.m.