LibreOffice: typelib/typedescription.h File Reference

LibreOffice LibreOffice 26.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
typedescription.h File Reference
`#include "cppu/cppudllapi.h"`
`#include "typelib/uik.h"`
`#include "typelib/typeclass.h"`
`#include "rtl/ustring.h"`

Go to the source code of this file.

## Classes
struct | _typelib_TypeDescriptionReference
| Holds a weak reference to a type description. More...
struct | _typelib_TypeDescription
| Full type description of a type. More...
struct | _typelib_CompoundTypeDescription
| Type description for exception types. More...
struct | _typelib_StructTypeDescription
| Type description for struct types. More...
struct | _typelib_IndirectTypeDescription
| Type description of a sequence. More...
struct | _typelib_EnumTypeDescription
| Type description of an enum. More...
struct | _typelib_MethodParameter
| Description of an interface method parameter. More...
struct | _typelib_InterfaceMemberTypeDescription
| Common base type description of typelib_InterfaceMethodTypeDescription and typelib_InterfaceAttributeTypeDescription. More...
struct | _typelib_InterfaceMethodTypeDescription
| Type description of an interface method. More...
struct | _typelib_InterfaceAttributeTypeDescription
| The description of an interface attribute. More...
struct | _typelib_InterfaceTypeDescription
| Type description of an interface. More...
struct | _typelib_CompoundMember_Init
| Init struct of compound members for typelib_typedescription_new(). More...
struct | _typelib_StructMember_Init
| Init struct of members for typelib_typedescription_newStruct(). More...
struct | _typelib_Parameter_Init
| Init struct of interface methods for typelib_typedescription_new(). More...

## Typedefs
typedef struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescriptionReference | typelib_TypeDescriptionReference
| Holds a weak reference to a type description.
typedef struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescription | typelib_TypeDescription
| Full type description of a type.
typedef struct _typelib_CompoundTypeDescription | typelib_CompoundTypeDescription
| Type description for exception types.
typedef struct _typelib_StructTypeDescription | typelib_StructTypeDescription
| Type description for struct types.
typedef struct _typelib_IndirectTypeDescription | typelib_IndirectTypeDescription
| Type description of a sequence.
typedef struct _typelib_EnumTypeDescription | typelib_EnumTypeDescription
| Type description of an enum.
typedef struct _typelib_MethodParameter | typelib_MethodParameter
| Description of an interface method parameter.
typedef struct _typelib_InterfaceMemberTypeDescription | typelib_InterfaceMemberTypeDescription
| Common base type description of typelib_InterfaceMethodTypeDescription and typelib_InterfaceAttributeTypeDescription.
typedef struct _typelib_InterfaceMethodTypeDescription | typelib_InterfaceMethodTypeDescription
| Type description of an interface method.
typedef struct _typelib_InterfaceAttributeTypeDescription | typelib_InterfaceAttributeTypeDescription
| The description of an interface attribute.
typedef struct SAL_DLLPUBLIC_RTTI _typelib_InterfaceTypeDescription | typelib_InterfaceTypeDescription
| Type description of an interface.
typedef struct _typelib_CompoundMember_Init | typelib_CompoundMember_Init
| Init struct of compound members for typelib_typedescription_new().
typedef struct _typelib_StructMember_Init | typelib_StructMember_Init
| Init struct of members for typelib_typedescription_newStruct().
typedef struct _typelib_Parameter_Init | typelib_Parameter_Init
| Init struct of interface methods for typelib_typedescription_new().
typedef void(*) | typelib_typedescription_Callback(void *pContext, typelib_TypeDescription **ppRet, rtl_uString *pTypeName)
| Function pointer declaration of callback function get additional descriptions.

## Functions
CPPU_DLLPUBLIC void | typelib_typedescription_newEnum (typelib_TypeDescription **ppRet, rtl_uString *pTypeName, sal_Int32 nDefaultValue, sal_Int32 nEnumValues, rtl_uString **ppEnumNames, sal_Int32 *pEnumValues) SAL_THROW_EXTERN_C()
| Creates an enum type description.
CPPU_DLLPUBLIC void | typelib_typedescription_new (typelib_TypeDescription **ppRet, typelib_TypeClass eTypeClass, rtl_uString *pTypeName, typelib_TypeDescriptionReference *pType, sal_Int32 nMembers, typelib_CompoundMember_Init *pMembers) SAL_THROW_EXTERN_C()
| Creates a new type description.
CPPU_DLLPUBLIC void | typelib_typedescription_newStruct (typelib_TypeDescription **ppRet, rtl_uString *pTypeName, typelib_TypeDescriptionReference *pType, sal_Int32 nMembers, typelib_StructMember_Init *pMembers) SAL_THROW_EXTERN_C()
| Creates a new struct type description.
CPPU_DLLPUBLIC void | typelib_typedescription_newInterface (typelib_InterfaceTypeDescription **ppRet, rtl_uString *pTypeName, sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5, typelib_TypeDescriptionReference *pBaseInterface, sal_Int32 nMembers, typelib_TypeDescriptionReference **ppMembers) SAL_THROW_EXTERN_C()
| Creates an interface type description.
CPPU_DLLPUBLIC void | typelib_typedescription_newMIInterface (typelib_InterfaceTypeDescription **ppRet, rtl_uString *pTypeName, sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5, sal_Int32 nBaseInterfaces, typelib_TypeDescriptionReference **ppBaseInterfaces, sal_Int32 nMembers, typelib_TypeDescriptionReference **ppMembers) SAL_THROW_EXTERN_C()
| Creates a multiple-inheritance interface type description.
CPPU_DLLPUBLIC void | typelib_typedescription_newInterfaceMethod (typelib_InterfaceMethodTypeDescription **ppRet, sal_Int32 nAbsolutePosition, sal_Bool bOneWay, rtl_uString *pMethodName, typelib_TypeClass eReturnTypeClass, rtl_uString *pReturnTypeName, sal_Int32 nParams, typelib_Parameter_Init *pParams, sal_Int32 nExceptions, rtl_uString **ppExceptionNames) SAL_THROW_EXTERN_C()
| Creates an interface method type description.
CPPU_DLLPUBLIC void | typelib_typedescription_newInterfaceAttribute (typelib_InterfaceAttributeTypeDescription **ppRet, sal_Int32 nAbsolutePosition, rtl_uString *pAttributeName, typelib_TypeClass eAttributeTypeClass, rtl_uString *pAttributeTypeName, sal_Bool bReadOnly) SAL_THROW_EXTERN_C()
| Creates an interface attribute type description.
CPPU_DLLPUBLIC void | typelib_typedescription_newExtendedInterfaceAttribute (typelib_InterfaceAttributeTypeDescription **ppRet, sal_Int32 nAbsolutePosition, rtl_uString *pAttributeName, typelib_TypeClass eAttributeTypeClass, rtl_uString *pAttributeTypeName, sal_Bool bReadOnly, sal_Int32 nGetExceptions, rtl_uString **ppGetExceptionNames, sal_Int32 nSetExceptions, rtl_uString **ppSetExceptionNames) SAL_THROW_EXTERN_C()
| Creates an extended interface attribute type description.
CPPU_DLLPUBLIC void | typelib_typedescription_acquire (typelib_TypeDescription *pDesc) SAL_THROW_EXTERN_C()
| Increments reference count of given type description.
CPPU_DLLPUBLIC void | typelib_typedescription_release (typelib_TypeDescription *pDesc) SAL_THROW_EXTERN_C()
| Decrements reference count of given type.
CPPU_DLLPUBLIC void | typelib_typedescription_register (typelib_TypeDescription **ppNewDescription) SAL_THROW_EXTERN_C()
| Registers a type description and creates a type description reference.
CPPU_DLLPUBLIC sal_Bool | typelib_typedescription_equals (const typelib_TypeDescription *p1, const typelib_TypeDescription *p2) SAL_THROW_EXTERN_C()
| Tests whether two types descriptions are equal, i.e.
CPPU_DLLPUBLIC void | typelib_typedescription_getByName (typelib_TypeDescription **ppRet, rtl_uString *pName) SAL_THROW_EXTERN_C()
| Retrieves a type description via its fully qualified name.
CPPU_DLLPUBLIC void | typelib_setCacheSize (sal_Int32 nNewSize) SAL_THROW_EXTERN_C()
| Sets size of type description cache.
CPPU_DLLPUBLIC void | typelib_typedescription_registerCallback (void *pContext, typelib_typedescription_Callback pCallback) SAL_THROW_EXTERN_C()
| Registers callback function providing additional type descriptions.
CPPU_DLLPUBLIC void | typelib_typedescription_revokeCallback (void *pContext, typelib_typedescription_Callback pCallback) SAL_THROW_EXTERN_C()
| Revokes a previously registered callback function.
CPPU_DLLPUBLIC void | typelib_typedescriptionreference_new (typelib_TypeDescriptionReference **ppTDR, typelib_TypeClass eTypeClass, rtl_uString *pTypeName) SAL_THROW_EXTERN_C()
| Creates a type description reference.
CPPU_DLLPUBLIC void | typelib_typedescriptionreference_newByAsciiName (typelib_TypeDescriptionReference **ppTDR, typelib_TypeClass eTypeClass, const char *pTypeName) SAL_THROW_EXTERN_C()
| Creates a type description reference.
CPPU_DLLPUBLIC void | typelib_typedescriptionreference_acquire (typelib_TypeDescriptionReference *pRef) SAL_THROW_EXTERN_C()
| Increments reference count of type description reference.
CPPU_DLLPUBLIC void | typelib_typedescriptionreference_release (typelib_TypeDescriptionReference *pRef) SAL_THROW_EXTERN_C()
| Increments reference count of type description reference.
CPPU_DLLPUBLIC void | typelib_typedescriptionreference_getDescription (typelib_TypeDescription **ppRet, typelib_TypeDescriptionReference *pRef) SAL_THROW_EXTERN_C()
| Retrieves the type description for a given reference.
CPPU_DLLPUBLIC sal_Bool | typelib_typedescriptionreference_equals (const typelib_TypeDescriptionReference *p1, const typelib_TypeDescriptionReference *p2) SAL_THROW_EXTERN_C()
| Tests whether two types description references are equal, i.e.
CPPU_DLLPUBLIC void | typelib_typedescriptionreference_assign (typelib_TypeDescriptionReference **ppDest, typelib_TypeDescriptionReference *pSource) SAL_THROW_EXTERN_C()
| Assigns a type.
CPPU_DLLPUBLIC sal_Bool | typelib_typedescription_isAssignableFrom (typelib_TypeDescription *pAssignable, typelib_TypeDescription *pFrom) SAL_THROW_EXTERN_C()
| Tests if values of type pAssignable can be assigned by values of type pFrom.
CPPU_DLLPUBLIC sal_Bool | typelib_typedescriptionreference_isAssignableFrom (typelib_TypeDescriptionReference *pAssignable, typelib_TypeDescriptionReference *pFrom) SAL_THROW_EXTERN_C()
| Tests if values of type pAssignable can be assigned by values of type pFrom.
CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** | typelib_static_type_getByTypeClass (typelib_TypeClass eTypeClass) SAL_THROW_EXTERN_C()
| Gets static type reference of standard types by type class.
CPPU_DLLPUBLIC void | typelib_static_type_init (typelib_TypeDescriptionReference **ppRef, typelib_TypeClass eTypeClass, const char *pTypeName) SAL_THROW_EXTERN_C()
| Inits static type reference.
CPPU_DLLPUBLIC void | typelib_static_sequence_type_init (typelib_TypeDescriptionReference **ppRef, typelib_TypeDescriptionReference *pElementType) SAL_THROW_EXTERN_C()
| Inits static sequence type reference.
CPPU_DLLPUBLIC void | typelib_static_compound_type_init (typelib_TypeDescriptionReference **ppRef, typelib_TypeClass eTypeClass, const char *pTypeName, typelib_TypeDescriptionReference *pBaseType, sal_Int32 nMembers, typelib_TypeDescriptionReference **ppMembers) SAL_THROW_EXTERN_C()
| Inits incomplete static compound type reference.
CPPU_DLLPUBLIC void | typelib_static_struct_type_init (typelib_TypeDescriptionReference **ppRef, const char *pTypeName, typelib_TypeDescriptionReference *pBaseType, sal_Int32 nMembers, typelib_TypeDescriptionReference **ppMembers, sal_Bool const *pParameterizedTypes) SAL_THROW_EXTERN_C()
| Inits incomplete static struct type reference.
CPPU_DLLPUBLIC void | typelib_static_interface_type_init (typelib_TypeDescriptionReference **ppRef, const char *pTypeName, typelib_TypeDescriptionReference *pBaseType) SAL_THROW_EXTERN_C()
| Inits incomplete static interface type reference.
CPPU_DLLPUBLIC void | typelib_static_mi_interface_type_init (typelib_TypeDescriptionReference **ppRef, const char *pTypeName, sal_Int32 nBaseTypes, typelib_TypeDescriptionReference **ppBaseTypes) SAL_THROW_EXTERN_C()
| Inits incomplete static multiple-inheritance interface type reference.
CPPU_DLLPUBLIC void | typelib_static_enum_type_init (typelib_TypeDescriptionReference **ppRef, const char *pTypeName, sal_Int32 nDefaultValue) SAL_THROW_EXTERN_C()
| Inits incomplete static enum type reference.
CPPU_DLLPUBLIC sal_Bool | typelib_typedescription_complete (typelib_TypeDescription **ppTypeDescr) SAL_THROW_EXTERN_C()
| Completes a typedescription to be used for, e.g., marshalling values.

## Typedef Documentation

## ◆ typelib_CompoundMember_Init

typedef struct _typelib_CompoundMember_Init typelib_CompoundMember_Init

Init struct of compound members for typelib_typedescription_new().

## ◆ typelib_CompoundTypeDescription

typedef struct _typelib_CompoundTypeDescription typelib_CompoundTypeDescription

Type description for exception types.

## ◆ typelib_EnumTypeDescription

typedef struct _typelib_EnumTypeDescription typelib_EnumTypeDescription

Type description of an enum.

The type class of this description is typelib_TypeClass_ENUM.

## ◆ typelib_IndirectTypeDescription

typedef struct _typelib_IndirectTypeDescription typelib_IndirectTypeDescription

Type description of a sequence.

## ◆ typelib_InterfaceAttributeTypeDescription

typedef struct _typelib_InterfaceAttributeTypeDescription typelib_InterfaceAttributeTypeDescription

The description of an interface attribute.

The type class of this description is typelib_TypeClass_INTERFACE_ATTRIBUTE. The size and the alignment are 0.

## ◆ typelib_InterfaceMemberTypeDescription

typedef struct _typelib_InterfaceMemberTypeDescription typelib_InterfaceMemberTypeDescription

Common base type description of typelib_InterfaceMethodTypeDescription and typelib_InterfaceAttributeTypeDescription.

## ◆ typelib_InterfaceMethodTypeDescription

typedef struct _typelib_InterfaceMethodTypeDescription typelib_InterfaceMethodTypeDescription

Type description of an interface method.

The type class of this description is typelib_TypeClass_INTERFACE_METHOD. The size and the alignment are 0.

## ◆ typelib_InterfaceTypeDescription

typedef struct SAL_DLLPUBLIC_RTTI _typelib_InterfaceTypeDescription typelib_InterfaceTypeDescription

Type description of an interface.

Not all members are always initialized (not yet initialized members being null); there are three levels:

- Minimally, only `aBase`, `pBaseTypeDescription`, `aUik`, `nBaseTypes`, and `ppBaseTypes` are initialized; `aBase.bComplete` is false. This only happens when an interface type description is created with `typelib_static_mi_interface_type_init` or `typelib_static_interface_type_init`.

- At the next level, `nMembers`, `ppMembers`, `nAllMembers`, `ppAllMembers` are also initialized; `aBase.bComplete` is still false. This happens when an interface type description is created with `typelib_typedescription_newMIInterface` or `typelib_typedescription_newInterface`.

- At the final level, `pMapMemberIndexToFunctionIndex`, `nMapFunctionIndexToMemberIndex`, and `pMapFunctionIndexToMemberIndex` are also initialized; `aBase.bComplete` is true. This happens after a call to `typelib_typedescription_complete`.

## ◆ typelib_MethodParameter

typedef struct _typelib_MethodParameter typelib_MethodParameter

Description of an interface method parameter.

## ◆ typelib_Parameter_Init

typedef struct _typelib_Parameter_Init typelib_Parameter_Init

Init struct of interface methods for typelib_typedescription_new().

## ◆ typelib_StructMember_Init

typedef struct _typelib_StructMember_Init typelib_StructMember_Init

Init struct of members for typelib_typedescription_newStruct().

Since
  UDK 3.2.0

## ◆ typelib_StructTypeDescription

typedef struct _typelib_StructTypeDescription typelib_StructTypeDescription

Type description for struct types.

This is only used to represent plain struct types and instantiated polymorphic struct types; there is no representation of polymorphic struct type templates at this level.

Since
  UDK 3.2.0

## ◆ typelib_TypeDescription

typedef struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescription typelib_TypeDescription

Full type description of a type.

Memory layout of this struct is identical to the typelib_TypeDescriptionReference for the first six members. So a typedescription can be used as type reference.

## ◆ typelib_typedescription_Callback

typedef void(*) typelib_typedescription_Callback(void *pContext, typelib_TypeDescription **ppRet, rtl_uString *pTypeName)

Function pointer declaration of callback function get additional descriptions.

Callbacks must provide complete type descriptions (see typelib_typedescription_complete())!

Parameters

  pContext | callback context
  ppRet | inout type description
  pTypeName | name of demanded type description

## ◆ typelib_TypeDescriptionReference

typedef struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescriptionReference typelib_TypeDescriptionReference

Holds a weak reference to a type description.

## Function Documentation

## ◆ typelib_setCacheSize()

CPPU_DLLPUBLIC void typelib_setCacheSize | ( | sal_Int32 | nNewSize | ) |

Sets size of type description cache.

Parameters

  nNewSize | new size of cache

Deprecated
  Do not use, it does not have any effect.

## ◆ typelib_static_compound_type_init()

CPPU_DLLPUBLIC void typelib_static_compound_type_init | ( | typelib_TypeDescriptionReference ** | ppRef,
|  | typelib_TypeClass | eTypeClass,
|  | const char * | pTypeName,
|  | typelib_TypeDescriptionReference * | pBaseType,
|  | sal_Int32 | nMembers,
|  | typelib_TypeDescriptionReference ** | ppMembers )

Inits incomplete static compound type reference.

Thread synchronizes on typelib init mutex.

Since this function can only be used to create type descriptions for plain struct types, not for instantiated polymorphic struct types, the function typelib_static_struct_type_init should be used instead for all struct types.

Parameters

  ppRef | pointer to type reference pointer
  eTypeClass | typelib_TypeClass_STRUCT or typelib_TypeClass_EXCEPTION
  pTypeName | name of type
  pBaseType | base type
  nMembers | number of members
  ppMembers | member types

## ◆ typelib_static_enum_type_init()

CPPU_DLLPUBLIC void typelib_static_enum_type_init | ( | typelib_TypeDescriptionReference ** | ppRef,
|  | const char * | pTypeName,
|  | sal_Int32 | nDefaultValue )

Inits incomplete static enum type reference.

Thread synchronizes on typelib init mutex.

Parameters

  ppRef | pointer to type reference pointer
  pTypeName | name of enum
  nDefaultValue | default enum value

## ◆ typelib_static_interface_type_init()

CPPU_DLLPUBLIC void typelib_static_interface_type_init | ( | typelib_TypeDescriptionReference ** | ppRef,
|  | const char * | pTypeName,
|  | typelib_TypeDescriptionReference * | pBaseType )

Inits incomplete static interface type reference.

Thread synchronizes on typelib init mutex.

Parameters

  ppRef | pointer to type reference pointer
  pTypeName | name of interface
  pBaseType | base type

## ◆ typelib_static_mi_interface_type_init()

CPPU_DLLPUBLIC void typelib_static_mi_interface_type_init | ( | typelib_TypeDescriptionReference ** | ppRef,
|  | const char * | pTypeName,
|  | sal_Int32 | nBaseTypes,
|  | typelib_TypeDescriptionReference ** | ppBaseTypes )

Inits incomplete static multiple-inheritance interface type reference.

Thread synchronizes on typelib init mutex.

Parameters

  ppRef | pointer to type reference pointer
  pTypeName | name of interface
  nBaseTypes | number of base types
  ppBaseTypes | base types

Since
  UDK 3.2.0

## ◆ typelib_static_sequence_type_init()

CPPU_DLLPUBLIC void typelib_static_sequence_type_init | ( | typelib_TypeDescriptionReference ** | ppRef,
|  | typelib_TypeDescriptionReference * | pElementType )

Inits static sequence type reference.

Thread synchronizes on typelib init mutex.

Parameters

  ppRef | pointer to type reference pointer
  pElementType | element type of sequence

## ◆ typelib_static_struct_type_init()

CPPU_DLLPUBLIC void typelib_static_struct_type_init | ( | typelib_TypeDescriptionReference ** | ppRef,
|  | const char * | pTypeName,
|  | typelib_TypeDescriptionReference * | pBaseType,
|  | sal_Int32 | nMembers,
|  | typelib_TypeDescriptionReference ** | ppMembers,
|  | sal_Bool const * | pParameterizedTypes )

Inits incomplete static struct type reference.

Thread synchronizes on typelib init mutex.

Parameters

  ppRef | pointer to type reference pointer
  pTypeName | name of type
  pBaseType | base type
  nMembers | number of members
  ppMembers | member types
  pParameterizedTypes | flags for direct members, specifying whether they are of parameterized type (true) or explicit type (false); must be null for a plain struct type

Since
  UDK 3.2.0

## ◆ typelib_static_type_getByTypeClass()

CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** typelib_static_type_getByTypeClass | ( | typelib_TypeClass | eTypeClass | ) |

Gets static type reference of standard types by type class.

ADDITIONAL OPT: provides Type com.sun.star.uno.Exception for typelib_TypeClass_EXCEPTION and com.sun.star.uno.XInterface for typelib_TypeClass_INTERFACE.

Thread synchronizes on typelib mutex.

Parameters

  eTypeClass | type class of basic type

Returns
  pointer to type reference pointer

## ◆ typelib_static_type_init()

CPPU_DLLPUBLIC void typelib_static_type_init | ( | typelib_TypeDescriptionReference ** | ppRef,
|  | typelib_TypeClass | eTypeClass,
|  | const char * | pTypeName )

Inits static type reference.

Thread synchronizes on typelib init mutex.

Parameters

  ppRef | pointer to type reference pointer
  eTypeClass | type class of type
  pTypeName | ascii name of type

## ◆ typelib_typedescription_acquire()

CPPU_DLLPUBLIC void typelib_typedescription_acquire | ( | typelib_TypeDescription * | pDesc | ) |

Increments reference count of given type description.

Parameters

  pDesc | type description

## ◆ typelib_typedescription_complete()

CPPU_DLLPUBLIC sal_Bool typelib_typedescription_complete | ( | typelib_TypeDescription ** | ppTypeDescr | ) |

Completes a typedescription to be used for, e.g., marshalling values.

COMPOUND, INTERFACE and ENUM type descriptions may be partly initialized (see typelib_static_...(), typelib_TypeDescription::bComplete). For interface type descriptions, this will also init index tables.

Parameters

  ppTypeDescr | [inout] type description to be completed (may be exchanged!)

Returns
  true, if type description is complete

## ◆ typelib_typedescription_equals()

CPPU_DLLPUBLIC sal_Bool typelib_typedescription_equals | ( | const typelib_TypeDescription * | p1,
|  | const typelib_TypeDescription * | p2 )

Tests whether two types descriptions are equal, i.e.

type class and names are equal.

Parameters

  p1 | a type description
  p2 | another type description

Returns
  true, if type descriptions are equal

## ◆ typelib_typedescription_getByName()

CPPU_DLLPUBLIC void typelib_typedescription_getByName | ( | typelib_TypeDescription ** | ppRet,
|  | rtl_uString * | pName )

Retrieves a type description via its fully qualified name.

Parameters

  ppRet | inout type description; *ppRet is 0, if type description was not found
  pName | name demanded type description

## ◆ typelib_typedescription_isAssignableFrom()

CPPU_DLLPUBLIC sal_Bool typelib_typedescription_isAssignableFrom | ( | typelib_TypeDescription * | pAssignable,
|  | typelib_TypeDescription * | pFrom )

Tests if values of type pAssignable can be assigned by values of type pFrom.

This includes widening conversion (e.g., long assignable from short), as long as there is no data loss.

Parameters

  pAssignable | type description of value to be assigned
  pFrom | type description of value

## ◆ typelib_typedescription_new()

CPPU_DLLPUBLIC void typelib_typedescription_new | ( | typelib_TypeDescription ** | ppRet,
|  | typelib_TypeClass | eTypeClass,
|  | rtl_uString * | pTypeName,
|  | typelib_TypeDescriptionReference * | pType,
|  | sal_Int32 | nMembers,
|  | typelib_CompoundMember_Init * | pMembers )

Creates a new type description.

Since this function can only be used to create type descriptions for plain struct types, not for instantiated polymorphic struct types, the function typelib_typedescription_newStruct should be used instead for all struct types.

Parameters

  ppRet | inout type description
  eTypeClass | type class
  pTypeName | name of type
  pType | sequence: element type; struct, Exception: base type;
  nMembers | number of members if struct, exception
  pMembers | array of members if struct, exception

## ◆ typelib_typedescription_newEnum()

CPPU_DLLPUBLIC void typelib_typedescription_newEnum | ( | typelib_TypeDescription ** | ppRet,
|  | rtl_uString * | pTypeName,
|  | sal_Int32 | nDefaultValue,
|  | sal_Int32 | nEnumValues,
|  | rtl_uString ** | ppEnumNames,
|  | sal_Int32 * | pEnumValues )

Creates an enum type description.

Parameters

  ppRet | inout enum type description
  pTypeName | name of enum
  nDefaultValue | default enum value
  nEnumValues | number of enum values
  ppEnumNames | names of enum values
  pEnumValues | enum values

## ◆ typelib_typedescription_newExtendedInterfaceAttribute()

CPPU_DLLPUBLIC void typelib_typedescription_newExtendedInterfaceAttribute | ( | typelib_InterfaceAttributeTypeDescription ** | ppRet,
|  | sal_Int32 | nAbsolutePosition,
|  | rtl_uString * | pAttributeName,
|  | typelib_TypeClass | eAttributeTypeClass,
|  | rtl_uString * | pAttributeTypeName,
|  | sal_Bool | bReadOnly,
|  | sal_Int32 | nGetExceptions,
|  | rtl_uString ** | ppGetExceptionNames,
|  | sal_Int32 | nSetExceptions,
|  | rtl_uString ** | ppSetExceptionNames )

Creates an extended interface attribute type description.

Parameters

  ppRet | inout attribute type description
  nAbsolutePosition | position of this attribute including all members of base interfaces
  pAttributeName | fully qualified name of attribute including interface name
  eAttributeTypeClass | type class of attribute type
  pAttributeTypeName | type name of attribute type
  bReadOnly | determines whether attribute is read-only
  nGetExceptions | number of getter exceptions
  ppGetExceptionNames | type names of getter exceptions
  nSetExceptions | number of setter exceptions
  ppSetExceptionNames | type names of setter exceptions

Since
  UDK 3.2.0

## ◆ typelib_typedescription_newInterface()

CPPU_DLLPUBLIC void typelib_typedescription_newInterface | ( | typelib_InterfaceTypeDescription ** | ppRet,
|  | rtl_uString * | pTypeName,
|  | sal_uInt32 | nUik1,
|  | sal_uInt16 | nUik2,
|  | sal_uInt16 | nUik3,
|  | sal_uInt32 | nUik4,
|  | sal_uInt32 | nUik5,
|  | typelib_TypeDescriptionReference * | pBaseInterface,
|  | sal_Int32 | nMembers,
|  | typelib_TypeDescriptionReference ** | ppMembers )

Creates an interface type description.

Parameters

  ppRet | inout interface type description
  pTypeName | the fully qualified name of the interface.
  nUik1 | uik part; deprecated and ignored, should always be 0
  nUik2 | uik part; deprecated and ignored, should always be 0
  nUik3 | uik part; deprecated and ignored, should always be 0
  nUik4 | uik part; deprecated and ignored, should always be 0
  nUik5 | uik part; deprecated and ignored, should always be 0
  pBaseInterface | base interface type, else 0
  nMembers | number of members
  ppMembers | members; attributes or methods

Deprecated
  use typelib_typedescription_newMIInterface instead

## ◆ typelib_typedescription_newInterfaceAttribute()

CPPU_DLLPUBLIC void typelib_typedescription_newInterfaceAttribute | ( | typelib_InterfaceAttributeTypeDescription ** | ppRet,
|  | sal_Int32 | nAbsolutePosition,
|  | rtl_uString * | pAttributeName,
|  | typelib_TypeClass | eAttributeTypeClass,
|  | rtl_uString * | pAttributeTypeName,
|  | sal_Bool | bReadOnly )

Creates an interface attribute type description.

Parameters

  ppRet | inout attribute type description
  nAbsolutePosition | position of this attribute including all members of base interfaces
  pAttributeName | fully qualified name of attribute including interface name
  eAttributeTypeClass | type class of attribute type
  pAttributeTypeName | type name of attribute type
  bReadOnly | determines whether attribute is read-only

Deprecated
  use typelib_typedescription_newExtendedInterfaceAttribute instead

## ◆ typelib_typedescription_newInterfaceMethod()

CPPU_DLLPUBLIC void typelib_typedescription_newInterfaceMethod | ( | typelib_InterfaceMethodTypeDescription ** | ppRet,
|  | sal_Int32 | nAbsolutePosition,
|  | sal_Bool | bOneWay,
|  | rtl_uString * | pMethodName,
|  | typelib_TypeClass | eReturnTypeClass,
|  | rtl_uString * | pReturnTypeName,
|  | sal_Int32 | nParams,
|  | typelib_Parameter_Init * | pParams,
|  | sal_Int32 | nExceptions,
|  | rtl_uString ** | ppExceptionNames )

Creates an interface method type description.

Parameters

  ppRet | inout method type description
  nAbsolutePosition | position of member including all members of base interfaces
  bOneWay | determines whether method is declared oneway
  pMethodName | fully qualified name of method including interface name
  eReturnTypeClass | type class of return type
  pReturnTypeName | type name of the return type
  nParams | number of parameters
  pParams | parameter types
  nExceptions | number of exceptions
  ppExceptionNames | type names of exceptions

## ◆ typelib_typedescription_newMIInterface()

CPPU_DLLPUBLIC void typelib_typedescription_newMIInterface | ( | typelib_InterfaceTypeDescription ** | ppRet,
|  | rtl_uString * | pTypeName,
|  | sal_uInt32 | nUik1,
|  | sal_uInt16 | nUik2,
|  | sal_uInt16 | nUik3,
|  | sal_uInt32 | nUik4,
|  | sal_uInt32 | nUik5,
|  | sal_Int32 | nBaseInterfaces,
|  | typelib_TypeDescriptionReference ** | ppBaseInterfaces,
|  | sal_Int32 | nMembers,
|  | typelib_TypeDescriptionReference ** | ppMembers )

Creates a multiple-inheritance interface type description.

Parameters

  ppRet | inout interface type description
  pTypeName | the fully qualified name of the interface.
  nUik1 | uik part; deprecated and ignored, should always be 0
  nUik2 | uik part; deprecated and ignored, should always be 0
  nUik3 | uik part; deprecated and ignored, should always be 0
  nUik4 | uik part; deprecated and ignored, should always be 0
  nUik5 | uik part; deprecated and ignored, should always be 0
  nBaseInterfaces | number of base interface types
  ppBaseInterfaces | base interface types
  nMembers | number of members
  ppMembers | members; attributes or methods

Since
  UDK 3.2.0

## ◆ typelib_typedescription_newStruct()

CPPU_DLLPUBLIC void typelib_typedescription_newStruct | ( | typelib_TypeDescription ** | ppRet,
|  | rtl_uString * | pTypeName,
|  | typelib_TypeDescriptionReference * | pType,
|  | sal_Int32 | nMembers,
|  | typelib_StructMember_Init * | pMembers )

Creates a new struct type description.

Parameters

  ppRet | inout type description
  pTypeName | name of type
  pType | base type;
  nMembers | number of members
  pMembers | array of members

Since
  UDK 3.2.0

## ◆ typelib_typedescription_register()

CPPU_DLLPUBLIC void typelib_typedescription_register | ( | typelib_TypeDescription ** | ppNewDescription | ) |

Registers a type description and creates a type description reference.

Type descriptions will be registered automatically if they are provided via the callback chain.

Parameters

  ppNewDescription | inout description to be registered;

## ◆ typelib_typedescription_registerCallback()

CPPU_DLLPUBLIC void typelib_typedescription_registerCallback | ( | void * | pContext,
|  | typelib_typedescription_Callback | pCallback )

Registers callback function providing additional type descriptions.

Parameters

  pContext | callback context
  pCallback | callback function

## ◆ typelib_typedescription_release()

CPPU_DLLPUBLIC void typelib_typedescription_release | ( | typelib_TypeDescription * | pDesc | ) |

Decrements reference count of given type.

If reference count reaches 0, the type description is deleted.

Parameters

  pDesc | type description

## ◆ typelib_typedescription_revokeCallback()

CPPU_DLLPUBLIC void typelib_typedescription_revokeCallback | ( | void * | pContext,
|  | typelib_typedescription_Callback | pCallback )

Revokes a previously registered callback function.

Parameters

  pContext | callback context
  pCallback | registered callback function

## ◆ typelib_typedescriptionreference_acquire()

CPPU_DLLPUBLIC void typelib_typedescriptionreference_acquire | ( | typelib_TypeDescriptionReference * | pRef | ) |

Increments reference count of type description reference.

Parameters

  pRef | type description reference

## ◆ typelib_typedescriptionreference_assign()

CPPU_DLLPUBLIC void typelib_typedescriptionreference_assign | ( | typelib_TypeDescriptionReference ** | ppDest,
|  | typelib_TypeDescriptionReference * | pSource )

Assigns a type.

Parameters

  ppDest | destination type
  pSource | source type

## ◆ typelib_typedescriptionreference_equals()

CPPU_DLLPUBLIC sal_Bool typelib_typedescriptionreference_equals | ( | const typelib_TypeDescriptionReference * | p1,
|  | const typelib_TypeDescriptionReference * | p2 )

Tests whether two types description references are equal, i.e.

type class and names are equal.

Parameters

  p1 | a type description reference
  p2 | another type description reference

Returns
  true, if type description references are equal

## ◆ typelib_typedescriptionreference_getDescription()

CPPU_DLLPUBLIC void typelib_typedescriptionreference_getDescription | ( | typelib_TypeDescription ** | ppRet,
|  | typelib_TypeDescriptionReference * | pRef )

Retrieves the type description for a given reference.

If it is not possible to resolve the reference, null is returned.

Parameters

  [in,out] | ppRet | type description
  [in] | pRef | type description reference

## ◆ typelib_typedescriptionreference_isAssignableFrom()

CPPU_DLLPUBLIC sal_Bool typelib_typedescriptionreference_isAssignableFrom | ( | typelib_TypeDescriptionReference * | pAssignable,
|  | typelib_TypeDescriptionReference * | pFrom )

Tests if values of type pAssignable can be assigned by values of type pFrom.

This includes widening conversion (e.g., long assignable from short), as long as there is no data loss.

Parameters

  pAssignable | type of value to be assigned
  pFrom | type of value

## ◆ typelib_typedescriptionreference_new()

CPPU_DLLPUBLIC void typelib_typedescriptionreference_new | ( | typelib_TypeDescriptionReference ** | ppTDR,
|  | typelib_TypeClass | eTypeClass,
|  | rtl_uString * | pTypeName )

Creates a type description reference.

This is a weak reference not holding the description. If the description is already registered, the previous one is returned.

Parameters

  ppTDR | inout type description reference
  eTypeClass | type class of type
  pTypeName | name of type

## ◆ typelib_typedescriptionreference_newByAsciiName()

CPPU_DLLPUBLIC void typelib_typedescriptionreference_newByAsciiName | ( | typelib_TypeDescriptionReference ** | ppTDR,
|  | typelib_TypeClass | eTypeClass,
|  | const char * | pTypeName )

Creates a type description reference.

This is a weak reference not holding the description. If the description is already registered, the previous one is returned.

Parameters

  ppTDR | inout type description reference
  eTypeClass | type class of type
  pTypeName | ascii name of type

## ◆ typelib_typedescriptionreference_release()

CPPU_DLLPUBLIC void typelib_typedescriptionreference_release | ( | typelib_TypeDescriptionReference * | pRef | ) |

Increments reference count of type description reference.

If the reference count reaches 0, then the reference is deleted.

Parameters

  pRef | type description reference