Go to the documentation of this file.
23 #ifndef __SSRC_SPREAD_MEMBERSHIP_INFO_H
24 #define __SSRC_SPREAD_MEMBERSHIP_INFO_H
30 #ifdef LIBSSRCSPREAD_ENABLE_MEMBERSHIP_INFO
41 class MembershipInfo {
42 friend void BaseMessage::get_membership_info(MembershipInfo & info)
const;
45 Spread::membership_info _info;
46 GroupList _local_members, _non_local_members;
49 _service_type = service;
74 void get_local_members(
GroupList & members)
const {
75 members = _local_members;
86 void get_non_local_members(
GroupList & members)
const {
87 members = _non_local_members;
102 void get_all_members(
GroupList & members)
const {
104 members.
add(_local_members);
105 members.
add(_non_local_members);
114 bool equal_group_ids(
const MembershipInfo & info)
const {
115 return (Spread::SP_equal_group_ids(_info.gid, info._info.gid) != 0);
125 string changed_member()
const {
126 return _info.changed_member;
133 bool is_regular_membership()
const {
134 return Is_reg_memb_mess(service());
143 bool is_transition()
const {
144 return Is_transition_mess(service());
153 bool is_self_leave()
const {
154 return Is_self_leave(service());
163 bool caused_by_join()
const {
164 return Is_caused_join_mess(service());
173 bool caused_by_leave()
const {
174 return Is_caused_leave_mess(service());
183 bool caused_by_disconnect()
const {
184 return Is_caused_disconnect_mess(service());
193 bool caused_by_network()
const {
194 return Is_caused_network_mess(service());
Copyright © 2006-2015 Savarese Software Research Corporation. All rights reserved.
Copyright © 2017 Savarese Software Research Corporation. All rights reserved