ADTF
Stream

observable Stream DataDefinition object. More...

Inheritance diagram for Stream:
[legend]

Classes

class  Struct
 DataDefinition object class of datamodel to hold a streamstruct. More...
 

Public Types

using Structs = utility::TypeAccessList< Struct, Stream >
 Definiton of the container containts the streamstructs of a stream.
 
- Public Types inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T >
typedef EVENT_CODE_T event_code_type
 local definition of the event code type
 
typedef MODEL_SUBJECT_T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< MODEL_SUBJECT_T, EVENT_CODE_T > observer_type
 local definition of the observer type to notify
 

Public Member Functions

 Stream ()=delete
 no default CTOR.
 
 Stream (Stream &&)
 move CTOR
 
Streamoperator= (Stream &&)
 move assignment operator More...
 
 Stream (const Stream &other)
 copy CTOR More...
 
Streamoperator= (const Stream &other)
 copy assignment operator More...
 
virtual ~Stream ()=default
 DTOR.
 
 Stream (const std::string &name, const std::string &stream_type_name, const std::string &description={}, const std::vector< Struct > &structs={})
 CTOR. More...
 
bool operator== (const Stream &other) const
 equality operator. More...
 
bool operator!= (const Stream &other) const
 non equality operator. More...
 
void setName (const std::string &name)
 Set the Name. More...
 
const std::string & getName () const
 Get the Name. More...
 
void setStreamTypeName (const std::string &stream_type_name)
 Set the Stream Type Name. More...
 
const std::string & getStreamTypeName () const
 Get the Stream Type Name. More...
 
const std::string & getDescription () const
 Get the Description. More...
 
void setDescription (const std::string &description)
 Set the Description. More...
 
const StructsgetStructs () const
 Get the Structs object. More...
 
StructsgetStructs ()
 Get the Structs object. More...
 
- Public Member Functions inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T >
 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! More...
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify. More...
 
void detachObserver (observer_type *observer)
 remove a observer if in list. More...
 
- Public Member Functions inherited from InfoMap
 InfoMap ()=default
 CTOR.
 
 InfoMap (const InfoMap &)
 copy CTOR More...
 
 InfoMap (InfoMap &&)
 move CTOR More...
 
InfoMapoperator= (const InfoMap &)
 copy assignment operator More...
 
InfoMapoperator= (InfoMap &&)
 move assignment operator More...
 
template<typename INFO_T >
const INFO_T * getInfo () const
 Get the Info Pointer. More...
 
template<typename INFO_T >
INFO_T * getInfo ()
 Get the Info Pointer. More...
 
template<typename INFO_T >
void setInfo (const std::shared_ptr< INFO_T > &info)
 Set the Info object as shared pointer. More...
 

Private Member Functions

void notify (ModelEventCode code, utility::TypeAccessMapEventCode map_code, const std::string &additional_info)
 
bool validateContains (const Structs::access_type &stream_struct) const
 
void notifyChangedListContent (utility::TypeAccessListEventCode code, Structs::access_type &stream_struct, const std::string &additional_info)
 
const Structs::container_named_compatibility_typegetNamedItemList () const
 
Structs::container_named_compatibility_typegetNamedItemList ()
 
const Structs::container_named_typegetNamedItemViewList () const
 
Structs::container_named_typegetNamedItemViewList ()
 

Private Attributes

std::string _name
 
std::string _stream_type_name
 
std::string _description
 
Structs _structs
 

Additional Inherited Members

- Protected Member Functions inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T >
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers More...
 

Detailed Description

observable Stream DataDefinition object.

Definition at line 39 of file datamodel_streams.h.

Constructor & Destructor Documentation

◆ Stream() [1/2]

Stream ( const Stream other)

copy CTOR

Parameters
otherthe stream to copy from.

◆ Stream() [2/2]

Stream ( const std::string &  name,
const std::string &  stream_type_name,
const std::string &  description = {},
const std::vector< Struct > &  structs = {} 
)

CTOR.

Parameters
namename of the stream
stream_type_namename of the stream type (may be a stucttype or a streammetatype)
descriptionthe description of the stream
structsvector of streamstructs that are added.
Exceptions
ddl::dd::Errorif a structs containing structs with the same name.

Member Function Documentation

◆ getDescription()

const std::string& getDescription ( ) const

Get the Description.

Returns
const std::string&

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode().

◆ getName()

const std::string& getName ( ) const

Get the Name.

Returns
const std::string&

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode().

◆ getStreamTypeName()

const std::string& getStreamTypeName ( ) const

Get the Stream Type Name.

Returns
const std::string&

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode().

◆ getStructs() [1/2]

Structs& getStructs ( )

Get the Structs object.

Returns
Structs&

◆ getStructs() [2/2]

const Structs& getStructs ( ) const

Get the Structs object.

Returns
const Structs&

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode(), and DDFromXMLFactory< DOM_NODE_TYPE >::createStream().

◆ operator!=()

bool operator!= ( const Stream other) const

non equality operator.

Parameters
otherthe other stream to compare this stream to.
Returns
false the streams are equal.
true the streams are not equal.

◆ operator=() [1/2]

Stream& operator= ( const Stream other)

copy assignment operator

Parameters
otherthe stream to copy from.
Returns
Stream&

◆ operator=() [2/2]

Stream& operator= ( Stream &&  )

move assignment operator

Returns
Stream&

◆ operator==()

bool operator== ( const Stream other) const

equality operator.

Parameters
otherthe other stream to compare this stream to.
Returns
true the streams are equal.
false the streams are not equal.

◆ setDescription()

void setDescription ( const std::string &  description)

Set the Description.

Parameters
descriptionthe description to set
Remarks
This is observable.

Referenced by DDFromXMLFactory< DOM_NODE_TYPE >::createStream().

◆ setName()

void setName ( const std::string &  name)

Set the Name.

Parameters
namethe name
Remarks
This is observable.
Exceptions
Throwsif a stream with that name already exists in the container this stream is part of.

◆ setStreamTypeName()

void setStreamTypeName ( const std::string &  stream_type_name)

Set the Stream Type Name.

Parameters
stream_type_namethe streamtype name (must be a structtype or a streammetatype)
Remarks
This is observable.