summaryrefslogtreecommitdiff
path: root/lib/src/turnsmm
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-05-20 16:49:49 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-05-20 16:49:49 +0200
commitbce0c3d0a21c4a0f53984d55c00d1505957353a3 (patch)
tree7e17b84585e27acb3b57a74978befe70ac8a800b /lib/src/turnsmm
parent7d9d987d6ccb80aabe98ee1fdb9e5bcc7394ddf2 (diff)
downloadturns-bce0c3d0a21c4a0f53984d55c00d1505957353a3.tar.xz
turns-bce0c3d0a21c4a0f53984d55c00d1505957353a3.zip
lib: add wrapper for id
Diffstat (limited to 'lib/src/turnsmm')
-rw-r--r--lib/src/turnsmm/participant.cpp5
-rw-r--r--lib/src/turnsmm/participant.hpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/src/turnsmm/participant.cpp b/lib/src/turnsmm/participant.cpp
index 38dfb3e..170c3a2 100644
--- a/lib/src/turnsmm/participant.cpp
+++ b/lib/src/turnsmm/participant.cpp
@@ -110,6 +110,11 @@ namespace Turns
return static_cast<Disposition>(turns_participant_get_disposition(const_cast<BaseObjectType *>(unwrap(this))));
}
+ auto Participant::get_id() const noexcept -> Glib::ustring
+ {
+ return Glib::convert_const_gchar_ptr_to_ustring(turns_participant_get_id(unwrap(this)));
+ }
+
auto Participant::get_name() const -> Glib::ustring
{
return turns_participant_get_name(const_cast<BaseObjectType *>(unwrap(this)));
diff --git a/lib/src/turnsmm/participant.hpp b/lib/src/turnsmm/participant.hpp
index b23fd42..c76cc29 100644
--- a/lib/src/turnsmm/participant.hpp
+++ b/lib/src/turnsmm/participant.hpp
@@ -47,6 +47,7 @@ namespace Turns
[[nodiscard]] auto get_active() const noexcept -> bool;
[[nodiscard]] auto get_defeated() const noexcept -> bool;
[[nodiscard]] auto get_disposition() const noexcept -> Disposition;
+ [[nodiscard]] auto get_id() const noexcept -> Glib::ustring;
[[nodiscard]] auto get_name() const -> Glib::ustring;
[[nodiscard]] auto get_priority() const noexcept -> float;