LibreOffice Module cppuhelper (master) 1
Classes | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
cppu::PropertySetMixinImpl Class Reference

A helper base class for cppu::PropertySetMixin. More...

#include <propertysetmixin.hxx>

Inheritance diagram for cppu::PropertySetMixinImpl:
[legend]
Collaboration diagram for cppu::PropertySetMixinImpl:
[legend]

Classes

class  BoundListeners
 A class used by subclasses of cppu::PropertySetMixin when implementing UNO interface type attribute setter functions. More...
 
class  Impl
 

Protected Types

enum  Implements {
  IMPLEMENTS_PROPERTY_SET = 1 ,
  IMPLEMENTS_FAST_PROPERTY_SET = 2 ,
  IMPLEMENTS_PROPERTY_ACCESS = 4
}
 Flags used by subclasses of cppu::PropertySetMixin to specify what UNO interface types shall be supported. More...
 

Protected Member Functions

void prepareSet (rtl::OUString const &propertyName, css::uno::Any const &oldValue, css::uno::Any const &newValue, BoundListeners *boundListeners)
 A function used by subclasses of cppu::PropertySetMixin when implementing UNO interface type attribute setter functions. More...
 
void dispose ()
 Mark this instance as being disposed. More...
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &type) SAL_OVERRIDE
 A function used by subclasses of cppu::PropertySetMixin when implementing css::uno::XInterface::queryInterface. More...
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () SAL_OVERRIDE
 
virtual void SAL_CALL setPropertyValue (rtl::OUString const &propertyName, css::uno::Any const &value) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL getPropertyValue (rtl::OUString const &propertyName) SAL_OVERRIDE
 
virtual void SAL_CALL addPropertyChangeListener (rtl::OUString const &propertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const &listener) SAL_OVERRIDE
 Adds a css::beans::XPropertyChangeListener. More...
 
virtual void SAL_CALL removePropertyChangeListener (rtl::OUString const &propertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const &listener) SAL_OVERRIDE
 
virtual void SAL_CALL addVetoableChangeListener (rtl::OUString const &propertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const &listener) SAL_OVERRIDE
 Adds a css::beans::XVetoableChangeListener. More...
 
virtual void SAL_CALL removeVetoableChangeListener (rtl::OUString const &propertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const &listener) SAL_OVERRIDE
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 handle, css::uno::Any const &value) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 handle) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPropertyValues () SAL_OVERRIDE
 
virtual void SAL_CALL setPropertyValues (css::uno::Sequence< css::beans::PropertyValue > const &props) SAL_OVERRIDE
 

Private Member Functions

 PropertySetMixinImpl (const PropertySetMixinImpl &) SAL_DELETED_FUNCTION
 
void operator= (const PropertySetMixinImpl &) SAL_DELETED_FUNCTION
 
 PropertySetMixinImpl (css::uno::Reference< css::uno::XComponentContext > const &context, Implements implements, css::uno::Sequence< rtl::OUString > const &absentOptional, css::uno::Type const &type)
 
 ~PropertySetMixinImpl ()
 
void checkUnknown (rtl::OUString const &propertyName)
 

Private Attributes

Implm_impl
 

Friends

class Impl
 
template<typename T >
class PropertySetMixin
 

Detailed Description

A helper base class for cppu::PropertySetMixin.

See the documentation of cppu::PropertySetMixin for further details.

That cppu::PropertySetMixin is derived from this base class should be considered an implementation detail. The functionality of cppu::PropertySetMixin that is inherited from this base class and is visible to subclasses of cppu::PropertySetMixin should be treated by such subclasses as being provided by cppu::PropertySetMixin directly (e.g., in such subclasses, use “PropertySetMixin::Implements” instead of “PropertySetMixinImpl::Implements”).

Available since: \n UDK 3.2.1

Definition at line 70 of file propertysetmixin.hxx.

Member Enumeration Documentation

◆ Implements

Flags used by subclasses of cppu::PropertySetMixin to specify what UNO interface types shall be supported.

Enumerator
IMPLEMENTS_PROPERTY_SET 

Flag specifying that the UNO interface type css::beans::XPropertySet shall be supported.

IMPLEMENTS_FAST_PROPERTY_SET 

Flag specifying that the UNO interface type css::beans::XFastPropertySet shall be supported.

IMPLEMENTS_PROPERTY_ACCESS 

Flag specifying that the UNO interface type css::beans::XPropertyAccess shall be supported.

Definition at line 81 of file propertysetmixin.hxx.

Constructor & Destructor Documentation

◆ PropertySetMixinImpl() [1/2]

cppu::PropertySetMixinImpl::PropertySetMixinImpl ( const PropertySetMixinImpl )
private

◆ PropertySetMixinImpl() [2/2]

cppu::PropertySetMixinImpl::PropertySetMixinImpl ( css::uno::Reference< css::uno::XComponentContext > const &  context,
Implements  implements,
css::uno::Sequence< rtl::OUString > const &  absentOptional,
css::uno::Type const &  type 
)
private

◆ ~PropertySetMixinImpl()

PropertySetMixinImpl::~PropertySetMixinImpl ( )
private

Definition at line 839 of file propertysetmixin.cxx.

Member Function Documentation

◆ addPropertyChangeListener()

void PropertySetMixinImpl::addPropertyChangeListener ( rtl::OUString const &  propertyName,
css::uno::Reference< css::beans::XPropertyChangeListener > const &  listener 
)
protectedvirtual

Adds a css::beans::XPropertyChangeListener.

If a listener is added more than once, it will receive all relevant notifications multiple times.

See also
css::beans::XPropertySet::addPropertyChangeListener

Definition at line 998 of file propertysetmixin.cxx.

◆ addVetoableChangeListener()

void PropertySetMixinImpl::addVetoableChangeListener ( rtl::OUString const &  propertyName,
css::uno::Reference< css::beans::XVetoableChangeListener > const &  listener 
)
protectedvirtual

Adds a css::beans::XVetoableChangeListener.

If a listener is added more than once, it will receive all relevant notifications multiple times.

See also
css::beans::XPropertySet::addVetoableChangeListener

Definition at line 1037 of file propertysetmixin.cxx.

◆ checkUnknown()

void PropertySetMixinImpl::checkUnknown ( rtl::OUString const &  propertyName)
private

Definition at line 843 of file propertysetmixin.cxx.

◆ dispose()

void PropertySetMixinImpl::dispose ( void  )
protected

Mark this instance as being disposed.

See css::lang::XComponent for the general concept of disposing UNO objects. On the first call to this function, all registered listeners (css::beans::XPropertyChangeListeners and css::beans::XVetoableChangeListeners) are notified of the disposing source. Any subsequent calls to this function are ignored.

May throw css::uno::RuntimeException and std::bad_alloc.

Definition at line 924 of file propertysetmixin.cxx.

◆ getFastPropertyValue()

css::uno::Any PropertySetMixinImpl::getFastPropertyValue ( sal_Int32  handle)
protectedvirtual

Definition at line 1085 of file propertysetmixin.cxx.

◆ getPropertySetInfo()

css::uno::Reference< css::beans::XPropertySetInfo > PropertySetMixinImpl::getPropertySetInfo ( )
protectedvirtual

Definition at line 978 of file propertysetmixin.cxx.

References Info.

◆ getPropertyValue()

css::uno::Any PropertySetMixinImpl::getPropertyValue ( rtl::OUString const &  propertyName)
protectedvirtual

Definition at line 991 of file propertysetmixin.cxx.

◆ getPropertyValues()

css::uno::Sequence< css::beans::PropertyValue > PropertySetMixinImpl::getPropertyValues ( )
protectedvirtual

Definition at line 1095 of file propertysetmixin.cxx.

References i, and n.

◆ operator=()

void cppu::PropertySetMixinImpl::operator= ( const PropertySetMixinImpl )
private

◆ prepareSet()

void PropertySetMixinImpl::prepareSet ( rtl::OUString const &  propertyName,
css::uno::Any const &  oldValue,
css::uno::Any const &  newValue,
BoundListeners boundListeners 
)
protected

A function used by subclasses of cppu::PropertySetMixin when implementing UNO interface type attribute setter functions.

First, this function checks whether this instance has already been disposed (see cppu::PropertySetMixinImpl::dispose), and throws a css::lang::DisposedException if applicable. For a constrained attribute (whose setter can explicitly raise css::beans::PropertyVetoException), this function notifies any css::beans::XVetoableChangeListeners. For a bound attribute, this function modifies the passed-in boundListeners so that it can afterwards be used to notify any css::beans::XPropertyChangeListeners. This function should be called before storing the new attribute value, and boundListeners->notify() should be called exactly once after storing the new attribute value (in case the attribute is bound; otherwise, calling boundListeners->notify() is ignored). Furthermore, boundListeners->notify() and this function have to be called from the same thread.

May throw css::beans::PropertyVetoException, css::uno::RuntimeException (and css::lang::DisposedException in particular), and std::bad_alloc.

Parameters
propertyNamethe name of the property (which is the same as the name of the attribute that is going to be set)
oldValuethe property value corresponding to the old attribute value. This is only used as css::beans::PropertyChangeEvent::OldValue, which is rather useless, anyway (see “Using the Observer Pattern” in OpenOffice.org Coding Guidelines). If the attribute that is going to be set is neither bound nor constrained, or if css::beans::PropertyChangeEvent::OldValue should not be set, a VOID Any can be used instead.
newValuethe property value corresponding to the new attribute value. This is only used as css::beans::PropertyChangeEvent::NewValue, which is rather useless, anyway (see “Using the Observer Pattern” in OpenOffice.org Coding Guidelines), unless the attribute that is going to be set is constrained. If the attribute that is going to be set is neither bound nor constrained, or if it is only bound but css::beans::PropertyChangeEvent::NewValue should not be set, a VOID Any can be used instead.
boundListenersa pointer to a fresh cppu::PropertySetMixinImpl::BoundListeners instance (which has not been passed to this function before, and on which notify has not yet been called); may only be null if the attribute that is going to be set is not bound

Definition at line 850 of file propertysetmixin.cxx.

References i, and cppu::PropertySetMixinImpl::BoundListeners::m_impl.

◆ queryInterface()

css::uno::Any PropertySetMixinImpl::queryInterface ( css::uno::Type const &  type)
protectedvirtual

A function used by subclasses of cppu::PropertySetMixin when implementing css::uno::XInterface::queryInterface.

This function checks for support of any of the UNO interface types specified in the call of the cppu::PropertySetMixin constructor. It does not check for any other UNO interface types (not even for css::uno::XInterface), and should not be used directly as the implementation of css::uno::XInterface::queryInterface of this UNO object.

Definition at line 951 of file propertysetmixin.cxx.

References type.

◆ removePropertyChangeListener()

void PropertySetMixinImpl::removePropertyChangeListener ( rtl::OUString const &  propertyName,
css::uno::Reference< css::beans::XPropertyChangeListener > const &  listener 
)
protectedvirtual

Definition at line 1020 of file propertysetmixin.cxx.

References i.

◆ removeVetoableChangeListener()

void PropertySetMixinImpl::removeVetoableChangeListener ( rtl::OUString const &  propertyName,
css::uno::Reference< css::beans::XVetoableChangeListener > const &  listener 
)
protectedvirtual

Definition at line 1059 of file propertysetmixin.cxx.

References i.

◆ setFastPropertyValue()

void PropertySetMixinImpl::setFastPropertyValue ( sal_Int32  handle,
css::uno::Any const &  value 
)
protectedvirtual

Definition at line 1075 of file propertysetmixin.cxx.

References value.

◆ setPropertyValue()

void PropertySetMixinImpl::setPropertyValue ( rtl::OUString const &  propertyName,
css::uno::Any const &  value 
)
protectedvirtual

Definition at line 983 of file propertysetmixin.cxx.

References value.

◆ setPropertyValues()

void PropertySetMixinImpl::setPropertyValues ( css::uno::Sequence< css::beans::PropertyValue > const &  props)
protectedvirtual

Definition at line 1121 of file propertysetmixin.cxx.

References p, and props.

Friends And Related Function Documentation

◆ Impl

friend class Impl
friend

Definition at line 330 of file propertysetmixin.hxx.

◆ PropertySetMixin

template<typename T >
friend class PropertySetMixin
friend

Definition at line 331 of file propertysetmixin.hxx.

Member Data Documentation

◆ m_impl

Impl* cppu::PropertySetMixinImpl::m_impl
private

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