// the class OCollection is base class for collections :-) typedef ::cppu::ImplHelper10< css::container::XNameAccess,
css::container::XIndexAccess,
css::container::XEnumerationAccess,
css::container::XContainer,
css::sdbc::XColumnLocate,
css::util::XRefreshable,
css::sdbcx::XDataDescriptorFactory,
css::sdbcx::XAppend,
css::sdbcx::XDrop,
css::lang::XServiceInfo> OCollectionBase;
protected:
::cppu::OWeakObject& m_rParent; // parent of the collection
::osl::Mutex& m_rMutex; // mutex of the parent bool m_bUseIndexOnly; // is only TRUE when only an indexaccess is needed
// the implementing class should refresh their elements /// @throws css::uno::RuntimeException virtualvoid impl_refresh() = 0;
// will be called when an object was requested by one of the accessing methods like getByIndex virtual css::uno::Reference< css::beans::XPropertySet > createObject(const OUString& _rName) = 0;
// will be called when a new object should be generated by a call of createDataDescriptor // the returned object is empty will be filled outside and added to the collection virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor();
/** appends an object described by a descriptor, under a given name @param_rForName isthenameunderwhichtheobjectshouldbeappended.Guaranteedtonotbeempty. Thisispassedforconvenienceonly,sinceit'stheresultofacallof getNameForObjectforthegivendescriptor @paramdescriptor describestheobjecttoappend @return thenewobjectwhichistobeinsertedintothecollection.Thismightbetheresult ofacallof<code>createObject(_rForName)</code>,oracloneofthedescriptor.
*/ virtual css::uno::Reference< css::beans::XPropertySet > appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor );
// called when XDrop was called virtualvoid dropObject(sal_Int32 _nPos, const OUString& _sElementName);
/** returns the name for the object. The default implementation ask for the property NAME. If this doesn't satisfy, it has to be overridden. @param_xObjectTheobjectwherethenameshouldbeextracted. @returnThenameoftheobject.
*/ virtual OUString getNameForObject(const css::uno::Reference< css::beans::XPropertySet >& _xObject);
/** clear the name map <p>Does<em>not</em>disposetheobjectsholdbythecollection.</p>
*/ void clear_NoDispose();
/** insert a new element into the collection
*/ void insertElement(const OUString& _sElementName,const css::uno::Reference< css::beans::XPropertySet >& _xElement);
/** return the object, if not existent it creates it. @param_nIndex Theindexoftheobjecttocreate. @returnObjectType
*/
css::uno::Reference< css::beans::XPropertySet > getObject(sal_Int32 _nIndex);
// only the name is identical to ::cppu::OComponentHelper virtualvoid disposing(); // dispatch the refcounting to the parent virtualvoid SAL_CALL acquire() noexcept override; virtualvoid SAL_CALL release() noexcept override;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.