Bar {parabar} | R Documentation |
Bar
Description
This is an abstract class that defines the pure virtual methods a concrete bar must implement.
Details
This class cannot be instantiated. It needs to be extended by concrete
subclasses that implement the pure virtual methods. Instances of concrete
backend implementations can be conveniently obtained using the
BarFactory
class.
Active bindings
engine
The bar engine.
Methods
Public methods
Method new()
Create a new Bar
object.
Usage
Bar$new()
Returns
Instantiating this call will throw an error.
Method create()
Create a progress bar.
Usage
Bar$create(total, initial, ...)
Arguments
total
The total number of times the progress bar should tick.
initial
The starting point of the progress bar.
...
Additional arguments for the bar creation. See the Details section for more information.
Details
The optional ...
named arguments depend on the specific concrete
implementation (i.e., BasicBar
or
ModernBar
).
Returns
This method returns void. The resulting bar is stored in the private
field .bar
, accessible via the active binding engine
.
Method update()
Update the progress bar.
Usage
Bar$update(current)
Arguments
current
The position the progress bar should be at (e.g., 30 out of 100), usually the index in a loop.
Method terminate()
Terminate the progress bar.
Usage
Bar$terminate()
Method clone()
The objects of this class are cloneable with this method.
Usage
Bar$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
BasicBar
, ModernBar
, and BarFactory
.