41 std::vector<std::unique_ptr<Component>>&& components,
42 std::unique_ptr<PropertyArray>&& properties);
82 std::span<PropertyType const>
const required_properties);
This class defines components (substances).
Property const & property(PropertyType const &p) const
PropertyArray properties_
std::string description() const
Short description of the phase with its name.
std::size_t numberOfComponents() const
A get-function for retrieving the number of components in this phase.
std::vector< std::unique_ptr< Component > > const components_
Property const & operator[](PropertyType const &p) const
bool hasProperty(PropertyType const &p) const
bool hasComponent(std::size_t const &index) const
PhaseName const phaseName
Component const & component(std::size_t const &index) const
Phase(PhaseName phase_name, std::vector< std::unique_ptr< Component > > &&components, std::unique_ptr< PropertyArray > &&properties)
The Phase constructor is called with the phase type enum.
PhaseName fromString(std::string const &phase_name)
Convert string to phase enum. Throws if invalid phase name.
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
std::array< std::unique_ptr< Property >, PropertyType::number_of_properties > PropertyArray
PhaseName
Enumeration of phase types.
std::string_view toString(PhaseName phase_name)
Convert phase enum to its string representation.