LibreOffice Module forms (master) 1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Collection< ELEMENT_TYPE > Class Template Reference

#include <collection.hxx>

Inheritance diagram for Collection< ELEMENT_TYPE >:
[legend]
Collaboration diagram for Collection< ELEMENT_TYPE >:
[legend]

Public Types

typedef ELEMENT_TYPE T
 
typedef std::vector< css::uno::Reference< css::container::XContainerListener > > Listeners_t
 

Public Member Functions

 Collection ()
 
const TgetItem (sal_Int32 n) const
 
void setItem (sal_Int32 n, const T &t)
 
bool hasItem (const T &t) const
 
sal_Int32 addItem (const T &t)
 
void removeItem (const T &t)
 
bool hasItems () const
 
sal_Int32 countItems () const
 
bool isValidIndex (sal_Int32 n) const
 
virtual bool isValid (const T &) const
 called before insertion to determine whether item is valid More...
 
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 nIndex) override
 
virtual void SAL_CALL replaceByIndex (sal_Int32 nIndex, const css::uno::Any &aElement) override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override
 
virtual sal_Bool SAL_CALL has (const css::uno::Any &aElement) override
 
virtual void SAL_CALL insert (const css::uno::Any &aElement) override
 
virtual void SAL_CALL remove (const css::uno::Any &aElement) 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
 

Protected Member Functions

virtual void _insert (const T &)
 called after item has been inserted into the collection More...
 
virtual void _remove (const T &)
 called before item is removed from the collection More...
 
void _elementInserted (sal_Int32 nPos)
 
void _elementRemoved (const T &aOld)
 
void _elementReplaced (const sal_Int32 nPos, const T &aNew)
 

Protected Attributes

std::vector< TmaItems
 
Listeners_t maListeners
 

Detailed Description

template<class ELEMENT_TYPE>
class Collection< ELEMENT_TYPE >

Definition at line 48 of file collection.hxx.

Member Typedef Documentation

◆ Listeners_t

template<class ELEMENT_TYPE >
typedef std::vector<css::uno::Reference<css::container::XContainerListener> > Collection< ELEMENT_TYPE >::Listeners_t

Definition at line 52 of file collection.hxx.

◆ T

template<class ELEMENT_TYPE >
typedef ELEMENT_TYPE Collection< ELEMENT_TYPE >::T

Definition at line 51 of file collection.hxx.

Constructor & Destructor Documentation

◆ Collection()

template<class ELEMENT_TYPE >
Collection< ELEMENT_TYPE >::Collection ( )
inline

Definition at line 60 of file collection.hxx.

Member Function Documentation

◆ _elementInserted()

template<class ELEMENT_TYPE >
void Collection< ELEMENT_TYPE >::_elementInserted ( sal_Int32  nPos)
inlineprotected

◆ _elementRemoved()

template<class ELEMENT_TYPE >
void Collection< ELEMENT_TYPE >::_elementRemoved ( const T aOld)
inlineprotected

◆ _elementReplaced()

template<class ELEMENT_TYPE >
void Collection< ELEMENT_TYPE >::_elementReplaced ( const sal_Int32  nPos,
const T aNew 
)
inlineprotected

◆ _insert()

template<class ELEMENT_TYPE >
virtual void Collection< ELEMENT_TYPE >::_insert ( const T )
inlineprotectedvirtual

called after item has been inserted into the collection

Definition at line 136 of file collection.hxx.

Referenced by Collection< ELEMENT_TYPE >::addItem(), and Collection< ELEMENT_TYPE >::setItem().

◆ _remove()

template<class ELEMENT_TYPE >
virtual void Collection< ELEMENT_TYPE >::_remove ( const T )
inlineprotectedvirtual

called before item is removed from the collection

Definition at line 139 of file collection.hxx.

Referenced by Collection< ELEMENT_TYPE >::removeItem(), and Collection< ELEMENT_TYPE >::setItem().

◆ addContainerListener()

template<class ELEMENT_TYPE >
virtual void SAL_CALL Collection< ELEMENT_TYPE >::addContainerListener ( const css::uno::Reference< css::container::XContainerListener > &  xListener)
inlineoverridevirtual

Definition at line 215 of file collection.hxx.

References Collection< ELEMENT_TYPE >::maListeners.

◆ addItem()

template<class ELEMENT_TYPE >
sal_Int32 Collection< ELEMENT_TYPE >::addItem ( const T t)
inline

◆ countItems()

template<class ELEMENT_TYPE >
sal_Int32 Collection< ELEMENT_TYPE >::countItems ( ) const
inline

◆ createEnumeration()

template<class ELEMENT_TYPE >
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL Collection< ELEMENT_TYPE >::createEnumeration ( )
inlineoverridevirtual

Definition at line 180 of file collection.hxx.

◆ getByIndex()

template<class ELEMENT_TYPE >
virtual css::uno::Any SAL_CALL Collection< ELEMENT_TYPE >::getByIndex ( sal_Int32  nIndex)
inlineoverridevirtual

◆ getCount()

template<class ELEMENT_TYPE >
virtual sal_Int32 SAL_CALL Collection< ELEMENT_TYPE >::getCount ( )
inlineoverridevirtual

Definition at line 155 of file collection.hxx.

References Collection< ELEMENT_TYPE >::countItems().

◆ getElementType()

template<class ELEMENT_TYPE >
virtual css::uno::Type SAL_CALL Collection< ELEMENT_TYPE >::getElementType ( )
inlineoverridevirtual

Definition at line 144 of file collection.hxx.

References cppu::UnoType< typename T >::get().

Referenced by NamedCollection< T >::getElementType().

◆ getItem()

template<class ELEMENT_TYPE >
const T & Collection< ELEMENT_TYPE >::getItem ( sal_Int32  n) const
inline

◆ has()

template<class ELEMENT_TYPE >
virtual sal_Bool SAL_CALL Collection< ELEMENT_TYPE >::has ( const css::uno::Any &  aElement)
inlineoverridevirtual

Definition at line 187 of file collection.hxx.

References Collection< ELEMENT_TYPE >::hasItem(), and t.

◆ hasElements()

template<class ELEMENT_TYPE >
virtual sal_Bool SAL_CALL Collection< ELEMENT_TYPE >::hasElements ( )
inlineoverridevirtual

Definition at line 149 of file collection.hxx.

References Collection< ELEMENT_TYPE >::hasItems().

Referenced by NamedCollection< T >::hasElements().

◆ hasItem()

template<class ELEMENT_TYPE >
bool Collection< ELEMENT_TYPE >::hasItem ( const T t) const
inline

◆ hasItems()

template<class ELEMENT_TYPE >
bool Collection< ELEMENT_TYPE >::hasItems ( ) const
inline

◆ insert()

template<class ELEMENT_TYPE >
virtual void SAL_CALL Collection< ELEMENT_TYPE >::insert ( const css::uno::Any &  aElement)
inlineoverridevirtual

◆ isValid()

template<class ELEMENT_TYPE >
virtual bool Collection< ELEMENT_TYPE >::isValid ( const T ) const
inlinevirtual

◆ isValidIndex()

template<class ELEMENT_TYPE >
bool Collection< ELEMENT_TYPE >::isValidIndex ( sal_Int32  n) const
inline

◆ remove()

template<class ELEMENT_TYPE >
virtual void SAL_CALL Collection< ELEMENT_TYPE >::remove ( const css::uno::Any &  aElement)
inlineoverridevirtual

◆ removeContainerListener()

template<class ELEMENT_TYPE >
virtual void SAL_CALL Collection< ELEMENT_TYPE >::removeContainerListener ( const css::uno::Reference< css::container::XContainerListener > &  xListener)
inlineoverridevirtual

Definition at line 224 of file collection.hxx.

References Collection< ELEMENT_TYPE >::maListeners.

◆ removeItem()

template<class ELEMENT_TYPE >
void Collection< ELEMENT_TYPE >::removeItem ( const T t)
inline

◆ replaceByIndex()

template<class ELEMENT_TYPE >
virtual void SAL_CALL Collection< ELEMENT_TYPE >::replaceByIndex ( sal_Int32  nIndex,
const css::uno::Any &  aElement 
)
inlineoverridevirtual

◆ setItem()

template<class ELEMENT_TYPE >
void Collection< ELEMENT_TYPE >::setItem ( sal_Int32  n,
const T t 
)
inline

Member Data Documentation

◆ maItems

template<class ELEMENT_TYPE >
std::vector<T> Collection< ELEMENT_TYPE >::maItems
protected

◆ maListeners

template<class ELEMENT_TYPE >
Listeners_t Collection< ELEMENT_TYPE >::maListeners
protected

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