LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
Typedefs | Functions
data.h File Reference
#include "cppu/cppudllapi.h"

Go to the source code of this file.

Typedefs

typedef void *(* uno_QueryInterfaceFunc) (void *pInterface, struct _typelib_TypeDescriptionReference *pType)
 Generic function pointer declaration to query for an interface. More...
 
typedef void(* uno_AcquireFunc) (void *pInterface)
 Generic function pointer declaration to acquire an interface. More...
 
typedef void(* uno_ReleaseFunc) (void *pInterface)
 Generic function pointer declaration to release an interface. More...
 

Functions

CPPU_DLLPUBLIC sal_Bool uno_equalData (void *pVal1, struct _typelib_TypeDescription *pVal1TypeDescr, void *pVal2, struct _typelib_TypeDescription *pVal2TypeDescr, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
 Tests if two values are equal. More...
 
CPPU_DLLPUBLIC sal_Bool uno_type_equalData (void *pVal1, struct _typelib_TypeDescriptionReference *pVal1Type, void *pVal2, struct _typelib_TypeDescriptionReference *pVal2Type, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
 Tests if two values are equal. More...
 
CPPU_DLLPUBLIC void uno_copyData (void *pDest, void *pSource, struct _typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
 Copy construct memory with given value. More...
 
CPPU_DLLPUBLIC void uno_type_copyData (void *pDest, void *pSource, struct _typelib_TypeDescriptionReference *pType, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
 Copy construct memory with given value. More...
 
CPPU_DLLPUBLIC void uno_copyAndConvertData (void *pDest, void *pSource, struct _typelib_TypeDescription *pTypeDescr, struct _uno_Mapping *mapping) SAL_THROW_EXTERN_C()
 Copy construct memory with given value. More...
 
CPPU_DLLPUBLIC void uno_type_copyAndConvertData (void *pDest, void *pSource, struct _typelib_TypeDescriptionReference *pType, struct _uno_Mapping *mapping) SAL_THROW_EXTERN_C()
 Copy construct memory with given value. More...
 
CPPU_DLLPUBLIC void uno_destructData (void *pValue, struct _typelib_TypeDescription *pTypeDescr, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
 Destructs a given value; does NOT free its memory! More...
 
CPPU_DLLPUBLIC void uno_type_destructData (void *pValue, struct _typelib_TypeDescriptionReference *pType, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
 Destructs a given value; does NOT free its memory! More...
 
CPPU_DLLPUBLIC void uno_constructData (void *pMem, struct _typelib_TypeDescription *pTypeDescr) SAL_THROW_EXTERN_C()
 Default constructs a value. More...
 
CPPU_DLLPUBLIC void uno_type_constructData (void *pMem, struct _typelib_TypeDescriptionReference *pType) SAL_THROW_EXTERN_C()
 Default constructs a value. More...
 
CPPU_DLLPUBLIC sal_Bool uno_assignData (void *pDest, struct _typelib_TypeDescription *pDestTypeDescr, void *pSource, struct _typelib_TypeDescription *pSourceTypeDescr, uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
 Assigns a destination value with a source value. More...
 
CPPU_DLLPUBLIC sal_Bool uno_type_assignData (void *pDest, struct _typelib_TypeDescriptionReference *pDestType, void *pSource, struct _typelib_TypeDescriptionReference *pSourceType, uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
 Assigns a destination value with a source value. More...
 
CPPU_DLLPUBLIC sal_Bool uno_type_isAssignableFromData (struct _typelib_TypeDescriptionReference *pAssignable, void *pFrom, struct _typelib_TypeDescriptionReference *pFromType, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
 Tests whether a value of given type is assignable from given value. More...
 

Typedef Documentation

◆ uno_AcquireFunc

typedef void( * uno_AcquireFunc) (void *pInterface)

Generic function pointer declaration to acquire an interface.

Parameters
pInterfaceinterface to be acquired

◆ uno_QueryInterfaceFunc

typedef void*( * uno_QueryInterfaceFunc) (void *pInterface, struct _typelib_TypeDescriptionReference *pType)

Generic function pointer declaration to query for an interface.

Parameters
pInterfaceinterface
pTypedemanded interface type
Returns
interface pointer

◆ uno_ReleaseFunc

typedef void( * uno_ReleaseFunc) (void *pInterface)

Generic function pointer declaration to release an interface.

Parameters
pInterfaceinterface to be release

Function Documentation

◆ uno_assignData()

CPPU_DLLPUBLIC sal_Bool uno_assignData ( void *  pDest,
struct _typelib_TypeDescription pDestTypeDescr,
void *  pSource,
struct _typelib_TypeDescription pSourceTypeDescr,
uno_QueryInterfaceFunc  queryInterface,
uno_AcquireFunc  acquire,
uno_ReleaseFunc  release 
)

Assigns a destination value with a source value.

Widening conversion WITHOUT data loss is allowed (e.g., assigning a long with a short). Querying for demanded interface type is allowed. Assignment from any value to a value of type Any and vice versa is allowed.

Parameters
pDestpointer to destination value
pDestTypeDescrtype description of destination value
pSourcepointer to source value; if 0, then destination value will be assigned to default value
pSourceTypeDescrtype destination of source value
queryInterfacefunction called each time an interface needs to be queried; defaults (0) to uno
acquirefunction called each time an interface needs to be acquired; defaults (0) to uno
releasefunction called each time an interface needs to be released; defaults (0) to uno
Returns
true if destination has been successfully assigned

◆ uno_constructData()

CPPU_DLLPUBLIC void uno_constructData ( void *  pMem,
struct _typelib_TypeDescription pTypeDescr 
)

Default constructs a value.

All simple types are set to 0, enums are set to their default value.

Parameters
pMempointer to memory of value to be constructed
pTypeDescrtype description of value to be constructed

◆ uno_copyAndConvertData()

CPPU_DLLPUBLIC void uno_copyAndConvertData ( void *  pDest,
void *  pSource,
struct _typelib_TypeDescription pTypeDescr,
struct _uno_Mapping mapping 
)

Copy construct memory with given value.

The size of the destination value must be larger or equal to the size of the source value. Interfaces are converted/ mapped by mapping parameter.

Parameters
pDestpointer to destination value memory
pSourcepointer to source value
pTypeDescrtype description of source
mappingmapping to convert/ map interfaces

◆ uno_copyData()

CPPU_DLLPUBLIC void uno_copyData ( void *  pDest,
void *  pSource,
struct _typelib_TypeDescription pTypeDescr,
uno_AcquireFunc  acquire 
)

Copy construct memory with given value.

The size of the destination value must be larger or equal to the size of the source value.

Parameters
pDestpointer to destination value memory
pSourcepointer to source value
pTypeDescrtype description of source
acquirefunction called each time an interface needs to be acquired; defaults (0) to uno

◆ uno_destructData()

CPPU_DLLPUBLIC void uno_destructData ( void *  pValue,
struct _typelib_TypeDescription pTypeDescr,
uno_ReleaseFunc  release 
)

Destructs a given value; does NOT free its memory!

Parameters
pValuevalue to be destructed
pTypeDescrtype description of value
releasefunction called each time an interface pointer needs to be released; defaults (0) to uno

◆ uno_equalData()

CPPU_DLLPUBLIC sal_Bool uno_equalData ( void *  pVal1,
struct _typelib_TypeDescription pVal1TypeDescr,
void *  pVal2,
struct _typelib_TypeDescription pVal2TypeDescr,
uno_QueryInterfaceFunc  queryInterface,
uno_ReleaseFunc  release 
)

Tests if two values are equal.

May compare different types (e.g., short to long).

Parameters
pVal1pointer to a value
pVal1TypeDescrtype description of pVal1
pVal2pointer to another value
pVal2TypeDescrtype description of pVal2
queryInterfacefunction called each time two interfaces are tested whether they belong to the same object; defaults (0) to uno
releasefunction to release queried interfaces; defaults (0) to uno
Returns
true if values are equal

◆ uno_type_assignData()

CPPU_DLLPUBLIC sal_Bool uno_type_assignData ( void *  pDest,
struct _typelib_TypeDescriptionReference pDestType,
void *  pSource,
struct _typelib_TypeDescriptionReference pSourceType,
uno_QueryInterfaceFunc  queryInterface,
uno_AcquireFunc  acquire,
uno_ReleaseFunc  release 
)

Assigns a destination value with a source value.

Widening conversion WITHOUT data loss is allowed (e.g., assigning a long with a short). Querying for demanded interface type is allowed. Assignment from any value to a value of type Any and vice versa is allowed.

Parameters
pDestpointer to destination value
pDestTypetype of destination value
pSourcepointer to source value; if 0, then destination value will be assigned to default value
pSourceTypetype of source value
queryInterfacefunction called each time an interface needs to be queried; defaults (0) to uno
acquirefunction called each time an interface needs to be acquired; defaults (0) to uno
releasefunction called each time an interface needs to be released; defaults (0) to uno
Returns
true if destination has been successfully assigned

◆ uno_type_constructData()

CPPU_DLLPUBLIC void uno_type_constructData ( void *  pMem,
struct _typelib_TypeDescriptionReference pType 
)

Default constructs a value.

All simple types are set to 0, enums are set to their default value.

Parameters
pMempointer to memory of value to be constructed
pTypetype of value to be constructed

◆ uno_type_copyAndConvertData()

CPPU_DLLPUBLIC void uno_type_copyAndConvertData ( void *  pDest,
void *  pSource,
struct _typelib_TypeDescriptionReference pType,
struct _uno_Mapping mapping 
)

Copy construct memory with given value.

The size of the destination value must be larger or equal to the size of the source value. Interfaces are converted/ mapped by mapping parameter.

Parameters
pDestpointer to destination value memory
pSourcepointer to source value
pTypetype of source
mappingmapping to convert/ map interfaces

◆ uno_type_copyData()

CPPU_DLLPUBLIC void uno_type_copyData ( void *  pDest,
void *  pSource,
struct _typelib_TypeDescriptionReference pType,
uno_AcquireFunc  acquire 
)

Copy construct memory with given value.

The size of the destination value must be larger or equal to the size of the source value.

Parameters
pDestpointer to destination value memory
pSourcepointer to source value
pTypetype of source
acquirefunction called each time an interface needs to be acquired; defaults (0) to uno

◆ uno_type_destructData()

CPPU_DLLPUBLIC void uno_type_destructData ( void *  pValue,
struct _typelib_TypeDescriptionReference pType,
uno_ReleaseFunc  release 
)

Destructs a given value; does NOT free its memory!

Parameters
pValuevalue to be destructed
pTypetype of value
releasefunction called each time an interface pointer needs to be released; defaults (0) to uno

◆ uno_type_equalData()

CPPU_DLLPUBLIC sal_Bool uno_type_equalData ( void *  pVal1,
struct _typelib_TypeDescriptionReference pVal1Type,
void *  pVal2,
struct _typelib_TypeDescriptionReference pVal2Type,
uno_QueryInterfaceFunc  queryInterface,
uno_ReleaseFunc  release 
)

Tests if two values are equal.

May compare different types (e.g., short to long).

Parameters
pVal1pointer to a value
pVal1Typetype of pVal1
pVal2pointer to another value
pVal2Typetype of pVal2
queryInterfacefunction called each time two interfaces are tested whether they belong to the same object; defaults (0) to uno
releasefunction to release queried interfaces; defaults (0) to uno
Returns
true if values are equal

◆ uno_type_isAssignableFromData()

CPPU_DLLPUBLIC sal_Bool uno_type_isAssignableFromData ( struct _typelib_TypeDescriptionReference pAssignable,
void *  pFrom,
struct _typelib_TypeDescriptionReference pFromType,
uno_QueryInterfaceFunc  queryInterface,
uno_ReleaseFunc  release 
)

Tests whether a value of given type is assignable from given value.

Widening conversion WITHOUT data loss is allowed (e.g., assigning a long with a short). Querying for demanded interface type is allowed. Assignment from any value to a value of type Any and vice versa is allowed.

Parameters
pAssignabletype
pFrompointer to value
pFromTypetype of value
queryInterfacefunction called each time an interface needs to be queried; defaults (0) to uno
releasefunction called each time an interface needs to be released; defaults (0) to uno
Returns
true if value is destination has been successfully assigned