LibreOffice Module slideshow (master) 1
|
Event, which delays the functor call the given amount of time. More...
#include <delayevent.hxx>
Public Types | |
typedef ::std::function< void()> | FunctorT |
Public Member Functions | |
template<typename FuncT > | |
Delay (FuncT const &func, double nTimeout, const OUString &rsDescription) | |
Delay (std::function< void()> func, double nTimeout, const OUString &rsDescription) | |
Delay (const Delay &)=delete | |
Delay & | operator= (const Delay &)=delete |
virtual bool | fire () override |
Execute the event. More... | |
virtual bool | isCharged () const override |
Query whether this event is still charged, i.e. More... | |
virtual double | getActivationTime (double nCurrentTime) const override |
Query the activation time instant this event shall be fired, if it was inserted at instant nCurrentTime into the queue. More... | |
virtual void | dispose () override |
Dispose all object references. More... | |
Public Member Functions inherited from slideshow::internal::Event | |
Event (OUString sDescription) | |
virtual bool | fire ()=0 |
Execute the event. More... | |
virtual bool | isCharged () const =0 |
Query whether this event is still charged, i.e. More... | |
virtual double | getActivationTime (double nCurrentTime) const =0 |
Query the activation time instant this event shall be fired, if it was inserted at instant nCurrentTime into the queue. More... | |
const OUString & | GetDescription () const |
Public Member Functions inherited from slideshow::internal::Disposable | |
virtual | ~Disposable () |
virtual void | dispose ()=0 |
Dispose all object references. More... | |
Private Attributes | |
double const | mnTimeout |
FunctorT | maFunc |
bool | mbWasFired |
Event, which delays the functor call the given amount of time.
Definition at line 31 of file delayevent.hxx.
typedef ::std::function<void ()> slideshow::internal::Delay::FunctorT |
Definition at line 34 of file delayevent.hxx.
|
inline |
Definition at line 37 of file delayevent.hxx.
|
inline |
Definition at line 43 of file delayevent.hxx.
|
delete |
|
overridevirtual |
Dispose all object references.
An implementor of this method must first call dispose() on any of its external references, and release them after that.
Implements slideshow::internal::Disposable.
Definition at line 47 of file delayevent.cxx.
References isCharged(), maFunc, and mbWasFired.
|
overridevirtual |
Execute the event.
Implements slideshow::internal::Event.
Definition at line 26 of file delayevent.cxx.
References isCharged(), maFunc, and mbWasFired.
|
overridevirtual |
Query the activation time instant this event shall be fired, if it was inserted at instant nCurrentTime into the queue.
nCurrentTime | The time from which the activation time is to be calculated from. |
Implements slideshow::internal::Event.
Definition at line 42 of file delayevent.cxx.
References mnTimeout.
|
overridevirtual |
Query whether this event is still charged, i.e.
able to fire.
Inactive events are ignored by the normal event containers (EventQueue, UserEventQueue etc.), and no explicit fire() is called upon them.
Implements slideshow::internal::Event.
Definition at line 37 of file delayevent.cxx.
References mbWasFired.
|
private |
Definition at line 62 of file delayevent.hxx.
|
private |
Definition at line 63 of file delayevent.hxx.
Referenced by dispose(), fire(), and isCharged().
|
private |
Definition at line 61 of file delayevent.hxx.
Referenced by getActivationTime().