20#ifndef INCLUDED_COMPHELPER_PROPARRHLP_HXX
21#define INCLUDED_COMPHELPER_PROPARRHLP_HXX
26#include <osl/diagnose.h>
75 css::uno::Sequence< css::beans::Property >& _rProps,
76 css::uno::Sequence< css::beans::Property >& _rAggregateProps
95 std::unique_lock aGuard(theMutex());
102 std::unique_lock aGuard(theMutex());
103 OSL_ENSURE(s_nRefCount > 0,
"OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have a refcount of 0 !");
114 OSL_ENSURE(s_nRefCount,
"OPropertyArrayUsageHelper::getArrayHelper : suspicious call : have a refcount of 0 !");
117 std::unique_lock aGuard(theMutex());
120 s_pProps = createArrayHelper();
121 OSL_ENSURE(s_pProps,
"OPropertyArrayUsageHelper::getArrayHelper : createArrayHelper returned nonsense !");
127template <
class TYPE> inline
130 css::uno::Sequence< css::beans::Property > aProps;
131 css::uno::Sequence< css::beans::Property > aAggregateProps;
132 fillProperties(aProps, aAggregateProps);
133 OSL_ENSURE(aProps.hasElements(),
"OAggregationArrayUsageHelper::createArrayHelper : fillProperties returned nonsense !");
an OPropertyArrayUsageHelper which will create an OPropertyArrayAggregationHelper
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const =0
overwrite this in your derived class.
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const
creates an OPropertyArrayAggregationHelper filled with properties for which's initialization fillProp...
::cppu::IPropertyArrayHelper * s_pProps
static std::mutex & theMutex()
OPropertyArrayUsageHelper()
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const =0
used to implement the creation of the array helper which is shared amongst all instances of the class...
static sal_Int32 s_nRefCount
::cppu::IPropertyArrayHelper * getArrayHelper()
call this in the getInfoHelper method of your derived class.
virtual ~OPropertyArrayUsageHelper()
#define DEFAULT_AGGREGATE_PROPERTY_ID
used for implementing a cppu::IPropertyArrayHelper for classes aggregating property sets