ADTF  3.18.2
Stream::Struct

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

Inheritance diagram for Stream::Struct:
[legend]

Public Member Functions

 Struct ()
 default CTOR
 
 Struct (const Struct &)=default
 copy CTOR
 
 Struct (Struct &&)=default
 move CTOR
 
Structoperator= (const Struct &)=default
 copy assignment operator. More...
 
Structoperator= (Struct &&)=default
 move assignment operator. More...
 
 Struct (const std::string &name, const std::string &type_name, OptionalSize byte_pos={})
 CTOR. More...
 
bool operator== (const Struct &other) const
 equality operator More...
 
bool operator!= (const Struct &other) const
 non-equality operator More...
 
const std::string & getName () const
 Get the Name. More...
 
void setName (const std::string &name)
 Set the Name. More...
 
const std::string & getTypeName () const
 Get the Type Name. More...
 
void setTypeName (const std::string &type_name)
 Set the Type Name. More...
 
OptionalSize getBytePos () const
 Get the Byte Pos. More...
 
void setBytePos (OptionalSize byte_pos)
 Set the Byte Pos. 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 Attributes

std::string _name
 
std::string _type_name
 
OptionalSize _byte_pos
 

Additional Inherited Members

- 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
 
- 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

DataDefinition object class of datamodel to hold a streamstruct.

Definition at line 80 of file datamodel_streams.h.

Constructor & Destructor Documentation

◆ Struct()

Struct ( const std::string &  name,
const std::string &  type_name,
OptionalSize  byte_pos = {} 
)

CTOR.

Parameters
namename of the stream struct (one single empty name is allowed (says xsd))
type_namethe name of the type to use (must be a valid struct type)
byte_posthe first bytepos of the structtype (optional ... default is 0)

Member Function Documentation

◆ getBytePos()

OptionalSize getBytePos ( ) const

Get the Byte Pos.

Returns
OptionalSize (use 0 if not valid)

◆ getName()

const std::string& getName ( ) const

Get the Name.

Returns
const std::string&

◆ getTypeName()

const std::string& getTypeName ( ) const

Get the Type Name.

Returns
const std::string&

◆ operator!=()

bool operator!= ( const Struct other) const

non-equality operator

Parameters
otherthe other streamstruct to compare the streamstruct with.
Returns
false the stream structs are equal
true the stream structs are not equal

◆ operator=() [1/2]

Struct& operator= ( const Struct )
default

copy assignment operator.

Returns
Struct&

◆ operator=() [2/2]

Struct& operator= ( Struct &&  )
default

move assignment operator.

Returns
Struct&

◆ operator==()

bool operator== ( const Struct other) const

equality operator

Parameters
otherthe other streamstruct to compare the streamstruct with.
Returns
true the stream structs are equal
false the stream structs are not equal

◆ setBytePos()

void setBytePos ( OptionalSize  byte_pos)

Set the Byte Pos.

Parameters
byte_posthe byte pos to set
Remarks
Is observable.

◆ setName()

void setName ( const std::string &  name)

Set the Name.

Parameters
namethe name
Remarks
Is observable.
Exceptions
maythrow if the name is not unique within the container this struct is part of.

◆ setTypeName()

void setTypeName ( const std::string &  type_name)

Set the Type Name.

Parameters
type_namethe typename to set
Remarks
Is observable.