Skip to content

hololinked.core.meta.RemoteInvokable

Base class providing additional functionality related to actions, it is not meant to be subclassed directly by the end-user.

UML Diagram

Source code in repo/hololinked/hololinked/core/meta.py
class RemoteInvokable:
    """
    Base class providing additional functionality related to actions, it is not meant to be subclassed directly by the end-user.

    [UML Diagram](https://docs.hololinked.dev/UML/PDF/Thing.pdf)
    """

    id: str

    def __init__(self):
        super().__init__()
        self.create_actions_registry()

    # creating name without underscore causes clash with the metaclass method
    # with same name
    def create_actions_registry(self) -> None:
        """Creates a registry for available `Actions` based on `ActionsRegistry`."""
        self._actions_registry = ActionsRegistry(self.__class__, self)  # ty: ignore[invalid-argument-type]

    @property
    def actions(self) -> ActionsRegistry:
        """Container for the action descriptors of the object."""
        return self._actions_registry

Attributes

actions property

actions: ActionsRegistry

Container for the action descriptors of the object.

Functions

create_actions_registry

create_actions_registry() -> None

Creates a registry for available Actions based on ActionsRegistry.

Source code in repo/hololinked/hololinked/core/meta.py
def create_actions_registry(self) -> None:
    """Creates a registry for available `Actions` based on `ActionsRegistry`."""
    self._actions_registry = ActionsRegistry(self.__class__, self)  # ty: ignore[invalid-argument-type]