LibreOffice Module ucb (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SortedDynamicResultSet Class Reference

#include <sortdynres.hxx>

Inheritance diagram for SortedDynamicResultSet:
[legend]
Collaboration diagram for SortedDynamicResultSet:
[legend]

Public Member Functions

 SortedDynamicResultSet (const css::uno::Reference< css::ucb::XDynamicResultSet > &xOriginal, const css::uno::Sequence< css::ucb::NumberedSortingInfo > &aOptions, const css::uno::Reference< css::ucb::XAnyCompareFactory > &xCompFac, const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~SortedDynamicResultSet () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override
 
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getStaticResultSet () override
 
virtual void SAL_CALL setListener (const css::uno::Reference< css::ucb::XDynamicResultSetListener > &Listener) override
 
virtual void SAL_CALL connectToCache (const css::uno::Reference< css::ucb::XDynamicResultSet > &xCache) override
 
virtual sal_Int16 SAL_CALL getCapabilities () override
 
void impl_disposing ()
 
void impl_notify (const css::ucb::ListEvent &Changes)
 In the first notify-call the listener gets the two <type>XResultSet</type>s and has to hold them. More...
 

Private Member Functions

void SendNotify ()
 

Private Attributes

std::unique_ptr< comphelper::OInterfaceContainerHelper2mpDisposeEventListeners
 
css::uno::Reference< css::ucb::XDynamicResultSetListener > mxListener
 
css::uno::Reference< css::ucb::XDynamicResultSet > mxOriginal
 
css::uno::Sequence< css::ucb::NumberedSortingInfo > maOptions
 
css::uno::Reference< css::ucb::XAnyCompareFactory > mxCompFac
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
rtl::Reference< SortedResultSetmxOne
 
rtl::Reference< SortedResultSetmxTwo
 
rtl::Reference< SortedDynamicResultSetListenermxOwnListener
 
EventList maActions
 
osl::Mutex maMutex
 
bool mbGotWelcome:1
 
bool mbUseOne:1
 
bool mbStatic:1
 

Detailed Description

Definition at line 43 of file sortdynres.hxx.

Constructor & Destructor Documentation

SortedDynamicResultSet::SortedDynamicResultSet ( const css::uno::Reference< css::ucb::XDynamicResultSet > &  xOriginal,
const css::uno::Sequence< css::ucb::NumberedSortingInfo > &  aOptions,
const css::uno::Reference< css::ucb::XAnyCompareFactory > &  xCompFac,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext 
)

Definition at line 51 of file sortdynres.cxx.

References m_xContext.

SortedDynamicResultSet::~SortedDynamicResultSet ( )
overridevirtual

Definition at line 71 of file sortdynres.cxx.

Member Function Documentation

void SAL_CALL SortedDynamicResultSet::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  Listener)
overridevirtual

Definition at line 120 of file sortdynres.cxx.

References getContainerMutex(), and maMutex.

void SAL_CALL SortedDynamicResultSet::connectToCache ( const css::uno::Reference< css::ucb::XDynamicResultSet > &  xCache)
overridevirtual

Definition at line 182 of file sortdynres.cxx.

References Exception, and m_xContext.

void SAL_CALL SortedDynamicResultSet::dispose ( void  )
overridevirtual

Definition at line 102 of file sortdynres.cxx.

References maMutex.

sal_Int16 SAL_CALL SortedDynamicResultSet::getCapabilities ( )
overridevirtual

Definition at line 213 of file sortdynres.cxx.

References maMutex.

OUString SAL_CALL SortedDynamicResultSet::getImplementationName ( )
overridevirtual

Definition at line 85 of file sortdynres.cxx.

Reference< XResultSet > SAL_CALL SortedDynamicResultSet::getStaticResultSet ( )
overridevirtual

Definition at line 145 of file sortdynres.cxx.

References SortedResultSet::Initialize(), and maMutex.

css::uno::Sequence< OUString > SAL_CALL SortedDynamicResultSet::getSupportedServiceNames ( )
overridevirtual

Definition at line 95 of file sortdynres.cxx.

References DYNAMIC_RESULTSET_SERVICE_NAME.

void SortedDynamicResultSet::impl_disposing ( )
Exceptions
css::uno::RuntimeException

Definition at line 372 of file sortdynres.cxx.

void SortedDynamicResultSet::impl_notify ( const css::ucb::ListEvent &  Changes)

In the first notify-call the listener gets the two <type>XResultSet</type>s and has to hold them.

Exceptions
css::uno::RuntimeException

The <type>XResultSet</type>s are implementations of the service <type>ContentResultSet</type>.

The notified new <type>XResultSet</type> will stay valid after returning notification. The old one will become invalid after returning notification.

While in notify-call the listener is allowed to read old and new version, except in the first call, where only the new Resultset is valid.

The Listener is allowed to blockade this call, until he really want to go to the new version. The only situation, where the listener has to return the update call at once is, while he disposes his broadcaster or while he is removing himself as listener (otherwise you deadlock)!!!

Definition at line 246 of file sortdynres.cxx.

References Any, SortedResultSet::CheckProperties(), SortedResultSet::CopyData(), SortedResultSet::GetCount(), SortedResultSet::getPropertyValue(), SortedResultSet::InsertNew(), maMutex, SortedResultSet::Move(), SortedResultSet::Remove(), SortedResultSet::ResortModified(), SortedResultSet::ResortNew(), and SortedResultSet::SetChanged().

void SAL_CALL SortedDynamicResultSet::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  Listener)
overridevirtual

Definition at line 132 of file sortdynres.cxx.

References maMutex.

void SortedDynamicResultSet::SendNotify ( )
private

Definition at line 380 of file sortdynres.cxx.

References i.

void SAL_CALL SortedDynamicResultSet::setListener ( const css::uno::Reference< css::ucb::XDynamicResultSetListener > &  Listener)
overridevirtual

Definition at line 165 of file sortdynres.cxx.

References maMutex.

sal_Bool SAL_CALL SortedDynamicResultSet::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 90 of file sortdynres.cxx.

References cppu::supportsService().

Member Data Documentation

css::uno::Reference< css::uno::XComponentContext > SortedDynamicResultSet::m_xContext
private

Definition at line 54 of file sortdynres.hxx.

EventList SortedDynamicResultSet::maActions
private

Definition at line 60 of file sortdynres.hxx.

osl::Mutex SortedDynamicResultSet::maMutex
private

Definition at line 61 of file sortdynres.hxx.

css::uno::Sequence< css::ucb::NumberedSortingInfo > SortedDynamicResultSet::maOptions
private

Definition at line 52 of file sortdynres.hxx.

bool SortedDynamicResultSet::mbGotWelcome
private

Definition at line 62 of file sortdynres.hxx.

bool SortedDynamicResultSet::mbStatic
private

Definition at line 64 of file sortdynres.hxx.

bool SortedDynamicResultSet::mbUseOne
private

Definition at line 63 of file sortdynres.hxx.

std::unique_ptr<comphelper::OInterfaceContainerHelper2> SortedDynamicResultSet::mpDisposeEventListeners
private

Definition at line 47 of file sortdynres.hxx.

css::uno::Reference< css::ucb::XAnyCompareFactory > SortedDynamicResultSet::mxCompFac
private

Definition at line 53 of file sortdynres.hxx.

css::uno::Reference< css::ucb::XDynamicResultSetListener > SortedDynamicResultSet::mxListener
private

Definition at line 49 of file sortdynres.hxx.

rtl::Reference<SortedResultSet> SortedDynamicResultSet::mxOne
private

Definition at line 56 of file sortdynres.hxx.

css::uno::Reference< css::ucb::XDynamicResultSet > SortedDynamicResultSet::mxOriginal
private

Definition at line 51 of file sortdynres.hxx.

rtl::Reference<SortedDynamicResultSetListener> SortedDynamicResultSet::mxOwnListener
private

Definition at line 58 of file sortdynres.hxx.

rtl::Reference<SortedResultSet> SortedDynamicResultSet::mxTwo
private

Definition at line 57 of file sortdynres.hxx.


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