ERUCES::TEUserRole
#include <terole.h>
The TEUserRole class represents a user role and is derived from the TEUpdatableObject class.
Inheritance
- Inherits ERUCES::TEUpdatableObject
Public Types
enum ROLETYPE
Role type enumeration.
| Value | Description |
|---|---|
USER_DEFINED | User defined role |
SYSTEM_DEFINED | System built-in role |
Public Member Functions
| Member | Description |
|---|---|
TEUserRole() | The TEUserRole constructor is the default class constructor. |
TEUserRole(const TEUserRole &) | The TEUserRole constructor copies a TEUserRole object. |
~TEUserRole() | The TEUserRole destructor is the class destructor. |
void setRoleId(te_oid id) | The setRoleId method sets a unique role identifier. |
te_oid getRoleId() const | The getRoleId method gets a role identifier. |
void setRoleName(const _TESTD string &name) | The setRoleName method sets a role name. |
const _TESTD string getRoleName() const | The getRoleName method gets a role name. |
ROLETYPE getRoleType() const | The getRoleType method gets a role type. |
void setRoleType(ROLETYPE type) | The setRoleType method sets a role type. |
bool isBuiltIn() const | The isBuiltIn method checks whether a role is preset or user-defined. |
unsigned int OperationIdCount() const | The OperationIdCount method gets the number of operations in a TEUserRole object. |
void getOperationIds(TEObjectContainer &opids) const | The 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() const | The 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()
The TEUserRole destructor is the class destructor.
void setRoleId(te_oid id)
The setRoleId method sets a unique role identifier.
Parameters
| Parameter | Description |
|---|---|
id | Role 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
| Parameter | Description |
|---|---|
name | String 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
| Parameter | Description |
|---|---|
type | Role 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
| Parameter | Description |
|---|---|
opids | Container 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
| Parameter | Description |
|---|---|
opid | ID 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
| Parameter | Description |
|---|---|
opid | ID 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.