Lines 82-89
template< class key , class hashImpl , c
Link Here
|
82 |
inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::~OMultiTypeInterfaceContainerHelperVar() |
82 |
inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::~OMultiTypeInterfaceContainerHelperVar() |
83 |
SAL_THROW( () ) |
83 |
SAL_THROW( () ) |
84 |
{ |
84 |
{ |
85 |
CONT_HASHMAP::iterator iter = m_pMap->begin(); |
85 |
typename CONT_HASHMAP::iterator iter = m_pMap->begin(); |
86 |
CONT_HASHMAP::iterator end = m_pMap->end(); |
86 |
typename CONT_HASHMAP::iterator end = m_pMap->end(); |
87 |
|
87 |
|
88 |
while( iter != end ) |
88 |
while( iter != end ) |
89 |
{ |
89 |
{ |
Lines 99-105
template< class key , class hashImpl , c
Link Here
|
99 |
inline ::com::sun::star::uno::Sequence< key > OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainedTypes() const |
99 |
inline ::com::sun::star::uno::Sequence< key > OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainedTypes() const |
100 |
SAL_THROW( () ) |
100 |
SAL_THROW( () ) |
101 |
{ |
101 |
{ |
102 |
CONT_HASHMAP::size_type nSize; |
102 |
typename CONT_HASHMAP::size_type nSize; |
103 |
|
103 |
|
104 |
::osl::MutexGuard aGuard( rMutex ); |
104 |
::osl::MutexGuard aGuard( rMutex ); |
105 |
if( nSize = m_pMap->size() ) |
105 |
if( nSize = m_pMap->size() ) |
Lines 107-114
inline ::com::sun::star::uno::Sequence<
Link Here
|
107 |
::com::sun::star::uno::Sequence< key > aInterfaceTypes( nSize ); |
107 |
::com::sun::star::uno::Sequence< key > aInterfaceTypes( nSize ); |
108 |
key * pArray = aInterfaceTypes.getArray(); |
108 |
key * pArray = aInterfaceTypes.getArray(); |
109 |
|
109 |
|
110 |
CONT_HASHMAP::iterator iter = m_pMap->begin(); |
110 |
typename CONT_HASHMAP::iterator iter = m_pMap->begin(); |
111 |
CONT_HASHMAP::iterator end = m_pMap->end(); |
111 |
typename CONT_HASHMAP::iterator end = m_pMap->end(); |
112 |
|
112 |
|
113 |
sal_Int32 i = 0; |
113 |
sal_Int32 i = 0; |
114 |
while( iter != end ) |
114 |
while( iter != end ) |
Lines 135-141
OInterfaceContainerHelper * OMultiTypeIn
Link Here
|
135 |
{ |
135 |
{ |
136 |
::osl::MutexGuard aGuard( rMutex ); |
136 |
::osl::MutexGuard aGuard( rMutex ); |
137 |
|
137 |
|
138 |
CONT_HASHMAP::iterator iter = m_pMap->find( rKey ); |
138 |
typename CONT_HASHMAP::iterator iter = m_pMap->find( rKey ); |
139 |
if( iter != m_pMap->end() ) |
139 |
if( iter != m_pMap->end() ) |
140 |
return (OInterfaceContainerHelper*) (*iter).second; |
140 |
return (OInterfaceContainerHelper*) (*iter).second; |
141 |
return 0; |
141 |
return 0; |
Lines 149-155
sal_Int32 OMultiTypeInterfaceContainerHe
Link Here
|
149 |
SAL_THROW( () ) |
149 |
SAL_THROW( () ) |
150 |
{ |
150 |
{ |
151 |
::osl::MutexGuard aGuard( rMutex ); |
151 |
::osl::MutexGuard aGuard( rMutex ); |
152 |
CONT_HASHMAP::iterator |
152 |
typename CONT_HASHMAP::iterator |
153 |
iter = m_pMap->find( rKey ); |
153 |
iter = m_pMap->find( rKey ); |
154 |
if( iter == m_pMap->end() ) |
154 |
if( iter == m_pMap->end() ) |
155 |
{ |
155 |
{ |
Lines 171-177
inline sal_Int32 OMultiTypeInterfaceCont
Link Here
|
171 |
::osl::MutexGuard aGuard( rMutex ); |
171 |
::osl::MutexGuard aGuard( rMutex ); |
172 |
|
172 |
|
173 |
// search container with id nUik |
173 |
// search container with id nUik |
174 |
CONT_HASHMAP::iterator iter = m_pMap->find( rKey ); |
174 |
typename CONT_HASHMAP::iterator iter = m_pMap->find( rKey ); |
175 |
// container found? |
175 |
// container found? |
176 |
if( iter != m_pMap->end() ) |
176 |
if( iter != m_pMap->end() ) |
177 |
return ((OInterfaceContainerHelper*)(*iter).second)->removeInterface( rListener ); |
177 |
return ((OInterfaceContainerHelper*)(*iter).second)->removeInterface( rListener ); |
Lines 186-192
void OMultiTypeInterfaceContainerHelperV
Link Here
|
186 |
const ::com::sun::star::lang::EventObject & rEvt ) |
186 |
const ::com::sun::star::lang::EventObject & rEvt ) |
187 |
SAL_THROW( () ) |
187 |
SAL_THROW( () ) |
188 |
{ |
188 |
{ |
189 |
CONT_HASHMAP::size_type nSize = 0; |
189 |
typename CONT_HASHMAP::size_type nSize = 0; |
190 |
OInterfaceContainerHelper ** ppListenerContainers = NULL; |
190 |
OInterfaceContainerHelper ** ppListenerContainers = NULL; |
191 |
{ |
191 |
{ |
192 |
::osl::MutexGuard aGuard( rMutex ); |
192 |
::osl::MutexGuard aGuard( rMutex ); |
Lines 196-205
void OMultiTypeInterfaceContainerHelperV
Link Here
|
196 |
ppListenerContainers = new ppp[nSize]; |
196 |
ppListenerContainers = new ppp[nSize]; |
197 |
//ppListenerContainers = new (ListenerContainer*)[nSize]; |
197 |
//ppListenerContainers = new (ListenerContainer*)[nSize]; |
198 |
|
198 |
|
199 |
CONT_HASHMAP::iterator iter = m_pMap->begin(); |
199 |
typename CONT_HASHMAP::iterator iter = m_pMap->begin(); |
200 |
CONT_HASHMAP::iterator end = m_pMap->end(); |
200 |
typename CONT_HASHMAP::iterator end = m_pMap->end(); |
201 |
|
201 |
|
202 |
CONT_HASHMAP::size_type i = 0; |
202 |
typename CONT_HASHMAP::size_type i = 0; |
203 |
while( iter != end ) |
203 |
while( iter != end ) |
204 |
{ |
204 |
{ |
205 |
ppListenerContainers[i++] = (OInterfaceContainerHelper*)(*iter).second; |
205 |
ppListenerContainers[i++] = (OInterfaceContainerHelper*)(*iter).second; |
Lines 209-215
void OMultiTypeInterfaceContainerHelperV
Link Here
|
209 |
} |
209 |
} |
210 |
|
210 |
|
211 |
// create a copy, because do not fire event in a guarded section |
211 |
// create a copy, because do not fire event in a guarded section |
212 |
for( CONT_HASHMAP::size_type i = 0; |
212 |
for( typename CONT_HASHMAP::size_type i = 0; |
213 |
i < nSize; i++ ) |
213 |
i < nSize; i++ ) |
214 |
{ |
214 |
{ |
215 |
if( ppListenerContainers[i] ) |
215 |
if( ppListenerContainers[i] ) |
Lines 224-231
template< class key , class hashImpl , c
Link Here
|
224 |
void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::clear() SAL_THROW( () ) |
224 |
void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::clear() SAL_THROW( () ) |
225 |
{ |
225 |
{ |
226 |
::osl::MutexGuard aGuard( rMutex ); |
226 |
::osl::MutexGuard aGuard( rMutex ); |
227 |
CONT_HASHMAP::iterator iter = m_pMap->begin(); |
227 |
typename CONT_HASHMAP::iterator iter = m_pMap->begin(); |
228 |
CONT_HASHMAP::iterator end = m_pMap->end(); |
228 |
typename CONT_HASHMAP::iterator end = m_pMap->end(); |
229 |
|
229 |
|
230 |
while( iter != end ) |
230 |
while( iter != end ) |
231 |
{ |
231 |
{ |