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

#include <Value.hh>

Public Types

typedef Diades::Utils::Exception< ValueFactoryException
 

Public Member Functions

 ValueFactory ()
 
 ~ValueFactory ()
 
void reset ()
 
void clear ()
 
bool operator== (const ValueFactory &factory) const
 
const ValuenewValue (const std::string &label)
 
const ValuegetValue (const std::string &label) const
 
const ValuenullValue () const
 

Static Public Member Functions

static std::string typeName ()
 

Private Attributes

std::unordered_map< std::string, Value::Pointer_dictionary
 
ValueVector _nullValue
 

Detailed Description

Factory that generates Value

Definition at line 197 of file Value.hh.

Member Typedef Documentation

◆ Exception

Definition at line 202 of file Value.hh.

Constructor & Destructor Documentation

◆ ValueFactory()

Diades::Sdmdl::ValueFactory::ValueFactory ( )
inline

Constructor

Definition at line 226 of file Value.hh.

◆ ~ValueFactory()

Diades::Sdmdl::ValueFactory::~ValueFactory ( )
inline

Destructor

Definition at line 237 of file Value.hh.

Member Function Documentation

◆ clear()

void Diades::Sdmdl::ValueFactory::clear ( )

Clear the factory

◆ getValue()

const Value& Diades::Sdmdl::ValueFactory::getValue ( const std::string &  label) const
Parameters
labelthe label of the Value to look for
Returns
the value with the given label if it exists, the null value otherwise

◆ newValue()

const Value& Diades::Sdmdl::ValueFactory::newValue ( const std::string &  label)
Parameters
labelthe label of the Value to create
Returns
the value with the given label (don't create doublons)

◆ nullValue()

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

Definition at line 294 of file Value.hh.

Referenced by Diades::Sdmdl::FormulaFactory::nullValue().

◆ operator==()

bool Diades::Sdmdl::ValueFactory::operator== ( const ValueFactory factory) const
inline

Equality operator

Parameters
factorya ValueFactory
Returns
true if they both the same factory (reference equality)

Definition at line 264 of file Value.hh.

References Diades::Sdmdl::Value::label().

◆ reset()

void Diades::Sdmdl::ValueFactory::reset ( )

Reset the ValueFactory

◆ typeName()

static std::string Diades::Sdmdl::ValueFactory::typeName ( )
inlinestatic

Definition at line 201 of file Value.hh.

Member Data Documentation

◆ _dictionary

std::unordered_map<std::string,Value::Pointer> Diades::Sdmdl::ValueFactory::_dictionary
private

_dictionary the diactionary of the created Value objects

Definition at line 209 of file Value.hh.

◆ _nullValue

ValueVector Diades::Sdmdl::ValueFactory::_nullValue
private

_nullValue the null Value of this factory

Definition at line 216 of file Value.hh.


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