ADTF  3.14.3
cStreamItem

Default implementation of an StreamItem as container of the Sample Stream s Queue. More...

Inheritance diagram for cStreamItem:
[legend]

Public Member Functions

 cStreamItem ()
 CTOR.
 
 cStreamItem (const IStreamItem &oItem)
 copy CTOR from interface More...
 
 cStreamItem (const ucom::ant::iobject_ptr< const ISample > &pSample)
 initializer CTOR More...
 
 cStreamItem (const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
 initializer CTOR More...
 
 cStreamItem (const cStreamItem &)=default
 copy CTOR
 
 cStreamItem (cStreamItem &&)=default
 move CTOR
 
cStreamItemoperator= (const cStreamItem &)=default
 copy operator
 
cStreamItemoperator= (cStreamItem &&)=default
 move operator
 
tType GetType () const
 Retrieves the type of the sample item. More...
 
tResult GetObject (ucom::ant::iobject_ptr< const ucom::ant::IObject > &pObject) const
 Retrieves the object of the StreamItem. More...
 
tResult GetSample (ucom::ant::iobject_ptr< const ISample > &pSample) const
 Retrieves the sample of the StreamItem if GetType is tType::Sample. More...
 
tResult GetStreamType (ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const
 Retrieves the StreamType of the StreamItem if GetType is tType::StreamType. More...
 
tResult SetSample (const ucom::ant::iobject_ptr< const ISample > &pSample)
 Sets a Sample to the StreamItem container and set tType::Sample. More...
 
tResult SetStreamType (const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
 Sets a StreamType to the StreamItem container and set tType::StreamType. More...
 
tResult CopyTo (IStreamItem &oDest) const
 Copy its content to the oDest container. More...
 

Private Attributes

tType m_eType
 
adtf::ucom::ant::object_ptr< const IStreamTypem_pStreamType
 
adtf::ucom::ant::object_ptr< const ISamplem_pSample
 

Additional Inherited Members

- Public Types inherited from IStreamItem
enum class  tType : uint32_t { Undefined = 0 , StreamType = 1 , Sample = 2 }
 serval types are defined More...
 
- Protected Member Functions inherited from IStreamItem
 ~IStreamItem ()=default
 not destructable
 

Detailed Description

Default implementation of an StreamItem as container of the Sample Stream s Queue.

Definition at line 98 of file streamitem_intf.h.

Constructor & Destructor Documentation

◆ cStreamItem() [1/3]

cStreamItem ( const IStreamItem oItem)
inline

copy CTOR from interface

Parameters
oItem[in] item to copy

Definition at line 112 of file streamitem_intf.h.

References IStreamItem::GetSample(), IStreamItem::GetStreamType(), IStreamItem::Sample, and IStreamItem::StreamType.

◆ cStreamItem() [2/3]

cStreamItem ( const ucom::ant::iobject_ptr< const ISample > &  pSample)
inline

initializer CTOR

Parameters
pSample[in] sample to set immediately

Definition at line 136 of file streamitem_intf.h.

◆ cStreamItem() [3/3]

cStreamItem ( const ucom::ant::iobject_ptr< const IStreamType > &  pStreamType)
inline

initializer CTOR

Parameters
pStreamType[in] StreamType to set immediately

Definition at line 144 of file streamitem_intf.h.

Member Function Documentation

◆ CopyTo()

tResult CopyTo ( IStreamItem oDest) const
inline

Copy its content to the oDest container.

Parameters
oDest[in] Destination item to copy the content to.
Returns
Result code of the SetStreamType or SetSample call.
Return values
ERR_INVALID_TYPEThe content of this item is not initialized.

Definition at line 226 of file streamitem_intf.h.

References IStreamItem::Sample, IStreamItem::SetSample(), IStreamItem::SetStreamType(), and IStreamItem::StreamType.

Referenced by cLimitedSampleReaderQueue::Pop(), and cDynamicSampleReaderQueue::Pop().

◆ GetObject()

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

Retrieves the object of the StreamItem.

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

Implements IStreamItem.

Definition at line 165 of file streamitem_intf.h.

References iobject_ptr_base< T >::Reset(), IStreamItem::Sample, and IStreamItem::StreamType.

◆ GetSample()

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

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

Implements IStreamItem.

Definition at line 184 of file streamitem_intf.h.

References iobject_ptr_base< T >::Reset(), and IStreamItem::Sample.

Referenced by cSampleReader::ReadNextSample().

◆ GetStreamType()

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

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

Implements IStreamItem.

Definition at line 194 of file streamitem_intf.h.

References iobject_ptr_base< T >::Reset(), and IStreamItem::StreamType.

◆ GetType()

tType GetType ( ) const
inlinevirtual

Retrieves the type of the sample item.

See tType for more info.

Returns
Returns the type of the sample item

Implements IStreamItem.

Definition at line 160 of file streamitem_intf.h.

Referenced by cLimitedSampleReaderQueue::Pop(), and cSampleReader::ReadNextSample().

◆ SetSample()

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

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

Implements IStreamItem.

Definition at line 204 of file streamitem_intf.h.

References object_ptr< T >::Reset(), and IStreamItem::Sample.

◆ SetStreamType()

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

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

Implements IStreamItem.

Definition at line 212 of file streamitem_intf.h.

References object_ptr< T >::Reset(), and IStreamItem::StreamType.


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)