From 661e98cf8bb61f29049d405aef9cdaace1449ac8 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 13 May 2025 14:19:42 +0200 Subject: libmm: add tests --- lib/src/turnsmm/participant.hpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'lib/src/turnsmm/participant.hpp') diff --git a/lib/src/turnsmm/participant.hpp b/lib/src/turnsmm/participant.hpp index 1eb5c1e..b41c64b 100644 --- a/lib/src/turnsmm/participant.hpp +++ b/lib/src/turnsmm/participant.hpp @@ -2,8 +2,10 @@ #define TURNSMM_PARTICIPANT_HPP #include "turns-participant.h" +#include "turnsmm/enums.hpp" #include +#include #include #include @@ -19,7 +21,7 @@ namespace Turns using CppObjectType = Participant; Participant(); - Participant(Glib::ustring const & name, float priority, int disposition); + Participant(Glib::ustring const & name, float priority, Disposition disposition); [[nodiscard]] auto gobj() noexcept -> BaseObjectType *; [[nodiscard]] auto gobj() const -> BaseObjectType const *; @@ -27,16 +29,27 @@ namespace Turns [[nodiscard]] auto get_active() const noexcept -> bool; [[nodiscard]] auto get_defeated() const noexcept -> bool; - [[nodiscard]] auto get_disposition() const noexcept -> int; + [[nodiscard]] auto get_disposition() const noexcept -> Disposition; [[nodiscard]] auto get_name() const -> Glib::ustring; [[nodiscard]] auto get_priority() const noexcept -> float; auto set_active(bool value) noexcept -> void; auto set_defeated(bool value) noexcept -> void; - auto set_disposition(int value) noexcept -> void; + auto set_disposition(Disposition value) noexcept -> void; auto set_name(Glib::ustring const & value) noexcept -> void; auto set_priority(float value) noexcept -> void; + [[nodiscard]] auto property_active() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_active() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_defeated() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_defeated() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_disposition() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_disposition() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_name() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_name() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_priority() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_priority() noexcept -> Glib::PropertyProxy; + protected: friend Participant_Class; -- cgit v1.2.3