Skip to content

Commit

Permalink
docs: Add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vasylskorych committed Jan 1, 2025
1 parent d70adf7 commit de3ad4c
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 15 deletions.
24 changes: 24 additions & 0 deletions ModelsAPI/BaseUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,35 @@ class CBaseUnit

public:
// TODO: initialize all pointers in constructor and make them references.
/**
* \private
* \brief Default constructor.
*/
CBaseUnit() = default;
/**
* \private
* \brief Copy constructor.
*/
CBaseUnit(const CBaseUnit& _other);
/**
* \private
* \brief Move constructor.
*/
CBaseUnit(CBaseUnit&& _other) noexcept;
/**
* \private
* \brief Copy assignment operator.
*/
CBaseUnit& operator=(CBaseUnit _other);
/**
* \private
* \brief Move assignment operator.
*/
CBaseUnit& operator=(CBaseUnit&& _other) noexcept;
/**
* \private
* \brief Destructor.
*/
virtual ~CBaseUnit() = default;

/**
Expand Down
3 changes: 3 additions & 0 deletions ModelsAPI/MixtureEnthalpyLookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class CMixtureEnthalpyLookup
* \param _intervalsNumber Number of temperature intervals.
*/
CMixtureEnthalpyLookup(const CMaterialsDatabase* _materialsDB, std::vector<std::string> _compounds, const SInterval& _limits, size_t _intervalsNumber);
/**
* \brief Copy constructor.
*/
CMixtureEnthalpyLookup(const CMixtureEnthalpyLookup& _other) = default;

/**
Expand Down
24 changes: 24 additions & 0 deletions ModelsAPI/PlotManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,35 @@ class CPlotManager
std::vector<std::unique_ptr<CPlot>> m_plotsStored; ///< A copy of plots used to store data during cyclic recalculations.

public:
/**
* \private
* \brief Default constructor.
*/
CPlotManager() = default;
/**
* \private
* \brief Copy constructor.
*/
CPlotManager(const CPlotManager& _other);
/**
* \private
* \brief Move constructor.
*/
CPlotManager(CPlotManager&& _other) noexcept;
/**
* \private
* \brief Copy assignment operator.
*/
CPlotManager& operator=(CPlotManager _other);
/**
* \private
* \brief Move assignment operator.
*/
CPlotManager& operator=(CPlotManager&& _other) noexcept;
/**
* \private
* \brief Destructor.
*/
~CPlotManager() = default;

/**
Expand Down
26 changes: 25 additions & 1 deletion ModelsAPI/StateVariable.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CH5Handler;
*/
class CStateVariable
{
static const unsigned m_saveVersion{ 1 }; // Current version of the saving procedure.
static constexpr unsigned m_saveVersion{ 1 }; // Current version of the saving procedure.

inline static const double m_eps{ 16 * std::numeric_limits<double>::epsilon() };

Expand Down Expand Up @@ -144,11 +144,35 @@ class CStateVariablesManager
std::vector<std::unique_ptr<CStateVariable>> m_stateVariables; // Defined state variables.

public:
/**
* \private
* \brief Default constructor.
*/
CStateVariablesManager() = default;
/**
* \private
* \brief Copy constructor.
*/
CStateVariablesManager(const CStateVariablesManager& _other);
/**
* \private
* \brief Move constructor.
*/
CStateVariablesManager(CStateVariablesManager&& _other) noexcept;
/**
* \private
* \brief Copy assignment operator.
*/
CStateVariablesManager& operator=(CStateVariablesManager _other);
/**
* \private
* \brief Move assignment operator.
*/
CStateVariablesManager& operator=(CStateVariablesManager&& _other) noexcept;
/**
* \private
* \brief Destructor.
*/
~CStateVariablesManager() = default;

/**
Expand Down
36 changes: 24 additions & 12 deletions ModelsAPI/UnitParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class CBaseUnitParameter
*/
CBaseUnitParameter& operator=(CBaseUnitParameter&& _other) = default;

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] virtual CBaseUnitParameter* clone() const = 0;
Expand Down Expand Up @@ -219,7 +220,8 @@ class CConstUnitParameter : public CBaseUnitParameter
{
}

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CConstUnitParameter* clone() const override { return new CConstUnitParameter{ *this }; }
Expand Down Expand Up @@ -372,7 +374,8 @@ class CListUnitParameter : public CBaseUnitParameter
{
}

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CListUnitParameter* clone() const override { return new CListUnitParameter{ *this }; }
Expand Down Expand Up @@ -569,7 +572,8 @@ class CDependentUnitParameter : public CBaseUnitParameter
*/
CDependentUnitParameter(std::string _valueName, double _valueInit, std::wstring _valueUnits, std::string _paramName, double _paramInit, std::wstring _paramUnits, std::string _description, double _valueMin, double _valueMax, double _paramMin, double _paramMax);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CDependentUnitParameter* clone() const override;
Expand Down Expand Up @@ -784,7 +788,8 @@ class CTDUnitParameter : public CDependentUnitParameter
*/
CTDUnitParameter(std::string _name, std::wstring _units, std::string _description, double _min, double _max, double _value);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CTDUnitParameter* clone() const override;
Expand Down Expand Up @@ -832,7 +837,8 @@ class CStringUnitParameter : public CBaseUnitParameter
*/
CStringUnitParameter(std::string _name, std::string _description, std::string _value);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CStringUnitParameter* clone() const override;
Expand Down Expand Up @@ -906,7 +912,8 @@ class CCheckBoxUnitParameter : public CBaseUnitParameter
*/
CCheckBoxUnitParameter(std::string _name, std::string _description, bool _checked);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CCheckBoxUnitParameter* clone() const override;
Expand Down Expand Up @@ -993,7 +1000,8 @@ class CSolverUnitParameter : public CBaseUnitParameter
*/
CSolverUnitParameter(std::string _name, std::string _description, ESolverTypes _type);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CSolverUnitParameter* clone() const override;
Expand Down Expand Up @@ -1091,7 +1099,8 @@ class CComboUnitParameter : public CBaseUnitParameter
*/
CComboUnitParameter(std::string _name, std::string _description, size_t _itemDefault, const std::vector<size_t>& _items, const std::vector<std::string>& _itemsNames);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CComboUnitParameter* clone() const override;
Expand Down Expand Up @@ -1206,7 +1215,8 @@ class CCompoundUnitParameter : public CBaseUnitParameter
*/
CCompoundUnitParameter(std::string _name, std::string _description);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CCompoundUnitParameter* clone() const override;
Expand Down Expand Up @@ -1277,7 +1287,8 @@ class CMDBCompoundUnitParameter : public CCompoundUnitParameter
*/
CMDBCompoundUnitParameter(std::string _name, std::string _description);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CMDBCompoundUnitParameter* clone() const override;
Expand All @@ -1303,7 +1314,8 @@ class CReactionUnitParameter : public CBaseUnitParameter
*/
CReactionUnitParameter(std::string _name, std::string _description);

/*
/**
* \private
* \brief Returns a non-managed pointer to a copy of this.
*/
[[nodiscard]] CReactionUnitParameter* clone() const override;
Expand Down
24 changes: 24 additions & 0 deletions ModelsAPI/UnitParametersManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,35 @@ class CUnitParametersManager
group_map_t m_groups; ///< List of group blocks and corresponding groups, to which parameters belong. Is used to determine activity of parameters.

public:
/**
* \private
* \brief Default constructor.
*/
CUnitParametersManager() = default;
/**
* \private
* \brief Copy constructor.
*/
CUnitParametersManager(const CUnitParametersManager& _other);
/**
* \private
* \brief Move constructor.
*/
CUnitParametersManager(CUnitParametersManager&& _other) noexcept;
/**
* \private
* \brief Copy assignment operator.
*/
CUnitParametersManager& operator=(CUnitParametersManager _other);
/**
* \private
* \brief Move assignment operator.
*/
CUnitParametersManager& operator=(CUnitParametersManager&& _other) noexcept;
/**
* \private
* \brief Destructor.
*/
~CUnitParametersManager() = default;

/**
Expand Down
52 changes: 50 additions & 2 deletions ModelsAPI/UnitPorts.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,41 @@ class CUnitPort

public:
/**
* \private
* \brief Default constructor.
*/
CUnitPort() = default;
/**
* \private
* \brief Constructs unit port with the given name and type.
* \param _name Name of the port.
* \param _type Type of the port.
*/
CUnitPort(std::string _name, EUnitPort _type);

CUnitPort() = default;
/**
* \private
* \brief Copy constructor.
*/
CUnitPort(const CUnitPort& _other) = default;
/**
* \private
* \brief Move constructor.
*/
CUnitPort(CUnitPort&& _other) = default;
/**
* \private
* \brief Copy assignment operator.
*/
CUnitPort& operator=(const CUnitPort& _other) = default;
/**
* \private
* \brief Move assignment operator.
*/
CUnitPort& operator=(CUnitPort&& _other) = default;
/**
* \private
* \brief Destructor.
*/
~CUnitPort() = default;

/**
Expand Down Expand Up @@ -119,11 +143,35 @@ class CPortsManager
std::vector<std::unique_ptr<CUnitPort>> m_ports; // All defined ports.

public:
/**
* \private
* \brief Default constructor.
*/
CPortsManager() = default;
/**
* \private
* \brief Copy constructor.
*/
CPortsManager(const CPortsManager& _other);
/**
* \private
* \brief Move constructor.
*/
CPortsManager(CPortsManager&& _other) noexcept;
/**
* \private
* \brief Copy assignment operator.
*/
CPortsManager& operator=(CPortsManager _other);
/**
* \private
* \brief Move assignment operator.
*/
CPortsManager& operator=(CPortsManager&& _other) noexcept;
/**
* \private
* \brief Destructor.
*/
~CPortsManager() = default;

/**
Expand Down

0 comments on commit de3ad4c

Please sign in to comment.