LibreOffice Module sdext (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:
Collaboration diagram for sdext::presenter::PresenterClockTimer:


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
::osl::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)

Definition at line 437 of file PresenterTimer.cxx.

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

Referenced by Instance().

◆ ~PresenterClockTimer()

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

Member Function Documentation

◆ AddListener()

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

◆ CheckCurrentTime()

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

Definition at line 517 of file PresenterTimer.cxx.

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

Referenced by AddListener().

◆ GetCurrentTime()

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

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)

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

Definition at line 109 of file PresenterTimer.hxx.

Referenced by AddListener(), and PresenterClockTimer().

◆ maDateTime

oslDateTime sdext::presenter::PresenterClockTimer::maDateTime

Definition at line 105 of file PresenterTimer.hxx.

Referenced by CheckCurrentTime(), and notify().

◆ maListeners

ListenerContainer sdext::presenter::PresenterClockTimer::maListeners

Definition at line 104 of file PresenterTimer.hxx.

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

◆ maMutex

::osl::Mutex sdext::presenter::PresenterClockTimer::maMutex

Definition at line 102 of file PresenterTimer.hxx.

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

◆ mbIsCallbackPending

bool sdext::presenter::PresenterClockTimer::mbIsCallbackPending

Definition at line 107 of file PresenterTimer.hxx.

Referenced by CheckCurrentTime(), and notify().

◆ mnTimerTaskId

sal_Int32 sdext::presenter::PresenterClockTimer::mnTimerTaskId

Definition at line 106 of file PresenterTimer.hxx.

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

◆ mpInstance

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

Definition at line 100 of file PresenterTimer.hxx.

Referenced by Instance(), and RemoveListener().

◆ mxRequestCallback

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

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: