![]() |
SDK
2.1.4
CloudBackend Software Development Kit - SDK API for C++
|
User role information. More...
#include <Role.h>
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... | |
std::vector< cbe::Member > | listMembers () |
Synchronous [exception] Synchronous version of listMembers(ListMembersDelegatePtr) , and throws an exception, ListMembersException, in case of a failed call. See listMembers(ListMembersDelegatePtr) More... | |
cbe::util::Optional< std::vector< cbe::Member > > | listMembers (ListMembersError &error) |
Synchronous [non-throwing] Synchronous version of listMembers(ListMembersDelegatePtr) , 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 listMembers(ListMembersDelegatePtr) More... | |
void | addRoleMember (MemberId memberId, AddRoleMemberDelegatePtr delegate) |
Adds a member to this role. More... | |
MemberId | addRoleMember (MemberId memberId) |
Synchronous [exception] Synchronous version of AddRoleMember(MemberId, AddRoleMemberDelegatePtr) , and throws an exception, AddRoleMemberException, in case of a failed call. See AddRoleMember(AddRoleMemberDelegatePtr) More... | |
cbe::util::Optional< MemberId > | addRoleMember (MemberId memberId, AddRoleMemberError &error) |
Synchronous [non-throwing] Synchronous version of AddRoleMember(memberId, AddRoleMemberDelegatePtr) , 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 AddRoleMember(memberId, AddRoleMemberDelegatePtr) More... | |
void | removeRoleMember (MemberId memberId, RemoveRoleMemberDelegatePtr delegate) |
Removes a member to this role. More... | |
MemberId | removeRoleMember (MemberId memberId) |
Synchronous [exception] Synchronous version of RemoveRoleMember(MemberId memberId, RemoveRoleMemberDelegatePtr) , and throws an exception, RemoveRoleMemberException, in case of a failed call. See RemoveRoleMember(RemoveRoleMemberDelegatePtr) More... | |
cbe::util::Optional< MemberId > | removeRoleMember (MemberId memberId, RemoveRoleMemberError &error) |
Synchronous [non-throwing] Synchronous version of RemoveRoleMember(memberId,RemoveRoleMemberDelegatePtr) , 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 RemoveRoleMember(memberId, RemoveRoleMemberDelegatePtr) More... | |
Role (cbe::DefaultCtor) | |
Default constructor. More... | |
operator bool () const | |
Checks if the current instance is real. More... | |
Friends | |
class | Group |
User role information.
Pointer to cbe::delegate::ListMembersDelegate that is passed into asynchronous version of method listMembers()
Pointer to cbe::delegate::ListMembersDelegate that is passed into asynchronous version of method listMembers() See delegate::object::ListMembersDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method listMembers()
See delegate::ListMembersDelegate::ErrorInfo
Pointer to AddRoleMemberDelegate that is passed into:
Pointer to cbe::delegate::AddRoleMemberDelegate that is passed into asynchronous version of method AddRoleMember() See delegate::object::AddRoleMemberDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method AddRoleMember()
See delegate::AddRoleMemberDelegate::ErrorInfo
Pointer to RemoveRoleMember that is passed into:
Group::RemoveRoleMember(std::string, RemoveRoleMemberDelegatePtr).
Pointer to cbe::delegate::RemoveRoleMember that is passed into asynchronous version of method RemoveRoleMember() See delegate::object::RemoveRoleMember::Exception
Forms the type of the error
return parameter for the synchronous version of method RemoveRoleMember()
See delegate::RemoveRoleMember::ErrorInfo
cbe::Role::Role | ( | cbe::DefaultCtor | ) |
Default constructor.
Construct a new object with the DefaultCtor
to enable the operator bool() test
std::string cbe::Role::name | ( | ) | const |
Name of the role.
cbe::RoleId cbe::Role::id | ( | ) | const |
Id of the role.
cbe::GroupId cbe::Role::groupId | ( | ) | const |
Id of the group the role belongs to.
void cbe::Role::listMembers | ( | ListMembersDelegatePtr | delegate | ) |
Lists the members of this role,.
delegate | Pointer to a delegate::ListMembersDelegate instance that is implemented by the user. |
std::vector<cbe::Member> cbe::Role::listMembers | ( | ) |
Synchronous [exception] Synchronous version of listMembers(ListMembersDelegatePtr) , and throws an exception, ListMembersException, in case of a failed call.
See listMembers(ListMembersDelegatePtr)
ListMembersException |
cbe::util::Optional<std::vector<cbe::Member> > cbe::Role::listMembers | ( | ListMembersError & | error | ) |
Synchronous [non-throwing] Synchronous version of listMembers(ListMembersDelegatePtr) , 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 listMembers(ListMembersDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the ListMembersError object passed in will we be populated with the error information. |
false
— indicates a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Role::addRoleMember | ( | MemberId | memberId, |
AddRoleMemberDelegatePtr | delegate | ||
) |
Adds a member to this role.
memberId | The id of the member to add to the role. |
delegate | Pointer to a delegate::AddRoleMemberDelegate instance that is implemented by the user. |
Synchronous [exception] Synchronous version of AddRoleMember(MemberId, AddRoleMemberDelegatePtr) , and throws an exception, AddRoleMemberException, in case of a failed call.
See AddRoleMember(AddRoleMemberDelegatePtr)
AddRoleMemberException |
cbe::util::Optional<MemberId> cbe::Role::addRoleMember | ( | MemberId | memberId, |
AddRoleMemberError & | error | ||
) |
Synchronous [non-throwing] Synchronous version of AddRoleMember(memberId, AddRoleMemberDelegatePtr) , 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 AddRoleMember(memberId, AddRoleMemberDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the AddRoleMemberError object passed in will we be populated with the error information. |
false
— indicates a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Role::removeRoleMember | ( | MemberId | memberId, |
RemoveRoleMemberDelegatePtr | delegate | ||
) |
Removes a member to this role.
memberId | The id of the member to remove from the role. |
delegate | Pointer to a delegate::RemoveRoleMember instance that is implemented by the user. |
Synchronous [exception] Synchronous version of RemoveRoleMember(MemberId memberId, RemoveRoleMemberDelegatePtr) , and throws an exception, RemoveRoleMemberException, in case of a failed call.
See RemoveRoleMember(RemoveRoleMemberDelegatePtr)
RemoveRoleMemberException |
cbe::util::Optional<MemberId> cbe::Role::removeRoleMember | ( | MemberId | memberId, |
RemoveRoleMemberError & | error | ||
) |
Synchronous [non-throwing] Synchronous version of RemoveRoleMember(memberId,RemoveRoleMemberDelegatePtr) , 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 RemoveRoleMember(memberId, RemoveRoleMemberDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the RemoveRoleMemberError object passed in will we be populated with the error information. |
false
— indicates a failed call, and the error information is passed out via the error
out/return parameter.
|
explicit |
Checks if the current instance is real.
An "unreal" instance implies typically a failed event.
Relies on the Default
constructor
Role(cbe::DefaultCtor)
true
: is real false
: unreal; got nullptr; if current instance is unbound/undefined. I.e., if it is only default constructed.