SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
cbe::Role Class Reference

User role information. More...

#include <Role.h>

Public Types

using ListMembersDelegatePtr = delegate::ListMembersDelegatePtr
 
using AddRoleMemberDelegatePtr = delegate::AddRoleMemberDelegatePtr
 
using RemoveRoleMemberDelegatePtr = delegate::RemoveRoleMemberDelegatePtr
 

Public Member Functions

std::string name () const
 
cbe::RoleId id () const
 
cbe::GroupId groupId () const
 
void listMembers (ListMembersDelegatePtr delegate)
 Lists the members of this role,. More...
 
void addRoleMember (MemberId memberId, AddRoleMemberDelegatePtr delegate)
 Adds a member to this role. More...
 
void removeRoleMember (MemberId memberId, RemoveRoleMemberDelegatePtr delegate)
 Removes a member to this role. More...
 
 Role (cbe::DefaultCtor)
 Default constructor. More...
 
 operator bool () const
 Checks if the current instance is real. More...
 

Friends

class Group
 

Detailed Description

User role information.

Member Typedef Documentation

◆ AddRoleMemberDelegatePtr

Pointer to cbe::delegate::ListMembersDelegate that is passed into asynchronous version of method listMembers() Pointer to AddRoleMemberDelegate that is passed into:

  • cbe::Group::AddRoleMember(AddRoleMemberDelegatePtr).

◆ ListMembersDelegatePtr

Pointer to cbe::delegate::ListMembersDelegate that is passed into asynchronous version of method listMembers()

◆ RemoveRoleMemberDelegatePtr

Pointer to cbe::delegate::AddRoleMemberDelegate that is passed into asynchronous version of method AddRoleMember() Pointer to RemoveRoleMember that is passed into:
Group::RemoveRoleMember(std::string, RemoveRoleMemberDelegatePtr).

Constructor & Destructor Documentation

◆ Role()

cbe::Role::Role ( cbe::DefaultCtor  )

Default constructor.

Pointer to cbe::delegate::RemoveRoleMember that is passed into asynchronous version of method RemoveRoleMember()

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

Member Function Documentation

◆ addRoleMember()

void cbe::Role::addRoleMember ( MemberId  memberId,
AddRoleMemberDelegatePtr  delegate 
)

Adds a member to this role.

Parameters
memberIdThe id of the member to add to the role.
delegatePointer to a delegate::AddRoleMemberDelegate instance that is implemented by the user.

◆ groupId()

cbe::GroupId cbe::Role::groupId ( ) const

Id of the group the role belongs to.

◆ id()

cbe::RoleId cbe::Role::id ( ) const

Id of the role.

◆ listMembers()

void cbe::Role::listMembers ( ListMembersDelegatePtr  delegate)

Lists the members of this role,.

Parameters
delegatePointer to a delegate::ListMembersDelegate instance that is implemented by the user.

◆ name()

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

Name of the role.

◆ operator bool()

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

Checks if the current instance is real.

An "unreal" instance implies typically a failed event.

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

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

◆ removeRoleMember()

void cbe::Role::removeRoleMember ( MemberId  memberId,
RemoveRoleMemberDelegatePtr  delegate 
)

Removes a member to this role.

Parameters
memberIdThe id of the member to remove from the role.
delegatePointer to a delegate::RemoveRoleMember instance that is implemented by the user.

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