LibreOffice Module connectivity (master) 1
|
#include <VCollection.hxx>
Public Member Functions | |
virtual | ~OCollection () |
DECLARE_SERVICE_INFO () | |
void | reFill (const ::std::vector< OUString > &_rVector) |
bool | isCaseSensitive () const |
void | renameObject (const OUString &_sOldName, const OUString &_sNewName) |
virtual void | disposing () |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Type SAL_CALL | getElementType () override |
virtual sal_Bool SAL_CALL | hasElements () override |
virtual sal_Int32 SAL_CALL | getCount () override |
virtual css::uno::Any SAL_CALL | getByIndex (sal_Int32 Index) 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 css::uno::Reference< css::container::XEnumeration > SAL_CALL | createEnumeration () override |
virtual void SAL_CALL | refresh () override |
virtual void SAL_CALL | addRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &l) override |
virtual void SAL_CALL | removeRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &l) override |
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL | createDataDescriptor () override |
virtual void SAL_CALL | appendByDescriptor (const css::uno::Reference< css::beans::XPropertySet > &descriptor) override |
virtual void SAL_CALL | dropByName (const OUString &elementName) override |
virtual void SAL_CALL | dropByIndex (sal_Int32 index) override |
virtual sal_Int32 SAL_CALL | findColumn (const OUString &columnName) 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 |
Public Member Functions inherited from cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > | |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) SAL_OVERRIDE |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () SAL_OVERRIDE |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () SAL_OVERRIDE |
Protected Member Functions | |
virtual void | impl_refresh ()=0 |
virtual ObjectType | createObject (const OUString &_rName)=0 |
virtual css::uno::Reference< css::beans::XPropertySet > | createDescriptor () |
virtual ObjectType | appendObject (const OUString &_rForName, const css::uno::Reference< css::beans::XPropertySet > &descriptor) |
appends an object described by a descriptor, under a given name More... | |
virtual void | dropObject (sal_Int32 _nPos, const OUString &_sElementName) |
virtual OUString | getNameForObject (const ObjectType &_xObject) |
returns the name for the object. More... | |
ObjectType | cloneDescriptor (const ObjectType &_descriptor) |
clones the given descriptor More... | |
OCollection (::cppu::OWeakObject &_rParent, bool _bCase, ::osl::Mutex &_rMutex, const ::std::vector< OUString > &_rVector, bool _bUseIndexOnly=false, bool _bUseHardRef=true) | |
void | clear_NoDispose () |
clear the name map More... | |
void | insertElement (const OUString &_sElementName, const ObjectType &_xElement) |
insert a new element into the collection More... | |
ObjectType | getObject (sal_Int32 _nIndex) |
return the object, if not existent it creates it. More... | |
Protected Member Functions inherited from cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > | |
~ImplHelper10 () SAL_NOEXCEPT | |
Protected Attributes | |
::std::unique_ptr< IObjectCollection > | m_pElements |
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > | m_aContainerListeners |
::comphelper::OInterfaceContainerHelper3< css::util::XRefreshListener > | m_aRefreshListeners |
::cppu::OWeakObject & | m_rParent |
::osl::Mutex & | m_rMutex |
bool | m_bUseIndexOnly |
Private Member Functions | |
void | notifyElementRemoved (const OUString &_sName) |
void | disposeElements () |
void | dropImpl (sal_Int32 _nIndex, bool _bReallyDrop=true) |
Definition at line 87 of file VCollection.hxx.
|
protected |
Definition at line 221 of file VCollection.cxx.
References reFill().
|
virtual |
Definition at line 244 of file VCollection.cxx.
|
overridevirtualnoexcept |
Definition at line 461 of file VCollection.cxx.
References cppu::OWeakObject::acquire(), and m_rParent.
|
overridevirtual |
Definition at line 450 of file VCollection.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), and m_aContainerListeners.
Referenced by connectivity::OTableHelper::refreshForeignKeys().
|
overridevirtual |
Definition at line 494 of file VCollection.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), and m_aRefreshListeners.
|
overridevirtual |
Definition at line 364 of file VCollection.cxx.
References aEvent, Any, appendObject(), getNameForObject(), m_aContainerListeners, m_pElements, m_rMutex, comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach(), connectivity::sdbcx::ODescriptor::setNew(), and sName.
|
protectedvirtual |
appends an object described by a descriptor, under a given name
_rForName | is the name under which the object should be appended. Guaranteed to not be empty. This is passed for convenience only, since it's the result of a call of getNameForObject for the given descriptor |
descriptor | describes the object to append |
createObject( _rForName )
, or a clone of the descriptor. Reimplemented in connectivity::firebird::Views, connectivity::mysqlc::Views, connectivity::ado::OColumns, connectivity::ado::OGroups, connectivity::ado::OIndexes, connectivity::ado::OKeys, connectivity::ado::OTables, connectivity::ado::OUsers, connectivity::ado::OViews, connectivity::dbase::ODbaseColumns, connectivity::dbase::ODbaseIndexColumns, connectivity::dbase::ODbaseIndexes, connectivity::dbase::ODbaseTables, connectivity::hsqldb::OTables, connectivity::hsqldb::OUsers, connectivity::hsqldb::HViews, connectivity::mysql::OTables, connectivity::mysql::OUsers, connectivity::mysql::OViews, connectivity::OColumnsHelper, connectivity::OIndexesHelper, connectivity::OKeysHelper, connectivity::firebird::Tables, connectivity::firebird::Users, and connectivity::mysqlc::Tables.
Definition at line 572 of file VCollection.cxx.
References cloneDescriptor().
Referenced by appendByDescriptor().
|
protected |
clear the name map
Does not dispose the objects hold by the collection.
Definition at line 278 of file VCollection.cxx.
References m_pElements, and m_rMutex.
|
protected |
clones the given descriptor
The method calls createDescriptor to create a new, empty descriptor, and then copies all properties from _descriptor to the new object, which is returned.
This method might come handy in derived classes for implementing appendObject, when the object is not actually appended to any backend (e.g. for the columns collection of a descriptor object itself, where there is not yet a database backend to append the column to).
Definition at line 565 of file VCollection.cxx.
References createDescriptor().
Referenced by appendObject(), connectivity::dbase::ODbaseColumns::appendObject(), connectivity::dbase::ODbaseIndexColumns::appendObject(), connectivity::OColumnsHelper::appendObject(), connectivity::OIndexesHelper::appendObject(), and connectivity::OKeysHelper::appendObject().
|
overridevirtual |
Definition at line 348 of file VCollection.cxx.
References createDescriptor(), and m_rMutex.
|
protectedvirtual |
Reimplemented in connectivity::OIndexColumns, connectivity::OKeyColumnsHelper, connectivity::firebird::Columns, connectivity::firebird::Tables, connectivity::firebird::Users, connectivity::firebird::Views, connectivity::mysqlc::Columns, connectivity::mysqlc::Tables, connectivity::mysqlc::Views, connectivity::ado::OColumns, connectivity::ado::OGroups, connectivity::ado::OIndexes, connectivity::ado::OKeys, connectivity::ado::OTables, connectivity::ado::OUsers, connectivity::ado::OViews, connectivity::dbase::ODbaseColumns, connectivity::dbase::ODbaseIndexColumns, connectivity::dbase::ODbaseIndexes, connectivity::dbase::ODbaseTables, connectivity::hsqldb::OHSQLColumns, connectivity::hsqldb::OTables, connectivity::hsqldb::OUsers, connectivity::hsqldb::HViews, connectivity::mysql::OMySQLColumns, connectivity::mysql::OTables, connectivity::mysql::OUsers, connectivity::mysql::OViews, connectivity::OColumnsHelper, connectivity::OIndexesHelper, and connectivity::OKeysHelper.
Definition at line 559 of file VCollection.cxx.
Referenced by cloneDescriptor(), and createDataDescriptor().
|
overridevirtual |
Definition at line 444 of file VCollection.cxx.
References m_rMutex.
|
protectedpure virtual |
Implemented in connectivity::OIndexColumns, connectivity::OKeyColumnsHelper, connectivity::evoab::OEvoabColumns, connectivity::evoab::OEvoabTables, connectivity::firebird::Views, connectivity::macab::MacabColumns, connectivity::macab::MacabTables, connectivity::mysqlc::Views, connectivity::ado::OColumns, connectivity::ado::OGroups, connectivity::ado::OIndexes, connectivity::ado::OKeys, connectivity::ado::OTables, connectivity::ado::OUsers, connectivity::ado::OViews, connectivity::calc::OCalcTables, connectivity::component::OComponentColumns, connectivity::dbase::ODbaseColumns, connectivity::dbase::ODbaseIndexColumns, connectivity::dbase::ODbaseIndexes, connectivity::dbase::ODbaseTables, connectivity::file::OColumns, connectivity::file::OTables, connectivity::flat::OFlatColumns, connectivity::flat::OFlatTables, connectivity::hsqldb::OTables, connectivity::hsqldb::OUsers, connectivity::hsqldb::HViews, connectivity::mysql::OTables, connectivity::mysql::OUsers, connectivity::mysql::OViews, connectivity::OColumnsHelper, connectivity::OIndexesHelper, connectivity::OKeysHelper, connectivity::firebird::Tables, connectivity::firebird::Users, connectivity::mysqlc::Tables, and connectivity::writer::OWriterTables.
Referenced by getObject().
connectivity::sdbcx::OCollection::DECLARE_SERVICE_INFO | ( | ) |
|
private |
Definition at line 554 of file VCollection.cxx.
References m_pElements.
Referenced by disposing(), and refresh().
|
virtual |
Reimplemented in connectivity::evoab::OEvoabTables, connectivity::macab::MacabTables, connectivity::hsqldb::OTables, connectivity::hsqldb::HViews, connectivity::mysql::OTables, and connectivity::mysql::OViews.
Definition at line 287 of file VCollection.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::disposeAndClear(), disposeElements(), m_aContainerListeners, m_aRefreshListeners, m_pElements, and m_rMutex.
Referenced by connectivity::evoab::OEvoabTables::disposing(), connectivity::macab::MacabTables::disposing(), connectivity::hsqldb::OTables::disposing(), connectivity::hsqldb::HViews::disposing(), and connectivity::mysql::OViews::disposing().
|
overridevirtual |
Definition at line 402 of file VCollection.cxx.
References dropImpl(), getCount(), index, and m_rMutex.
|
overridevirtual |
Definition at line 392 of file VCollection.cxx.
References dropImpl(), m_pElements, and m_rMutex.
Referenced by connectivity::firebird::Views::dropByNameImpl(), connectivity::hsqldb::HViews::dropByNameImpl(), and connectivity::mysql::OViews::dropByNameImpl().
|
private |
Definition at line 411 of file VCollection.cxx.
References dropObject(), m_pElements, and notifyElementRemoved().
Referenced by dropByIndex(), dropByName(), and getObject().
|
protectedvirtual |
Reimplemented in connectivity::firebird::Views, connectivity::mysqlc::Views, connectivity::ado::OColumns, connectivity::ado::OGroups, connectivity::ado::OIndexes, connectivity::ado::OKeys, connectivity::ado::OTables, connectivity::ado::OUsers, connectivity::ado::OViews, connectivity::dbase::ODbaseColumns, connectivity::dbase::ODbaseIndexes, connectivity::dbase::ODbaseTables, connectivity::hsqldb::OTables, connectivity::hsqldb::OUsers, connectivity::hsqldb::HViews, connectivity::mysql::OTables, connectivity::mysql::OUsers, connectivity::mysql::OViews, connectivity::OColumnsHelper, connectivity::OIndexesHelper, connectivity::OKeysHelper, connectivity::firebird::Tables, connectivity::firebird::Users, connectivity::mysqlc::Tables, connectivity::mysqlc::Indexes, connectivity::firebird::Indexes, and connectivity::firebird::Keys.
Definition at line 577 of file VCollection.cxx.
Referenced by dropImpl().
|
overridevirtual |
Definition at line 433 of file VCollection.cxx.
References columnName, m_pElements, O3TL_UNREACHABLE, and dbtools::throwInvalidColumnException().
|
overridevirtual |
Definition at line 299 of file VCollection.cxx.
References Any, getObject(), m_pElements, and m_rMutex.
|
overridevirtual |
Definition at line 308 of file VCollection.cxx.
References aName, Any, getObject(), connectivity::SharedResources::getResourceStringWithSubstitution(), m_pElements, and m_rMutex.
|
overridevirtual |
Definition at line 482 of file VCollection.cxx.
References m_pElements, and m_rMutex.
Referenced by dropByIndex().
|
overridevirtual |
Definition at line 325 of file VCollection.cxx.
References m_pElements, and m_rMutex.
|
overridevirtual |
Definition at line 471 of file VCollection.cxx.
References cppu::UnoType< typename T >::get().
|
protectedvirtual |
returns the name for the object.
The default implementation ask for the property NAME. If this doesn't satisfy, it has to be overridden.
_xObject | The object where the name should be extracted. |
Reimplemented in connectivity::mysqlc::Tables, connectivity::hsqldb::OTables, and connectivity::mysql::OTables.
Definition at line 355 of file VCollection.cxx.
References connectivity::OMetaConnection::getPropMap(), PROPERTY_ID_NAME, and sName.
Referenced by appendByDescriptor().
|
protected |
return the object, if not existent it creates it.
_nIndex | The index of the object to create. |
Definition at line 528 of file VCollection.cxx.
References createObject(), dropImpl(), Exception, cppu::getCaughtException(), and m_pElements.
Referenced by connectivity::dbase::ODbaseTables::dropObject(), connectivity::hsqldb::OTables::dropObject(), connectivity::hsqldb::HViews::dropObject(), connectivity::mysql::OViews::dropObject(), connectivity::OKeysHelper::dropObject(), getByIndex(), and getByName().
|
overridevirtual |
Reimplemented from cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >.
Definition at line 257 of file VCollection.cxx.
References aTypes, cppu::UnoType< typename T >::get(), cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >::getTypes(), and m_bUseIndexOnly.
|
overridevirtual |
Definition at line 488 of file VCollection.cxx.
References aName, m_pElements, and m_rMutex.
Referenced by connectivity::hsqldb::OTables::dropObject(), and connectivity::OTableHelper::refreshForeignKeys().
|
overridevirtual |
Definition at line 476 of file VCollection.cxx.
References m_pElements, and m_rMutex.
|
protectedpure virtual |
css::uno::RuntimeException |
Implemented in connectivity::OIndexColumns, connectivity::OKeyColumnsHelper, connectivity::evoab::OEvoabColumns, connectivity::evoab::OEvoabTables, connectivity::firebird::Tables, connectivity::firebird::Users, connectivity::firebird::Views, connectivity::macab::MacabColumns, connectivity::macab::MacabTables, connectivity::mysqlc::Tables, connectivity::mysqlc::Views, connectivity::ado::OColumns, connectivity::ado::OGroups, connectivity::ado::OIndexes, connectivity::ado::OKeys, connectivity::ado::OTables, connectivity::ado::OUsers, connectivity::ado::OViews, connectivity::dbase::ODbaseColumns, connectivity::dbase::ODbaseIndexColumns, connectivity::dbase::ODbaseIndexes, connectivity::dbase::ODbaseTables, connectivity::file::OColumns, connectivity::file::OTables, connectivity::hsqldb::OTables, connectivity::hsqldb::OUsers, connectivity::hsqldb::HViews, connectivity::mysql::OTables, connectivity::mysql::OUsers, connectivity::mysql::OViews, connectivity::OColumnsHelper, connectivity::OIndexesHelper, and connectivity::OKeysHelper.
Referenced by refresh().
|
protected |
insert a new element into the collection
Definition at line 504 of file VCollection.cxx.
References m_pElements.
Referenced by connectivity::firebird::Tables::appendNew(), connectivity::ado::OTables::appendNew(), and connectivity::hsqldb::OTables::appendNew().
|
inline |
Definition at line 173 of file VCollection.hxx.
Referenced by connectivity::ado::OKeys::appendObject(), connectivity::OKeyColumnsHelper::createDescriptor(), connectivity::ado::OColumns::createDescriptor(), connectivity::ado::OGroups::createDescriptor(), connectivity::ado::OIndexes::createDescriptor(), connectivity::ado::OKeys::createDescriptor(), connectivity::ado::OTables::createDescriptor(), connectivity::ado::OUsers::createDescriptor(), connectivity::ado::OViews::createDescriptor(), connectivity::dbase::ODbaseColumns::createDescriptor(), connectivity::OKeyColumnsHelper::createObject(), connectivity::ado::OColumns::createObject(), connectivity::ado::OGroups::createObject(), connectivity::ado::OIndexes::createObject(), connectivity::ado::OKeys::createObject(), connectivity::ado::OTables::createObject(), connectivity::ado::OUsers::createObject(), connectivity::ado::OViews::createObject(), connectivity::component::OComponentColumns::createObject(), connectivity::dbase::ODbaseColumns::createObject(), connectivity::dbase::ODbaseIndexColumns::createObject(), connectivity::flat::OFlatColumns::createObject(), connectivity::hsqldb::HViews::createObject(), connectivity::mysql::OViews::createObject(), and connectivity::OColumnsHelper::createObject().
|
private |
Definition at line 424 of file VCollection.cxx.
References aEvent, Any, comphelper::OInterfaceIteratorHelper3< class ListenerT >::hasMoreElements(), m_aContainerListeners, and comphelper::OInterfaceIteratorHelper3< class ListenerT >::next().
Referenced by dropImpl().
|
overridevirtual |
Reimplemented from cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >.
Reimplemented in connectivity::dbase::ODbaseTables, and connectivity::file::OTables.
Definition at line 248 of file VCollection.cxx.
References Any, m_bUseIndexOnly, and cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >::queryInterface().
void OCollection::reFill | ( | const ::std::vector< OUString > & | _rVector | ) |
Definition at line 342 of file VCollection.cxx.
References m_pElements.
Referenced by OCollection().
|
overridevirtual |
Definition at line 331 of file VCollection.cxx.
References disposeElements(), impl_refresh(), m_aRefreshListeners, m_rMutex, and comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach().
|
overridevirtualnoexcept |
Definition at line 466 of file VCollection.cxx.
References m_rParent, and cppu::OWeakObject::release().
|
overridevirtual |
Definition at line 456 of file VCollection.cxx.
References m_aContainerListeners, and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
Referenced by connectivity::OTableHelper::disposing().
|
overridevirtual |
Definition at line 499 of file VCollection.cxx.
References m_aRefreshListeners, and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
void OCollection::renameObject | ( | const OUString & | _sOldName, |
const OUString & | _sNewName | ||
) |
Definition at line 511 of file VCollection.cxx.
References aEvent, Any, comphelper::OInterfaceIteratorHelper3< class ListenerT >::hasMoreElements(), m_aContainerListeners, m_pElements, and comphelper::OInterfaceIteratorHelper3< class ListenerT >::next().
Referenced by connectivity::sdbcx::OTable::rename().
|
protected |
Definition at line 93 of file VCollection.hxx.
Referenced by addContainerListener(), appendByDescriptor(), connectivity::firebird::Tables::appendNew(), connectivity::ado::OTables::appendNew(), connectivity::hsqldb::OTables::appendNew(), disposing(), notifyElementRemoved(), removeContainerListener(), and renameObject().
|
protected |
Definition at line 94 of file VCollection.hxx.
Referenced by addRefreshListener(), disposing(), refresh(), and removeRefreshListener().
|
protected |
Definition at line 99 of file VCollection.hxx.
Referenced by getTypes(), and queryInterface().
|
protected |
Definition at line 91 of file VCollection.hxx.
Referenced by appendByDescriptor(), connectivity::OKeysHelper::appendObject(), clear_NoDispose(), disposeElements(), disposing(), dropByName(), dropImpl(), findColumn(), getByIndex(), getByName(), getCount(), getElementNames(), getObject(), hasByName(), hasElements(), insertElement(), reFill(), and renameObject().
|
protected |
Definition at line 98 of file VCollection.hxx.
Referenced by appendByDescriptor(), connectivity::OColumnsHelper::appendObject(), clear_NoDispose(), createDataDescriptor(), createEnumeration(), disposing(), dropByIndex(), dropByName(), getByIndex(), getByName(), getCount(), getElementNames(), hasByName(), hasElements(), and refresh().
|
protected |
Definition at line 97 of file VCollection.hxx.
Referenced by acquire(), connectivity::dbase::ODbaseTables::createDescriptor(), connectivity::hsqldb::OTables::createDescriptor(), connectivity::hsqldb::HViews::createDescriptor(), connectivity::mysql::OViews::createDescriptor(), connectivity::evoab::OEvoabTables::createObject(), connectivity::macab::MacabTables::createObject(), connectivity::calc::OCalcTables::createObject(), connectivity::dbase::ODbaseTables::createObject(), connectivity::flat::OFlatTables::createObject(), connectivity::hsqldb::OTables::createObject(), connectivity::writer::OWriterTables::createObject(), connectivity::hsqldb::HViews::createView(), connectivity::mysql::OViews::createView(), connectivity::dbase::ODbaseTables::dropObject(), connectivity::hsqldb::OTables::dropObject(), connectivity::hsqldb::HViews::dropObject(), connectivity::mysql::OViews::dropObject(), connectivity::evoab::OEvoabTables::impl_refresh(), connectivity::macab::MacabTables::impl_refresh(), connectivity::mysqlc::Tables::impl_refresh(), connectivity::dbase::ODbaseTables::impl_refresh(), connectivity::file::OTables::impl_refresh(), connectivity::hsqldb::OTables::impl_refresh(), connectivity::hsqldb::HViews::impl_refresh(), connectivity::mysql::OViews::impl_refresh(), and release().