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

#include <Type.hh>

Public Types

typedef Utils::Exception< TypeFactoryException
 
typedef TypePointer
 

Public Member Functions

 TypeFactory (AltaricaModel &model)
 
void init ()
 
void clear ()
 
 ~TypeFactory ()
 
const TypenullType () const
 
const TypegetBoolean () const
 
const TypegetInteger () const
 
const TypegetIdentifier () const
 
const TypegetStructureType (const Type::StructureFields &fields)
 
const TypegetArrayType (const Type &itemType, unsigned size)
 
const AltaricaModelowner () const
 

Static Public Member Functions

static string typeName ()
 

Private Attributes

vector< Pointer_types
 
unordered_map< string, unsigned > _internalLabelToTypeCodes
 
AltaricaModel_owner
 
Type _nullType
 

Detailed Description

The factory of Type

Definition at line 226 of file Type.hh.

Member Typedef Documentation

◆ Exception

Definition at line 230 of file Type.hh.

◆ Pointer

Definition at line 231 of file Type.hh.

Constructor & Destructor Documentation

◆ TypeFactory()

Diades::Altarica::TypeFactory::TypeFactory ( AltaricaModel model)

Default constructor

◆ ~TypeFactory()

Diades::Altarica::TypeFactory::~TypeFactory ( )

Destructor

Member Function Documentation

◆ clear()

void Diades::Altarica::TypeFactory::clear ( )

Clear the factory

◆ getArrayType()

const Type& Diades::Altarica::TypeFactory::getArrayType ( const Type itemType,
unsigned  size 
)
Parameters
itemTypethe Type of any item of the array
sizethe size of the array
Returns
the Type Array<itemType>[size]

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

◆ getBoolean()

const Type& Diades::Altarica::TypeFactory::getBoolean ( ) const
inline
Returns
the Type Boolean

Definition at line 272 of file Type.hh.

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

◆ getIdentifier()

const Type& Diades::Altarica::TypeFactory::getIdentifier ( ) const
inline
Returns
the Type Identifier

Definition at line 280 of file Type.hh.

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

◆ getInteger()

const Type& Diades::Altarica::TypeFactory::getInteger ( ) const
inline
Returns
the Type Integer

Definition at line 276 of file Type.hh.

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

◆ getStructureType()

const Type& Diades::Altarica::TypeFactory::getStructureType ( const Type::StructureFields fields)
Parameters
fieldsthe fields of a Structure
Returns
the Type Structure associated with 'fields'

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

◆ init()

void Diades::Altarica::TypeFactory::init ( )

Initialisation of the TypeFactory

Parameters
_ownerthe owner of the TypeFactory

◆ nullType()

const Type& Diades::Altarica::TypeFactory::nullType ( ) const
inline
Returns
the Type NoType

Definition at line 268 of file Type.hh.

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

◆ owner()

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

The AltaricaModel that owns the factory

Returns
the owner of the TypeFactory
Todo:
test

◆ typeName()

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

Definition at line 229 of file Type.hh.

Member Data Documentation

◆ _internalLabelToTypeCodes

unordered_map<string, unsigned> Diades::Altarica::TypeFactory::_internalLabelToTypeCodes
private

Definition at line 234 of file Type.hh.

◆ _nullType

Type Diades::Altarica::TypeFactory::_nullType
private

Definition at line 236 of file Type.hh.

◆ _owner

AltaricaModel& Diades::Altarica::TypeFactory::_owner
private

Definition at line 235 of file Type.hh.

◆ _types

vector<Pointer> Diades::Altarica::TypeFactory::_types
private

Definition at line 233 of file Type.hh.


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