LibreOffice Module comphelper (master)  1
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
comphelper::OPropertySetAggregationHelper Class Referenceabstract

helper class for implementing the property-set-related interfaces for an object doin' aggregation supports at least XPropertySet and XMultiPropertySet More...

#include <propagg.hxx>

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

Public Member Functions

 OPropertySetAggregationHelper (::cppu::OBroadcastHelper &rBHelper)
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &aValue) override
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
 
virtual void SAL_CALL propertiesChange (const css::uno::Sequence< css::beans::PropertyChangeEvent > &evt) override
 
virtual void SAL_CALL vetoableChange (const css::beans::PropertyChangeEvent &aEvent) override
 
virtual void SAL_CALL setPropertyValues (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) override
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
 
virtual css::beans::PropertyState SAL_CALL getPropertyState (const OUString &PropertyName) override
 
virtual void SAL_CALL setPropertyToDefault (const OUString &PropertyName) override
 
virtual css::uno::Any SAL_CALL getPropertyDefault (const OUString &aPropertyName) override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override=0
 still waiting to be overwritten ... More...
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &_rConvertedValue, css::uno::Any &_rOldValue, sal_Int32 _nHandle, const css::uno::Any &_rValue) override
 only implemented for "forwarded" properties, every other property must be handled in the derivee, and will assert if passed herein More...
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 _nHandle, const css::uno::Any &_rValue) override
 only implemented for "forwarded" properties, every other property must be handled in the derivee, and will assert if passed herein More...
 
- Public Member Functions inherited from comphelper::OPropertyStateHelper
 OPropertyStateHelper (::cppu::OBroadcastHelper &rBHlp)
 
 OPropertyStateHelper (::cppu::OBroadcastHelper &rBHlp,::cppu::IEventNotificationHook *i_pFireEvents)
 
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates (const css::uno::Sequence< OUString > &aPropertyName) override
 
virtual css::beans::PropertyState getPropertyStateByHandle (sal_Int32 nHandle)
 
virtual void setPropertyToDefaultByHandle (sal_Int32 nHandle)
 
virtual css::uno::Any getPropertyDefaultByHandle (sal_Int32 nHandle) const
 
- Public Member Functions inherited from cppu::OPropertySetHelper2
 OPropertySetHelper2 (OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents=NULL, bool bIgnoreRuntimeExceptionsWhileFiring=false)
 
virtual void SAL_CALL enableChangeListenerNotification (sal_Bool bEnable) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OPropertySetHelper
 OPropertySetHelper (OBroadcastHelper &rBHelper)
 
 OPropertySetHelper (OBroadcastHelper &rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring)
 
 OPropertySetHelper (OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents, bool bIgnoreRuntimeExceptionsWhileFiring=false)
 
css::uno::Sequence< css::uno::Type > getTypes ()
 
void SAL_CALL disposing ()
 
virtual void SAL_CALL setPropertyValue (const ::rtl::OUString &rPropertyName, const css::uno::Any &aValue) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL getPropertyValue (const ::rtl::OUString &aPropertyName) SAL_OVERRIDE
 
virtual void SAL_CALL addPropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removePropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL addVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removeVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL setPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames) SAL_OVERRIDE
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 
virtual void SAL_CALL firePropertiesChangeEvent (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 

Protected Member Functions

virtual ~OPropertySetAggregationHelper () override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
void disposing ()
 
sal_Int32 getOriginalHandle (sal_Int32 _nHandle) const
 
OUString getPropertyName (sal_Int32 _nHandle) const
 
void declareForwardedProperty (sal_Int32 _nHandle)
 declares the property with the given (public) handle as one to be forwarded to the aggregate More...
 
bool isCurrentlyForwardingProperty (sal_Int32 _nHandle) const
 checks whether we're actually forwarding a property value to our aggregate More...
 
virtual void forwardingPropertyValue (sal_Int32 _nHandle)
 called immediately before a property value which is overwritten in this instance is forwarded to the aggregate More...
 
virtual void forwardedPropertyValue (sal_Int32 _nHandle)
 called immediately after a property value which is overwritten in this instance has been forwarded to the aggregate More...
 
void setAggregation (const css::uno::Reference< css::uno::XInterface > &)
 must be called before aggregation, if aggregation is used More...
 
void startListening ()
 
- Protected Member Functions inherited from comphelper::OPropertyStateHelper
virtual ~OPropertyStateHelper () override
 
void firePropertyChange (sal_Int32 nHandle, const css::uno::Any &aNewValue, const css::uno::Any &aOldValue)
 
- Protected Member Functions inherited from cppu::OPropertySetHelper2
virtual ~OPropertySetHelper2 ()
 
- Protected Member Functions inherited from cppu::OPropertySetHelper
void SAL_CALL fire (sal_Int32 *pnHandles, const css::uno::Any *pNewValues, const css::uno::Any *pOldValues, sal_Int32 nCount, sal_Bool bVetoable)
 
void SAL_CALL setFastPropertyValues (sal_Int32 nSeqLen, sal_Int32 *pHandles, const css::uno::Any *pValues, sal_Int32 nHitCount)
 
void setDependentFastPropertyValue (sal_Int32 i_handle, const css::uno::Any &i_value)
 
 ~OPropertySetHelper ()
 

Protected Attributes

css::uno::Reference< css::beans::XPropertyState > m_xAggregateState
 
css::uno::Reference< css::beans::XPropertySetm_xAggregateSet
 
css::uno::Reference< css::beans::XMultiPropertySet > m_xAggregateMultiSet
 
css::uno::Reference< css::beans::XFastPropertySet > m_xAggregateFastSet
 
std::unique_ptr< internal::PropertyForwarderm_pForwarder
 
bool m_bListening: 1
 
- Protected Attributes inherited from cppu::OPropertySetHelper
OBroadcastHelperrBHelper
 
OMultiTypeInterfaceContainerHelperInt32 aBoundLC
 
OMultiTypeInterfaceContainerHelperInt32 aVetoableLC
 
Impl *const m_pReserved
 

Friends

class internal::PropertyForwarder
 

Additional Inherited Members

- Static Public Member Functions inherited from cppu::OPropertySetHelper
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo (IPropertyArrayHelper &rProperties)
 
- Static Protected Member Functions inherited from comphelper::OPropertyStateHelper
static css::uno::Sequence< css::uno::Type > getTypes ()
 

Detailed Description

helper class for implementing the property-set-related interfaces for an object doin' aggregation supports at least XPropertySet and XMultiPropertySet

Definition at line 197 of file propagg.hxx.

Constructor & Destructor Documentation

comphelper::OPropertySetAggregationHelper::OPropertySetAggregationHelper ( ::cppu::OBroadcastHelper rBHelper)

Definition at line 326 of file propagg.cxx.

References m_pForwarder.

comphelper::OPropertySetAggregationHelper::~OPropertySetAggregationHelper ( )
overrideprotectedvirtual

Definition at line 334 of file propagg.cxx.

Member Function Documentation

void SAL_CALL comphelper::OPropertySetAggregationHelper::addPropertiesChangeListener ( const css::uno::Sequence< OUString > &  aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener > &  xListener 
)
overridevirtual

Definition at line 492 of file propagg.cxx.

References m_bListening, and startListening().

void SAL_CALL comphelper::OPropertySetAggregationHelper::addPropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 483 of file propagg.cxx.

References m_bListening, and startListening().

void SAL_CALL comphelper::OPropertySetAggregationHelper::addVetoableChangeListener ( const OUString &  PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  aListener 
)
overridevirtual

Definition at line 474 of file propagg.cxx.

References m_bListening, and startListening().

sal_Bool SAL_CALL comphelper::OPropertySetAggregationHelper::convertFastPropertyValue ( css::uno::Any &  _rConvertedValue,
css::uno::Any &  _rOldValue,
sal_Int32  _nHandle,
const css::uno::Any &  _rValue 
)
overridevirtual

only implemented for "forwarded" properties, every other property must be handled in the derivee, and will assert if passed herein

Implements cppu::OPropertySetHelper.

Definition at line 812 of file propagg.cxx.

References Any, getFastPropertyValue(), getInfoHelper(), comphelper::OPropertyArrayAggregationHelper::getPropertyByHandle(), m_pForwarder, Property, and comphelper::tryPropertyValue().

Referenced by setPropertyValues().

void comphelper::OPropertySetAggregationHelper::declareForwardedProperty ( sal_Int32  _nHandle)
protected

declares the property with the given (public) handle as one to be forwarded to the aggregate

Sometimes, you might want to overwrite properties at the aggregate. That is, though the aggregate implements this property, and still is to hold the property value, you want to do additional handling upon setting the property, but then forward the value to the aggregate.

Use this method to declare such properties.

When a "forwarded property" is set from outside, the class first calls <member>forwardingPropertyValue</member> for any preprocessing, then forwards the property value to the aggregate, and then calls <member>forwardedPropertyValue</member>.

When you declare a property as "forwarded", the class takes care for some multi-threading issues, for instance, it won't fire any property change notifications which result from forwarding a property value, unless it's safe to do so (i.e. unless our mutex is released).

See also
forwardingPropertyValue
forwardedPropertyValue

Definition at line 840 of file propagg.cxx.

References m_pForwarder.

void SAL_CALL comphelper::OPropertySetAggregationHelper::disposing ( const css::lang::EventObject &  Source)
overridevirtual

Definition at line 370 of file propagg.cxx.

References m_bListening, and m_xAggregateSet.

void comphelper::OPropertySetAggregationHelper::disposing ( )
protected
void comphelper::OPropertySetAggregationHelper::forwardedPropertyValue ( sal_Int32  _nHandle)
protectedvirtual

called immediately after a property value which is overwritten in this instance has been forwarded to the aggregate

See also
declareForwardedProperty
forwardingPropertyValue

Definition at line 853 of file propagg.cxx.

Referenced by comphelper::internal::PropertyForwarder::doForward().

void comphelper::OPropertySetAggregationHelper::forwardingPropertyValue ( sal_Int32  _nHandle)
protectedvirtual

called immediately before a property value which is overwritten in this instance is forwarded to the aggregate

See also
declareForwardedProperty
forwardedPropertyValue

Definition at line 847 of file propagg.cxx.

Referenced by comphelper::internal::PropertyForwarder::doForward().

css::uno::Any SAL_CALL comphelper::OPropertySetAggregationHelper::getFastPropertyValue ( sal_Int32  nHandle)
overridevirtual
void comphelper::OPropertySetAggregationHelper::getFastPropertyValue ( css::uno::Any &  rValue,
sal_Int32  nHandle 
) const
overrideprotectedvirtual
virtual ::cppu::IPropertyArrayHelper& SAL_CALL comphelper::OPropertySetAggregationHelper::getInfoHelper ( )
overridepure virtual
sal_Int32 comphelper::OPropertySetAggregationHelper::getOriginalHandle ( sal_Int32  _nHandle) const
protected
css::uno::Any SAL_CALL comphelper::OPropertySetAggregationHelper::getPropertyDefault ( const OUString &  aPropertyName)
overridevirtual
OUString comphelper::OPropertySetAggregationHelper::getPropertyName ( sal_Int32  _nHandle) const
protected
css::beans::PropertyState SAL_CALL comphelper::OPropertySetAggregationHelper::getPropertyState ( const OUString &  PropertyName)
overridevirtual
bool comphelper::OPropertySetAggregationHelper::isCurrentlyForwardingProperty ( sal_Int32  _nHandle) const
protected

checks whether we're actually forwarding a property value to our aggregate

See also
declareForwardedProperty
forwardingPropertyValue
forwardedPropertyValue

Definition at line 859 of file propagg.cxx.

References m_pForwarder.

Referenced by propertiesChange().

void SAL_CALL comphelper::OPropertySetAggregationHelper::propertiesChange ( const css::uno::Sequence< css::beans::PropertyChangeEvent > &  evt)
overridevirtual
css::uno::Any SAL_CALL comphelper::OPropertySetAggregationHelper::queryInterface ( const css::uno::Type &  aType)
overridevirtual
void comphelper::OPropertySetAggregationHelper::setAggregation ( const css::uno::Reference< css::uno::XInterface > &  _rxDelegate)
protected

must be called before aggregation, if aggregation is used

Exceptions
css::lang::IllegalArgumentException

Definition at line 436 of file propagg.cxx.

References m_bListening, m_xAggregateFastSet, m_xAggregateMultiSet, m_xAggregateSet, m_xAggregateState, cppu::OPropertySetHelper::rBHelper, and cppu::OBroadcastHelperVar< class, class >::rMutex.

void SAL_CALL comphelper::OPropertySetAggregationHelper::setFastPropertyValue ( sal_Int32  nHandle,
const css::uno::Any &  aValue 
)
overridevirtual
void SAL_CALL comphelper::OPropertySetAggregationHelper::setFastPropertyValue_NoBroadcast ( sal_Int32  _nHandle,
const css::uno::Any &  _rValue 
)
overridevirtual

only implemented for "forwarded" properties, every other property must be handled in the derivee, and will assert if passed herein

Implements cppu::OPropertySetHelper.

Definition at line 832 of file propagg.cxx.

References m_pForwarder.

Referenced by setPropertyValues().

void SAL_CALL comphelper::OPropertySetAggregationHelper::setPropertyToDefault ( const OUString &  PropertyName)
overridevirtual
void SAL_CALL comphelper::OPropertySetAggregationHelper::setPropertyValues ( const css::uno::Sequence< OUString > &  PropertyNames,
const css::uno::Sequence< css::uno::Any > &  Values 
)
overridevirtual
void comphelper::OPropertySetAggregationHelper::startListening ( )
protected
void SAL_CALL comphelper::OPropertySetAggregationHelper::vetoableChange ( const css::beans::PropertyChangeEvent &  aEvent)
overridevirtual

Definition at line 425 of file propagg.cxx.

References cppu::OPropertySetHelper::fire(), getInfoHelper(), and m_xAggregateSet.

Friends And Related Function Documentation

friend class internal::PropertyForwarder
friend

Definition at line 201 of file propagg.hxx.

Member Data Documentation

bool comphelper::OPropertySetAggregationHelper::m_bListening
protected
std::unique_ptr<internal::PropertyForwarder> comphelper::OPropertySetAggregationHelper::m_pForwarder
protected
css::uno::Reference< css::beans::XFastPropertySet> comphelper::OPropertySetAggregationHelper::m_xAggregateFastSet
protected

Definition at line 207 of file propagg.hxx.

Referenced by getFastPropertyValue(), setAggregation(), and setFastPropertyValue().

css::uno::Reference< css::beans::XMultiPropertySet> comphelper::OPropertySetAggregationHelper::m_xAggregateMultiSet
protected

Definition at line 206 of file propagg.hxx.

Referenced by disposing(), setAggregation(), setPropertyValues(), and startListening().

css::uno::Reference< css::beans::XPropertySet> comphelper::OPropertySetAggregationHelper::m_xAggregateSet
protected
css::uno::Reference< css::beans::XPropertyState> comphelper::OPropertySetAggregationHelper::m_xAggregateState
protected

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