LibreOffice Module unotools (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
utl::AccessibleRelationSetHelper Class Referencefinal

@descr This base class provides an implementation of the AccessibleRelationSet service. More...

#include <accessiblerelationsethelper.hxx>

Inheritance diagram for utl::AccessibleRelationSetHelper:
[legend]
Collaboration diagram for utl::AccessibleRelationSetHelper:
[legend]

Public Member Functions

 AccessibleRelationSetHelper ()
 
 AccessibleRelationSetHelper (const AccessibleRelationSetHelper &rHelper)
 
virtual sal_Int32 SAL_CALL getRelationCount () override
 Returns the number of relations in this relation set. More...
 
virtual css::accessibility::AccessibleRelation SAL_CALL getRelation (sal_Int32 nIndex) override
 Returns the relation of this relation set that is specified by the given index. More...
 
virtual sal_Bool SAL_CALL containsRelation (sal_Int16 aRelationType) override
 Tests whether the relation set contains a relation matching the specified key. More...
 
virtual css::accessibility::AccessibleRelation SAL_CALL getRelationByType (sal_Int16 aRelationType) override
 Retrieve and return the relation with the given relation type. More...
 
void AddRelation (const css::accessibility::AccessibleRelation &rRelation)
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 Returns a sequence of all supported interfaces. More...
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 Returns an implementation id. More...
 

Private Member Functions

virtual ~AccessibleRelationSetHelper () override
 

Private Attributes

std::mutex maMutex
 Mutex guarding this object. More...
 
std::vector< css::accessibility::AccessibleRelation > maRelations
 The implementation of this helper interface. More...
 

Detailed Description

@descr This base class provides an implementation of the AccessibleRelationSet service.

Definition at line 39 of file accessiblerelationsethelper.hxx.

Constructor & Destructor Documentation

◆ AccessibleRelationSetHelper() [1/2]

AccessibleRelationSetHelper::AccessibleRelationSetHelper ( )

Definition at line 45 of file accessiblerelationsethelper.cxx.

◆ AccessibleRelationSetHelper() [2/2]

AccessibleRelationSetHelper::AccessibleRelationSetHelper ( const AccessibleRelationSetHelper rHelper)

Definition at line 49 of file accessiblerelationsethelper.cxx.

References maRelations.

◆ ~AccessibleRelationSetHelper()

AccessibleRelationSetHelper::~AccessibleRelationSetHelper ( )
overrideprivatevirtual

Definition at line 55 of file accessiblerelationsethelper.cxx.

Member Function Documentation

◆ AddRelation()

void AccessibleRelationSetHelper::AddRelation ( const css::accessibility::AccessibleRelation &  rRelation)
Exceptions
uno::RuntimeException

Definition at line 139 of file accessiblerelationsethelper.cxx.

References comphelper::concatSequences(), maMutex, and maRelations.

◆ containsRelation()

sal_Bool SAL_CALL AccessibleRelationSetHelper::containsRelation ( sal_Int16  aRelationType)
overridevirtual

Tests whether the relation set contains a relation matching the specified key.

Parameters
aRelationTypeThe type of relation to look for in this set of relations. This has to be one of the constants of AccessibleRelationType.
Returns
Returns <TRUE> if there is a (at least one) relation of the given type and <FALSE> if there is no such relation in the set.
Parameters
aRelationTypeThe type of relation to look for in this set of relations. This has to be one of the constants of <type>AccessibleRelationType</type>.
Returns
Returns <TRUE> if there is a (at least one) relation of the given type and <FALSE> if there is no such relation in the set.

Definition at line 111 of file accessiblerelationsethelper.cxx.

References maMutex, and maRelations.

◆ getImplementationId()

uno::Sequence< sal_Int8 > SAL_CALL AccessibleRelationSetHelper::getImplementationId ( )
overridevirtual

Returns an implementation id.

Definition at line 165 of file accessiblerelationsethelper.cxx.

◆ getRelation()

AccessibleRelation SAL_CALL AccessibleRelationSetHelper::getRelation ( sal_Int32  nIndex)
overridevirtual

Returns the relation of this relation set that is specified by the given index.

Parameters
nIndexThis index specifies the relatio to return.
Returns
For a valid index, i.e. inside the range 0 to the number of relations minus one, the returned value is the requested relation. If the index is invalid then the returned relation has the type INVALID.

Definition at line 88 of file accessiblerelationsethelper.cxx.

References o3tl::make_unsigned(), maMutex, maRelations, and nIndex.

◆ getRelationByType()

AccessibleRelation SAL_CALL AccessibleRelationSetHelper::getRelationByType ( sal_Int16  aRelationType)
overridevirtual

Retrieve and return the relation with the given relation type.

Parameters
aRelationTypeThe type of the relation to return. This has to be one of the constants of AccessibleRelationType.
Returns
If a relation with the given type could be found than (a copy of) this relation is returned. Otherwise a relation with the type INVALID is returned.
Parameters
aRelationTypeThe type of the relation to return. This has to be one of the constants of <type>AccessibleRelationType</type>.
Returns
If a relation with the given type could be found than (a copy of) this relation is returned. Otherwise a relation with the type INVALID is returned.

Definition at line 132 of file accessiblerelationsethelper.cxx.

References maMutex, and maRelations.

◆ getRelationCount()

sal_Int32 SAL_CALL AccessibleRelationSetHelper::getRelationCount ( )
overridevirtual

Returns the number of relations in this relation set.

Returns
Returns the number of relations or zero if there are none.

Definition at line 67 of file accessiblerelationsethelper.cxx.

References maMutex, and maRelations.

◆ getTypes()

uno::Sequence< css::uno::Type > AccessibleRelationSetHelper::getTypes ( )
overridevirtual

Returns a sequence of all supported interfaces.

Definition at line 156 of file accessiblerelationsethelper.cxx.

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

Member Data Documentation

◆ maMutex

std::mutex utl::AccessibleRelationSetHelper::maMutex
private

Mutex guarding this object.

Definition at line 118 of file accessiblerelationsethelper.hxx.

Referenced by AddRelation(), containsRelation(), getRelation(), getRelationByType(), and getRelationCount().

◆ maRelations

std::vector<css::accessibility::AccessibleRelation> utl::AccessibleRelationSetHelper::maRelations
private

The implementation of this helper interface.

Definition at line 120 of file accessiblerelationsethelper.hxx.

Referenced by AddRelation(), containsRelation(), getRelation(), getRelationByType(), and getRelationCount().


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