diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-05-20 16:49:49 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-05-20 16:49:49 +0200 |
| commit | bce0c3d0a21c4a0f53984d55c00d1505957353a3 (patch) | |
| tree | 7e17b84585e27acb3b57a74978befe70ac8a800b /lib/src/turnsmm | |
| parent | 7d9d987d6ccb80aabe98ee1fdb9e5bcc7394ddf2 (diff) | |
| download | turns-bce0c3d0a21c4a0f53984d55c00d1505957353a3.tar.xz turns-bce0c3d0a21c4a0f53984d55c00d1505957353a3.zip | |
lib: add wrapper for id
Diffstat (limited to 'lib/src/turnsmm')
| -rw-r--r-- | lib/src/turnsmm/participant.cpp | 5 | ||||
| -rw-r--r-- | lib/src/turnsmm/participant.hpp | 1 |
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; |
