ooodev.adapter.reflection.type_description_enumeration_access_partial module

class ooodev.adapter.reflection.type_description_enumeration_access_partial.TypeDescriptionEnumerationAccessPartial(component, interface=com.sun.star.reflection.XTypeDescriptionEnumerationAccess)[source]

Bases: object

Partial class for XTypeDescriptionEnumerationAccess.

Parameters:
  • component (XTypeDescriptionEnumerationAccess) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.reflection.XTypeDescriptionEnumerationAccess)[source]

Constructor

Parameters:
  • component (XTypeDescriptionEnumerationAccess) – UNO Component that implements com.sun.star.reflection.XTypeDescriptionEnumerationAccess interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XTypeDescriptionEnumerationAccess.

Return type:

None

create_type_description_enumeration(module_name, depth, *types)[source]

Creates an enumeration for type descriptions.

An enumeration is always created for a UNOIDL module. The enumeration contents can be restricted by specifying type classes. Only types that match one of the supplied type classes will be part of the collection. Additionally, it is possible to specify the depth for the search within the underlying type description tree.

Valid types classes are:

The enumeration returns implementations of XTypeDescription. Following concrete UNOIDL parts represented by specialized interfaces derived from XTypeDescription can be returned by the enumerator:

Parameters:
  • module_name (str) – Name of the UNOIDL module.

  • depth (TypeDescriptionSearchDepth) – Depth for the search within the underlying type description tree.

  • types (TypeClass) – One or more type classes. Restricts the contents of the enumeration. It will only contain type descriptions that match one of the supplied type classes. An empty sequence specifies that the enumeration shall contain all type descriptions.

Raises:
  • NoSuchTypeNameExceptionNoSuchTypeNameException

  • InvalidTypeNameExceptionInvalidTypeNameException

Returns:

Enumeration for type descriptions. for x in enums loop can be used to iterate through the enumeration.

Return type:

TypeDescriptionEnumerationComp

Note

Valid types classes are:

  • ooo.dyn.uno.type_class.MODULE

  • ooo.dyn.uno.type_class.INTERFACE

  • ooo.dyn.uno.type_class.SERVICE

  • ooo.dyn.uno.type_class.STRUCT

  • ooo.dyn.uno.type_class.ENUM

  • ooo.dyn.uno.type_class.EXCEPTION

  • ooo.dyn.uno.type_class.TYPEDEF

  • ooo.dyn.uno.type_class.CONSTANT

  • ooo.dyn.uno.type_class.CONSTANTS

  • ooo.dyn.uno.type_class.SINGLETON

Hint

  • TypeClass is an enum and can be imported from ooo.dyn.uno.type_class.