ADTF
Loading...
Searching...
No Matches
adtf::streaming::stream_meta_type< MetaTypeStruct > Class Template Reference

brings latest ant::stream_meta_type to the users scope More...

#include <streamtype.h>

Inherits adtf::streaming::ant::cStreamMetaType.

Public Member Functions

 stream_meta_type ()
 
tResult IsCompatible (const IStreamType &oCheckedType, const IStreamType &oExpectedType) const override
 
- Public Member Functions inherited from adtf::streaming::ant::cStreamMetaType
tResult GetMetaTypeName (IString &&strTypeName) const override
 Gets the unique meta type name.
 
adtf::util::tVersion GetVersion () const override
 Get version of a Stream Type.
 
tResult GetDefaultConfig (adtf::ucom::ant::iobject_ptr< const adtf::base::IProperties > &pProperties) const override
 Get the default configuration values for a Stream Type.
 
tResult GetParent (adtf::ucom::ant::iobject_ptr< const IStreamMetaType > &pParent) const override
 This GetParent function is deprecated.
 
tResult IsCompatible (const IStreamType &oTypeToCheck, const IStreamType &oTypeExpected) const override
 Compares the oTypeExpected Stream Type with the oTypeToCheck.
 
 cStreamMetaType ()
 
virtual ~cStreamMetaType () override
 
- Public Member Functions inherited from adtf::ucom::catwo::object< IStreamMetaType >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::streaming::ant::cStreamMetaType
tResult SetMetaTypeName (const char *strTypeName)
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 
- Protected Attributes inherited from adtf::streaming::ant::cStreamMetaType
cString m_strMetaTypeName
 MetaTypeName of the StreamMetaType (like "adtf/default")
 
adtf::ucom::object_ptr< adtf::base::IPropertiesm_pDefaultProperties
 Default properties.
 
adtf::ucom::object_ptr< IStreamMetaTypem_pParentMetaType
 parent if any
 
tVersion m_sVersion
 version
 

Detailed Description

template<typename MetaTypeStruct>
class adtf::streaming::stream_meta_type< MetaTypeStruct >

brings latest ant::stream_meta_type to the users scope

Generator template stream_meta_type to create a StreamMetaType Class for the Type T

Template Parameters
MetaTypeStructThe type MetaTypeStruct needs to be a class with following concept:
Minimal constraint:
{
static constexpr const char* const MetaTypeName = <your meta type name as string>;
static void SetProperties(const adtf::ucom::iobject_ptr<adtf::base::IProperties>& pProperties)
{
//your properties to set
pProperties->SetProperty(adtf::base::property<adtf_util::cString>(PlainTypeProperty, ""));
}
};
Definition properties_v2.h:283
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
Use this Stream Meta Type if your sample data will be any of this type: bool, uint8_t,...
Definition streammetatypeplain.h:220
Is compatible:
Additionally it is possible to implement a IsCompabible method:
{
static constexpr const char* const MetaTypeName = <your meta type name as string>;
static void SetProperties(const adtf::ucom::iobject_ptr<adtf::base::IProperties>& pProperties)
{
//your properties to set
pProperties->SetProperty(adtf::base::property<adtf_util::cString>(PlainTypeProperty, ""));
}
static void IsCompatible(const IStreamType& oSourceType,
const IStreamType& oDestinationType)
{
// implement your comapible crititeria here!!
}
};
Defines access methods for the interface of a Stream Type.
Definition streamtype_intf.h:96

Constructor & Destructor Documentation

◆ stream_meta_type()

template<typename MetaTypeStruct>
adtf::streaming::ant::stream_meta_type< MetaTypeStruct >::stream_meta_type ( )
inline

default CTOR. This CTOR will generate your Stream Meta Type implementation for the given concept call MetaTypeStruct.

See also
stream_meta_type

Member Function Documentation

◆ IsCompatible()

template<typename MetaTypeStruct>
tResult adtf::streaming::ant::stream_meta_type< MetaTypeStruct >::IsCompatible ( const IStreamType & oCheckedType,
const IStreamType & oExpectedType ) const
inlineoverride

The IsCompatible implementation of this generator class will decide at compile time wether to use the MetaTypeStruct::IsCompatible method if provided or to use the cStreamMetaType::IsCompatible default implementation.

Parameters
oCheckedTypeThe type to check
oExpectedTypeThe base expected type the checked type must be compatible to for a successfully call.
See also
stream_meta_type, cStreamMetaType::IsCompatible

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