Skip to main content

ERUCES::TEUserRole

#include <terole.h>

The TEUserRole class represents a user role and is derived from the TEUpdatableObject class.

© Pi Soft, 2018-2026 · Tricryption Engine 8.1

Inheritance​

Public Types​

enum ROLETYPE

Role type enumeration.

ValueDescription
USER_DEFINEDUser defined role
SYSTEM_DEFINEDSystem built-in role

Public Member Functions​

MemberDescription
TEUserRole()The TEUserRole constructor is the default class constructor.
TEUserRole(const TEUserRole &)The TEUserRole constructor copies a TEUserRole object.
TEUserRole & operator=(const TEUserRole &)The = operator assigns a deep copy of the source's implementation object to this object (self-assignment safe; the previous implementation object is freed).
~TEUserRole()The TEUserRole destructor is the class destructor.
void setRoleId(te_oid id)The setRoleId method sets a unique role identifier.
te_oid getRoleId() constThe getRoleId method gets a role identifier.
void setRoleName(const _TESTD string &name)The setRoleName method sets a role name.
const _TESTD string getRoleName() constThe getRoleName method gets a role name.
ROLETYPE getRoleType() constThe getRoleType method gets a role type.
void setRoleType(ROLETYPE type)The setRoleType method sets a role type.
bool isBuiltIn() constThe isBuiltIn method checks whether a role is preset or user-defined.
unsigned int OperationIdCount() constThe OperationIdCount method gets the number of operations in a TEUserRole object.
void getOperationIds(TEObjectContainer &opids) constThe getOperationIDs method gets the IDs of all operations assigned to a TEUserRole object.
bool addOperation(te_oid opid)The addOperation method adds an operation to a TEUserRole object.
bool removeOperation(te_oid opid)The removeOperation method removes an operation from a TEUserRole object.
void clearOperations()The clearOperations method clears all operations from a TEUserRole object.
TEObject * clone() constThe clone method clones a TEUserRole object.

Member Function Documentation​

TEUserRole()​

The TEUserRole constructor is the default class constructor.

Role type definition

TEUserRole(const TEUserRole &)​

The TEUserRole constructor copies a TEUserRole object.

TEUserRole & operator=(const TEUserRole &)​

The = operator assigns a deep copy of the source's implementation object to this object (self-assignment safe; the previous implementation object is freed).

TE81-448 (W36 round 1): until this round the implicit member copied the pointer, so the assignee and the source freed one object twice.

~TEUserRole()​

The TEUserRole destructor is the class destructor.

void setRoleId(te_oid id)​

The setRoleId method sets a unique role identifier.

Parameters

ParameterDescription
idRole ID to be set.

te_oid getRoleId() const​

The getRoleId method gets a role identifier.

Returns: Role ID.

void setRoleName(const _TESTD string &name)​

The setRoleName method sets a role name.

Parameters

ParameterDescription
nameString of role name.

const _TESTD string getRoleName() const​

The getRoleName method gets a role name.

Returns: String of role name

ROLETYPE getRoleType() const​

The getRoleType method gets a role type.

Returns: Role type.

void setRoleType(ROLETYPE type)​

The setRoleType method sets a role type.

Parameters

ParameterDescription
typeRole type to be set.

bool isBuiltIn() const​

The isBuiltIn method checks whether a role is preset or user-defined.

Returns: Returns a boolean value indicating whether the role is preset; TRUE = role is preset, FALSE = role is user-defined.

unsigned int OperationIdCount() const​

The OperationIdCount method gets the number of operations in a TEUserRole object.

Returns: number of operations

void getOperationIds(TEObjectContainer &opids) const​

The getOperationIDs method gets the IDs of all operations assigned to a TEUserRole object.

Parameters

ParameterDescription
opidsContainer of IDs of all operations the role can process

bool addOperation(te_oid opid)​

The addOperation method adds an operation to a TEUserRole object.

Parameters

ParameterDescription
opidID of operation to be added.

Returns: Returns a boolean representing whether or not the operation was added.

bool removeOperation(te_oid opid)​

The removeOperation method removes an operation from a TEUserRole object.

Parameters

ParameterDescription
opidID of operation to be removed

void clearOperations()​

The clearOperations method clears all operations from a TEUserRole object.

TEObject * clone() const​

The clone method clones a TEUserRole object.

Returns: Returns a cloned TEUserRole object.

Examples​