DiaDes
0.1
DIAgnosisofDiscrete-EventSystem
|
Altarica assignments like x:=y. More...
#include <Assignment.hh>
Public Types | |
typedef reference_wrapper< Assignment > | Reference |
typedef reference_wrapper< Assignment const > | ConstReference |
typedef Assignment * | Pointer |
typedef const Assignment * | ConstPointer |
Public Member Functions | |
Assignment () | |
Assignment (const NodeDecl &owner, const Expression &memberAccess, const Expression &assignedValue) | |
virtual | ~Assignment () |
void | setMemberAccess (const Expression &memberAccess) |
void | setValue (const Expression &assignedValue) |
void | setOwner (const NodeDecl &owner) |
const Expression & | memberAccess () const |
const Expression & | assignedValue () const |
const NodeDecl & | owner () const |
bool | operator== (const Assignment &assignment) const |
bool | valid () const |
Private Attributes | |
Expression::ExprVector | _memberAccess |
Expression::ExprVector | _assignedValue |
vector< reference_wrapper< NodeDecl const > > | _owner |
Friends | |
ostream & | operator<< (ostream &os, const Assignment &assignment) |
Exception | |
typedef Utils::Exception< Assignment > | Exception |
static string | typeName () |
Altarica assignments like x:=y.
This class implements an Altarica assignment like x:=y. Both x and y are expressions. x characterises the variable to assign and y the value to assign to x.
Definition at line 38 of file Assignment.hh.
typedef const Assignment* Diades::Altarica::Assignment::ConstPointer |
Definition at line 44 of file Assignment.hh.
typedef reference_wrapper<Assignment const> Diades::Altarica::Assignment::ConstReference |
Definition at line 42 of file Assignment.hh.
Definition at line 56 of file Assignment.hh.
Definition at line 43 of file Assignment.hh.
typedef reference_wrapper<Assignment> Diades::Altarica::Assignment::Reference |
Definition at line 41 of file Assignment.hh.
|
inline |
Default constructor
Definition at line 65 of file Assignment.hh.
References assignedValue(), memberAccess(), and owner().
Diades::Altarica::Assignment::Assignment | ( | const NodeDecl & | owner, |
const Expression & | memberAccess, | ||
const Expression & | assignedValue | ||
) |
Constructor
owner | the node declaration containing this assignment |
memberAccess | the variable to assign (an Expression whose scope is a VariableDecl to be assigned) |
assignedValue | the value to assign to the variable (an Expression that will be evaluated to get the Value to assign to the Variable supported by the Expression memberAccess) |
|
inlinevirtual |
Destructor
Definition at line 82 of file Assignment.hh.
References setMemberAccess(), and setValue().
|
inline |
Definition at line 129 of file Assignment.hh.
References require, and valid().
Referenced by Assignment().
|
inline |
Definition at line 117 of file Assignment.hh.
References require, and valid().
Referenced by Assignment().
bool Diades::Altarica::Assignment::operator== | ( | const Assignment & | assignment | ) | const |
Equality operator
assignment | the Assignment to compare |
Referenced by owner().
|
inline |
Definition at line 142 of file Assignment.hh.
References operator<<, operator==(), require, and valid().
Referenced by Diades::Altarica::NodeDecl::addInitialisation(), and Assignment().
void Diades::Altarica::Assignment::setMemberAccess | ( | const Expression & | memberAccess | ) |
Set the assigned variable designed by the given Expression
memberAccess | the Expression designing the Variable to assign |
Referenced by ~Assignment().
|
inline |
owner | the owner of the Assignment |
Definition at line 105 of file Assignment.hh.
void Diades::Altarica::Assignment::setValue | ( | const Expression & | assignedValue | ) |
Set the Value to assign to the Variable
assignedValue | the value to assign (result of the Expression evaluations). |
Referenced by ~Assignment().
|
inlinestatic |
Definition at line 57 of file Assignment.hh.
bool Diades::Altarica::Assignment::valid | ( | ) | const |
Referenced by Diades::Altarica::NodeDecl::addInitialisation(), assignedValue(), memberAccess(), and owner().
|
friend |
Stream operator
os | output stream |
assignment | Assignment to assign |
Referenced by owner().
|
private |
Definition at line 48 of file Assignment.hh.
|
private |
Definition at line 47 of file Assignment.hh.
|
private |
Definition at line 49 of file Assignment.hh.