LibreOffice: com::sun::star::uno::Type Class Reference

LibreOffice LibreOffice 6.0 SDK C/C++ API Reference

Public Member Functions | List of all members
com::sun::star::uno::Type Class Reference

C++ class representing an IDL meta type. More...

`#include <Type.h>`

## Public Member Functions
| Type ()
| Default Constructor: Type is set to void. More...
| Type (TypeClass eTypeClass, const ::rtl::OUString &rTypeName)
| Constructor: Type is constructed by given name and type class. More...
| Type (TypeClass eTypeClass, const sal_Char *pTypeName)
| Constructor: Type is constructed by given name and type class. More...
| Type (typelib_TypeDescriptionReference *pType)
| Constructor: Type is (copy) constructed by given C type description reference. More...
| Type (typelib_TypeDescriptionReference *pType, UnoType_NoAcquire dummy)
| Constructor: Type is (copy) constructed by given C type description reference without acquiring it. More...
| Type (typelib_TypeDescriptionReference *pType, __sal_NoAcquire dummy)
| Constructor: Type is (copy) constructed by given C type description reference without acquiring it. More...
| Type (const Type &rType)
| Copy constructor: Type is copy constructed by given type. More...
| ~Type ()
| Destructor: Releases acquired C type description reference. More...
Type & | operator= (const Type &rType)
| Assignment operator: Acquires right side type and releases previously set type. More...
TypeClass | getTypeClass () const
| Gets the type class of set type. More...
inline ::rtl::OUString | getTypeName () const
| Gets the name of the set type. More...
void | getDescription (typelib_TypeDescription **ppDescr) const
| Obtains a full type description of set type. More...
typelib_TypeDescriptionReference * | getTypeLibType () const
| Gets the C typelib type description reference pointer. More...
bool | isAssignableFrom (const Type &rType) const
| Tests if values of this reflected type can be assigned by values of given type. More...
bool | equals (const Type &rType) const
| Compares two types. More...
bool | operator== (const Type &rType) const
| Equality operator: Compares two types. More...
bool | operator!= (const Type &rType) const
| Unequality operator: Compares two types. More...

## Detailed Description

C++ class representing an IDL meta type.

This class is used to represent a type, i.e. a type name and its type class. Internally the type holds a C type description reference of the runtime. You can obtain a full type description of a type by calling member function getDescription().

See also
  typelib_TypeDescriptionReference

## Constructor & Destructor Documentation

## ◆ Type() [1/7]

com::sun::star::uno::Type::Type | ( |  | ) |
| inline

Default Constructor: Type is set to void.

## ◆ Type() [2/7]

com::sun::star::uno::Type::Type | ( | TypeClass | eTypeClass,
|  | const ::rtl::OUString & | rTypeName
| ) |  |
| inline

Constructor: Type is constructed by given name and type class.

Parameters

  eTypeClass | type class of type
  rTypeName | name of type

## ◆ Type() [3/7]

com::sun::star::uno::Type::Type | ( | TypeClass | eTypeClass,
|  | const sal_Char * | pTypeName
| ) |  |
| inline

Constructor: Type is constructed by given name and type class.

Parameters

  eTypeClass | type class of type
  pTypeName | name of type

## ◆ Type() [4/7]

com::sun::star::uno::Type::Type | ( | typelib_TypeDescriptionReference * | pType | ) |
| inline

Constructor: Type is (copy) constructed by given C type description reference.

Parameters

  pType | C type description reference

## ◆ Type() [5/7]

com::sun::star::uno::Type::Type | ( | typelib_TypeDescriptionReference * | pType,
|  | UnoType_NoAcquire | dummy
| ) |  |
| inline

Constructor: Type is (copy) constructed by given C type description reference without acquiring it.

Parameters

  pType | C type description reference
  dummy | UNO_TYPE_NO_ACQUIRE to force obvious distinction to other constructors

## ◆ Type() [6/7]

com::sun::star::uno::Type::Type | ( | typelib_TypeDescriptionReference * | pType,
|  | __sal_NoAcquire | dummy
| ) |  |
| inline

Constructor: Type is (copy) constructed by given C type description reference without acquiring it.

Parameters

  pType | C type description reference
  dummy | SAL_NO_ACQUIRE to force obvious distinction to other constructors

## ◆ Type() [7/7]

com::sun::star::uno::Type::Type | ( | const Type & | rType | ) |
| inline

Copy constructor: Type is copy constructed by given type.

Parameters

  rType | another type

## ◆ ~Type()

com::sun::star::uno::Type::~Type | ( |  | ) |
| inline

Destructor: Releases acquired C type description reference.

## Member Function Documentation

## ◆ equals()

bool com::sun::star::uno::Type::equals | ( | const Type & | rType | ) | const
| inline

Compares two types.

Parameters

  rType | another type

Returns
  true if both types refer the same type, false otherwise

## ◆ getDescription()

void com::sun::star::uno::Type::getDescription | ( | typelib_TypeDescription ** | ppDescr | ) | const
| inline

Obtains a full type description of set type.

Parameters

  ppDescr | [inout] type description

## ◆ getTypeClass()

TypeClass com::sun::star::uno::Type::getTypeClass | ( |  | ) | const
| inline

Gets the type class of set type.

Returns
  type class of set type

## ◆ getTypeLibType()

typelib_TypeDescriptionReference* com::sun::star::uno::Type::getTypeLibType | ( |  | ) | const
| inline

Gets the C typelib type description reference pointer.

Does not acquire the reference!

Returns
  UNacquired type description reference

## ◆ getTypeName()

rtl::OUString com::sun::star::uno::Type::getTypeName | ( |  | ) | const
| inline

Gets the name of the set type.

Returns
  name of the set type

## ◆ isAssignableFrom()

bool com::sun::star::uno::Type::isAssignableFrom | ( | const Type & | rType | ) | const
| inline

Tests if values of this reflected type can be assigned by values of given type.

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

Parameters

  rType | another type

Returns
  true if values of this type can be assigned from values of given type, false otherwise

## ◆ operator!=()

bool com::sun::star::uno::Type::operator!= | ( | const Type & | rType | ) | const
| inline

Unequality operator: Compares two types.

Parameters

  rType | another type

Returns
  false if both types refer the same type, true otherwise

## ◆ operator=()

Type & com::sun::star::uno::Type::operator= | ( | const Type & | rType | ) |
| inline

Assignment operator: Acquires right side type and releases previously set type.

Parameters

  rType | another type (right side)

Returns
  this type

## ◆ operator==()

bool com::sun::star::uno::Type::operator== | ( | const Type & | rType | ) | const
| inline

Equality operator: Compares two types.

Parameters

  rType | another type

Returns
  true if both types refer the same type, false otherwise

The documentation for this class was generated from the following files:

- com/sun/star/uno/Type.h
- com/sun/star/uno/Type.hxx