# Unit parameters manager

class CUnitParametersManager

  Manager of unit parameters for each unit.

  Each parameter may be a member of one or several groups, to allow showing / hiding of some parameters in GUI. Block is defined by a single CComboUnitParameter or CCheckboxUnitParameter and may have several options to choose. Each option is a group of one or several parameters, which should be shown / hidden together, depending on the selection of the corresponding CComboUnitParameter or CCheckboxUnitParameter. One parameter can belong to several groups and several blocks. Block is stored as an index of a CComboUnitParameter or CCheckboxUnitParameter. Group is stored as indices of parameters, which belong to this group.

  Public Functions

  size_t ParametersNumber() const

    Returns number of specified unit parameters.

    Returns:

      Number of parameters defined in the unit.

  bool IsNameExist(const std::string &_name) const

    Checks whether unit parameter with given name exists.

    Parameters:

      _name – Name of unit parameter.

    Returns:

      Whether unit parameter with given name exists.

  std::vector<CBaseUnitParameter*> GetParameters() const

    Returns list of all defined unit parameters.

    Returns:

      List of all defined unit parameters.

  std::vector<CBaseUnitParameter*> GetActiveParameters() const

    Returns list of all active unit parameters.

    Returns:

      List of all active unit parameters.

  const CBaseUnitParameter *GetParameter(size_t _index) const

    Returns const pointer to the unit parameter with the specified index.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Const pointer to the unit parameter.

  CBaseUnitParameter *GetParameter(size_t _index)

    Returns const pointer to the unit parameter with the specified index.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CBaseUnitParameter *GetParameter(const std::string &_name) const

    Returns const pointer to the unit parameter with the specified name.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Const pointer to the unit parameter.

  CBaseUnitParameter *GetParameter(const std::string &_name)

    Returns const pointer to the unit parameter with the specified name.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CConstRealUnitParameter *GetConstRealParameter(size_t _index) const

    Returns const pointer to the real constant unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CConstRealUnitParameter *GetConstRealParameter(size_t _index)

    Returns pointer to the constant real unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CConstIntUnitParameter *GetConstIntParameter(size_t _index) const

    Returns const pointer to the signed integer constant unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CConstIntUnitParameter *GetConstIntParameter(size_t _index)

    Returns pointer to the constant signed integer unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CConstUIntUnitParameter *GetConstUIntParameter(size_t _index) const

    Returns const pointer to the unsigned integer constant unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CConstUIntUnitParameter *GetConstUIntParameter(size_t _index)

    Returns pointer to the constant unsigned integer unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CDependentUnitParameter *GetDependentParameter(size_t _index) const

    Returns const pointer to the dependent unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CDependentUnitParameter *GetDependentParameter(size_t _index)

    Returns pointer to the dependent unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CTDUnitParameter *GetTDParameter(size_t _index) const

    Returns const pointer to the time-dependent unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CTDUnitParameter *GetTDParameter(size_t _index)

    Returns pointer to the time-dependent unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CStringUnitParameter *GetStringParameter(size_t _index) const

    Returns const pointer to the string unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CStringUnitParameter *GetStringParameter(size_t _index)

    Returns pointer to the string unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CCheckBoxUnitParameter *GetCheckboxParameter(size_t _index) const

    Returns const pointer to the check box unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CCheckBoxUnitParameter *GetCheckboxParameter(size_t _index)

    Returns pointer to the check box unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CSolverUnitParameter *GetSolverParameter(size_t _index) const

    Returns const pointer to the solver unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CSolverUnitParameter *GetSolverParameter(size_t _index)

    Returns pointer to the solver unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CComboUnitParameter *GetComboParameter(size_t _index) const

    Returns const pointer to the combo unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CComboUnitParameter *GetComboParameter(size_t _index)

    Returns pointer to the combo unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CCompoundUnitParameter *GetCompoundParameter(size_t _index) const

    Returns const pointer to the compound unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CCompoundUnitParameter *GetCompoundParameter(size_t _index)

    Returns pointer to the compound unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CMDBCompoundUnitParameter *GetMDBCompoundParameter(size_t _index) const

    Returns const pointer to the MDB compound unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CMDBCompoundUnitParameter *GetMDBCompoundParameter(size_t _index)

    Returns pointer to the MDB compound unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CReactionUnitParameter *GetReactionParameter(size_t _index) const

    Returns const pointer to the reaction unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CReactionUnitParameter *GetReactionParameter(size_t _index)

    Returns pointer to the reaction unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CListRealUnitParameter *GetListRealParameter(size_t _index) const

    Returns const pointer to the real list unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CListRealUnitParameter *GetListRealParameter(size_t _index)

    Returns pointer to the list real unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CListIntUnitParameter *GetListIntParameter(size_t _index) const

    Returns const pointer to the signed integer list unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CListIntUnitParameter *GetListIntParameter(size_t _index)

    Returns pointer to the signed integer list unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CListUIntUnitParameter *GetListUIntParameter(size_t _index) const

    Returns const pointer to the unsigned integer list unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CListUIntUnitParameter *GetListUIntParameter(size_t _index)

    Returns pointer to the unsigned integer list unit parameter with the specified index.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CConstRealUnitParameter *GetConstRealParameter(const std::string &_name) const

    Returns const pointer to the real constant unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CConstRealUnitParameter *GetConstRealParameter(const std::string &_name)

    Returns pointer to the constant real unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CConstIntUnitParameter *GetConstIntParameter(const std::string &_name) const

    Returns const pointer to the signed integer constant unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CConstIntUnitParameter *GetConstIntParameter(const std::string &_name)

    Returns pointer to the constant signed integer unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CConstUIntUnitParameter *GetConstUIntParameter(const std::string &_name) const

    Returns const pointer to the unsigned integer constant unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CConstUIntUnitParameter *GetConstUIntParameter(const std::string &_name)

    Returns pointer to the constant unsigned integer unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CDependentUnitParameter *GetDependentParameter(const std::string &_name) const

    Returns const pointer to the dependent unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CDependentUnitParameter *GetDependentParameter(const std::string &_name)

    Returns pointer to the time-dependent unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CTDUnitParameter *GetTDParameter(const std::string &_name) const

    Returns const pointer to the time-dependent unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CTDUnitParameter *GetTDParameter(const std::string &_name)

    Returns pointer to the time-dependent unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CStringUnitParameter *GetStringParameter(const std::string &_name) const

    Returns const pointer to the string unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CStringUnitParameter *GetStringParameter(const std::string &_name)

    Returns pointer to the string unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CCheckBoxUnitParameter *GetCheckboxParameter(const std::string &_name) const

    Returns const pointer to the check box unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CCheckBoxUnitParameter *GetCheckboxParameter(const std::string &_name)

    Returns pointer to the check box unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CSolverUnitParameter *GetSolverParameter(const std::string &_name) const

    Returns const pointer to the solver unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CSolverUnitParameter *GetSolverParameter(const std::string &_name)

    Returns pointer to the solver unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CComboUnitParameter *GetComboParameter(const std::string &_name) const

    Returns const pointer to the combo unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CComboUnitParameter *GetComboParameter(const std::string &_name)

    Returns pointer to the combo unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CCompoundUnitParameter *GetCompoundParameter(const std::string &_name) const

    Returns const pointer to the compound unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CCompoundUnitParameter *GetCompoundParameter(const std::string &_name)

    Returns pointer to the compound unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CMDBCompoundUnitParameter *GetMDBCompoundParameter(const std::string &_name) const

    Returns const pointer to the MDB compound unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CMDBCompoundUnitParameter *GetMDBCompoundParameter(const std::string &_name)

    Returns pointer to the MDB compound unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CReactionUnitParameter *GetReactionParameter(const std::string &_name) const

    Returns const pointer to the reaction unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CReactionUnitParameter *GetReactionParameter(const std::string &_name)

    Returns pointer to the reaction unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CListRealUnitParameter *GetListRealParameter(const std::string &_name) const

    Returns const pointer to the real list unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CListRealUnitParameter *GetListRealParameter(const std::string &_name)

    Returns pointer to the list real unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CListIntUnitParameter *GetListIntParameter(const std::string &_name) const

    Returns const pointer to the signed integer list unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CListIntUnitParameter *GetListIntParameter(const std::string &_name)

    Returns pointer to the list signed integer unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  const CListUIntUnitParameter *GetListUIntParameter(const std::string &_name) const

    Returns const pointer to the unsigned integer list unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  CListUIntUnitParameter *GetListUIntParameter(const std::string &_name)

    Returns pointer to the list unsigned integer unit parameter with the specified _name.

    If such parameter does not exist, returns nullptr.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  double GetConstRealParameterValue(size_t _index) const

    Returns value of a constant real unit parameter with the specified _index.

    If such parameter does not exist or is not a constant real parameter, returns 0.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  int64_t GetConstIntParameterValue(size_t _index) const

    Returns value of a constant signed integer unit parameter with the specified _index.

    If such parameter does not exist or is not a constant signed integer parameter, returns 0.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  uint64_t GetConstUIntParameterValue(size_t _index) const

    Returns value of a constant unsigned integer unit parameter with the specified _index.

    If such parameter does not exist or is not a constant unsigned integer parameter, returns 0.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  double GetDependentParameterValue(size_t _index, double _param) const

    Returns value of a dependent unit parameter with the specified _index and _param.

    If such parameter does not exist or is not a dependent parameter, returns 0.

    Parameters:

      - _index – Index of the unit parameter.

      - _param – Dependent parameter.

    Returns:

      Pointer to the unit parameter.

  double GetTDParameterValue(size_t _index, double _time) const

    Returns value of a TD unit parameter with the specified _index and _time.

    If such parameter does not exist or is not a TD parameter, returns 0.

    Parameters:

      - _index – Index of the unit parameter.

      - _time – Time point.

    Returns:

      Pointer to the unit parameter.

  std::string GetStringParameterValue(size_t _index) const

    Returns value of a string unit parameter with the specified _index.

    If such parameter does not exist or is not a string parameter, returns “”.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  bool GetCheckboxParameterValue(size_t _index) const

    Returns value of a check box unit parameter with the specified _index.

    If such parameter does not exist or is not a check box parameter, returns false.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::string GetSolverParameterValue(size_t _index) const

    Returns value of a solver unit parameter with the specified _index.

    If such parameter does not exist or is not a solver parameter, returns “”.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  size_t GetComboParameterValue(size_t _index) const

    Returns value of a combo unit parameter with the specified _index.

    If such parameter does not exist or is not a combo parameter, returns -1.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::string GetCompoundParameterValue(size_t _index) const

    Returns value of a compound unit parameter with the specified _index.

    If such parameter does not exist or is not a compound parameter, returns “”.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::string GetMDBCompoundParameterValue(size_t _index) const

    Returns value of a MDB compound unit parameter with the specified _index.

    If such parameter does not exist or is not a MDB compound parameter, returns “”.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::vector<CChemicalReaction> GetReactionParameterValue(size_t _index) const

    Returns value of a reaction unit parameter with the specified _index.

    If such parameter does not exist or is not a reaction parameter, returns empty vector.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  double GetListRealParameterValue(size_t _index, size_t _valueIndex) const

    Returns value of a list real unit parameter with the specified _index.

    If such parameter does not exist or is not a list real parameter, returns 0.

    Parameters:

      - _index – Index of the unit parameter.

      - _valueIndex – Index of the value.

    Returns:

      Pointer to the unit parameter.

  int64_t GetListIntParameterValue(size_t _index, size_t _valueIndex) const

    Returns value of a list signed integer unit parameter with the specified _index.

    If such parameter does not exist or is not a list signed integer parameter, returns 0.

    Parameters:

      - _index – Index of the unit parameter.

      - _valueIndex – Index of the value.

    Returns:

      Pointer to the unit parameter.

  uint64_t GetListUIntParameterValue(size_t _index, size_t _valueIndex) const

    Returns value of a list unsigned integer unit parameter with the specified _index.

    If such parameter does not exist or is not a list unsigned integer parameter, returns 0.

    Parameters:

      - _index – Index of the unit parameter.

      - _valueIndex – Index of the value.

    Returns:

      Pointer to the unit parameter.

  double GetConstRealParameterValue(const std::string &_name) const

    Returns value of a constant real unit parameter with the specified _name.

    If such parameter does not exist or is not a constant real parameter, returns 0.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  int64_t GetConstIntParameterValue(const std::string &_name) const

    Returns value of a constant signed integer unit parameter with the specified _name.

    If such parameter does not exist or is not a constant signed integer parameter, returns 0.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  uint64_t GetConstUIntParameterValue(const std::string &_name) const

    Returns value of a constant unsigned integer unit parameter with the specified _name.

    If such parameter does not exist or is not a constant unsigned integer parameter, returns 0.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  double GetDependentParameterValue(const std::string &_name, double _param) const

    Returns value of a dependent unit parameter with the specified _name and _param.

    If such parameter does not exist or is not a dependent parameter, returns 0.

    Parameters:

      - _name – Name of the unit parameter.

      - _param – Dependent parameter.

    Returns:

      Pointer to the unit parameter.

  double GetTDParameterValue(const std::string &_name, double _time) const

    Returns value of a TD unit parameter with the specified _name and _time.

    If such parameter does not exist or is not a TD parameter, returns 0.

    Parameters:

      - _name – Name of the unit parameter.

      - _time – Time point.

    Returns:

      Pointer to the unit parameter.

  std::string GetStringParameterValue(const std::string &_name) const

    Returns value of a string unit parameter with the specified _name.

    If such parameter does not exist or is not a string parameter, returns “”.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  bool GetCheckboxParameterValue(const std::string &_name) const

    Returns value of a check box unit parameter with the specified _name.

    If such parameter does not exist or is not a check box parameter, returns “”.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::string GetSolverParameterValue(const std::string &_name) const

    Returns value of a solver unit parameter with the specified _name.

    If such parameter does not exist or is not a solver parameter, returns “”.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  size_t GetComboParameterValue(const std::string &_name) const

    Returns value of a combo unit parameter with the specified _name.

    If such parameter does not exist or is not a combo parameter, returns -1.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::string GetCompoundParameterValue(const std::string &_name) const

    Returns value of a compound unit parameter with the specified _name.

    If such parameter does not exist or is not a compound parameter, returns “”.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::string GetMDBCompoundParameterValue(const std::string &_name) const

    Returns value of a MDB compound unit parameter with the specified _name.

    If such parameter does not exist or is not a MDB compound parameter, returns “”.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  std::vector<CChemicalReaction> GetReactionParameterValue(const std::string &_name) const

    Returns value of a reaction unit parameter with the specified _name.

    If such parameter does not exist or is not a reaction parameter, returns “”.

    Parameters:

      _name – Name of the unit parameter.

    Returns:

      Pointer to the unit parameter.

  double GetListRealParameterValue(const std::string &_name, size_t _index) const

    Returns value of a list real unit parameter with the specified _name.

    If such parameter does not exist or is not a list real parameter, returns 0.

    Parameters:

      - _name – Name of the unit parameter.

      - _index – Index of the value in the list.

    Returns:

      Pointer to the unit parameter.

  int64_t GetListIntParameterValue(const std::string &_name, size_t _index) const

    Returns value of a list signed integer unit parameter with the specified _name.

    If such parameter does not exist or is not a list signed integer parameter, returns 0.

    Parameters:

      - _name – Name of the unit parameter.

      - _index – Index of the value in the list.

    Returns:

      Pointer to the unit parameter.

  uint64_t GetListUIntParameterValue(const std::string &_name, size_t _index) const

    Returns value of a list unsigned integer unit parameter with the specified _name.

    If such parameter does not exist or is not a list unsigned integer parameter, returns 0.

    Parameters:

      - _name – Name of the unit parameter.

      - _index – Index of the value in the list.

    Returns:

      Pointer to the unit parameter.

  std::vector<double> GetAllTimePoints() const

    Returns a sorted list of time points defined in all unit parameters.

    Returns:

      Sorted vector of time points.

  std::vector<double> GetAllTimePoints(double _tBeg, double _tEnd) const

    Returns a sorted list of time points form the given interval defined in all unit parameters.

    Parameters:

      - _tBeg – Begin of the time interval.

      - _tEnd – End of the time interval.

    Returns:

      Sorted vector of time points.

  void AddParametersToGroup(size_t _block, size_t _group, const std::vector<size_t> &_parameters)

    Adds the list of parameters by their indices to existing group of existing block.

    If block, group or some of the parameters do not exist, does nothing.

    Parameters:

      - _block – Index of a block of unit parameters.

      - _group – Index of a group of unit parameters shown/hidden together.

      - _parameters – Indices of unit parameters to add to the group.

  void AddParametersToGroup(const std::string &_block, const std::string &_group, const std::vector<std::string> &_parameters)

    Adds the list of _parameters by their names to existing _group of existing _block.

    If block, group or some of the parameters do not exist, does nothing.

    Parameters:

      - _block – Name of a block of unit parameters (name of the combobox unit parameter).

      - _group – Value of the combobox, specifying a group of unit parameters shown/hidden together.

      - _parameters – Names of unit parameters to add to the group.

  void AddParametersToGroup(const std::string &_block, bool _group, const std::vector<std::string> &_parameters)

    Adds the list of _parameters by their names to existing _group of existing _block.

    If block, group or some of the parameters do not exist, does nothing.

    Parameters:

      - _block – Name of a block of unit parameters (name of the checkbox unit parameter).

      - _group – Value of the checkbox, specifying a group of unit parameters shown/hidden together.

      - _parameters – Names of unit parameters to add to the group.

  bool IsParameterActive(size_t _index) const

    Returns true if unit parameter with the specified index is selected in at least one group of any block, or if it is a not grouped parameter.

    Parameters:

      _index – Index of the unit parameter.

    Returns:

      Whether unit parameter is selected in one of the groups.

  bool IsParameterActive(const CBaseUnitParameter &_parameter) const

    Returns true if this parameter is selected in at least one group of any block, or if it is a not grouped parameter.

    Parameters:

      _parameter – Reference to unit parameter.

    Returns:

      Whether unit parameter is selected in one of the groups.

  bool IsGroupSelector(const CBaseUnitParameter &_parameter) const

    Returns true if the given unit parameter defines a group of parameters.

    Parameters:

      _parameter – Reference to unit parameter.

    Returns:

      Whether unit parameter is selected in the group.

  Friends

  friend void swap(CUnitParametersManager &_first, CUnitParametersManager &_second) noexcept

    Swaps the content of two managers.

    Parameters:

      - _first – First manager.

      - _second – Second manager.