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

#include <Variable.hh>

Public Member Functions

 VariableFactory ()
 
 ~VariableFactory ()
 
const set< Identifier > & emptyAttributes () const
 
const set< Identifier > & emptyFields () const
 
Variable newVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes)
 
Variable newVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Node node)
 
Variable newVariable (const Identifier &label, const set< Variable > &variables, Node node)
 
Variable newVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Variable variable)
 

Static Public Member Functions

static VariableFactoryfactory ()
 

Private Member Functions

Variable newSimpleVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes)
 
Variable newSimpleVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Node node)
 
Variable newSimpleVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Variable variable)
 
Variable newStructureVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes)
 
Variable newStructureVariable (const Identifier &label, const set< Variable > &variables, Node node)
 
Variable newStructureVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Node node)
 
Variable newStructureVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Variable variable)
 
Variable newArrayVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes)
 
Variable newArrayVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Node node)
 
Variable newArrayVariable (const Identifier &label, Domain domain, const set< Identifier > &attributes, Variable variable)
 

Private Attributes

unordered_map< Identifier, Variable_modelVariableOfLabel
 
vector< Variable_modelVariables
 
vector< unordered_map< Identifier, Variable > > _nodeVariables
 
vector< Variable_internalVariables
 
set< Identifier_emptyAttributes
 
set< Identifier_emptyFields
 

Static Private Attributes

static VariableFactory_variableFactory
 

Detailed Description

The factory (see pattern design books) for the creation of all the Variable objects.

Definition at line 478 of file Variable.hh.

Constructor & Destructor Documentation

Diades::Altarica::VariableFactory::VariableFactory ( )

Default constructor

Diades::Altarica::VariableFactory::~VariableFactory ( )

Destructor

Member Function Documentation

const set<Identifier>& Diades::Altarica::VariableFactory::emptyAttributes ( ) const
inline

Definition at line 654 of file Variable.hh.

const set<Identifier>& Diades::Altarica::VariableFactory::emptyFields ( ) const
inline

Definition at line 661 of file Variable.hh.

static VariableFactory* Diades::Altarica::VariableFactory::factory ( )
static
Returns
a pointer to the unique factory
Variable Diades::Altarica::VariableFactory::newArrayVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes 
)
private

creation of a new array variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newArrayVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Node  node 
)
private

creation of a new array variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
nodethe scope of the variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newArrayVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Variable  variable 
)
private

creation of a new array variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
variablethe scope of the variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newSimpleVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes 
)
private

creation of a new simple variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array)
Variable Diades::Altarica::VariableFactory::newSimpleVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Node  node 
)
private

creation of a new simple variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
nodethe scope of the variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newSimpleVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Variable  variable 
)
private

creation of a new simple variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
nodethe scope of the variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newStructureVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes 
)
private

creation of a new structured variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newStructureVariable ( const Identifier label,
const set< Variable > &  variables,
Node  node 
)
private

creation of a new structured variable

Parameters
labelthe label of of the new Variable (may be empty)
variablesthe fields of the new Variable
nodethe scope of the variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newStructureVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Node  node 
)
private

creation of a new structured variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
nodethe scope of the variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newStructureVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Variable  variable 
)
private

creation of a new structured variable

Parameters
labelthe label of of the new Variable (may be empty)
domainthe Domain of the new Variable
attributesthe set of attributes of the new Variable
variablethe scope of the variable
Returns
the created Variable, if the label is empty, an internal label is generated and the Variable is considered as internal (automatic variables not implicitly declared like the elements of an array).
Variable Diades::Altarica::VariableFactory::newVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes 
)

Creation of a new Variable

Parameters
labelthe label of the new Variable
domainthe Domain of the Variable
attributesthe set of attributes of the Variable
Returns
the created Variable if success. Return an invalid Variable in case of failure like a preexisting global Variable with the same name.
Variable Diades::Altarica::VariableFactory::newVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Node  node 
)

Creation of a new Variable

Parameters
labelthe label of the new Variable
domainthe Domain of the Variable
attributesthe set of attributes of the Variable
nodethe scope of the variable
Returns
the created Variable if success. Return an invalid Variable in case of failure like a preexisting global Variable with the same name.
Variable Diades::Altarica::VariableFactory::newVariable ( const Identifier label,
const set< Variable > &  variables,
Node  node 
)

Creation of a new structure Variable

Parameters
labelthe label of the new Variable
variablesthe field of the Variable
nodethe scope of the variable
Returns
the created Variable if success. Return an invalid Variable in case of failure like a preexisting global Variable with the same name.
Variable Diades::Altarica::VariableFactory::newVariable ( const Identifier label,
Domain  domain,
const set< Identifier > &  attributes,
Variable  variable 
)

Creation of a new Variable

Parameters
labelthe label of the new Variable
domainthe Domain of the Variable
attributesthe set of attributes of the Variable
variablethe scope of the variable
Returns
the created Variable if success. Return an invalid Variable in case of failure like a preexisting variable on the same local scope with the same name.

Member Data Documentation

set<Identifier> Diades::Altarica::VariableFactory::_emptyAttributes
private

Definition at line 487 of file Variable.hh.

set<Identifier> Diades::Altarica::VariableFactory::_emptyFields
private

Definition at line 488 of file Variable.hh.

vector<Variable> Diades::Altarica::VariableFactory::_internalVariables
private

Definition at line 486 of file Variable.hh.

unordered_map<Identifier,Variable> Diades::Altarica::VariableFactory::_modelVariableOfLabel
private

Definition at line 481 of file Variable.hh.

vector<Variable> Diades::Altarica::VariableFactory::_modelVariables
private

Definition at line 482 of file Variable.hh.

vector< unordered_map<Identifier,Variable> > Diades::Altarica::VariableFactory::_nodeVariables
private

Definition at line 483 of file Variable.hh.

VariableFactory* Diades::Altarica::VariableFactory::_variableFactory
staticprivate

Definition at line 490 of file Variable.hh.


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