ADTF  3.13.2
stream_meta_type< MetaTypeStruct >


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

Inheritance diagram for stream_meta_type< MetaTypeStruct >:
[legend]

Public Member Functions

 stream_meta_type ()
 default CTOR. More...
 
tResult IsCompatible (const IStreamType &oCheckedType, const IStreamType &oExpectedType) const override
 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. More...
 
- Public Member Functions inherited from cStreamMetaType
tResult GetMetaTypeName (IString &&strTypeName) const override
 Gets the unique meta type name. More...
 
adtf::util::tVersion GetVersion () const override
 Get version of a Stream Type. More...
 
tResult GetDefaultConfig (adtf::ucom::ant::iobject_ptr< const adtf::base::IProperties > &pProperties) const override
 Get the default configuration values for a Stream Type. More...
 
tResult GetParent (adtf::ucom::ant::iobject_ptr< const IStreamMetaType > &pParent) const override
 This GetParent function is deprecated. More...
 
tResult IsCompatible (const IStreamType &oTypeToCheck, const IStreamType &oTypeExpected) const override
 Compares the oTypeExpected Stream Type with the oTypeToCheck - see Default Stream Meta Types in ADTF for a summary of implementations. More...
 
 cStreamMetaType ()
 Default CTOR.
 
virtual ~cStreamMetaType ()=default
 DTOR.
 
- Public Member Functions inherited from object< IStreamMetaType >
tResult GetInterface (const tChar *i_strIID, tVoid *&o_pInterface) override
 Query interfaces on an object. More...
 
tResult GetInterface (const tChar *i_strIID, const tVoid *&o_pInterface) const override
 Provides const correct interface querying. More...
 
tVoid Destroy () const override
 Destruct and deallocate instantiations of type IObject. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Additional Inherited Members

- Protected Member Functions inherited from cStreamMetaType
tResult SetMetaTypeName (const tChar *strTypeName)
 Sets the unique type name. More...
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor –> Use implemented Destroy() instead of delete!
 
- Protected Attributes inherited from 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::ant::stream_meta_type< MetaTypeStruct >


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:
struct stream_meta_type_plain
{
static constexpr const tChar* const MetaTypeName = <your meta type name as string>;
static tVoid SetProperties(const adtf::ucom::iobject_ptr<adtf::base::IProperties>& pProperties)
{
//your properties to set
pProperties->SetProperty(adtf::base::property<adtf_util::cString>(PlainTypeProperty, ""));
}
};
Is compatible:
Additionally it is possible to implement a IsCompabible method:
struct stream_meta_type_plain
{
static constexpr const tChar* const MetaTypeName = <your meta type name as string>;
static tVoid SetProperties(const adtf::ucom::iobject_ptr<adtf::base::IProperties>& pProperties)
{
//your properties to set
pProperties->SetProperty(adtf::base::property<adtf_util::cString>(PlainTypeProperty, ""));
}
static tVoid IsCompatible(const IStreamType& oSourceType,
const IStreamType& oDestinationType)
{
// implement your comapible crititeria here!!
}
};
See also
Stream Meta Type

Definition at line 233 of file streamtype.h.

Constructor & Destructor Documentation

◆ stream_meta_type()

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

Definition at line 242 of file streamtype.h.

References cStreamMetaType::m_pDefaultProperties, and cStreamMetaType::SetMetaTypeName().

Member Function Documentation

◆ IsCompatible()

tResult 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, Default Stream Meta Types in ADTF

Definition at line 257 of file streamtype.h.

References cStreamMetaType::IsCompatible().


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Tue Nov 16 2021 by doxygen 1.8.14)