From adaba10aa7d8e504d3d10bfda42cb79b3ade459e Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 30 Apr 2025 11:07:25 +0200 Subject: core: add getters and setters for Participant --- core/include/turns/core/participant.hpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'core/include') diff --git a/core/include/turns/core/participant.hpp b/core/include/turns/core/participant.hpp index 2c02b1b..d2f2035 100644 --- a/core/include/turns/core/participant.hpp +++ b/core/include/turns/core/participant.hpp @@ -24,11 +24,23 @@ namespace turns::core auto operator<=>(Participant const & other) const noexcept -> std::partial_ordering; - auto property_disposition(this auto && self); - auto property_is_active(this auto && self); - auto property_is_defeated(this auto && self); - auto property_name(this auto && self); - auto property_priority(this auto && self); + [[nodiscard]] auto get_disposition() const -> disposition; + [[nodiscard]] auto get_is_active() const -> bool; + [[nodiscard]] auto get_is_defeated() const -> bool; + [[nodiscard]] auto get_name() const -> Glib::ustring; + [[nodiscard]] auto get_priority() const -> float; + + auto set_disposition(disposition value) -> void; + auto set_is_active(bool value) -> void; + auto set_is_defeated(bool value) -> void; + auto set_name(Glib::ustring const & value) -> void; + auto set_priority(float value) -> void; + + [[nodiscard]] auto property_disposition(this auto && self); + [[nodiscard]] auto property_is_active(this auto && self); + [[nodiscard]] auto property_is_defeated(this auto && self); + [[nodiscard]] auto property_name(this auto && self); + [[nodiscard]] auto property_priority(this auto && self); auto serialize() -> nlohmann::json; -- cgit v1.2.3