DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <Assignment.hh>
Public Types | |
typedef Diades::Utils::Exception< Assignment > | Exception |
Public Member Functions | |
Assignment () | |
bool | valid () const |
Assignment (const Variable &var, const Value &val) | |
Assignment (const Assignment &assignment) | |
virtual | ~Assignment () |
void | setVariable (const Variable &var) |
void | setValue (const Value &val) |
const Variable & | variable () const |
const Value & | value () const |
Assignment & | operator= (const Assignment &assign) |
bool | operator== (const Assignment &assignment) const |
bool | operator< (const Assignment &assignment) const |
void | unvalidate () |
Static Public Member Functions | |
static string | typeName () |
Private Attributes | |
Variable | _variable |
Value | _value |
Friends | |
ostream & | operator<< (ostream &os, const Assignment &assign) |
An assignment var = val where var is a Variable and val is a Value
Definition at line 23 of file Assignment.hh.
Definition at line 26 of file Assignment.hh.
|
inline |
Definition at line 39 of file Assignment.hh.
Referenced by valid().
Constructor of an Assignment.
Create an assignment (var = val) if both parameters are valid and var.containsValue(val), the created assignement is invalid otherwise.
|
inline |
|
inlinevirtual |
bool Diades::Sdmdl::Assignment::operator< | ( | const Assignment & | assignment | ) | const |
|
inline |
|
inline |
assignment |
Definition at line 146 of file Assignment.hh.
References _value, _variable, operator<(), and valid().
void Diades::Sdmdl::Assignment::setValue | ( | const Value & | val | ) |
Set the Value of the current Assignment. If the Value is valid and is a possible Value of the variable(), set the Assignment to (variable() = val). The Assignment is invalid otherwise
val | the Value to assign |
Referenced by ~Assignment().
void Diades::Sdmdl::Assignment::setVariable | ( | const Variable & | var | ) |
Set the Variable of the current Assignment. If the Variable is valid, and a default Value is available for this Variable, set the Assignment to (var = var.defaultValue). The Assignment is invalid otherwise
var | a Variable |
Referenced by ~Assignment().
|
inlinestatic |
Definition at line 27 of file Assignment.hh.
|
inline |
Definition at line 165 of file Assignment.hh.
References operator<<.
|
inline |
Definition at line 47 of file Assignment.hh.
References Assignment().
Referenced by operator==().
|
inline |
Definition at line 116 of file Assignment.hh.
References _value.
|
inline |
Definition at line 104 of file Assignment.hh.
References _variable.
|
friend |
|
private |
Definition at line 31 of file Assignment.hh.
Referenced by operator=(), operator==(), and value().
|
private |
Definition at line 30 of file Assignment.hh.
Referenced by operator=(), operator==(), and variable().