Samchon Framework for CPP  1.0.0
samchon::library::ProgressEvent Class Reference

Event representing a progress. More...

#include <ProgressEvent.hpp>

Collaboration diagram for samchon::library::ProgressEvent:

Public Member Functions

 ProgressEvent (EventDispatcher *, size_t, size_t)
 Construct from source and progress. More...
 
auto getNumerator () const -> size_t
 Get numerator, number of current progress. More...
 
auto getDenominator () const -> size_t
 Get denominator, number of total progress. More...
 
auto getPercent () const -> double
 Get percentage of the progress. More...
 
- Public Member Functions inherited from samchon::library::Event
 Event (EventDispatcher *, int)
 Construct from source and type. More...
 
auto getSource () const -> EventDispatcher *
 Get source of the Event. More...
 
auto getType () const -> int
 Get type of the Event. More...
 

Protected Attributes

size_t numerator
 The number of current progress. More...
 
size_t denominator
 The number of total progress. More...
 
- Protected Attributes inherited from samchon::library::Event
EventDispatchersource
 Source of the event. More...
 
int type
 Type of the event. More...
 

Detailed Description

Event representing a progress.

[Inherited]

Definition at line 17 of file ProgressEvent.hpp.

Constructor & Destructor Documentation

ProgressEvent::ProgressEvent ( EventDispatcher source,
size_t  numerator,
size_t  denominator 
)

Construct from source and progress.

Parameters
sourceSource of the event; who made the event
numeratorThe number of current progress
denominatorThe number of total progress
Exceptions
exceptiondenominator is zero

Definition at line 5 of file ProgressEvent.cpp.

References denominator, and numerator.

Member Function Documentation

auto ProgressEvent::getNumerator ( ) const -> size_t

Get numerator, number of current progress.

Definition at line 12 of file ProgressEvent.cpp.

References numerator.

auto ProgressEvent::getDenominator ( ) const -> size_t

Get denominator, number of total progress.

Definition at line 16 of file ProgressEvent.cpp.

References denominator.

auto ProgressEvent::getPercent ( ) const -> double

Get percentage of the progress.

Definition at line 20 of file ProgressEvent.cpp.

References denominator, and numerator.

Member Data Documentation

size_t samchon::library::ProgressEvent::numerator
protected

The number of current progress.

Definition at line 34 of file ProgressEvent.hpp.

Referenced by getNumerator(), getPercent(), and ProgressEvent().

size_t samchon::library::ProgressEvent::denominator
protected

The number of total progress.

Warning
denominator cannot be zero

Definition at line 40 of file ProgressEvent.hpp.

Referenced by getDenominator(), getPercent(), and ProgressEvent().


The documentation for this class was generated from the following files: