aboutsummaryrefslogtreecommitdiff
path: root/core/src/participant.cpp
blob: 24d1cffe8f4946c7dbcf096bd63724c91460c76e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "turns/core/participant.hpp"

#include <glibmm/refptr.h>

#include <typeinfo>
#include <compare>

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