LibreOffice: uno/data.h File Reference

LibreOffice LibreOffice 26.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
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.
typedef void(*) | uno_AcquireFunc(void *pInterface)
| Generic function pointer declaration to acquire an interface.
typedef void(*) | uno_ReleaseFunc(void *pInterface)
| Generic function pointer declaration to release an interface.

## 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.
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.
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.
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.
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.
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.
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!
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!
CPPU_DLLPUBLIC void | uno_constructData (void *pMem, struct _typelib_TypeDescription *pTypeDescr) SAL_THROW_EXTERN_C()
| Default constructs a value.
CPPU_DLLPUBLIC void | uno_type_constructData (void *pMem, struct _typelib_TypeDescriptionReference *pType) SAL_THROW_EXTERN_C()
| Default constructs a value.
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.
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.
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.

## Typedef Documentation

## ◆ uno_AcquireFunc

typedef void(*) uno_AcquireFunc(void *pInterface)

Generic function pointer declaration to acquire an interface.

Parameters

  pInterface | interface 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

  pInterface | interface
  pType | demanded interface type

Returns
  interface pointer

## ◆ uno_ReleaseFunc

typedef void(*) uno_ReleaseFunc(void *pInterface)

Generic function pointer declaration to release an interface.

Parameters

  pInterface | interface 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

  pDest | pointer to destination value
  pDestTypeDescr | type description of destination value
  pSource | pointer to source value; if 0, then destination value will be assigned to default value
  pSourceTypeDescr | type destination of source value
  queryInterface | function called each time an interface needs to be queried; defaults (0) to uno
  acquire | function called each time an interface needs to be acquired; defaults (0) to uno
  release | function 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

  pMem | pointer to memory of value to be constructed
  pTypeDescr | type 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

  pDest | pointer to destination value memory
  pSource | pointer to source value
  pTypeDescr | type description of source
  mapping | mapping 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

  pDest | pointer to destination value memory
  pSource | pointer to source value
  pTypeDescr | type description of source
  acquire | function 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

  pValue | value to be destructed
  pTypeDescr | type description of value
  release | function 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

  pVal1 | pointer to a value
  pVal1TypeDescr | type description of pVal1
  pVal2 | pointer to another value
  pVal2TypeDescr | type description of pVal2
  queryInterface | function called each time two interfaces are tested whether they belong to the same object; defaults (0) to uno
  release | function 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

  pDest | pointer to destination value
  pDestType | type of destination value
  pSource | pointer to source value; if 0, then destination value will be assigned to default value
  pSourceType | type of source value
  queryInterface | function called each time an interface needs to be queried; defaults (0) to uno
  acquire | function called each time an interface needs to be acquired; defaults (0) to uno
  release | function 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

  pMem | pointer to memory of value to be constructed
  pType | type 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

  pDest | pointer to destination value memory
  pSource | pointer to source value
  pType | type of source
  mapping | mapping 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

  pDest | pointer to destination value memory
  pSource | pointer to source value
  pType | type of source
  acquire | function 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

  pValue | value to be destructed
  pType | type of value
  release | function 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

  pVal1 | pointer to a value
  pVal1Type | type of pVal1
  pVal2 | pointer to another value
  pVal2Type | type of pVal2
  queryInterface | function called each time two interfaces are tested whether they belong to the same object; defaults (0) to uno
  release | function 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

  pAssignable | type
  pFrom | pointer to value
  pFromType | type of value
  queryInterface | function called each time an interface needs to be queried; defaults (0) to uno
  release | function called each time an interface needs to be released; defaults (0) to uno

Returns
  true if value is destination has been successfully assigned