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

#include <Variable.hh>

Public Member Functions

 VariableData ()
 
 ~VariableData ()
 

Private Member Functions

void createStructureVariables (const set< Identifier > &attributes, const StructureDomainData *domainData)
 Is the Variable free? That is, its current Value is not initialised. More...
 
void createArrayVariables (const set< Identifier > &attributes, const ArrayDomainData *domainData)
 
 VariableData (const Identifier &label, Domain domain, const set< Identifier > &attributes, unsigned id)
 
 VariableData (const Identifier &label, const set< Variable > &variables, unsigned id, Node node)
 
 VariableData (const Identifier &label, Domain domain, const set< Identifier > &attributes, unsigned id, Node node)
 
 VariableData (const Identifier &label, const set< Variable > &variables, const set< Identifier > &attributes, unsigned id, Node node)
 
 VariableData (const Identifier &label, Domain domain, const set< Identifier > &attributes, unsigned id, Variable variable)
 

Private Attributes

Identifier _label
 
Domain _domain
 label of the Variable More...
 
union {
   map< Identifier, Variable > *   _structure
 
   vector< Variable > *   _array
 Fields of the Variable if the Variable is a structure. More...
 
_fields
 Domain of the Variable. More...
 
set< Identifier_fieldName
 
set< Identifier_attrib
 Fieldnames of the Variable if the Variable is a structure. More...
 
void * _scope
 attributes of the Variable More...
 
VariableScope _scopeType
 The scope of the variable. More...
 
Value _value
 The scope type of the variable. More...
 
unsigned _id
 The current Value of the Variable. More...
 
bool _isFree
 The id of the Variable. More...
 

Friends

class VariableFactory
 
class Variable
 

Detailed Description

A variable. It consists of an Identifier, a Domain and a list of attributes and a owner. The variable may be structured (Structure or Array). In this case, a Variable also has some fields implemented as other Variable objects. VariableData are created/deleted by VariableFactory only. The user shall not use this class. It is for internal purpose.

Definition at line 31 of file Variable.hh.

Constructor & Destructor Documentation

Diades::Altarica::VariableData::VariableData ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
unsigned  id 
)
private

Parmetrised constructor (Variable in the global scope)

Parameters
labelLabel of the Variable
domainDomain of the Variable
attributesAttributes of the Variable empty otherwise
idthe id of the Variable
Diades::Altarica::VariableData::VariableData ( const Identifier label,
const set< Variable > &  variables,
unsigned  id,
Node  node 
)
private

Parmetrised constructor (Variable in the global scope)

Parameters
labelLabel of the Variable
variablesthe fields of the Variable
idthe id of the Variable
nodeThe scope of the variable
Diades::Altarica::VariableData::VariableData ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
unsigned  id,
Node  node 
)
private

Parmetrised constructor

Parameters
labelLabel of the Variable
domainDomain of the Variable
attributesAttributes of the Variable empty otherwise
idthe id of the Variable
nodeThe scope of the variable
Diades::Altarica::VariableData::VariableData ( const Identifier label,
const set< Variable > &  variables,
const set< Identifier > &  attributes,
unsigned  id,
Node  node 
)
private

Parmetrised constructor

Parameters
labelLabel of the Variable
domainDomain of the Variable
attributesAttributes of the Variable empty otherwise
idthe id of the Variable
nodeThe scope of the variable
Diades::Altarica::VariableData::VariableData ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
unsigned  id,
Variable  variable 
)
private

Parmetrised constructor

Parameters
labelLabel of the Variable
domainDomain of the Variable
attributesAttributes of the Variable empty otherwise
idthe id of the Variable
variableThe scope of the variable
Diades::Altarica::VariableData::VariableData ( )

Parmetrised constructor

Parameters
labelLabel of the Variable
domainDomain of the Variable
fieldsFields of the Variable if the Variable is a structure, empty otherwise
attributesAttributes of the Variable empty otherwise
idthe id of the Variable
functionThe scope of the variable Parmetrised constructor
labelLabel of the Variable
domainDomain of the Variable
fieldsFields of the Variable if the Variable is a structure, empty otherwise
attributesAttributes of the Variable empty otherwise
idthe id of the Variable
formulaThe scope of the variable Default constructor
Diades::Altarica::VariableData::~VariableData ( )

Destructor

Member Function Documentation

void Diades::Altarica::VariableData::createArrayVariables ( const set< Identifier > &  attributes,
const ArrayDomainData domainData 
)
private

Create the internal Variable objects of the current VariableData object based on the Array domain

Parameters
attributesAttributes of the Variable empty otherwise
domainDataa ArrayDomainData
void Diades::Altarica::VariableData::createStructureVariables ( const set< Identifier > &  attributes,
const StructureDomainData domainData 
)
private

Is the Variable free? That is, its current Value is not initialised.

Create the internal Variable objects of the current VariableData object based on the Structure domain

Parameters
attributesAttributes of the Variable empty otherwise
domainDataa StructureDomainData

Friends And Related Function Documentation

friend class Variable
friend

Definition at line 175 of file Variable.hh.

friend class VariableFactory
friend

Definition at line 174 of file Variable.hh.

Member Data Documentation

vector<Variable>* Diades::Altarica::VariableData::_array

Fields of the Variable if the Variable is a structure.

Definition at line 41 of file Variable.hh.

set<Identifier> Diades::Altarica::VariableData::_attrib
private

Fieldnames of the Variable if the Variable is a structure.

Definition at line 44 of file Variable.hh.

Domain Diades::Altarica::VariableData::_domain
private

label of the Variable

Definition at line 37 of file Variable.hh.

Referenced by Diades::Altarica::Variable::domain().

set<Identifier> Diades::Altarica::VariableData::_fieldName
private

Definition at line 43 of file Variable.hh.

union { ... } Diades::Altarica::VariableData::_fields

Domain of the Variable.

unsigned Diades::Altarica::VariableData::_id
private

The current Value of the Variable.

Definition at line 48 of file Variable.hh.

bool Diades::Altarica::VariableData::_isFree
private

The id of the Variable.

Definition at line 49 of file Variable.hh.

Identifier Diades::Altarica::VariableData::_label
private

Definition at line 36 of file Variable.hh.

Referenced by Diades::Altarica::Variable::label().

void* Diades::Altarica::VariableData::_scope
private

attributes of the Variable

Definition at line 45 of file Variable.hh.

Referenced by Diades::Altarica::Variable::variableScope().

VariableScope Diades::Altarica::VariableData::_scopeType
private

The scope of the variable.

Definition at line 46 of file Variable.hh.

Referenced by Diades::Altarica::Variable::scopeType().

map<Identifier,Variable>* Diades::Altarica::VariableData::_structure

Definition at line 40 of file Variable.hh.

Value Diades::Altarica::VariableData::_value
private

The scope type of the variable.

Definition at line 47 of file Variable.hh.


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