SDK  2.1.4
CloudBackend Software Development Kit - SDK API for C++
cbe::Member Class Reference

A of member of a Group. More...

#include <Member.h>

Public Types

using KickDelegatePtr = delegate::KickDelegatePtr
 
using KickException = delegate::KickDelegate::Exception
 
using KickError = delegate::KickDelegate::ErrorInfo
 
using BanDelegatePtr = delegate::BanDelegatePtr
 
using BanException = delegate::BanDelegate::Exception
 
using BanError = delegate::BanDelegate::ErrorInfo
 
using UnBanDelegatePtr = delegate::UnBanDelegatePtr
 
using UnBanException = delegate::UnBanDelegate::Exception
 
using UnBanError = delegate::UnBanDelegate::ErrorInfo
 

Public Member Functions

void kick (std::string kickComment, KickDelegatePtr delegate)
 
delegate::KickSuccess kick (std::string kickComment)
 Synchronous [exception] Synchronous version of kick(std::string kickComment, KickDelegatePtr) , and throws an exception, KickException, in case of a failed call.
See kick(KickDelegatePtr) More...
 
cbe::util::Optional< delegate::KickSuccesskick (std::string kickComment, KickError &error)
 Synchronous [non-throwing] Synchronous version of kick(kickComment, KickDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See kick(kickComment, KickDelegatePtr) More...
 
void ban (std::string banComment, BanDelegatePtr delegate)
 
delegate::BanSuccess ban (std::string banComment)
 Synchronous [exception] Synchronous version of ban(std::string,BanDelegatePtr) , and throws an exception, BanException, in case of a failed call.
See ban(BanDelegatePtr) More...
 
cbe::util::Optional< delegate::BanSuccessban (std::string banComment, BanError &error)
 Synchronous [non-throwing] Synchronous version of ban(banComment,BanDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See ban(banComment, BanDelegatePtr) More...
 
void unBan (UnBanDelegatePtr delegate)
 
delegate::UnBanSuccess unBan ()
 Synchronous [exception] Synchronous version of unBan(UnBanDelegatePtr) , and throws an exception, UnBanException, in case of a failed call.
See unBan(UnBanDelegatePtr) More...
 
cbe::util::Optional< delegate::UnBanSuccessunBan (UnBanError &error)
 Synchronous [non-throwing] Synchronous version of unBan(UnBanDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See unBan(UnBanDelegatePtr) More...
 
cbe::MemberId memberId () const
 
std::string name () const
 
cbe::Visibility visibility () const
 
cbe::GroupId groupId () const
 
cbe::MemberBanInfo getMemberBanInfo ()
 Gets the member ban info map.
 
 Member (cbe::DefaultCtor)
 Default constructor. More...
 
 operator bool () const
 Checks if the current instance is real. More...
 

Friends

class Group
 
class Role
 

Detailed Description

A of member of a Group.

Member Typedef Documentation

◆ KickDelegatePtr

◆ KickException

Pointer to cbe::delegate::KickDelegate that is passed into asynchronous version of method kick() See delegate::object::KickDelegate::Exception

◆ KickError

Forms the type of the error return parameter for the synchronous version of method kick()
See delegate::KickDelegate::ErrorInfo

◆ BanDelegatePtr

◆ BanException

Pointer to cbe::delegate::BanDelegate that is passed into asynchronous version of method ban() See delegate::object::BanDelegate::Exception

◆ BanError

Forms the type of the error return parameter for the synchronous version of method ban()
See delegate::BanDelegate::ErrorInfo

◆ UnBanDelegatePtr

◆ UnBanException

Pointer to cbe::delegate::UnBanDelegate that is passed into asynchronous version of method unBan() See delegate::object::UnBanDelegate::Exception

◆ UnBanError

Forms the type of the error return parameter for the synchronous version of method unBan()
See delegate::UnBanDelegate::ErrorInfo

Constructor & Destructor Documentation

◆ Member()

cbe::Member::Member ( cbe::DefaultCtor  )

Default constructor.

Construct a new object with the DefaultCtor to enable the operator bool() test

Member Function Documentation

◆ kick() [1/3]

void cbe::Member::kick ( std::string  kickComment,
KickDelegatePtr  delegate 
)

Kick out a member from a group

Parameters
kickCommentfree text describing the reason for this decision
delegatea shared pointer to the class in which you implement cbe::delegate::KickDelegate to receive the callback on server completion.

◆ kick() [2/3]

delegate::KickSuccess cbe::Member::kick ( std::string  kickComment)

Synchronous [exception] Synchronous version of kick(std::string kickComment, KickDelegatePtr) , and throws an exception, KickException, in case of a failed call.
See kick(KickDelegatePtr)

Returns
Information about the kick object — if the call was successful.
See cbe::delegate::KickSuccess
Exceptions
KickException

◆ kick() [3/3]

cbe::util::Optional<delegate::KickSuccess> cbe::Member::kick ( std::string  kickComment,
KickError error 
)

Synchronous [non-throwing] Synchronous version of kick(kickComment, KickDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See kick(kickComment, KickDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the KickError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ ban() [1/3]

void cbe::Member::ban ( std::string  banComment,
BanDelegatePtr  delegate 
)

Ban or evict a member from a group

Parameters
banCommentFree text describing the reason for this decision
delegateShared pointer to the class in which you implement cbe::delegate::BanDelegate to receive the callback upon completion of this request.

◆ ban() [2/3]

delegate::BanSuccess cbe::Member::ban ( std::string  banComment)

Synchronous [exception] Synchronous version of ban(std::string,BanDelegatePtr) , and throws an exception, BanException, in case of a failed call.
See ban(BanDelegatePtr)

Returns
Information about the ban object — if the call was successful.
See cbe::delegate::BanSuccess
Exceptions
BanException

◆ ban() [3/3]

cbe::util::Optional<delegate::BanSuccess> cbe::Member::ban ( std::string  banComment,
BanError error 
)

Synchronous [non-throwing] Synchronous version of ban(banComment,BanDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See ban(banComment, BanDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the BanError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ unBan() [1/3]

void cbe::Member::unBan ( UnBanDelegatePtr  delegate)

Revoke a ban of a member from a group

Parameters
delegatea shared pointer to the class in which you implement cbe::delegate::UnBanDelegate to receive the callback on server completion.

◆ unBan() [2/3]

delegate::UnBanSuccess cbe::Member::unBan ( )

Synchronous [exception] Synchronous version of unBan(UnBanDelegatePtr) , and throws an exception, UnBanException, in case of a failed call.
See unBan(UnBanDelegatePtr)

Returns
Information about the unBan object — if the call was successful.
See cbe::delegate::UnBanSuccess
Exceptions
UnBanException

◆ unBan() [3/3]

cbe::util::Optional<delegate::UnBanSuccess> cbe::Member::unBan ( UnBanError error)

Synchronous [non-throwing] Synchronous version of unBan(UnBanDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See unBan(UnBanDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the UnBanError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ memberId()

cbe::MemberId cbe::Member::memberId ( ) const

the member id number

◆ name()

std::string cbe::Member::name ( ) const

Returns the member name.

◆ visibility()

cbe::Visibility cbe::Member::visibility ( ) const

see the enum Visibility in Types.h

◆ groupId()

cbe::GroupId cbe::Member::groupId ( ) const

the group id number

◆ operator bool()

cbe::Member::operator bool ( ) const
explicit

Checks if the current instance is real.

An "unreal" instance implies typically a failed event.

Relies on the Default constructor Member(cbe::DefaultCtor)

Returns
true : is real
false : unreal; got nullptr; if current instance is unbound/undefined. I.e., if it is only default constructed.

The documentation for this class was generated from the following file: