LibreOffice Module sd (master) 1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
sdext::presenter::PresenterClockTimer Class Reference

A timer that calls its listeners, typically clocks, every second to update their current time value. More...

#include <PresenterTimer.hxx>

Inheritance diagram for sdext::presenter::PresenterClockTimer:
[legend]
Collaboration diagram for sdext::presenter::PresenterClockTimer:
[legend]

Classes

class  Listener
 

Public Types

typedef std::shared_ptr< ListenerSharedListener
 

Public Member Functions

static ::rtl::Reference< PresenterClockTimerInstance (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
void AddListener (const SharedListener &rListener)
 
void RemoveListener (const SharedListener &rListener)
 
virtual void SAL_CALL notify (const css::uno::Any &rUserData) override
 

Static Public Member Functions

static oslDateTime GetCurrentTime ()
 

Private Types

typedef ::std::vector< SharedListenerListenerContainer
 

Private Member Functions

 PresenterClockTimer (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~PresenterClockTimer () override
 
void CheckCurrentTime (const TimeValue &rCurrentTime)
 

Private Attributes

static ::rtl::Reference< PresenterClockTimermpInstance
 
std::mutex maMutex
 
ListenerContainer maListeners
 
oslDateTime maDateTime
 
sal_Int32 mnTimerTaskId
 
bool mbIsCallbackPending
 
css::uno::Reference< css::awt::XRequestCallback > mxRequestCallback
 
const css::uno::Reference< css::uno::XComponentContext > m_xContext
 

Additional Inherited Members

- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

A timer that calls its listeners, typically clocks, every second to update their current time value.

Definition at line 73 of file PresenterTimer.hxx.

Member Typedef Documentation

◆ ListenerContainer

Definition at line 103 of file PresenterTimer.hxx.

◆ SharedListener

Definition at line 85 of file PresenterTimer.hxx.

Constructor & Destructor Documentation

◆ PresenterClockTimer()

sdext::presenter::PresenterClockTimer::PresenterClockTimer ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)
private

Definition at line 437 of file PresenterTimer.cxx.

References m_aMutex, m_xContext, m_xContext, maDateTime, mxRequestCallback, and xFactory.

Referenced by Instance().

◆ ~PresenterClockTimer()

sdext::presenter::PresenterClockTimer::~PresenterClockTimer ( )
overrideprivatevirtual

Member Function Documentation

◆ AddListener()

void sdext::presenter::PresenterClockTimer::AddListener ( const SharedListener rListener)

◆ CheckCurrentTime()

void sdext::presenter::PresenterClockTimer::CheckCurrentTime ( const TimeValue &  rCurrentTime)
private

Definition at line 517 of file PresenterTimer.cxx.

References Any, maDateTime, maMutex, mbIsCallbackPending, and mxRequestCallback.

Referenced by AddListener().

◆ GetCurrentTime()

oslDateTime sdext::presenter::PresenterClockTimer::GetCurrentTime ( )
static

Definition at line 508 of file PresenterTimer.cxx.

◆ Instance()

rtl::Reference< PresenterClockTimer > sdext::presenter::PresenterClockTimer::Instance ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

Definition at line 419 of file PresenterTimer.cxx.

References mpInstance, and PresenterClockTimer().

◆ notify()

void SAL_CALL sdext::presenter::PresenterClockTimer::notify ( const css::uno::Any &  rUserData)
overridevirtual

Definition at line 552 of file PresenterTimer.cxx.

References maDateTime, maListeners, maMutex, and mbIsCallbackPending.

◆ RemoveListener()

void sdext::presenter::PresenterClockTimer::RemoveListener ( const SharedListener rListener)

Member Data Documentation

◆ m_xContext

const css::uno::Reference<css::uno::XComponentContext> sdext::presenter::PresenterClockTimer::m_xContext
private

Definition at line 109 of file PresenterTimer.hxx.

Referenced by AddListener(), and PresenterClockTimer().

◆ maDateTime

oslDateTime sdext::presenter::PresenterClockTimer::maDateTime
private

Definition at line 105 of file PresenterTimer.hxx.

Referenced by CheckCurrentTime(), and notify().

◆ maListeners

ListenerContainer sdext::presenter::PresenterClockTimer::maListeners
private

Definition at line 104 of file PresenterTimer.hxx.

Referenced by AddListener(), notify(), and RemoveListener().

◆ maMutex

std::mutex sdext::presenter::PresenterClockTimer::maMutex
private

Definition at line 102 of file PresenterTimer.hxx.

Referenced by AddListener(), CheckCurrentTime(), notify(), and RemoveListener().

◆ mbIsCallbackPending

bool sdext::presenter::PresenterClockTimer::mbIsCallbackPending
private

Definition at line 107 of file PresenterTimer.hxx.

Referenced by CheckCurrentTime(), and notify().

◆ mnTimerTaskId

sal_Int32 sdext::presenter::PresenterClockTimer::mnTimerTaskId
private

Definition at line 106 of file PresenterTimer.hxx.

Referenced by AddListener(), RemoveListener(), and ~PresenterClockTimer().

◆ mpInstance

rtl::Reference< PresenterClockTimer > sdext::presenter::PresenterClockTimer::mpInstance
private

Definition at line 100 of file PresenterTimer.hxx.

Referenced by Instance(), and RemoveListener().

◆ mxRequestCallback

css::uno::Reference<css::awt::XRequestCallback> sdext::presenter::PresenterClockTimer::mxRequestCallback
private

Definition at line 108 of file PresenterTimer.hxx.

Referenced by CheckCurrentTime(), PresenterClockTimer(), and ~PresenterClockTimer().


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