Navigation using names#
Access to a model element by its name is done with namespace-based navigation.
Name objects are:
Global: sensor, constant, type, group, or operator declaration
Local: input/output of an operator, a flow defined with var.
Objects can be found in another module, or can be hidden (an input by a local flow for instance).
The get_declaration()
function returns:
The global object (if any) with a given name (either an id, or module::id form), from the
ModuleBody
andModuleInterface
.The object (if any) with a given name (either an id, or module::id form) in the current scope, or in the enclosing scope, possibly reaching the module level, from the
Scope
.
See also Navigation using names for a detailed example.