LibreOffice Module filter (master) 1
Public Member Functions | Private Attributes | List of all members
filter::config::CacheUpdateListener Class Reference

implements a listener, which will update the global filter cache, if the underlying configuration wa changed by other processes. More...

#include <cacheupdatelistener.hxx>

Inheritance diagram for filter::config::CacheUpdateListener:
[legend]
Collaboration diagram for filter::config::CacheUpdateListener:
[legend]

Public Member Functions

 CacheUpdateListener (FilterCache &rFilterCache, css::uno::Reference< css::uno::XInterface > xConfigAccess, FilterCache::EItemType eConfigType)
 initialize new instance of this class. More...
 
virtual ~CacheUpdateListener () override
 standard dtor. More...
 
void startListening ()
 starts listening. More...
 
void stopListening ()
 stop listening. More...
 
virtual void SAL_CALL changesOccurred (const css::util::ChangesEvent &aEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &aEvent) override
 

Private Attributes

std::mutex m_aMutex
 
FilterCachem_rCache
 reference to the singleton(!) filter cache implementation, which should be updated by this thread. More...
 
css::uno::Reference< css::uno::XInterface > m_xConfig
 holds the configuration access, where we listen alive. More...
 
FilterCache::EItemType m_eConfigType
 every instance of this update listener listen on a special sub set of the filter configuration. More...
 

Detailed Description

implements a listener, which will update the global filter cache, if the underlying configuration wa changed by other processes.

Definition at line 34 of file cacheupdatelistener.hxx.

Constructor & Destructor Documentation

◆ CacheUpdateListener()

filter::config::CacheUpdateListener::CacheUpdateListener ( FilterCache rFilterCache,
css::uno::Reference< css::uno::XInterface >  xConfigAccess,
FilterCache::EItemType  eConfigType 
)

initialize new instance of this class.

@descr Listening won't be started here. It can be done by calling startListening() on this instance.

See also
startListening()
Parameters
xConfigAccessthe configuration access, where this instance should listen for changes.
eConfigTypespecify the type of configuration.

Definition at line 34 of file cacheupdatelistener.cxx.

◆ ~CacheUpdateListener()

filter::config::CacheUpdateListener::~CacheUpdateListener ( )
overridevirtual

standard dtor.

Definition at line 43 of file cacheupdatelistener.cxx.

Member Function Documentation

◆ changesOccurred()

void SAL_CALL filter::config::CacheUpdateListener::changesOccurred ( const css::util::ChangesEvent &  aEvent)
overridevirtual

◆ disposing()

void SAL_CALL filter::config::CacheUpdateListener::disposing ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 171 of file cacheupdatelistener.cxx.

References aEvent, m_aMutex, and m_xConfig.

◆ startListening()

void filter::config::CacheUpdateListener::startListening ( )

starts listening.

Definition at line 47 of file cacheupdatelistener.cxx.

References m_aMutex, and m_xConfig.

◆ stopListening()

void filter::config::CacheUpdateListener::stopListening ( )

stop listening.

Definition at line 63 of file cacheupdatelistener.cxx.

References m_aMutex, and m_xConfig.

Member Data Documentation

◆ m_aMutex

std::mutex filter::config::CacheUpdateListener::m_aMutex
private

Definition at line 41 of file cacheupdatelistener.hxx.

Referenced by changesOccurred(), disposing(), startListening(), and stopListening().

◆ m_eConfigType

FilterCache::EItemType filter::config::CacheUpdateListener::m_eConfigType
private

every instance of this update listener listen on a special sub set of the filter configuration.

So it should know, which type of configuration entry it must put into the filter cache, if the configuration notifies changes ...

Definition at line 54 of file cacheupdatelistener.hxx.

Referenced by changesOccurred().

◆ m_rCache

FilterCache& filter::config::CacheUpdateListener::m_rCache
private

reference to the singleton(!) filter cache implementation, which should be updated by this thread.

Definition at line 45 of file cacheupdatelistener.hxx.

Referenced by changesOccurred().

◆ m_xConfig

css::uno::Reference< css::uno::XInterface > filter::config::CacheUpdateListener::m_xConfig
private

holds the configuration access, where we listen alive.

Definition at line 48 of file cacheupdatelistener.hxx.

Referenced by changesOccurred(), disposing(), startListening(), and stopListening().


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