diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-05-16 18:39:44 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-05-16 18:39:44 +0200 |
| commit | 842097d321e2ad9eedd7a171cdcca001d112de55 (patch) | |
| tree | dc058fe2fe0a43198564882c12bea0acd3749af8 /lib/src/turnsmm/turn-order.cpp | |
| parent | 39d704461bff127a54b0b64e68135ed48b3d989b (diff) | |
| download | turns-842097d321e2ad9eedd7a171cdcca001d112de55.tar.xz turns-842097d321e2ad9eedd7a171cdcca001d112de55.zip | |
lib: implement addition of participants
Diffstat (limited to 'lib/src/turnsmm/turn-order.cpp')
| -rw-r--r-- | lib/src/turnsmm/turn-order.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/src/turnsmm/turn-order.cpp b/lib/src/turnsmm/turn-order.cpp index b29589e..c89bd92 100644 --- a/lib/src/turnsmm/turn-order.cpp +++ b/lib/src/turnsmm/turn-order.cpp @@ -1,6 +1,7 @@ #include "turnsmm/turn-order.hpp" #include "turns-turn-order.h" +#include "turnsmm/participant.hpp" #include "turnsmm/private/turn-order_p.hpp" #include <glibmm/class.h> @@ -79,14 +80,19 @@ namespace Turns return gobj(); } + auto TurnOrder::add(Glib::RefPtr<Participant> const & participant) noexcept -> void + { + return turns_turn_order_add(unwrap(this), unwrap(participant)); + } + auto TurnOrder::get_participant_count() const noexcept -> std::size_t { - return turns_turn_order_get_participant_count(const_cast<BaseObjectType *>(unwrap(this))); + return turns_turn_order_get_participant_count(unwrap(this)); } auto TurnOrder::get_running() const noexcept -> bool { - return turns_turn_order_get_running(const_cast<BaseObjectType *>(unwrap(this))); + return turns_turn_order_get_running(unwrap(this)); } auto TurnOrder::property_running() const noexcept -> Glib::PropertyProxy_ReadOnly<bool> |
