numerous.engine.system.VariableNamespaceBase

VariableNamespaceBase

class numerous.engine.system.VariableNamespaceBase(item, tag, is_connector=False, _id=UUID('ac501b4a-d58b-11ea-93d5-0242ac110002'))[source]

Represents a set of variables.

add_equations(list_of_equations, update_bindings=True)[source]
Adding a list of equations to namespace. Each equation in the list is parsed and all
required variables are created and registered in the namespace.
Parameters:
  • list_of_equations (list of 'Equation') – list of equations to be added
  • update_bindings (bool) –
    if True creates and register a binding variables in all bindings associated with item
    that namespace is created in.
create_variable(name)[source]

Creates a variable in the namespaces with given name.

Parameters:name (string) – Name of a ‘Variable’
create_variable_from_desc(variable_description)[source]

Creates and register a variable from given description.

Parameters:
  • variable_description ('VariableDescription') – variable_description
  • on_assign_overload ('OverloadAction') – action on assign overload
get_variable(var_tag)[source]

Get a variable with given description.

Parameters:
  • var_description ('VariableDescription') –

    variable_description

    Returns

  • -------
  • variable ('Variable') – returns a variable matching description or None
register_variable(variable)[source]

Registering existing Variable in the namespace.

Parameters:variable ('Variable') – Variable to be registered.