LibreOffice Module comphelper (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
comphelper::OEnumerationByIndex Class Referencefinal

provides a com.sun.star.container::XEnumeration access based on an object implementing the com.sun.star.container::XNameAccess interface More...

#include <enumhelper.hxx>

Inheritance diagram for comphelper::OEnumerationByIndex:
[legend]
Collaboration diagram for comphelper::OEnumerationByIndex:
[legend]

Public Member Functions

 OEnumerationByIndex (css::uno::Reference< css::container::XIndexAccess > _xAccess)
 
virtual ~OEnumerationByIndex () override
 
virtual sal_Bool SAL_CALL hasMoreElements () override
 
virtual css::uno::Any SAL_CALL nextElement () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &aEvent) override
 

Private Member Functions

COMPHELPER_DLLPRIVATE void impl_startDisposeListening ()
 
COMPHELPER_DLLPRIVATE void impl_stopDisposeListening ()
 

Private Attributes

css::uno::Reference< css::container::XIndexAccess > m_xAccess
 
sal_Int32 m_nPos
 
bool m_bListening
 
std::mutex m_aLock
 

Detailed Description

provides a com.sun.star.container::XEnumeration access based on an object implementing the com.sun.star.container::XNameAccess interface

Definition at line 71 of file enumhelper.hxx.

Constructor & Destructor Documentation

◆ OEnumerationByIndex()

comphelper::OEnumerationByIndex::OEnumerationByIndex ( css::uno::Reference< css::container::XIndexAccess >  _xAccess)

Definition at line 151 of file enumhelper.cxx.

References impl_startDisposeListening(), and m_nPos.

◆ ~OEnumerationByIndex()

comphelper::OEnumerationByIndex::~OEnumerationByIndex ( )
overridevirtual

Definition at line 160 of file enumhelper.cxx.

References impl_stopDisposeListening(), and m_aLock.

Member Function Documentation

◆ disposing()

void SAL_CALL comphelper::OEnumerationByIndex::disposing ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 205 of file enumhelper.cxx.

References aEvent, m_aLock, and m_xAccess.

◆ hasMoreElements()

sal_Bool SAL_CALL comphelper::OEnumerationByIndex::hasMoreElements ( )
overridevirtual

Definition at line 168 of file enumhelper.cxx.

References impl_stopDisposeListening(), m_aLock, m_nPos, and m_xAccess.

◆ impl_startDisposeListening()

void comphelper::OEnumerationByIndex::impl_startDisposeListening ( )
private

Definition at line 214 of file enumhelper.cxx.

References m_bListening, m_refCount, and m_xAccess.

Referenced by OEnumerationByIndex().

◆ impl_stopDisposeListening()

void comphelper::OEnumerationByIndex::impl_stopDisposeListening ( )
private

Definition at line 230 of file enumhelper.cxx.

References m_bListening, m_refCount, and m_xAccess.

Referenced by hasMoreElements(), nextElement(), and ~OEnumerationByIndex().

◆ nextElement()

css::uno::Any SAL_CALL comphelper::OEnumerationByIndex::nextElement ( )
overridevirtual

Definition at line 185 of file enumhelper.cxx.

References impl_stopDisposeListening(), m_aLock, m_nPos, and m_xAccess.

Member Data Documentation

◆ m_aLock

std::mutex comphelper::OEnumerationByIndex::m_aLock
private

Definition at line 78 of file enumhelper.hxx.

Referenced by disposing(), hasMoreElements(), nextElement(), and ~OEnumerationByIndex().

◆ m_bListening

bool comphelper::OEnumerationByIndex::m_bListening
private

Definition at line 77 of file enumhelper.hxx.

Referenced by impl_startDisposeListening(), and impl_stopDisposeListening().

◆ m_nPos

sal_Int32 comphelper::OEnumerationByIndex::m_nPos
private

Definition at line 76 of file enumhelper.hxx.

Referenced by hasMoreElements(), and nextElement().

◆ m_xAccess

css::uno::Reference< css::container::XIndexAccess > comphelper::OEnumerationByIndex::m_xAccess
private

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