LibreOffice Module slideshow (master) 1
Public Member Functions | Private Attributes | List of all members
slideshow::internal::RehearseTimingsActivity::WakeupEvent Class Reference
Inheritance diagram for slideshow::internal::RehearseTimingsActivity::WakeupEvent:
[legend]
Collaboration diagram for slideshow::internal::RehearseTimingsActivity::WakeupEvent:
[legend]

Public Member Functions

 WakeupEvent (std::shared_ptr< ::canvas::tools::ElapsedTime > const &pTimeBase, ActivitySharedPtr const &rActivity, ActivitiesQueue &rActivityQueue)
 
 WakeupEvent (const WakeupEvent &)=delete
 
WakeupEventoperator= (const WakeupEvent &)=delete
 
virtual void dispose () override
 Dispose all object references. More...
 
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...
 
void start ()
 Start the internal timer. More...
 
void setNextTimeout (double nextTime)
 Set the next timeout this object should generate. 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

::canvas::tools::ElapsedTime maTimer
 
double mnNextTime
 
std::weak_ptr< ActivitympActivity
 
ActivitiesQueuemrActivityQueue
 

Detailed Description

Definition at line 53 of file rehearsetimingsactivity.cxx.

Constructor & Destructor Documentation

◆ WakeupEvent() [1/2]

slideshow::internal::RehearseTimingsActivity::WakeupEvent::WakeupEvent ( std::shared_ptr< ::canvas::tools::ElapsedTime > const &  pTimeBase,
ActivitySharedPtr const &  rActivity,
ActivitiesQueue rActivityQueue 
)
inline

Definition at line 56 of file rehearsetimingsactivity.cxx.

◆ WakeupEvent() [2/2]

slideshow::internal::RehearseTimingsActivity::WakeupEvent::WakeupEvent ( const WakeupEvent )
delete

Member Function Documentation

◆ dispose()

virtual void slideshow::internal::RehearseTimingsActivity::WakeupEvent::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 69 of file rehearsetimingsactivity.cxx.

◆ fire()

virtual bool slideshow::internal::RehearseTimingsActivity::WakeupEvent::fire ( )
inlineoverridevirtual

Execute the event.

Returns
true, if event was successfully executed.

Implements slideshow::internal::Event.

Definition at line 70 of file rehearsetimingsactivity.cxx.

References slideshow::internal::ActivitiesQueue::addActivity(), mpActivity, and mrActivityQueue.

◆ getActivationTime()

virtual double slideshow::internal::RehearseTimingsActivity::WakeupEvent::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 80 of file rehearsetimingsactivity.cxx.

References canvas::tools::ElapsedTime::getElapsedTime(), maTimer, and mnNextTime.

◆ isCharged()

virtual bool slideshow::internal::RehearseTimingsActivity::WakeupEvent::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 79 of file rehearsetimingsactivity.cxx.

◆ operator=()

WakeupEvent & slideshow::internal::RehearseTimingsActivity::WakeupEvent::operator= ( const WakeupEvent )
delete

◆ setNextTimeout()

void slideshow::internal::RehearseTimingsActivity::WakeupEvent::setNextTimeout ( double  nextTime)
inline

Set the next timeout this object should generate.

Parameters
nextTimeAbsolute time, measured from the last start() call, when this event should wakeup the Activity again. If your time is relative, simply call start() just before every setNextTimeout() call.

Definition at line 99 of file rehearsetimingsactivity.cxx.

References mnNextTime.

◆ start()

void slideshow::internal::RehearseTimingsActivity::WakeupEvent::start ( )
inline

Start the internal timer.

Definition at line 89 of file rehearsetimingsactivity.cxx.

References maTimer, and canvas::tools::ElapsedTime::reset().

Member Data Documentation

◆ maTimer

::canvas::tools::ElapsedTime slideshow::internal::RehearseTimingsActivity::WakeupEvent::maTimer
private

Definition at line 102 of file rehearsetimingsactivity.cxx.

Referenced by getActivationTime(), and start().

◆ mnNextTime

double slideshow::internal::RehearseTimingsActivity::WakeupEvent::mnNextTime
private

Definition at line 103 of file rehearsetimingsactivity.cxx.

Referenced by getActivationTime(), and setNextTimeout().

◆ mpActivity

std::weak_ptr<Activity> slideshow::internal::RehearseTimingsActivity::WakeupEvent::mpActivity
private

Definition at line 104 of file rehearsetimingsactivity.cxx.

Referenced by fire().

◆ mrActivityQueue

ActivitiesQueue& slideshow::internal::RehearseTimingsActivity::WakeupEvent::mrActivityQueue
private

Definition at line 105 of file rehearsetimingsactivity.cxx.

Referenced by fire().


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