#include "turns/domain/participant.hpp" #include #include namespace turns::domain { auto participant::create(Glib::ustring name, float order_value) -> Glib::RefPtr { return Glib::make_refptr_for_instance(new participant{name, order_value}); } participant::participant(Glib::ustring name, float order_value) : Glib::ObjectBase{typeid(participant)} , m_name{*this, "name"} , m_order_value{*this, "order_value"} { m_name = name; m_order_value = order_value; } auto participant::operator<=>(participant const & other) const noexcept -> std::partial_ordering { return m_order_value <=> other.m_order_value; } auto participant::property_name() -> Glib::PropertyProxy { return m_name.get_proxy(); } auto participant::property_name() const -> Glib::PropertyProxy_ReadOnly { return m_name.get_proxy(); } auto participant::property_over_value() -> Glib::PropertyProxy { return m_order_value.get_proxy(); } auto participant::property_over_value() const -> Glib::PropertyProxy_ReadOnly { return m_order_value.get_proxy(); } auto operator<=>(Glib::RefPtr const & lhs, Glib::RefPtr const & rhs) -> std::partial_ordering { return *lhs <=> *rhs; } } // namespace turns::domain