#include <role.h>
Public Member Functions | |
Role (unsigned _id, ROLE_TYPE _type, unsigned _basing_var, unsigned _basing_fsa, PathExpression *_rel_path, PathExpression *_var_path) | |
Constructor. | |
virtual | ~Role () |
void | print (OutputStream &dos) const |
Prints this single role. | |
virtual void | printExtended (OutputStream &dos) |
Prints this single role with extended informations. | |
unsigned | getId () |
Returns the unique role ID. | |
void | setId (unsigned _id) |
Sets the unique role ID. | |
ROLE_TYPE | getType () |
Returns the type of this single role. | |
unsigned | getBasingVar () |
Returns the basing variable of this single role. | |
unsigned | getBasingFSA () |
Returns the basing first straight ancestor (FSA) variable of this single role. | |
PathExpression * | getConcatenationPath () |
Returns the concatenated path of this single role. | |
SignOffExpression * | getSignOffExpression () |
Returns the corresponding signOff-statement of this single role. | |
bool | isPosRole () |
Returns if this single role derives from a [position ()=1] PathStepAttributePosition. | |
bool | isDosRole () |
Returns if this single role derives from a /dos : : node () PathStepExpression. | |
Private Attributes | |
unsigned | id |
The unique role ID. | |
ROLE_TYPE | type |
The type of this single role. | |
unsigned | basing_var |
The basing variable of this single role. | |
unsigned | basing_fsa |
The basing first straight ancestor (FSA) variable of this single role. | |
PathExpression * | rel_path |
The relative path of this single role. | |
PathExpression * | var_path |
The path of the variable of this single role. | |
PathExpression * | concat_path |
The constructed concatenated path of this single role. |
Represents a single role, which is removed from BufferNode by a SignOffExpression.
Definition at line 57 of file role.h.
Role::Role | ( | unsigned | _id, | |
ROLE_TYPE | _type, | |||
unsigned | _basing_var, | |||
unsigned | _basing_fsa, | |||
PathExpression * | _rel_path, | |||
PathExpression * | _var_path | |||
) |
Constructor.
Constructor - creating object for a role ID, a ROLE_TYPE, a basing variable, a basing first straight ancestor (FSA) variable and two PathExpression.
[in] | _id | Unique role ID. |
[in] | _type | ROLE_TYPE. |
[in] | _basing_var | Basing variable. |
[in] | _basing_fsa | Basing first straight ancestor (FSA) variable. |
[in] | _rel_path | Relative path. |
[in] | _var_path | Path of the variable. |
Definition at line 39 of file role.cpp.
References PathExpression::addPathStep(), PathExpression::clone(), concat_path, PathExpression::getPathSteps(), rel_path, and var_path.
Role::~Role | ( | ) | [virtual] |
unsigned Role::getBasingFSA | ( | ) | [inline] |
Returns the basing first straight ancestor (FSA) variable of this single role.
Returns the basing first straight ancestor (FSA) variable of this single role, i.e. returns the member variable.
unsigned | Basing first straight ancestor (FSA) variable of this single role. |
Definition at line 135 of file role.h.
References basing_fsa.
unsigned Role::getBasingVar | ( | ) | [inline] |
Returns the basing variable of this single role.
Returns the basing variable of this single role, i.e. returns the member variable.
unsigned | Basing variable of this single role. |
Definition at line 126 of file role.h.
References basing_var.
Referenced by ProjectionTreeNode::print().
PathExpression * Role::getConcatenationPath | ( | ) | [inline] |
Returns the concatenated path of this single role.
Returns the concatenated path of this single role, which is the resulting PathExpression on concatenating the relative path (rel_path) with the path of the variable (var_path).
PathExpression* | Pointer to a PathExpression obejct. |
Definition at line 145 of file role.h.
References concat_path.
unsigned Role::getId | ( | ) | [inline] |
Returns the unique role ID.
Returns the unique role ID, i.e. returns the member variable.
unsigned | Unique role ID of this single role. |
Definition at line 100 of file role.h.
References id.
Referenced by ProjectionTreeNode::print(), DependencyTuple::print(), and BufferNode::removeRoleFromNode().
SignOffExpression * Role::getSignOffExpression | ( | ) |
Returns the corresponding signOff-statement of this single role.
Returns the corresponding signOff-statement of this single role.
SignOffExpression* | Pointer to a SignOffExpression object. |
Definition at line 79 of file role.cpp.
References basing_fsa, PathExpression::clone(), concat_path, PathExpression::isEmptyPath(), and VarExpression::setId().
ROLE_TYPE Role::getType | ( | ) | [inline] |
Returns the type of this single role.
Returns the type of this single role.
ROLE_TYPE. |
Definition at line 117 of file role.h.
References type.
Referenced by ProjectionTreeNode::print().
bool Role::isDosRole | ( | ) |
Returns if this single role derives from a /dos
:
:
node
()
PathStepExpression.
Returns if this single role derives from a /dos
:
:
node
()
PathStepExpression.
bool | true if this single role derives from a /dos : : node () PathStepExpression, false otherwise. |
Definition at line 100 of file role.cpp.
References PathExpression::getTailPathStep(), PathStepExpression::isDosNodeStep(), PathExpression::isEmptyPath(), and var_path.
Referenced by ProjectionTreeNode::isDosDepNode(), and BufferNode::removeRoleFromNode().
bool Role::isPosRole | ( | ) |
Returns if this single role derives from a [position
()=1]
PathStepAttributePosition.
Returns if this single role derives from a [position
()=1]
PathStepAttributePosition.
bool | true if this single role derives from a [position ()=1] PathStepAttributePosition, false otherwise. |
Definition at line 94 of file role.cpp.
References PathStepExpression::getAttribute(), PathExpression::getTailPathStep(), PathStepAttribute::getType(), PathStepExpression::hasAttribute(), and var_path.
Referenced by ProjectionTreeNode::isPosDepNode().
void Role::print | ( | OutputStream & | dos | ) | const |
Prints this single role.
Prints this single role.
[in] | dos | Pointer to a OutputStream object. |
void |
Definition at line 65 of file role.cpp.
References id.
Referenced by operator<<().
void Role::printExtended | ( | OutputStream & | dos | ) | [virtual] |
Prints this single role with extended informations.
Prints this single role with extended informations.
[in] | dos | Pointer to a OutputStream object. |
void |
Definition at line 69 of file role.cpp.
References basing_fsa, basing_var, VarName::getInstance(), VarName::getVarname(), PathExpression::isEmptyPath(), rel_path, and var_path.
void Role::setId | ( | unsigned | _id | ) | [inline] |
unsigned Role::basing_fsa [private] |
The basing first straight ancestor (FSA) variable of this single role.
The basing first straight ancestor (FSA) variable of this single role, which is the fourth argument of the constructor.
Definition at line 195 of file role.h.
Referenced by getBasingFSA(), getSignOffExpression(), and printExtended().
unsigned Role::basing_var [private] |
The basing variable of this single role.
The basing variable of this single role, which is the third argument of the constructor.
Definition at line 189 of file role.h.
Referenced by getBasingVar(), and printExtended().
PathExpression * Role::concat_path [private] |
The constructed concatenated path of this single role.
The constructed concatenated path of this single role, which has been done in the constructor.
Definition at line 214 of file role.h.
Referenced by getConcatenationPath(), getSignOffExpression(), Role(), and ~Role().
unsigned Role::id [private] |
PathExpression * Role::rel_path [private] |
The relative path of this single role.
The relative path of this single role, which is the fifth argument of the constructor.
Definition at line 201 of file role.h.
Referenced by printExtended(), Role(), and ~Role().
ROLE_TYPE Role::type [private] |
PathExpression * Role::var_path [private] |
The path of the variable of this single role.
The path of the variable of this single role, which is the sixth argument of the constructor. This member variable may be NULL
.
Definition at line 208 of file role.h.
Referenced by isDosRole(), isPosRole(), printExtended(), Role(), and ~Role().