DiaDes  0.1
DIAgnosisofDiscrete-EventSystem
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
Diades::Altarica::ValueFactory Class Reference

#include <Value.hh>

Public Types

typedef Utils::Exception< ValueFactoryException
 

Public Member Functions

const ValuegetValue (const Identifier &value)
 
const ValuegetValue (bool value)
 
const ValuegetValue (int value)
 
const ValuegetValue (const Value::ArrayFields &arrayValueFields)
 
const ValuegetValue (const Value::StructureFields &structureValueFields)
 
const ValuenullValue () const
 
 ~ValueFactory ()
 
 ValueFactory (AltaricaModel &model)
 
void init ()
 
void clear ()
 
const AltaricaModelowner () const
 
AltaricaModelowner ()
 

Static Public Member Functions

static string typeName ()
 

Private Attributes

AltaricaModel_owner
 
vector< Value::Pointer_basicValues
 
unordered_map< Identifier, unsigned > _identifierMapping
 
unordered_map< int, Value::Pointer_integerMapping
 
vector< Value::Pointer_identifierValues
 
unordered_map< string, unsigned > _structureMapping
 
vector< Value::Pointer_structuredValues
 
unordered_map< string, unsigned > _arrayMapping
 
vector< Value::Pointer_arrayedValues
 

Friends

class AltaricaModel
 
class Value
 

Detailed Description

Factory for the Value

Definition at line 294 of file Value.hh.

Member Typedef Documentation

◆ Exception

Definition at line 297 of file Value.hh.

Constructor & Destructor Documentation

◆ ~ValueFactory()

Diades::Altarica::ValueFactory::~ValueFactory ( )

◆ ValueFactory()

Diades::Altarica::ValueFactory::ValueFactory ( AltaricaModel model)

Member Function Documentation

◆ clear()

void Diades::Altarica::ValueFactory::clear ( )

◆ getValue() [1/5]

const Value& Diades::Altarica::ValueFactory::getValue ( const Identifier value)
Parameters
valuean Identifier
Returns
the Value associated to the Identifier IMPORTANT HERE, 'value' MUST BE an Identifier and NOT a 'char *' otherwise you'll be victim of the dynamic conversion to bool that will call getValue(bool) instead of this one.

Referenced by Diades::Altarica::AltaricaModel::getValue().

◆ getValue() [2/5]

const Value& Diades::Altarica::ValueFactory::getValue ( bool  value)
Parameters
valuea boolean
Returns
the Value associated to the boolean

◆ getValue() [3/5]

const Value& Diades::Altarica::ValueFactory::getValue ( int  value)
Parameters
valuea integer
Returns
the Value associated to the integer

◆ getValue() [4/5]

const Value& Diades::Altarica::ValueFactory::getValue ( const Value::ArrayFields arrayValueFields)
Parameters
arrayValueFieldsthe value of each element of the array
Returns
the value array

◆ getValue() [5/5]

const Value& Diades::Altarica::ValueFactory::getValue ( const Value::StructureFields structureValueFields)
Parameters
structureValueFieldsthe value of each element of the structure
Returns
the value structure

◆ init()

void Diades::Altarica::ValueFactory::init ( )

◆ nullValue()

const Value& Diades::Altarica::ValueFactory::nullValue ( ) const
inline
Returns
the null Value

Definition at line 340 of file Value.hh.

Referenced by Diades::Altarica::AltaricaModel::nullValue().

◆ owner() [1/2]

const AltaricaModel& Diades::Altarica::ValueFactory::owner ( ) const

◆ owner() [2/2]

AltaricaModel& Diades::Altarica::ValueFactory::owner ( )

◆ typeName()

static string Diades::Altarica::ValueFactory::typeName ( )
inlinestatic

Definition at line 298 of file Value.hh.

Friends And Related Function Documentation

◆ AltaricaModel

friend class AltaricaModel
friend

Definition at line 370 of file Value.hh.

◆ Value

friend class Value
friend

Definition at line 371 of file Value.hh.

Member Data Documentation

◆ _arrayedValues

vector<Value::Pointer> Diades::Altarica::ValueFactory::_arrayedValues
private

Definition at line 367 of file Value.hh.

◆ _arrayMapping

unordered_map<string,unsigned> Diades::Altarica::ValueFactory::_arrayMapping
private

Definition at line 366 of file Value.hh.

◆ _basicValues

vector<Value::Pointer> Diades::Altarica::ValueFactory::_basicValues
private

Definition at line 360 of file Value.hh.

◆ _identifierMapping

unordered_map<Identifier,unsigned> Diades::Altarica::ValueFactory::_identifierMapping
private

Definition at line 361 of file Value.hh.

◆ _identifierValues

vector<Value::Pointer> Diades::Altarica::ValueFactory::_identifierValues
private

Definition at line 363 of file Value.hh.

◆ _integerMapping

unordered_map<int,Value::Pointer> Diades::Altarica::ValueFactory::_integerMapping
private

Definition at line 362 of file Value.hh.

◆ _owner

AltaricaModel& Diades::Altarica::ValueFactory::_owner
private

Definition at line 359 of file Value.hh.

◆ _structuredValues

vector<Value::Pointer> Diades::Altarica::ValueFactory::_structuredValues
private

Definition at line 365 of file Value.hh.

◆ _structureMapping

unordered_map<string,unsigned> Diades::Altarica::ValueFactory::_structureMapping
private

Definition at line 364 of file Value.hh.


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