#include <rolelist.h>
Public Member Functions | |
virtual | ~RoleList () |
vector< Role * > * | getRoles () |
Returns all used roles. | |
Role * | getFreshRole (unsigned basing_var, ROLE_TYPE type, PathExpression *from_var) |
Returns a fresh unused role for use. | |
unsigned | getMaxRoleId () |
Returns the maximum id of all used roles. | |
bool | removeRole (Role *role) |
Removes a single role. | |
void | sortRolesForSignOffs () |
Sorts roles, which belong together, for better/faster SignOffExpression execution. | |
Static Public Member Functions | |
static void | initInstance (PathEnvironment *_penv) |
Initializes instance of RoleList. | |
static RoleList * | getInstance () |
Returns instance of RoleList. | |
Private Member Functions | |
void | computeMaxRoleId () |
Computes the maximum id of all used roles (max_role_id). | |
RoleList (PathEnvironment *_penv) | |
Constructor. | |
Private Attributes | |
vector< Role * > | roles |
All used roles. | |
PathEnvironment * | penv |
The entered PathEnvironment. | |
unsigned | max_role_id |
bool | max_role_id_computed |
Indicates if the maximum id of all used roles has been computed. | |
Static Private Attributes | |
static RoleList * | instance = NULL |
Instance of RoleList. |
Represents a list of all used roles, i.e. of all used Role, e.g. ri
or rj
(whereas i != j
), which takes a PathEnvironment as arguments.
Definition at line 55 of file rolelist.h.
RoleList::~RoleList | ( | ) | [virtual] |
RoleList::RoleList | ( | PathEnvironment * | _penv | ) | [private] |
Constructor.
Constructor - creating object for a PathEnvironment.
[in] | _penv | Pointer to a PathEnvironment object. |
Definition at line 48 of file rolelist.cpp.
Referenced by initInstance().
void RoleList::computeMaxRoleId | ( | ) | [private] |
Computes the maximum id of all used roles (max_role_id).
Computes the maximum id of all used roles (max_role_id).
void |
Definition at line 145 of file rolelist.cpp.
References max_role_id, max_role_id_computed, and roles.
Referenced by getMaxRoleId().
Role * RoleList::getFreshRole | ( | unsigned | basing_var, | |
ROLE_TYPE | type, | |||
PathExpression * | from_var | |||
) |
Returns a fresh unused role for use.
Returns a fresh unused role for use.
[in] | basing_var | The underlying (numeric value of a) variable for the PathExpression, which is the third argument of this method. |
[in] | type | ROLE_TYPE. |
[in] | from_var | Pointer to a PathExpression object. |
Role* | Pointer to a Role object. |
Definition at line 58 of file rolelist.cpp.
References getInstance(), PathEnvironment::getPathBetween(), penv, and roles.
Referenced by ProjectionTree::createProjectionTree().
static RoleList * RoleList::getInstance | ( | ) | [static] |
Returns instance of RoleList.
Returns instance of RoleList, i.e. of this object.
RoleList* | Pointer to a RoleList object. |
Definition at line 44 of file rolelist.cpp.
References instance.
Referenced by Executor::buildSignOffQuery(), ProjectionTree::createProjectionTree(), getFreshRole(), IntMultiSet::IntMultiSet(), ProjectionTreeNode::removeSubtreeExclSelf(), ProjectionTreeNode::removeSubtreeInclSelf(), ProjectionTreeNode::setRedundantRoleSelf(), and Executor::~Executor().
unsigned RoleList::getMaxRoleId | ( | ) |
Returns the maximum id of all used roles.
Returns the maximum id of all used roles.
unsigned | Maximum id of all used roles. |
Definition at line 72 of file rolelist.cpp.
References computeMaxRoleId(), max_role_id, and max_role_id_computed.
Referenced by IntMultiSet::IntMultiSet().
vector< Role * > * RoleList::getRoles | ( | ) | [inline] |
Returns all used roles.
Returns all used roles, i.e. returns the member variable.
vector<Role*>* | Pointer to a vector object containing pointer of Role objects. |
Definition at line 85 of file rolelist.h.
References roles.
Referenced by Executor::buildSignOffQuery().
static void RoleList::initInstance | ( | PathEnvironment * | _penv | ) | [static] |
Initializes instance of RoleList.
Initializes instance of RoleList, i.e. initializes this object.
[in] | _penv | Pointer to a PathEnvironment object. |
void |
Definition at line 40 of file rolelist.cpp.
References instance, and RoleList().
Referenced by Executor::collectQueryInformation().
bool RoleList::removeRole | ( | Role * | role | ) |
Removes a single role.
Removes a single role in this list, i.e. removes a single role in this object.
[in] | role | Pointer to a Role object (role which should be removed). |
bool | true if Role was successfully removed, false otherwise. |
Definition at line 80 of file rolelist.cpp.
References roles.
Referenced by ProjectionTreeNode::removeSubtreeExclSelf(), and ProjectionTreeNode::removeSubtreeInclSelf().
void RoleList::sortRolesForSignOffs | ( | ) |
Sorts roles, which belong together, for better/faster SignOffExpression execution.
Sorts roles, which belong together, for better/faster SignOffExpression execution.
void |
Definition at line 95 of file rolelist.cpp.
References roles.
Referenced by Executor::buildSignOffQuery().
static RoleList * RoleList::instance = NULL [static, private] |
Instance of RoleList.
Instance of RoleList to avoid duplicate existence of this object.
Definition at line 132 of file rolelist.h.
Referenced by getInstance(), and initInstance().
unsigned RoleList::max_role_id [private] |
The maximum id of all used roles.
Definition at line 156 of file rolelist.h.
Referenced by computeMaxRoleId(), and getMaxRoleId().
bool RoleList::max_role_id_computed [private] |
Indicates if the maximum id of all used roles has been computed.
Indicates if the maximum id of all used roles has been computed, i.e. true
if it has been computed, false
otherwise.
Definition at line 163 of file rolelist.h.
Referenced by computeMaxRoleId(), and getMaxRoleId().
PathEnvironment * RoleList::penv [private] |
The entered PathEnvironment.
The entered PathEnvironment, which is the argument of the constructor.
Definition at line 150 of file rolelist.h.
Referenced by getFreshRole().
vector< Role * > RoleList::roles [private] |
All used roles.
All used roles, i.e. all used Role.
Definition at line 144 of file rolelist.h.
Referenced by computeMaxRoleId(), getFreshRole(), getRoles(), removeRole(), sortRolesForSignOffs(), and ~RoleList().