19 #ifndef INCLUDED_UNO_MAPPING_HXX
20 #define INCLUDED_UNO_MAPPING_HXX
56 inline static void * SAL_CALL
operator new (
size_t nSize )
SAL_THROW(())
58 inline static void SAL_CALL
operator delete (
void * pMem )
SAL_THROW(())
60 inline static void * SAL_CALL
operator new ( size_t,
void * pMem )
SAL_THROW(())
62 inline static void SAL_CALL
operator delete (
void *,
void * )
SAL_THROW(())
74 const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo,
135 {
return _pMapping; }
141 inline bool SAL_CALL
is() const SAL_THROW(())
142 {
return (_pMapping != 0); }
146 inline void SAL_CALL
clear() SAL_THROW(());
171 void * pInterface, const ::com::sun::star::uno::Type & rType )
const SAL_THROW(());
180 { (*_pMapping->
mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); }
196 inline void SAL_CALL
mapInterface(
void ** ppOut,
void * pInterface, const ::com::sun::star::uno::Type & rType )
const SAL_THROW(());
200 const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, const ::rtl::OUString & rAddPurpose )
224 : _pMapping( pMapping )
227 (*_pMapping->
acquire)( _pMapping );
231 : _pMapping( rMapping._pMapping )
234 (*_pMapping->
acquire)( _pMapping );
240 (*_pMapping->
release)( _pMapping );
247 (*_pMapping->
release)( _pMapping );
255 (*pMapping->
acquire)( pMapping );
257 (*_pMapping->
release)( _pMapping );
258 _pMapping = pMapping;
263 void ** ppOut,
void * pInterface, const ::com::sun::star::uno::Type & rType )
const
267 TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() );
271 TYPELIB_DANGER_RELEASE( pTD );
280 (*_pMapping->
mapInterface)( _pMapping, &pOut, pInterface, pTypeDescr );
285 void * pInterface, const ::com::sun::star::uno::Type & rType )
const
289 mapInterface( &pOut, pInterface, rType );
314 return (0 != *ppRet);
337 return (0 != *ppRet);
uno_ReleaseMappingFunc release
Releases mapping.
Definition: mapping.h:72
bool is() const SAL_THROW(())
Tests if a mapping is set.
Definition: mapping.hxx:141
~Mapping() SAL_THROW(())
Destructor.
Definition: mapping.hxx:237
Mapping(const ::rtl::OUString &rFrom, const ::rtl::OUString &rTo, const ::rtl::OUString &rAddPurpose=::rtl::OUString()) SAL_THROW(())
Holds a mapping from the specified source to the specified destination by environment type names...
Definition: mapping.hxx:199
Mapping & operator=(uno_Mapping *pMapping) SAL_THROW(())
Sets a given mapping.
Definition: mapping.hxx:252
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
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.
C++ wrapper for binary C uno_Environment.
Definition: environment.hxx:45
void mapInterface(void **ppOut, void *pInterface, typelib_InterfaceTypeDescription *pTypeDescr) const SAL_THROW(())
Maps an interface from one environment to another.
Definition: mapping.hxx:179
void clear() SAL_THROW(())
Releases a set mapping.
Definition: mapping.hxx:243
bool mapToUno(uno_Interface **ppRet, const Reference< C > &x) SAL_THROW(())
Deprecated.
Definition: mapping.hxx:329
::com::sun::star::uno::Type const & getTypeFavourUnsigned(SAL_UNUSED_PARAMETER T const *)
A working replacement for getCppuType (see there).
Definition: unotype.hxx:287
The binary specification of an UNO environment.
Definition: environment.h:41
C++ wrapper for C uno_Mapping.
Definition: mapping.hxx:49
This is the binary specification of a mapping.
Definition: mapping.h:64
Type description of an interface.
Definition: typedescription.h:370
void * mapInterface(void *pInterface, typelib_InterfaceTypeDescription *pTypeDescr) const SAL_THROW(())
Maps an interface from one environment to another.
Definition: mapping.hxx:275
#define SAL_THROW(x)
Exception specification documentation.
Definition: types.h:361
Full type description of a type.
Definition: typedescription.h:71
#define OSL_ASSERT(c)
Definition: diagnose.h:105
uno_Environment * get() const SAL_THROW(())
Provides UNacquired pointer to the set C environment.
Definition: environment.hxx:115
uno_AcquireMappingFunc acquire
Acquires mapping.
Definition: mapping.h:68
void mapInterface(void **ppOut, void *pInterface, typelib_TypeDescription *pTypeDescr) const SAL_THROW(())
Maps an interface from one environment to another.
Definition: mapping.hxx:187
Template reference class for interface type derived from BaseReference.
Definition: unotype.hxx:32
bool mapToCpp(Reference< C > *ppRet, uno_Interface *pUnoI) SAL_THROW(())
Deprecated.
Definition: mapping.hxx:306
The binary C uno interface description.
Definition: dispatcher.h:62
#define UNO_LB_UNO
Environment type name for binary C UNO.
Definition: lbnames.h:45
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:82
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
uno_MapInterfaceFunc mapInterface
mapping function
Definition: mapping.h:76
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 ...