diff options
Diffstat (limited to 'core/src/participant.cpp')
| -rw-r--r-- | core/src/participant.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/core/src/participant.cpp b/core/src/participant.cpp new file mode 100644 index 0000000..45b02bd --- /dev/null +++ b/core/src/participant.cpp @@ -0,0 +1,35 @@ +#include "turns/core/participant.hpp" + +#include <typeinfo> +#include <utility> + +#include <glibmm/class.h> +#include <glibmm/refptr.h> + +namespace turns::core +{ + auto participant::create(Glib::ustring name, float priority, core::disposition disposition) -> Glib::RefPtr<participant> + { + return Glib::make_refptr_for_instance(new participant{name, priority, disposition}); + } + + participant::participant() + : Glib::ObjectBase{typeid(participant)} + , Glib::Object{} + { + } + + participant::participant(Glib::ustring name, float priority, core::disposition disposition) + : participant() + { + m_name = name; + m_priority = priority; + m_disposition = disposition; + } + + auto participant::operator<=>(participant const & other) const noexcept -> std::partial_ordering + { + return m_priority <=> other.m_priority; + } + +} // namespace turns::core
\ No newline at end of file |
