Source code for ooodev.adapter.sdb.parameters_supplier_partial

from __future__ import annotations
from typing import Any, TYPE_CHECKING
import uno

from import XParametersSupplier

from ooodev.exceptions import ex as mEx
from ooodev.loader import lo as mLo

    from import XIndexAccess
    from ooodev.utils.type_var import UnoInterface

[docs]class ParametersSupplierPartial: """ Partial class for XParametersSupplier. """
[docs] def __init__(self, component: XParametersSupplier, interface: UnoInterface | None = XParametersSupplier) -> None: """ Constructor Args: component (XParametersSupplier): UNO Component that implements ```` interface. interface (UnoInterface, optional): The interface to be validated. Defaults to ``XParametersSupplier``. """ def validate(comp: Any, obj_type: Any) -> None: if obj_type is None: return if not mLo.Lo.is_uno_interfaces(comp, obj_type): raise mEx.MissingInterfaceError(obj_type) validate(component, interface) self.__component = component
# region XParametersSupplier
[docs] def get_parameters(self) -> XIndexAccess: """ Returns the container of parameters. Returns: XIndexAccess: The parameters. """ return self.__component.getParameters()
# endregion XParametersSupplier