19 #ifndef INCLUDED_UNO_MAPPING_HXX
20 #define INCLUDED_UNO_MAPPING_HXX
55 inline static void * SAL_CALL
operator new (
size_t nSize )
SAL_THROW(())
57 inline static void SAL_CALL
operator delete (
void * pMem )
SAL_THROW(())
59 inline static void * SAL_CALL
operator new ( size_t,
void * pMem )
SAL_THROW(())
61 inline static void SAL_CALL
operator delete (
void *,
void * )
SAL_THROW(())
73 const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo,
134 {
return _pMapping; }
141 {
return (_pMapping != 0); }
145 inline void SAL_CALL
clear() SAL_THROW(());
170 void * pInterface, const ::com::sun::star::uno::Type & rType )
const SAL_THROW(());
179 { (*_pMapping->
mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); }
195 inline void SAL_CALL
mapInterface(
void ** ppOut,
void * pInterface, const ::com::sun::star::uno::Type & rType )
const SAL_THROW(());
199 const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, const ::rtl::OUString & rAddPurpose )
223 : _pMapping( pMapping )
226 (*_pMapping->acquire)( _pMapping );
230 : _pMapping( rMapping._pMapping )
233 (*_pMapping->acquire)( _pMapping );
239 (*_pMapping->
release)( _pMapping );
246 (*_pMapping->
release)( _pMapping );
254 (*pMapping->
acquire)( pMapping );
256 (*_pMapping->release)( _pMapping );
257 _pMapping = pMapping;
262 void ** ppOut,
void * pInterface, const ::com::sun::star::uno::Type & rType )
const
266 TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() );
270 TYPELIB_DANGER_RELEASE( pTD );
279 (*_pMapping->mapInterface)( _pMapping, &pOut, pInterface, pTypeDescr );
284 void * pInterface, const ::com::sun::star::uno::Type & rType )
const
288 mapInterface( &pOut, pInterface, rType );
313 return (0 != *ppRet);
336 return (0 != *ppRet);
Mapping(const ::rtl::OUString &rFrom, const ::rtl::OUString &rTo, const ::rtl::OUString &rAddPurpose=::rtl::OUString())
Holds a mapping from the specified source to the specified destination by environment type names...
Definition: mapping.hxx:198
uno_AcquireMappingFunc acquire
Acquires mapping.
Definition: mapping.h:68
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:82
CPPU_DLLPUBLIC void uno_getMappingByName(struct _uno_Mapping **ppMapping, rtl_uString *pFrom, rtl_uString *pTo, rtl_uString *pAddPurpose) SAL_THROW_EXTERN_C()
Gets an interface mapping from one language environment to another by corresponding environment type ...
void * mapInterface(void *pInterface, typelib_InterfaceTypeDescription *pTypeDescr) const
Maps an interface from one environment to another.
Definition: mapping.hxx:274
sal_Bool mapToUno(uno_Interface **ppRet, const Reference< C > &x)
Deprecated.
Definition: mapping.hxx:328
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
This is the binary specification of a mapping.
Definition: mapping.h:64
#define UNO_LB_UNO
Environment type name for binary C UNO.
Definition: lbnames.h:44
Type description of an interface.
Definition: typedescription.h:424
uno_MapInterfaceFunc mapInterface
mapping function
Definition: mapping.h:76
void clear()
Releases a set mapping.
Definition: mapping.hxx:242
::com::sun::star::uno::Type const & getTypeFavourUnsigned(SAL_UNUSED_PARAMETER T const *)
A working replacement for getCppuType (see there).
Definition: unotype.hxx:287
uno_ReleaseMappingFunc release
Releases mapping.
Definition: mapping.h:72
Full type description of a type.
Definition: typedescription.h:71
The binary C uno interface description.
Definition: dispatcher.h:62
The binary specification of an UNO environment.
Definition: environment.h:41
void mapInterface(void **ppOut, void *pInterface, typelib_TypeDescription *pTypeDescr) const
Maps an interface from one environment to another.
Definition: mapping.hxx:186
C++ wrapper for C uno_Mapping.
Definition: mapping.hxx:48
uno_Environment * get() const
Provides UNacquired pointer to the set C environment.
Definition: environment.hxx:115
CPPU_DLLPUBLIC void uno_getMapping(struct _uno_Mapping **ppMapping, struct _uno_Environment *pFrom, struct _uno_Environment *pTo, rtl_uString *pAddPurpose) SAL_THROW_EXTERN_C()
Gets an interface mapping from one environment to another.
Template reference class for interface type derived from BaseReference.
Definition: unotype.hxx:32
~Mapping()
Destructor.
Definition: mapping.hxx:236
unsigned char sal_Bool
Definition: types.h:46
#define OSL_ASSERT(c)
Definition: diagnose.h:153
sal_Bool mapToCpp(Reference< C > *ppRet, uno_Interface *pUnoI)
Deprecated.
Definition: mapping.hxx:305
Mapping & operator=(uno_Mapping *pMapping)
Sets a given mapping.
Definition: mapping.hxx:251
sal_Bool is() const
Tests if a mapping is set.
Definition: mapping.hxx:140
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
C++ wrapper for binary C uno_Environment.
Definition: environment.hxx:45
void mapInterface(void **ppOut, void *pInterface, typelib_InterfaceTypeDescription *pTypeDescr) const
Maps an interface from one environment to another.
Definition: mapping.hxx:178
#define SAL_THROW(exc)
Definition of function throw clause macros.
Definition: types.h:358