summaryrefslogtreecommitdiff
path: root/lib/src/turnsmm/participant.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-05-12 17:53:49 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-05-12 17:53:49 +0200
commitfb015121f064f2be12d1e28cdc7c54e074ed0411 (patch)
tree8e4577e5166af0ab01931243a25cc2f02b909e22 /lib/src/turnsmm/participant.hpp
parenta1e345d62f143c3ef22e73eb51ac55fef27cf2da (diff)
downloadturns-fb015121f064f2be12d1e28cdc7c54e074ed0411.tar.xz
turns-fb015121f064f2be12d1e28cdc7c54e074ed0411.zip
lib: begin basic C++ wrapper
Diffstat (limited to 'lib/src/turnsmm/participant.hpp')
-rw-r--r--lib/src/turnsmm/participant.hpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/src/turnsmm/participant.hpp b/lib/src/turnsmm/participant.hpp
new file mode 100644
index 0000000..1eb5c1e
--- /dev/null
+++ b/lib/src/turnsmm/participant.hpp
@@ -0,0 +1,53 @@
+#ifndef TURNSMM_PARTICIPANT_HPP
+#define TURNSMM_PARTICIPANT_HPP
+
+#include "turns-participant.h"
+
+#include <glibmm/object.h>
+#include <glibmm/refptr.h>
+#include <glibmm/ustring.h>
+
+namespace Turns
+{
+
+ class Participant final : public Glib::Object
+ {
+ public:
+ using BaseClassType = TurnsParticipantClass;
+ using BaseObjectType = TurnsParticipant;
+ using CppClassType = class Participant_Class;
+ using CppObjectType = Participant;
+
+ Participant();
+ Participant(Glib::ustring const & name, float priority, int disposition);
+
+ [[nodiscard]] auto gobj() noexcept -> BaseObjectType *;
+ [[nodiscard]] auto gobj() const -> BaseObjectType const *;
+ [[nodiscard]] auto gobj_copy() noexcept -> BaseObjectType *;
+
+ [[nodiscard]] auto get_active() const noexcept -> bool;
+ [[nodiscard]] auto get_defeated() const noexcept -> bool;
+ [[nodiscard]] auto get_disposition() const noexcept -> int;
+ [[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_name(Glib::ustring const & value) noexcept -> void;
+ auto set_priority(float value) noexcept -> void;
+
+ protected:
+ friend Participant_Class;
+
+ explicit Participant(BaseObjectType * gobj);
+ };
+
+} // namespace Turns
+
+namespace Glib
+{
+ auto wrap(TurnsParticipant * object, bool copy = false) -> Glib::RefPtr<Turns::Participant>;
+} // namespace Glib
+
+#endif \ No newline at end of file