LibreOffice Module slideshow (master) 1
Public Member Functions | Private Attributes | List of all members
slideshow::internal::DelayFacade Class Reference

Event, which delays calling passed Event's fire() method the given amount of time. More...

#include <interruptabledelayevent.hxx>

Inheritance diagram for slideshow::internal::DelayFacade:
[legend]
Collaboration diagram for slideshow::internal::DelayFacade:
[legend]

Public Member Functions

 DelayFacade (EventSharedPtr xEvent, double nTimeout)
 
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

EventSharedPtr mpEvent
 
double mnTimeout
 

Detailed Description

Event, which delays calling passed Event's fire() method the given amount of time.

This is actually a facade around the passed event object, that passes on all calls to that object, and the sole contribution of itself is the delay.

Definition at line 36 of file interruptabledelayevent.hxx.

Constructor & Destructor Documentation

◆ DelayFacade()

slideshow::internal::DelayFacade::DelayFacade ( EventSharedPtr  xEvent,
double  nTimeout 
)
inline

Definition at line 39 of file interruptabledelayevent.hxx.

Member Function Documentation

◆ dispose()

virtual void slideshow::internal::DelayFacade::dispose ( )
inlineoverridevirtual

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 75 of file interruptabledelayevent.hxx.

References mpEvent.

◆ fire()

virtual bool slideshow::internal::DelayFacade::fire ( )
inlineoverridevirtual

Execute the event.

Returns
true, if event was successfully executed.

Implements slideshow::internal::Event.

Definition at line 47 of file interruptabledelayevent.hxx.

References isCharged(), and mpEvent.

◆ getActivationTime()

virtual double slideshow::internal::DelayFacade::getActivationTime ( double  nCurrentTime) const
inlineoverridevirtual

Query the activation time instant this event shall be fired, if it was inserted at instant nCurrentTime into the queue.

Parameters
nCurrentTimeThe time from which the activation time is to be calculated from.
Returns
the time instant in seconds, on which this event is to be fired.

Implements slideshow::internal::Event.

Definition at line 68 of file interruptabledelayevent.hxx.

References mnTimeout.

◆ isCharged()

virtual bool slideshow::internal::DelayFacade::isCharged ( ) const
inlineoverridevirtual

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.

Returns
true, if this event has already been fired.

Implements slideshow::internal::Event.

Definition at line 60 of file interruptabledelayevent.hxx.

References mpEvent.

Referenced by fire().

Member Data Documentation

◆ mnTimeout

double slideshow::internal::DelayFacade::mnTimeout
private

Definition at line 82 of file interruptabledelayevent.hxx.

Referenced by getActivationTime().

◆ mpEvent

EventSharedPtr slideshow::internal::DelayFacade::mpEvent
private

Definition at line 81 of file interruptabledelayevent.hxx.

Referenced by dispose(), fire(), and isCharged().


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