LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
dbaccess::OBookmarkContainer Class Referencefinal

#include <bookmarkcontainer.hxx>

Inheritance diagram for dbaccess::OBookmarkContainer:
[legend]
Collaboration diagram for dbaccess::OBookmarkContainer:
[legend]

Public Member Functions

 OBookmarkContainer (::cppu::OWeakObject &_rParent, ::osl::Mutex &_rMutex)
 constructs the container. More...
 
virtual ~OBookmarkContainer () override
 looks like the dtor ... More...
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept 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 css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override
 
virtual sal_Int32 SAL_CALL getCount () override
 
virtual css::uno::Any SAL_CALL getByIndex (sal_Int32 _nIndex) override
 
virtual void SAL_CALL insertByName (const OUString &_rName, const css::uno::Any &aElement) override
 
virtual void SAL_CALL removeByName (const OUString &_rName) override
 
virtual void SAL_CALL replaceByName (const OUString &_rName, const css::uno::Any &aElement) override
 
virtual css::uno::Any SAL_CALL getByName (const OUString &aName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames () override
 
virtual sal_Bool SAL_CALL hasByName (const OUString &aName) override
 
virtual void SAL_CALL addContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override
 
virtual void SAL_CALL removeContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent () override
 
virtual void SAL_CALL setParent (const css::uno::Reference< css::uno::XInterface > &Parent) override
 

Private Types

typedef std::map< OUString, OUString > MapString2String
 
typedef std::vector< MapString2String::iterator > MapIteratorVector
 

Private Member Functions

bool checkExistence (const OUString &_rName)
 quickly checks if there already is an element with a given name. More...
 
void implAppend (const OUString &_rName, const OUString &_rDocumentLocation)
 
void implRemove (const OUString &_rName)
 
void implReplace (const OUString &_rName, const OUString &_rNewLink)
 

Private Attributes

MapString2String m_aBookmarks
 
MapIteratorVector m_aBookmarksIndexed
 
::cppu::OWeakObjectm_rParent
 
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
 
::osl::Mutex & m_rMutex
 

Detailed Description

Definition at line 51 of file bookmarkcontainer.hxx.

Member Typedef Documentation

◆ MapIteratorVector

typedef std::vector<MapString2String::iterator> dbaccess::OBookmarkContainer::MapIteratorVector
private

Definition at line 55 of file bookmarkcontainer.hxx.

◆ MapString2String

typedef std::map<OUString, OUString> dbaccess::OBookmarkContainer::MapString2String
private

Definition at line 54 of file bookmarkcontainer.hxx.

Constructor & Destructor Documentation

◆ OBookmarkContainer()

dbaccess::OBookmarkContainer::OBookmarkContainer ( ::cppu::OWeakObject _rParent,
::osl::Mutex &  _rMutex 
)

constructs the container.


after the construction of the object the creator has to call initialize.

Parameters
_rParentthe parent object which is used for ref counting
_rMutexthe parent's mutex object for access safety

Definition at line 41 of file bookmarkcontainer.cxx.

References m_rParent.

◆ ~OBookmarkContainer()

dbaccess::OBookmarkContainer::~OBookmarkContainer ( )
overridevirtual

looks like the dtor ...

Definition at line 59 of file bookmarkcontainer.cxx.

Member Function Documentation

◆ acquire()

void SAL_CALL dbaccess::OBookmarkContainer::acquire ( )
overridevirtualnoexcept

Definition at line 49 of file bookmarkcontainer.cxx.

References cppu::OWeakObject::acquire(), and m_rParent.

◆ addContainerListener()

void SAL_CALL dbaccess::OBookmarkContainer::addContainerListener ( const css::uno::Reference< css::container::XContainerListener > &  xListener)
overridevirtual

◆ checkExistence()

bool dbaccess::OBookmarkContainer::checkExistence ( const OUString &  _rName)
inlineprivate

quickly checks if there already is an element with a given name.

No access to the configuration occurs, i.e. if there is such an object which is not already loaded, it won't be loaded now.

Parameters
_rNamethe object name to check
Returns
sal_True if there already exists such an object

Definition at line 141 of file bookmarkcontainer.hxx.

References m_aBookmarks.

Referenced by getByName(), hasByName(), implReplace(), insertByName(), removeByName(), and replaceByName().

◆ createEnumeration()

Reference< XEnumeration > SAL_CALL dbaccess::OBookmarkContainer::createEnumeration ( )
overridevirtual

Definition at line 193 of file bookmarkcontainer.cxx.

References m_rMutex.

◆ getByIndex()

Any SAL_CALL dbaccess::OBookmarkContainer::getByIndex ( sal_Int32  _nIndex)
overridevirtual

Definition at line 206 of file bookmarkcontainer.cxx.

References Any, m_aBookmarksIndexed, m_rMutex, and o3tl::make_unsigned().

◆ getByName()

Any SAL_CALL dbaccess::OBookmarkContainer::getByName ( const OUString &  aName)
overridevirtual

Definition at line 216 of file bookmarkcontainer.cxx.

References Any, checkExistence(), m_aBookmarks, and m_rMutex.

◆ getCount()

sal_Int32 SAL_CALL dbaccess::OBookmarkContainer::getCount ( )
overridevirtual

Definition at line 200 of file bookmarkcontainer.cxx.

References m_aBookmarks, and m_rMutex.

◆ getElementNames()

Sequence< OUString > SAL_CALL dbaccess::OBookmarkContainer::getElementNames ( )
overridevirtual

Definition at line 226 of file bookmarkcontainer.cxx.

References m_aBookmarks, m_aBookmarksIndexed, and m_rMutex.

◆ getElementType()

Type SAL_CALL dbaccess::OBookmarkContainer::getElementType ( )
overridevirtual

Definition at line 181 of file bookmarkcontainer.cxx.

◆ getImplementationName()

OUString SAL_CALL dbaccess::OBookmarkContainer::getImplementationName ( )
overridevirtual

Definition at line 64 of file bookmarkcontainer.cxx.

◆ getParent()

Reference< XInterface > SAL_CALL dbaccess::OBookmarkContainer::getParent ( )
overridevirtual

Definition at line 289 of file bookmarkcontainer.cxx.

References m_rParent.

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL dbaccess::OBookmarkContainer::getSupportedServiceNames ( )
overridevirtual

Definition at line 74 of file bookmarkcontainer.cxx.

◆ hasByName()

sal_Bool SAL_CALL dbaccess::OBookmarkContainer::hasByName ( const OUString &  aName)
overridevirtual

Definition at line 242 of file bookmarkcontainer.cxx.

References checkExistence(), and m_rMutex.

◆ hasElements()

sal_Bool SAL_CALL dbaccess::OBookmarkContainer::hasElements ( )
overridevirtual

Definition at line 186 of file bookmarkcontainer.cxx.

References m_aBookmarks, and m_rMutex.

◆ implAppend()

void dbaccess::OBookmarkContainer::implAppend ( const OUString &  _rName,
const OUString &  _rDocumentLocation 
)
private

Definition at line 273 of file bookmarkcontainer.cxx.

References m_aBookmarks, m_aBookmarksIndexed, and m_rMutex.

Referenced by insertByName().

◆ implRemove()

void dbaccess::OBookmarkContainer::implRemove ( const OUString &  _rName)
private

Definition at line 249 of file bookmarkcontainer.cxx.

References m_aBookmarks, m_aBookmarksIndexed, and m_rMutex.

Referenced by removeByName().

◆ implReplace()

void dbaccess::OBookmarkContainer::implReplace ( const OUString &  _rName,
const OUString &  _rNewLink 
)
private

Definition at line 281 of file bookmarkcontainer.cxx.

References checkExistence(), m_aBookmarks, and m_rMutex.

Referenced by replaceByName().

◆ insertByName()

void SAL_CALL dbaccess::OBookmarkContainer::insertByName ( const OUString &  _rName,
const css::uno::Any &  aElement 
)
overridevirtual

◆ release()

void SAL_CALL dbaccess::OBookmarkContainer::release ( )
overridevirtualnoexcept

Definition at line 54 of file bookmarkcontainer.cxx.

References m_rParent, and cppu::OWeakObject::release().

◆ removeByName()

void SAL_CALL dbaccess::OBookmarkContainer::removeByName ( const OUString &  _rName)
overridevirtual

◆ removeContainerListener()

void SAL_CALL dbaccess::OBookmarkContainer::removeContainerListener ( const css::uno::Reference< css::container::XContainerListener > &  xListener)
overridevirtual

◆ replaceByName()

void SAL_CALL dbaccess::OBookmarkContainer::replaceByName ( const OUString &  _rName,
const css::uno::Any &  aElement 
)
overridevirtual

◆ setParent()

void SAL_CALL dbaccess::OBookmarkContainer::setParent ( const css::uno::Reference< css::uno::XInterface > &  Parent)
overridevirtual

Definition at line 294 of file bookmarkcontainer.cxx.

◆ supportsService()

sal_Bool SAL_CALL dbaccess::OBookmarkContainer::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 69 of file bookmarkcontainer.cxx.

References cppu::supportsService().

Member Data Documentation

◆ m_aBookmarks

MapString2String dbaccess::OBookmarkContainer::m_aBookmarks
private

◆ m_aBookmarksIndexed

MapIteratorVector dbaccess::OBookmarkContainer::m_aBookmarksIndexed
private

Definition at line 58 of file bookmarkcontainer.hxx.

Referenced by getByIndex(), getElementNames(), implAppend(), and implRemove().

◆ m_aContainerListeners

::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> dbaccess::OBookmarkContainer::m_aContainerListeners
private

◆ m_rMutex

::osl::Mutex& dbaccess::OBookmarkContainer::m_rMutex
private

◆ m_rParent

::cppu::OWeakObject& dbaccess::OBookmarkContainer::m_rParent
private

Definition at line 60 of file bookmarkcontainer.hxx.

Referenced by acquire(), getParent(), and release().


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