DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
Diades::Altarica::NodeInstance Class Reference

#include <NodeInstance.hh>

Public Types

typedef NodeInstanceData::VariableIndex VariableIndex
 
typedef vector< NodeInstanceData * >::size_type SubNodeIndex
 

Public Member Functions

 NodeInstance ()
 
 NodeInstance (NodeInstanceData *data)
 
 NodeInstance (const NodeInstance &node)
 
NodeInstanceoperator= (const NodeInstance &node)
 
Node nodeType () const
 
bool valid () const
 
bool operator< (const NodeInstance &node) const
 
bool operator== (const NodeInstance &node) const
 
AltaricaModelmodel () const
 
const Identifiername () const
 
unsigned numberOfFlowVariables () const
 
unsigned numberOfStateVariables () const
 
unsigned numberOfNodeVariables () const
 
Variable getVariable (const Identifier &name) const
 
EncVariable getEncodedVariable (const Variable &var) const
 
EncVariable getEncodedNextVariable (const Variable &var) const
 
VariableIndex firstNodeVariableIndex () const
 
VariableIndex lastNodeVariableIndex () const
 
Variable getNodeVariable (VariableIndex index) const
 
EncVariable getEncodedNodeVariable (VariableIndex index) const
 
EncVariable getEncodedNextNodeVariable (VariableIndex index) const
 
VariableIndex firstStateVariableIndex () const
 
VariableIndex lastStateVariableIndex () const
 
Variable getStateVariable (VariableIndex index) const
 
EncVariable getEncodedStateVariable (VariableIndex index) const
 
EncVariable getEncodedNextStateVariable (VariableIndex index) const
 
VariableIndex firstFlowVariableIndex () const
 
VariableIndex lastFlowVariableIndex () const
 
Variable getFlowVariable (VariableIndex index) const
 
EncVariable getEncodedFlowVariable (VariableIndex index) const
 
EncVariable getEncodedNextFlowVariable (VariableIndex index) const
 
unsigned numberOfSubNodes () const
 
SubNodeIndex subNodeFirst () const
 
SubNodeIndex subNodeLast () const
 
NodeInstance getSubNode (SubNodeIndex index) const
 
FormulaFactoryfactory ()
 
EncVariableFactoryvarFactory ()
 
EncVariable getEncodedEvents () const
 
Formula getEncodedTransition (Event event) const
 

Private Attributes

NodeInstanceData_data
 

Friends

ostream & operator<< (ostream &os, const NodeInstance &instance)
 

Detailed Description

This class implements a Node instance of the model. For example, if a node A is defined and in another node there is a sub-node b:A then the object 'b' is a NodeInstance of the Node A This class also internaly encodes the data as a set of BDDs A NodeInstance has its own variable and formula factories for the encoding into BDDs. The class NodeInstance is very light as it is just a pointer on an NodeInstanceData object. So it can be used like a Value and included in STL-containers without any problem of efficiency.

Definition at line 200 of file NodeInstance.hh.

Member Typedef Documentation

Definition at line 412 of file NodeInstance.hh.

Definition at line 289 of file NodeInstance.hh.

Constructor & Destructor Documentation

Diades::Altarica::NodeInstance::NodeInstance ( )
inline

Definition at line 206 of file NodeInstance.hh.

Diades::Altarica::NodeInstance::NodeInstance ( NodeInstanceData data)
inline

NodeInstance constructor

Parameters
typethe type of the NodeInstance (that is a Node)
namethe name of the NodeInstance

Definition at line 213 of file NodeInstance.hh.

Diades::Altarica::NodeInstance::NodeInstance ( const NodeInstance node)
inline

copy constructor

Definition at line 218 of file NodeInstance.hh.

Member Function Documentation

FormulaFactory& Diades::Altarica::NodeInstance::factory ( )
inline
Returns
the FormulaFactory associated to this NodeInstance

Definition at line 442 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::factory().

VariableIndex Diades::Altarica::NodeInstance::firstFlowVariableIndex ( ) const
inline
Returns
the index of the first flow variable (either encoded or not)

Definition at line 376 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::firstFlowVariableIndex().

VariableIndex Diades::Altarica::NodeInstance::firstNodeVariableIndex ( ) const
inline
Returns
the index of the first node variable (either encoded or not)

Definition at line 320 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::firstNodeVariableIndex().

VariableIndex Diades::Altarica::NodeInstance::firstStateVariableIndex ( ) const
inline
Returns
the index of the first state variable (either encoded or not)

Definition at line 348 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::firstStateVariableIndex().

EncVariable Diades::Altarica::NodeInstance::getEncodedEvents ( ) const
inline
Returns
the encoded variable for the events

Definition at line 453 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getEncodedEvents().

EncVariable Diades::Altarica::NodeInstance::getEncodedFlowVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Encoded Flow Variable

Definition at line 393 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getEncodedFlowVariable().

EncVariable Diades::Altarica::NodeInstance::getEncodedNextFlowVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Encoded next-Flow Variable

Definition at line 400 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getEncodedNextFlowVariable().

EncVariable Diades::Altarica::NodeInstance::getEncodedNextNodeVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Encoded next-Node Variable

Definition at line 344 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getEncodedNextNodeVariable().

EncVariable Diades::Altarica::NodeInstance::getEncodedNextStateVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Encoded next-State Variable

Definition at line 371 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getEncodedNextStateVariable().

EncVariable Diades::Altarica::NodeInstance::getEncodedNextVariable ( const Variable var) const
inline
EncVariable Diades::Altarica::NodeInstance::getEncodedNodeVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Encoded Node Variable

Definition at line 338 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getEncodedNodeVariable().

EncVariable Diades::Altarica::NodeInstance::getEncodedStateVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Encoded State Variable

Definition at line 365 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getEncodedStateVariable().

Formula Diades::Altarica::NodeInstance::getEncodedTransition ( Event  event) const
inline
EncVariable Diades::Altarica::NodeInstance::getEncodedVariable ( const Variable var) const
inline
Variable Diades::Altarica::NodeInstance::getFlowVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Flow Variable

Definition at line 387 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getFlowVariable().

Variable Diades::Altarica::NodeInstance::getNodeVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding Node Variable

Definition at line 332 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getNodeVariable().

Variable Diades::Altarica::NodeInstance::getStateVariable ( VariableIndex  index) const
inline
Parameters
indexa VariableIndex
Returns
the corresponding State Variable

Definition at line 359 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getStateVariable().

NodeInstance Diades::Altarica::NodeInstance::getSubNode ( SubNodeIndex  index) const
inline
Parameters
indexIndex of the sub node
Returns
the corresponding sub node

Definition at line 434 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::getSubNode().

Variable Diades::Altarica::NodeInstance::getVariable ( const Identifier name) const
inline
VariableIndex Diades::Altarica::NodeInstance::lastFlowVariableIndex ( ) const
inline
Returns
the index of the last flow variable (either encoded or not)

Definition at line 381 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::lastFlowVariableIndex().

VariableIndex Diades::Altarica::NodeInstance::lastNodeVariableIndex ( ) const
inline
Returns
the index of the last node variable (either encoded or not)

Definition at line 325 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::lastNodeVariableIndex().

VariableIndex Diades::Altarica::NodeInstance::lastStateVariableIndex ( ) const
inline
Returns
the index of the last state variable (either encoded or not)

Definition at line 353 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::lastStateVariableIndex().

AltaricaModel& Diades::Altarica::NodeInstance::model ( ) const
inline

The model that owns this NodeInstance

Returns
this model;

Definition at line 264 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::model().

const Identifier& Diades::Altarica::NodeInstance::name ( ) const
inline

Name of the node instance

Returns
the name of the node instance

Definition at line 270 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::name().

Node Diades::Altarica::NodeInstance::nodeType ( ) const
inline

Definition at line 234 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::nodeType().

unsigned Diades::Altarica::NodeInstance::numberOfFlowVariables ( ) const
inline
Returns
the number of flow variables

Definition at line 275 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::numberOfFlowVariables().

unsigned Diades::Altarica::NodeInstance::numberOfNodeVariables ( ) const
inline
Returns
the number of node variables

Definition at line 285 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::numberOfNodeVariables().

unsigned Diades::Altarica::NodeInstance::numberOfStateVariables ( ) const
inline
Returns
the number of state variables

Definition at line 280 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::numberOfStateVariables().

unsigned Diades::Altarica::NodeInstance::numberOfSubNodes ( ) const
inline
Returns
the number of subnodes

Definition at line 406 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::numberOfSubNodes().

bool Diades::Altarica::NodeInstance::operator< ( const NodeInstance node) const
inline

comparison operator

Parameters
nodeInstancean NodeInstance
Returns
true if the current instance is lower (pointer comparison)

Definition at line 249 of file NodeInstance.hh.

References _data.

NodeInstance& Diades::Altarica::NodeInstance::operator= ( const NodeInstance node)
inline

assignment operator

Parameters
nodea NodeInstance
Returns
a NodeInstance

Definition at line 226 of file NodeInstance.hh.

References _data.

bool Diades::Altarica::NodeInstance::operator== ( const NodeInstance node) const
inline

equality operator

Parameters
nodeInstancean NodeInstance
Returns
true if the current instance is lower (pointer comparison)

Definition at line 257 of file NodeInstance.hh.

References _data.

SubNodeIndex Diades::Altarica::NodeInstance::subNodeFirst ( ) const
inline
Returns
the index of the first sub node

Definition at line 417 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::subNodeFirst().

SubNodeIndex Diades::Altarica::NodeInstance::subNodeLast ( ) const
inline
Returns
the index of the last sub node

Definition at line 425 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::subNodeLast().

bool Diades::Altarica::NodeInstance::valid ( ) const
inline
Returns
true if the NodeInstance is valid

Definition at line 239 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::valid().

EncVariableFactory& Diades::Altarica::NodeInstance::varFactory ( )
inline
Returns
the EncVariableFactory associated to this NodeInstance

Definition at line 447 of file NodeInstance.hh.

References Diades::Altarica::NodeInstanceData::varFactory().

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const NodeInstance instance 
)
friend

Output stream operator on a Node Instance

Member Data Documentation

NodeInstanceData* Diades::Altarica::NodeInstance::_data
private

Definition at line 203 of file NodeInstance.hh.

Referenced by operator<(), operator=(), and operator==().


The documentation for this class was generated from the following file: