DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <Assignment.hh>
Public Types | |
using | Variable = Diades::Sdmdl::Variable |
using | Value = Diades::Sdmdl::Value |
using | Exception = Diades::Utils::Exception< Assignment > |
Public Member Functions | |
Assignment () | |
bool | valid () const |
Assignment (const Variable &var, const Value &val) | |
Assignment (const Assignment &assignment) | |
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 |
void | unvalidate () |
Static Public Member Functions | |
static string | typeName () |
Private Types | |
using | ConstVarReference = std::reference_wrapper< Variable const > |
using | ConstValReference = std::reference_wrapper< Value const > |
using | VarVector = std::vector< ConstVarReference > |
using | ValVector = std::vector< ConstValReference > |
Private Attributes | |
VarVector | _variable |
ValVector | _value |
Friends | |
ostream & | operator<< (ostream &os, const Assignment &assign) |
An Assignment is the association of a Variable and a Value of its domains. An Assignment just contains reference and aims at being a temporary container for interfacing between Bdds and their interpretation
Definition at line 30 of file Assignment.hh.
|
private |
associated with the Value of the Assignement
Definition at line 65 of file Assignment.hh.
|
private |
associated with the Variable of the Assignement
Definition at line 61 of file Assignment.hh.
Definition at line 46 of file Assignment.hh.
ConstValReference reference wrapper on a constant Diades::Sdmdl::Experimental::Assignment::Value |
Definition at line 41 of file Assignment.hh.
|
private |
Definition at line 73 of file Assignment.hh.
ConstVarReference reference wrapper on a constant Diades::Sdmdl::Experimental::Assignment::Variable |
Definition at line 36 of file Assignment.hh.
|
private |
Definition at line 69 of file Assignment.hh.
|
inline |
|
inline |
Constructor of an Assignment.
Create an assignment (var = val) if both parameters are valid and var.containsValue(val), the created assignement is invalid otherwise.
Definition at line 121 of file Assignment.hh.
|
inline |
Copy constructor
assignment | an Assignment |
Definition at line 132 of file Assignment.hh.
References _value, _variable, value(), and variable().
|
inline |
|
inlinevirtual |
Destructor
Definition at line 168 of file Assignment.hh.
|
inline |
assign | the Assignment to be assigned |
Definition at line 246 of file Assignment.hh.
References _value, _variable, value(), and variable().
|
inline |
assignment | the Assignment to compare |
Definition at line 272 of file Assignment.hh.
References valid(), value(), and variable().
|
inline |
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 |
Definition at line 202 of file Assignment.hh.
References Diades::Sdmdl::Value::isNull().
|
inline |
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 |
Definition at line 179 of file Assignment.hh.
References Diades::Sdmdl::Variable::defaultValue(), Diades::Sdmdl::Value::isNull(), and Diades::Sdmdl::Variable::isNull().
|
inlinestatic |
Definition at line 52 of file Assignment.hh.
|
inline |
Mahe the Assignment invalid
Definition at line 283 of file Assignment.hh.
|
inline |
Definition at line 104 of file Assignment.hh.
Referenced by operator==(), value(), and variable().
|
inline |
Definition at line 233 of file Assignment.hh.
References require, and valid().
Referenced by Assignment(), Diades::Sdmdl::Experimental::StateInfoEncoder::getStateInfoId(), operator=(), and operator==().
|
inline |
Definition at line 221 of file Assignment.hh.
References require, and valid().
Referenced by Assignment(), Diades::Sdmdl::Experimental::StateInfoEncoder::getStateInfoId(), operator=(), and operator==().
|
friend |
Stream operator
os | the output stream |
assign | the Assignment to print out |
also
work with invalid Assignment Definition at line 299 of file Assignment.hh.
|
private |
Definition at line 83 of file Assignment.hh.
Referenced by Assignment(), and operator=().
|
private |
Definition at line 78 of file Assignment.hh.
Referenced by Assignment(), and operator=().