ADTF
Loading...
Searching...
No Matches
ddl::dd::datamodel::EnumType Class Reference

observable DataDefinition object class to describe EnumType. More...

#include <datamodel_types.h>

Inherits ddl::dd::datamodel::TypeBase, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >, and ddl::dd::datamodel::InfoMap.

Public Types

using Element = KeyValuePair
 Enum type element defintion as Name Value pair.
 
using Elements = utility::TypeAccessMap<Element, EnumType>
 container class for elements in EnumType
 
- Public Types inherited from ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >
typedef ModelEventCode event_code_type
 local definition of the event code type
 
typedef TYPE subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< TYPE, ModelEventCode > observer_type
 local definition of the observer type to notify
 
typedef ModelEventCode event_code_type
 local definition of the event code type
 
typedef TYPE subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< TYPE, ModelEventCode > observer_type
 local definition of the observer type to notify
 
typedef ModelEventCode event_code_type
 local definition of the event code type
 
typedef TYPE subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< TYPE, ModelEventCode > observer_type
 local definition of the observer type to notify
 
typedef ModelEventCode event_code_type
 local definition of the event code type
 
typedef TYPE subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< TYPE, ModelEventCode > observer_type
 local definition of the observer type to notify
 
- Public Types inherited from ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 

Public Member Functions

 EnumType ()=delete
 no default CTOR
 
 EnumType (EnumType &&)
 move CTOR.
 
EnumTypeoperator= (EnumType &&)
 move assignment operator
 
 EnumType (const EnumType &other)
 Copy CTOR.
 
EnumTypeoperator= (const EnumType &other)
 copy assignment operator
 
 EnumType (const std::string &name, const std::string &data_type_name, const std::vector< Element > &elements={})
 Construct a new Enum Type object.
 
virtual ~EnumType ()=default
 DTOR.
 
bool operator== (const EnumType &other) const
 equality operator.
 
bool operator!= (const EnumType &other) const
 non equality operator.
 
const ElementsgetElements () const
 Get the Elements object.
 
ElementsgetElements ()
 Get the Elements object.
 
TypeOfType getTypeOfType () const override
 Get the Type Of the Type (data_type, enum_type, struct_type, stream_meta_type).
 
void setName (const std::string &name) override
 Set the Name.
 
const std::string & getDataTypeName () const
 Get the Data Type Name.
 
void setDataTypeName (const std::string &data_type_name)
 Set the Data Type Name.
 
- Public Member Functions inherited from ddl::dd::datamodel::TypeBase
 TypeBase ()=default
 CTOR.
 
 TypeBase (const TypeBase &)=default
 copy CTOR
 
 TypeBase (TypeBase &&)=default
 move CTOR
 
TypeBaseoperator= (const TypeBase &)=default
 copy assignment operator
 
TypeBaseoperator= (TypeBase &&)=default
 move assignment operator
 
 TypeBase (std::string name)
 CTOR.
 
virtual ~TypeBase ()=default
 DTOR.
 
const std::string & getName () const
 Get the Name.
 
- Public Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
- Public Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
- Public Member Functions inherited from ddl::dd::datamodel::InfoMap
 InfoMap ()=default
 CTOR.
 
 InfoMap (const InfoMap &)
 copy CTOR
 
 InfoMap (InfoMap &&)
 move CTOR
 
InfoMapoperator= (const InfoMap &)
 copy assignment operator
 
InfoMapoperator= (InfoMap &&)
 move assignment operator
 
template<typename INFO_T>
const INFO_T * getInfo () const
 Get the Info Pointer.
 
template<typename INFO_T>
INFO_T * getInfo ()
 Get the Info Pointer.
 
template<typename INFO_T>
void setInfo (const std::shared_ptr< INFO_T > &info)
 Set the Info object as shared pointer.
 

Additional Inherited Members

- Protected Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
- Protected Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
- Protected Attributes inherited from ddl::dd::datamodel::TypeBase
std::string _name
 name storage value
 

Detailed Description

observable DataDefinition object class to describe EnumType.

Constructor & Destructor Documentation

◆ EnumType() [1/2]

ddl::dd::datamodel::EnumType::EnumType ( const EnumType & other)

Copy CTOR.

Parameters
otherthe other enumtype to copy

◆ EnumType() [2/2]

ddl::dd::datamodel::EnumType::EnumType ( const std::string & name,
const std::string & data_type_name,
const std::vector< Element > & elements = {} )

Construct a new Enum Type object.

Parameters
namename of the enum
data_type_namename of the data type this enumtype refers to
elementsvector of elements to add while constructing
Exceptions
maythrow if elements contains elements with trhe same name twice!

Member Function Documentation

◆ getDataTypeName()

const std::string & ddl::dd::datamodel::EnumType::getDataTypeName ( ) const

Get the Data Type Name.

Returns
const std::string&

◆ getElements() [1/2]

Elements & ddl::dd::datamodel::EnumType::getElements ( )

Get the Elements object.

Returns
Elements&

◆ getElements() [2/2]

const Elements & ddl::dd::datamodel::EnumType::getElements ( ) const

Get the Elements object.

Returns
const Elements&

◆ getTypeOfType()

TypeOfType ddl::dd::datamodel::EnumType::getTypeOfType ( ) const
overridevirtual

Get the Type Of the Type (data_type, enum_type, struct_type, stream_meta_type).

Returns
TypeOfType

Implements ddl::dd::datamodel::TypeBase.

◆ operator!=()

bool ddl::dd::datamodel::EnumType::operator!= ( const EnumType & other) const

non equality operator.

Parameters
otherthe enum type to compare the enum to
Returns
false the enum is equal (aslo its elements).
true the enum is not equal.

◆ operator=() [1/2]

EnumType & ddl::dd::datamodel::EnumType::operator= ( const EnumType & other)

copy assignment operator

Parameters
otherthe other enumtype to copy
Returns
EnumType&

◆ operator=() [2/2]

EnumType & ddl::dd::datamodel::EnumType::operator= ( EnumType && )

move assignment operator

Returns
EnumType&

◆ operator==()

bool ddl::dd::datamodel::EnumType::operator== ( const EnumType & other) const

equality operator.

Parameters
otherthe enum type to compare the enum to
Returns
true the enum is equal (aslo its elements).
false the enum is not equal.

◆ setDataTypeName()

void ddl::dd::datamodel::EnumType::setDataTypeName ( const std::string & data_type_name)

Set the Data Type Name.

Parameters
data_type_namename of the datatype this enumtype referes to.

◆ setName()

void ddl::dd::datamodel::EnumType::setName ( const std::string & name)
overridevirtual

Set the Name.

Parameters
nameThe name of type.
Exceptions
Thismight throw if the set name does already exist in the container this type is part of.

Reimplemented from ddl::dd::datamodel::TypeBase.


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