ADTF
Loading...
Searching...
No Matches
adtf::streaming::hollow::cSubStreamTypes Class Reference

#include <streammetatypesubstreams.h>

Inherited by adtf::filter::hollow::cSubStreamTypes.

Public Member Functions

template<typename MetaType = stream_meta_type_substreams, typename = std::enable_if_t<is_stream_meta_type<MetaType>::value, MetaType>>
 cSubStreamTypes (const MetaType &=MetaType())
 
 cSubStreamTypes (const ucom::ant::iobject_ptr< const ant::IStreamMetaType > &pMetaType)
 
virtual ~cSubStreamTypes ()
 
void SetSubStream (const char *strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)
 
void SetSubStream (std::string_view strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)
 
void AddSubStream (std::string_view strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)
 
void SetRequestProperties (const base::ant::IProperties &oProperties, const char *strSubStreamName="")
 
ucom::ant::object_ptr< const streaming::ant::IStreamTypeGetSubStreamType (const char *strName) const
 
std::optional< std::tuple< uint32_t, ucom::object_ptr< const ant::IStreamType >, ucom::object_ptr< const base::ant::IProperties > > > GetSubStream (std::string_view strName) const noexcept
 
ucom::ant::object_ptr< ant::IStreamTypeGetStreamType () const
 

Detailed Description

Helper class to create a stream type with multiple Substreams.

Constructor & Destructor Documentation

◆ cSubStreamTypes() [1/2]

template<typename MetaType = stream_meta_type_substreams, typename = std::enable_if_t<is_stream_meta_type<MetaType>::value, MetaType>>
adtf::streaming::hollow::cSubStreamTypes::cSubStreamTypes ( const MetaType & = MetaType())
inline

Constructor.

Parameters
[in]oMetaTypeThe meta type that should be used.
Template Parameters
TheStream Meta Type

◆ cSubStreamTypes() [2/2]

adtf::streaming::hollow::cSubStreamTypes::cSubStreamTypes ( const ucom::ant::iobject_ptr< const ant::IStreamMetaType > & pMetaType)

Constructor.

Parameters
[in]pMetaTypeThe meta type that should be used.

◆ ~cSubStreamTypes()

virtual adtf::streaming::hollow::cSubStreamTypes::~cSubStreamTypes ( )
virtual

Destructor.

Member Function Documentation

◆ AddSubStream()

void adtf::streaming::hollow::cSubStreamTypes::AddSubStream ( std::string_view strName,
uint32_t nSubStreamId,
const ucom::ant::iobject_ptr< const ant::IStreamType > & pType )

Adds a Substream if no Substream with the same name already exist.

Parameters
[in]strNameThe name of the Substream, required to be unique, this is the key to the map of substreams.
[in]nSubStreamIdThe id of the Substream, should be unique, but can be reused for aliases etc.
[in]pTypeThe type of the Substream.

◆ GetStreamType()

ucom::ant::object_ptr< ant::IStreamType > adtf::streaming::hollow::cSubStreamTypes::GetStreamType ( ) const

Get a Stream Type that contains all currently set Substreams.

This is recreated each time this method is called.

Returns
A pointer to a Stream Type.

◆ GetSubStream()

std::optional< std::tuple< uint32_t, ucom::object_ptr< const ant::IStreamType >, ucom::object_ptr< const base::ant::IProperties > > > adtf::streaming::hollow::cSubStreamTypes::GetSubStream ( std::string_view strName) const
noexcept

Retrieve the entire definition of a given Substream.

Parameters
[in]strNameThe name of the Substream.
Returns
The Substream if it exists.

◆ GetSubStreamType()

ucom::ant::object_ptr< const streaming::ant::IStreamType > adtf::streaming::hollow::cSubStreamTypes::GetSubStreamType ( const char * strName) const

Retrieve the Stream Type of a given Substream.

Parameters
[in]strNameThe name of the Substream.
Returns
The stream type if a substream by the given name exists.
Exceptions
tResultThrows if the stream can not be found.

◆ SetRequestProperties()

void adtf::streaming::hollow::cSubStreamTypes::SetRequestProperties ( const base::ant::IProperties & oProperties,
const char * strSubStreamName = "" )

Sets the common or Substream specific request properties.

Parameters
[in]oPropertiesThe properties to set.
[in]strSubStreamNameThe name of the Substream. If empty, then the common request properties will be set.

◆ SetSubStream() [1/2]

void adtf::streaming::hollow::cSubStreamTypes::SetSubStream ( const char * strName,
uint32_t nSubStreamId,
const ucom::ant::iobject_ptr< const ant::IStreamType > & pType )

Adds or updates a Substream.

Parameters
[in]strNameThe name of the Substream, required to be unique, this is the key to the map of substreams.
[in]nSubStreamIdThe id of the Substream, should be unique, but can be reused for aliases etc.
[in]pTypeThe type of the Substream.

◆ SetSubStream() [2/2]

void adtf::streaming::hollow::cSubStreamTypes::SetSubStream ( std::string_view strName,
uint32_t nSubStreamId,
const ucom::ant::iobject_ptr< const ant::IStreamType > & pType )

Adds or updates a Substream.

Parameters
[in]strNameThe name of the Substream, required to be unique, this is the key to the map of substreams.
[in]nSubStreamIdThe id of the Substream, should be unique, but can be reused for aliases etc.
[in]pTypeThe type of the Substream.

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