Skip to content

Make Generator class stateless #1395

@hsorby

Description

@hsorby

The Generator class is semi-stateless, but it holds onto an analyser model when it is asked to perform a function. Making the class fully stateless will remove ambiguity around which analyserModel is currently held as there is no way for the user to know this, wrt. the Generator class.

The Generator class is also not an owner of the AnalyserModel and shouldn’t keep a reference to it.
The Generator class can either hold a weak pointer to the AnalyserModel or drop its reference when it has finished with it.

This issue seeks to either stop mAnalyserModel holding a reference beyond the current function call or retain only a weak pointer. Also make equationCode functions take an analyserModel as a first argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions