Samchon Framework for CPP  1.0.0
ProgressEvent.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/library/Event.hpp>
5 
6 namespace samchon
7 {
8 namespace library
9 {
17  class SAMCHON_FRAMEWORK_API ProgressEvent
18  : public Event
19  {
20  private:
21  typedef Event super;
22 
23  enum : int
24  {
25  ACTIVATE = 1,
26  COMPLETE = 2,
27  REMOVED = -1
28  };
29 
30  protected:
34  size_t numerator;
35 
40  size_t denominator;
41 
42  public:
43  enum : int
44  {
45  PROGRESS = 11
46  };
47 
57  ProgressEvent(EventDispatcher *, size_t, size_t);
58  virtual ~ProgressEvent() = default;
59 
63  auto getNumerator() const->size_t;
64 
68  auto getDenominator() const->size_t;
69 
73  auto getPercent() const -> double;
74  };
75 };
76 };
size_t denominator
The number of total progress.
Represent an event running on background.
Definition: Event.hpp:42
Event representing a progress.
Abstract class for dispatching Event.
size_t numerator
The number of current progress.
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7