hpcflow.sdk.app.Singleton#
- class hpcflow.sdk.app.Singleton#
-
Metaclass that enforces that only one instance of a class can be made.
Type Parameters#
- T
The type of the class that is a singleton.
Methods
Retrieve the instance of the singleton class if initialised.
Return a type's method resolution order.
- get_instance()#
Retrieve the instance of the singleton class if initialised.
- Raises:
RuntimeError – If there is no instance already.
- Parameters:
cls (Singleton[T]) –
- Return type:
T
- mro()#
Return a type’s method resolution order.