maxon.Registry

Description

Registries are used to register specific implementations of a given interface.
An implementation that is registered in such a registry can then be accessed with a specific ID from anywhere in the application.

Methods Signature

Get(eid)

Retrieves the object stored with the given maxon.Id within the current registry.

GetEntries()

Retrieve a RegistryIterator that can be iterate with a for loop.

GetId()

Return the identifier of this registry.

Insert(eid, object)

Inserts a new entry into the current registry.

Methods Definition

classmethod Registry.Get(eid)

Retrieves the object stored with the given maxon.Id within the current registry.

Parameters

eid (maxon.Id) – The object identifier to access into the registry.

Returns

The object stored in the current registry matching the maxon.Id.

Return type

Any

Raises

LookupError – If value not inside the registry.

classmethod Registry.GetEntries()

Retrieve a RegistryIterator that can be iterate with a for loop.

Returns

an iterator.

classmethod Registry.GetId()

Return the identifier of this registry.

Returns

The identifier of this registry.

Return type

maxon.Id

classmethod Registry.Insert(eid, object)

Inserts a new entry into the current registry.

Parameters
  • eid (maxon.Id) – The identifier of the object.

  • object (Any) – The object to store into the registry.

Returns