summaryrefslogtreecommitdiff
path: root/lib/src/turnsmm/participant.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-05-23 13:51:10 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-05-23 13:51:10 +0200
commitc45004b73bb045328a724d1d860df6d1515af6d4 (patch)
tree4ce448eeb947e87f0447e9be20d90151a26421c9 /lib/src/turnsmm/participant.hpp
parent14db127b26bc47861b6c41f144fe6e3b4ce283a0 (diff)
downloadturns-c45004b73bb045328a724d1d860df6d1515af6d4.tar.xz
turns-c45004b73bb045328a724d1d860df6d1515af6d4.zip
lib: split out header files
Diffstat (limited to 'lib/src/turnsmm/participant.hpp')
-rw-r--r--lib/src/turnsmm/participant.hpp91
1 files changed, 0 insertions, 91 deletions
diff --git a/lib/src/turnsmm/participant.hpp b/lib/src/turnsmm/participant.hpp
deleted file mode 100644
index 6dece0e..0000000
--- a/lib/src/turnsmm/participant.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com>
- * SPDX-License-Identifier: LGPL-2.1-only
- */
-
-#ifndef TURNSMM_PARTICIPANT_HPP
-#define TURNSMM_PARTICIPANT_HPP
-
-#include "turns-participant.h"
-#include "turnsmm/enum_helpers.hpp"
-
-#include <glibmm/object.h>
-#include <glibmm/propertyproxy.h>
-#include <glibmm/refptr.h>
-#include <glibmm/ustring.h>
-
-#include <glib-object.h>
-#include <glib.h>
-
-namespace Turns
-{
-
- class Participant final : public Glib::Object
- {
- public:
- using BaseClassType = TurnsParticipantClass;
- using BaseObjectType = TurnsParticipant;
- using CppClassType = class Participant_Class;
- using CppObjectType = Participant;
-
- enum struct Disposition : guint
- {
- Neutral,
- Friendly,
- Hostile,
- Secret,
- };
-
- auto static get_base_type() -> GType;
- auto static get_type() -> GType;
-
- auto static create() -> Glib::RefPtr<Participant>;
- auto static create(Glib::ustring const & name, float priority, Disposition disposition) -> Glib::RefPtr<Participant>;
-
- Participant();
- Participant(Glib::ustring const & name, float priority, Disposition 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 -> Disposition;
- [[nodiscard]] auto get_id() const noexcept -> Glib::ustring;
- [[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(Disposition value) noexcept -> void;
- auto set_name(Glib::ustring const & value) noexcept -> void;
- auto set_priority(float value) noexcept -> void;
-
- [[nodiscard]] auto property_active() const noexcept -> Glib::PropertyProxy_ReadOnly<bool>;
- [[nodiscard]] auto property_active() noexcept -> Glib::PropertyProxy<bool>;
- [[nodiscard]] auto property_defeated() const noexcept -> Glib::PropertyProxy_ReadOnly<bool>;
- [[nodiscard]] auto property_defeated() noexcept -> Glib::PropertyProxy<bool>;
- [[nodiscard]] auto property_disposition() const noexcept -> Glib::PropertyProxy_ReadOnly<Disposition>;
- [[nodiscard]] auto property_disposition() noexcept -> Glib::PropertyProxy<Disposition>;
- [[nodiscard]] auto property_name() const noexcept -> Glib::PropertyProxy_ReadOnly<Glib::ustring const &>;
- [[nodiscard]] auto property_name() noexcept -> Glib::PropertyProxy<Glib::ustring const &>;
- [[nodiscard]] auto property_priority() const noexcept -> Glib::PropertyProxy_ReadOnly<float>;
- [[nodiscard]] auto property_priority() noexcept -> Glib::PropertyProxy<float>;
-
- protected:
- friend Participant_Class;
-
- explicit Participant(BaseObjectType * gobj);
- };
-
-} // namespace Turns
-
-namespace Glib
-{
- TURNS_DECLARE_ENUM_VALUE_SPECIALIZATION(Participant::Disposition);
-
- auto wrap(TurnsParticipant * object, bool copy = false) -> Glib::RefPtr<Turns::Participant>;
-} // namespace Glib
-
-#endif \ No newline at end of file