ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
IStreamItemabstract

The IStreamItem interface is the base type for all object which are passed through a stream. More...

#include <streamitem_intf.h>

Inheritance diagram for IStreamItem:
[legend]

Public Types

enum class  tType : uint32_t { Undefined = 0 , StreamType = 1 , Sample = 2 }
 serval types are defined More...
 

Public Member Functions

virtual tType GetType () const =0
 Retrieves the type of the sample item.
 
virtual tResult GetObject (ucom::ant::iobject_ptr< const ucom::ant::IObject > &pObject) const =0
 Retrieves the object of the StreamItem.
 
virtual tResult GetSample (ucom::ant::iobject_ptr< const ISample > &pSample) const =0
 Retrieves the sample of the StreamItem if GetType is tType::Sample.
 
virtual tResult GetStreamType (ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const =0
 Retrieves the StreamType of the StreamItem if GetType is tType::StreamType.
 
virtual tResult SetSample (const ucom::ant::iobject_ptr< const ISample > &pSample)=0
 Sets a Sample to the StreamItem container and set tType::Sample.
 
virtual tResult SetStreamType (const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)=0
 Sets a StreamType to the StreamItem container and set tType::StreamType.
 

Protected Member Functions

 ~IStreamItem ()=default
 not destructable
 

Detailed Description

The IStreamItem interface is the base type for all object which are passed through a stream.

Definition at line 22 of file streamitem_intf.h.

Member Enumeration Documentation

◆ tType

enum class tType : uint32_t
strong

serval types are defined

Enumerator
StreamType 

item is a IStreamType. Mind: All StreamType changes will be queue too !!

Sample 

item is a queue item contains a ISample

Definition at line 30 of file streamitem_intf.h.

Member Function Documentation

◆ GetObject()

virtual tResult GetObject ( ucom::ant::iobject_ptr< const ucom::ant::IObject > & pObject) const
pure virtual

Retrieves the object of the StreamItem.

Remarks
Mind, this could result in a ucom_cast call!
Return values
ERR_NOERRORObject successfully retrieved

Implemented in cStreamItem, and cStreamItem.

◆ GetSample()

virtual tResult GetSample ( ucom::ant::iobject_ptr< const ISample > & pSample) const
pure virtual

Retrieves the sample of the StreamItem if GetType is tType::Sample.

The StreamItem was created to prevent ucom_casts call while transmissions and to define clearly which items are supported.

Return values
ERR_NOERRORSample successfully retrieved

Implemented in cStreamItem, and cStreamItem.

Referenced by cStreamItem::cStreamItem().

◆ GetStreamType()

virtual tResult GetStreamType ( ucom::ant::iobject_ptr< const IStreamType > & pStreamType) const
pure virtual

Retrieves the StreamType of the StreamItem if GetType is tType::StreamType.

The StreamItem was created to prevent ucom_casts call while transmissions and to define clearly which items are supported.

Return values
ERR_NOERRORStreamType successfully retrieved

Implemented in cStreamItem, and cStreamItem.

Referenced by cStreamItem::cStreamItem(), and cSampleReader::ProcessStreamItem().

◆ GetType()

virtual tType GetType ( ) const
pure virtual

Retrieves the type of the sample item.

See tType for more info.

Returns
Returns the type of the sample item

Implemented in cStreamItem, and cStreamItem.

Referenced by cSampleReader::ProcessStreamItem(), and cLimitedSampleReaderQueue::Push().

◆ SetSample()

virtual tResult SetSample ( const ucom::ant::iobject_ptr< const ISample > & pSample)
pure virtual

Sets a Sample to the StreamItem container and set tType::Sample.

The StreamItem was created to prevent ucom_casts call while transmissions and to define clearly which items are supported.

Parameters
pSample[in] Sample to set
Return values
ERR_NOERRORSample successfully set

Implemented in cStreamItem, and cStreamItem.

Referenced by cStreamItem::CopyTo().

◆ SetStreamType()

virtual tResult SetStreamType ( const ucom::ant::iobject_ptr< const IStreamType > & pStreamType)
pure virtual

Sets a StreamType to the StreamItem container and set tType::StreamType.

The StreamItem was created to prevent ucom_casts call while transmissions and to define clearly which items are supported.

Parameters
pStreamType[in] StreamType to set
Return values
ERR_NOERRORSample successfully set

Implemented in cStreamItem, and cStreamItem.

Referenced by cStreamItem::CopyTo().