summaryrefslogtreecommitdiff
path: root/cppuhelper/inc/cppuhelper/interfacecontainer.h
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/inc/cppuhelper/interfacecontainer.h')
-rw-r--r--cppuhelper/inc/cppuhelper/interfacecontainer.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/cppuhelper/inc/cppuhelper/interfacecontainer.h b/cppuhelper/inc/cppuhelper/interfacecontainer.h
index 3f5da6bd10dc..ee57127a4fca 100644
--- a/cppuhelper/inc/cppuhelper/interfacecontainer.h
+++ b/cppuhelper/inc/cppuhelper/interfacecontainer.h
@@ -44,6 +44,17 @@
namespace cppu
{
+namespace detail {
+
+ union element_alias
+ {
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > *pAsSequence;
+ ::com::sun::star::uno::XInterface * pAsInterface;
+ element_alias() : pAsInterface(0) {}
+ };
+
+}
+
//===================================================================
class OInterfaceContainerHelper;
/**
@@ -95,7 +106,9 @@ public:
private:
OInterfaceContainerHelper & rCont;
sal_Bool bIsList;
- void * pData;
+
+ detail::element_alias aData;
+
sal_Int32 nRemain;
OInterfaceIteratorHelper( const OInterfaceIteratorHelper & ) SAL_THROW( () );
@@ -222,14 +235,14 @@ public:
private:
friend class OInterfaceIteratorHelper;
/**
- bIsList == TRUE -> pData of type Sequence< XInterfaceSequence >,
- otherwise pData == of type (XEventListener *)
+ bIsList == TRUE -> aData.pAsSequence of type Sequence< XInterfaceSequence >,
+ otherwise aData.pAsInterface == of type (XEventListener *)
*/
- void * pData;
+ detail::element_alias aData;
::osl::Mutex & rMutex;
/** TRUE -> used by an iterator. */
sal_Bool bInUse;
- /** TRUE -> pData is of type Sequence< XInterfaceSequence >. */
+ /** TRUE -> aData.pAsSequence is of type Sequence< XInterfaceSequence >. */
sal_Bool bIsList;
OInterfaceContainerHelper( const OInterfaceContainerHelper & ) SAL_THROW( () );