Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TM1DirectiveResolver (class in TM1DirectiveResolver.py)

The class is implementing mechanism to select a list of directives applying to certain TM1 rule command or a feeder command out of all available directives in the TM1 rule file. The mechanism is using region membership (scope) of each rule or feeder to select proper list of directives. The directives are selected according to priority given by distance of the rule or feeder command from each region start.

The class defines following attributes:

Attribute

Type

Usage

splice_executor

TM1SpliceExecutor

Link to an instance of TM1SpliceExecutor.

directives_by_scope

Dict[str, List[TM1Directive]]

Dictionary of directives applying to region, indexed by region name.

The class exposes following methods:

Method

Usage

append_directive

Adds a directive to dictionary of directives directives_by_scope.

consume_directive

Called by parser whenever a directive is found during parsing of the TM1 rule file. Creates a new directive and appends it to the internal dictionary.

resolve_directives

Returns a new instance of TM1DirectiveContainer that has been added all applying directives according to region membership.

apply_directives

Resolves and applies directives to an area statement of a TM1 rule or feeder command.

deregister

Functionality was removed, originally served to store last splicing results in a file to be able to rollback to previous rule state.