The Template class#

Aliases#

halerium.core.template.Template
class Template(scopetor, name=None, strict=True)#

Template of a scopetor.

By calling the template you create an instance (i.e. a copy) of the templated scopetor.

Parameters:
  • scopetor (halerium.Scopetor) – The scopetor from which to create the template.

  • name (str, optional) – The name of the template. The default is to use the name of the scopetor.

  • strict (bool, optional) – If True the scopetor has to be self-contained. If False not self-contained parts are left out. The default is True.

__call__(name, frame=None)#

Create scopetor instance from the template.

Creates a instance of the templated scopetor in the current scope.

Parameters:
  • name (str) – The name of the instance.

  • frame (optional) – If provided, the frame in which the instance will try to register its name.