26#include <com/sun/star/beans/PropertyAttribute.hpp>
47 virtual bool approveValue(
const css::uno::Any& rValue )
const = 0;
48 virtual void setValue(
const css::uno::Any& rValue ) = 0;
49 virtual void getValue( css::uno::Any& rValue )
const = 0;
56template<
typename CLASS,
typename VALUE,
class WRITER,
class READER >
76 virtual bool approveValue(
const css::uno::Any& rValue )
const override
79 return ( rValue >>= aVal );
82 virtual void setValue(
const css::uno::Any& rValue )
override
85 OSL_VERIFY( rValue >>= aTypedVal );
89 virtual void getValue( css::uno::Any& rValue )
const override
102template<
typename CLASS,
typename VALUE >
106 , void (CLASS::*)( const VALUE& )
107 , VALUE (CLASS::*)() const
122template<
typename CLASS >
126 , void (CLASS::*)( bool )
127 , bool (CLASS::*)() const
142template<
typename CLASS,
typename VALUE >
146 , void (SAL_CALL CLASS::*)( const VALUE& )
147 , VALUE (SAL_CALL CLASS::*)()
175 typedef ::std::map< const sal_Int32, ::rtl::Reference< PropertyAccessorBase > >
PropertyAccessors;
200 const css::beans::Property& rProperty,
201 const ::rtl::Reference< PropertyAccessorBase >& rAccessor
251 virtual sal_Bool SAL_CALL
convertFastPropertyValue( css::uno::Any& rConvertedValue, css::uno::Any& rOldValue, sal_Int32 nHandle,
const css::uno::Any& rValue )
override;
253 virtual void SAL_CALL
getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nHandle )
const override;
256 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo( )
override;
279 using ::comphelper::OStatefulPropertySet::getFastPropertyValue;
331 css::uno::Any aNewValue;
helper class for implementing property accessors via UNO methods
APIPropertyAccessor(CLASS *pInstance, Writer pWriter, Reader pReader)
typedef void(SAL_CALL CLASS::*Writer)(const VALUE &)
typedef VALUE(SAL_CALL CLASS::*Reader)()
helper class for implementing non-UNO accessors to a boolean property
BooleanPropertyAccessor(CLASS *pInstance, Writer pWriter, Reader pReader)
helper class for implementing property accessors via non-UNO methods
DirectPropertyAccessor(CLASS *pInstance, Writer pWriter, Reader pReader)
helper class for implementing property accessors through public member functions
virtual void setValue(const css::uno::Any &rValue) override
virtual void getValue(css::uno::Any &rValue) const override
virtual bool isWriteable() const override
GenericPropertyAccessor(CLASS *pInstance, Writer pWriter, Reader pReader)
virtual bool approveValue(const css::uno::Any &rValue) const override
base class which encapsulates accessing (reading/writing) concrete property values
virtual bool approveValue(const css::uno::Any &rValue) const =0
virtual bool isWriteable() const =0
virtual ~PropertyAccessorBase() override
virtual void getValue(css::uno::Any &rValue) const =0
virtual void setValue(const css::uno::Any &rValue)=0
bridges two XPropertySet helper implementations
void registerProperty(const css::beans::Property &rProperty, const ::rtl::Reference< PropertyAccessorBase > &rAccessor)
registers a new property to be supported by this instance
virtual cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
::std::map< const sal_Int32, css::uno::Any > PropertyValueCache
::std::vector< css::beans::Property > PropertyArray
PropertyAccessorBase & locatePropertyHandler(sal_Int32 nHandle) const
locates a property given by handle
void notifyAndCachePropertyValue(sal_Int32 nHandle)
notifies a change in a given property value, if necessary
PropertyValueCache m_aCache
::std::map< const sal_Int32, ::rtl::Reference< PropertyAccessorBase > > PropertyAccessors
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
OPropertysetHelper methods.
void notifyPropertyChange(sal_Int32 nHandle, const css::uno::Any &rOldValue, const css::uno::Any &rNewValue, const NotifierAccess &) const
notifies a change in a given property to all interested listeners
void initializePropertyValueCache(sal_Int32 nHandle)
initializes the property value cache for the given property, with its current value
virtual ~PropertySetBase() override
PropertyArray m_aProperties
std::unique_ptr< cppu::IPropertyArrayHelper > m_pProperties
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
void getCurrentPropertyValueByHandle(sal_Int32 nHandle, css::uno::Any &rValue, const NotifierAccess &) const
retrieves the current property value for the given handle
PropertyAccessors m_aAccessors
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
a helper class for notifying property changes in a <type>PropertySetBase</type> instance.
~PropertyChangeNotifier()
const PropertySetBase & m_rPropertySet
css::uno::Any m_aOldValue
PropertyChangeNotifier(const PropertySetBase &rPropertySet, sal_Int32 nHandle)
constructs a PropertyChangeNotifier
helper struct for granting selective access to some notification-related methods