24#ifndef GCS_VIEW_INCLUDED
25#define GCS_VIEW_INCLUDED
72 explicit Gcs_view(
const std::vector<Gcs_member_identifier> &members,
74 const std::vector<Gcs_member_identifier> &leaving,
75 const std::vector<Gcs_member_identifier> &joined,
87 explicit Gcs_view(
const std::vector<Gcs_member_identifier> &members,
89 const std::vector<Gcs_member_identifier> &leaving,
90 const std::vector<Gcs_member_identifier> &joined,
123 const std::vector<Gcs_member_identifier> &
get_members()
const;
157 bool has_member(
const std::string &member_id)
const;
170 void clone(
const std::vector<Gcs_member_identifier> &members,
172 const std::vector<Gcs_member_identifier> &leaving,
173 const std::vector<Gcs_member_identifier> &joined,
This represents the unique identification of a group.
Definition: gcs_group_identifier.h:35
It represents the identity of a group member within a certain group.
Definition: gcs_member_identifier.h:40
This represents the identification of a certain view of a certain group in a moment in time.
Definition: gcs_view_identifier.h:44
This represents the membership view that a member has from a group.
Definition: gcs_view.h:55
std::vector< Gcs_member_identifier > * m_members
Definition: gcs_view.h:160
Gcs_view_error_code
Define error codes associated to the view.
Definition: gcs_view.h:60
@ OK
Definition: gcs_view.h:60
@ MEMBER_EXPELLED
Definition: gcs_view.h:60
Gcs_view(const std::vector< Gcs_member_identifier > &members, const Gcs_view_identifier &view_id, const std::vector< Gcs_member_identifier > &leaving, const std::vector< Gcs_member_identifier > &joined, const Gcs_group_identifier &group_id)
Gcs_view constructor.
Definition: gcs_view.cc:29
std::vector< Gcs_member_identifier > * m_joined
Definition: gcs_view.h:163
const std::vector< Gcs_member_identifier > & get_joined_members() const
Definition: gcs_view.cc:125
bool has_member(const std::string &member_id) const
Definition: gcs_view.cc:146
Gcs_view_identifier * m_view_id
Definition: gcs_view.h:161
const Gcs_view_identifier & get_view_id() const
Definition: gcs_view.cc:110
Gcs_view::Gcs_view_error_code m_error_code
Definition: gcs_view.h:165
void clone(const std::vector< Gcs_member_identifier > &members, const Gcs_view_identifier &view_id, const std::vector< Gcs_member_identifier > &leaving, const std::vector< Gcs_member_identifier > &joined, const Gcs_group_identifier &group_id, Gcs_view::Gcs_view_error_code error_code)
Definition: gcs_view.cc:69
std::vector< Gcs_member_identifier > * m_leaving
Definition: gcs_view.h:162
const Gcs_group_identifier & get_group_id() const
Definition: gcs_view.cc:112
Gcs_view & operator=(Gcs_view const &)
const std::vector< Gcs_member_identifier > & get_leaving_members() const
Definition: gcs_view.cc:120
Gcs_group_identifier * m_group_id
Definition: gcs_view.h:164
virtual ~Gcs_view()
Definition: gcs_view.cc:102
const std::vector< Gcs_member_identifier > & get_members() const
Definition: gcs_view.cc:116
Gcs_view::Gcs_view_error_code get_error_code() const
Definition: gcs_view.cc:129
const Gcs_member_identifier * get_member(const std::string &member_id) const
Definition: gcs_view.cc:133