ADTF
|
Factory class for ddl codecs for samples. More...
Public Types | |
typedef ddl::codec::FactoryElement< sample_codec_factory_access< const cSampleCodecFactory > > | tElement |
Iterator value element type for the factory to get element information. More... | |
typedef ddl::codec::ChildElements< sample_codec_factory_access< const cSampleCodecFactory > > | tElements |
Iterator container to iterate all elements of the factory. More... | |
![]() | |
typedef ddl::StructElement | DefinedStructElementType |
type definition for the old access_element API. | |
Public Member Functions | |
cSampleCodecFactory () | |
Empty constructor. More... | |
cSampleCodecFactory (const char *strStructName, const char *strMediaDescription, ddl::tDataRepresentation eDefaultDataRepresentation=ddl::tDataRepresentation::Deserialized) | |
Constructor that take a DDL string for initialization. More... | |
cSampleCodecFactory (const ddl::dd::StructType &oStruct, const ddl::dd::DataDefinition &oParentDD, ddl::tDataRepresentation eDefaultDataRepresentation=ddl::tDataRepresentation::Deserialized) | |
Constructor that uses an OO-DDL struct for initialization. More... | |
cSampleCodecFactory (const std::pair< std::string, std::string > &oMDDescription, ddl::tDataRepresentation eDefaultDataRepresentation=ddl::tDataRepresentation::Deserialized) | |
Construct a new c Sample Codec Factory. More... | |
cSampleCodecFactory (const ddl::DDStructure &oTypeDefinition, ddl::tDataRepresentation eDefaultDataRepresentation=ddl::tDataRepresentation::Deserialized) | |
Construct a new c Sample Codec Factory. More... | |
cSampleCodecFactory (const streaming::ant::IStreamType &oStreamType) | |
Construct a new c Sample Codec Factory. More... | |
cSampleCodecFactory (const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pStreamType) | |
Construct a new c Sample Codec Factory. More... | |
cSampleCodecFactory (const cSampleCodecFactory &) | |
Copy constructor. | |
cSampleCodecFactory (cSampleCodecFactory &&) | |
Move constructor. | |
cSampleCodecFactory & | operator= (const cSampleCodecFactory &) |
assignment operator | |
cSampleCodecFactory & | operator= (cSampleCodecFactory &&) |
Move assignment operator. | |
tResult | IsValid () const |
Check if the factory is in a valid state. More... | |
cStaticSampleDecoder | MakeStaticDecoderFor (const adtf::streaming::ISample &oSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a static decoder for the given sample. More... | |
cStaticSampleCodec | MakeStaticCodecFor (adtf::streaming::ISample &oSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a static codec for the given sample. More... | |
cSampleDecoder | MakeDecoderFor (const adtf::streaming::ISample &oSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a decoder for the given sample. More... | |
cSampleCodec | MakeCodecFor (adtf::streaming::ISample &oSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a codec for the given sample. More... | |
tElement | GetElement (const tCodecIndex &oCodecIndex) const |
Retrieves an element for the codec index. More... | |
tElement | GetElement (const std::string &strElementFullName) const |
Retrieves an element for the given name. More... | |
const tElements & | GetElements () const |
Retrieves the elements of the factory to get element information. More... | |
size_t | GetElementChildCount (const tCodecIndex &oCodecIndex) const |
Retrieves the amount of child elements for the given codec index. More... | |
std::string | GetElementFullName (const tCodecIndex &oCodecIndex) const |
Retrieves the full name of the element within its main structure. More... | |
std::string | GetElementName (const tCodecIndex &oCodecIndex) const |
Retrieves the name of the element within its structured element. More... | |
const std::string & | GetElementBaseName (const tCodecIndex &oCodecIndex) const |
Retrieves the base name of the element within its structured element. More... | |
size_t | GetStaticBufferSize (ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized) const |
Gets the static buffer size in bytes for the structure. More... | |
ddl::tDataRepresentation | GetDefaultDataRepresentation () const |
Returns the current default data representation whuke creating codec or decoder. More... | |
cStaticSampleDecoder | MakeStaticDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a static decoder for the given sample. More... | |
cSampleDecoder | MakeDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a decoder for the given sample. More... | |
cStaticSampleCodec | MakeStaticCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a static codec for the given sample. More... | |
cSampleCodec | MakeCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample, ddl::tDataRepresentation eDataRepresentation) const |
Creates a codec for the given sample. More... | |
cStaticSampleDecoder | MakeStaticDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample) const |
Creates a static decoder for the given sample using the default data representation. More... | |
cSampleDecoder | MakeDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample) const |
Creates a decoder for the given sample using the default data representation. More... | |
cStaticSampleCodec | MakeStaticCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample) const |
Creates a static codec for the given sample using the default data representation. More... | |
cSampleCodec | MakeCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample) const |
Creates a codec for the given sample using the default data representation. More... | |
cStaticSampleDecoder | MakeStaticDecoderFor (const adtf::streaming::ISample &oSample) const |
Creates a static decoder for the given sample using the default data representation. More... | |
cSampleDecoder | MakeDecoderFor (const adtf::streaming::ISample &oSample) const |
Creates a decoder for the given sample using the default data representation. More... | |
cStaticSampleCodec | MakeStaticCodecFor (adtf::streaming::ISample &oSample) const |
Creates a static codec for the given sample using the default data representation. More... | |
cSampleCodec | MakeCodecFor (adtf::streaming::ISample &oSample) const |
Creates a codec for the given sample using the default data representation. More... | |
void | Resolve (tCodecIndex &oCodecIndex) const |
retrieves the lyoutinformation for the given codec index. More... | |
![]() | |
tCodecIndex | Resolve (tCodecLeafIndex nElementIndex) const |
Legacy: Retrieves a codec index with element information for the given leaf index. More... | |
size_t | GetStaticElementCount () const |
Legacy: Gets the leaf count. More... | |
tResult | GetStaticElement (tCodecLeafIndex nElementLeafIndex, const ddl::StructElement *&pElement) const |
Legacy: Access information about an element. More... | |
tCodecLeafIndex | FindIndex (const char *strElementName) const |
Legacy: Retrieves the leaf index of the first element in the given element path. More... | |
tCodecLeafIndex | FindArrayIndex (const char *strArrayName) const |
Legacy: Retrieves the leaf index of the first element in the given element path. More... | |
tCodecLeafIndex | FindStructIndex (const char *strStructName) const |
Legacy: Retrieves the leaf index of the first element in the given element path. More... | |
Private Member Functions | |
const ddl::codec::CodecFactory * | getFactory () const override |
For internal use only. | |
Private Attributes | |
ddl::tDataRepresentation | m_eDefaultDataRepresentation = ddl::tDataRepresentation::Deserialized |
For internal use only. | |
ddl::codec::CodecFactory | m_oFactory |
For internal use only. | |
tElement | m_oFirstElement |
Additional Inherited Members | |
![]() | |
static const char * | GetStaticStructElementName (const ddl::StructElement *pElement) |
Legacy helper funtion to support old adtf_ddl::element_access::find_* functions. More... | |
Factory class for ddl codecs for samples.
Definition at line 945 of file sample_codec.h.
typedef ddl::codec::FactoryElement<sample_codec_factory_access<const cSampleCodecFactory> > tElement |
Iterator value element type for the factory to get element information.
Definition at line 1070 of file sample_codec.h.
typedef ddl::codec::ChildElements<sample_codec_factory_access<const cSampleCodecFactory> > tElements |
Iterator container to iterate all elements of the factory.
Definition at line 1093 of file sample_codec.h.
Empty constructor.
This exists to enable uninitialized member variables of this type that are move-assigned later on.
cSampleCodecFactory | ( | const char * | strStructName, |
const char * | strMediaDescription, | ||
ddl::tDataRepresentation | eDefaultDataRepresentation = ddl::tDataRepresentation::Deserialized |
||
) |
Constructor that take a DDL string for initialization.
[in] | strStructName | The name of the struct for which codecs should be generated. |
[in] | strMediaDescription | The DDL description. |
[in] | eDefaultDataRepresentation | The representation used for the Make* factory methods without an parameter for the data representation. |
cSampleCodecFactory | ( | const ddl::dd::StructType & | oStruct, |
const ddl::dd::DataDefinition & | oParentDD, | ||
ddl::tDataRepresentation | eDefaultDataRepresentation = ddl::tDataRepresentation::Deserialized |
||
) |
Constructor that uses an OO-DDL struct for initialization.
[in] | pStruct | The struct definition. |
[in] | eDefaultDataRepresentation | The representation used for the Make* factory methods without an parameter for the data representation. |
cSampleCodecFactory | ( | const std::pair< std::string, std::string > & | oMDDescription, |
ddl::tDataRepresentation | eDefaultDataRepresentation = ddl::tDataRepresentation::Deserialized |
||
) |
Construct a new c Sample Codec Factory.
oMDDescription | String pair of "struct_name", "data_description". |
eDefaultDataRepresentation | Default data representation if creting a codec without representation value |
cSampleCodecFactory | ( | const ddl::DDStructure & | oTypeDefinition, |
ddl::tDataRepresentation | eDefaultDataRepresentation = ddl::tDataRepresentation::Deserialized |
||
) |
Construct a new c Sample Codec Factory.
oTypeDefinition | Data definition defined within a DDStructure. |
eDefaultDataRepresentation | Default data representation if creting a codec without representation value |
cSampleCodecFactory | ( | const streaming::ant::IStreamType & | oStreamType | ) |
Construct a new c Sample Codec Factory.
oStreamType | Streamtype with set properties "md_struct" and "md_description". |
cSampleCodecFactory | ( | const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > & | pStreamType | ) |
Construct a new c Sample Codec Factory.
pStreamType | Streamtype with set properties "md_struct" and "md_description". |
ddl::tDataRepresentation GetDefaultDataRepresentation | ( | ) | const |
Returns the current default data representation whuke creating codec or decoder.
tElement GetElement | ( | const std::string & | strElementFullName | ) | const |
Retrieves an element for the given name.
[in] | strElementFullName | The full name of the element in point notation (i.e. "element1.child_element[4].element_value" ). |
throws | tResult if not found. |
tElement GetElement | ( | const tCodecIndex & | oCodecIndex | ) | const |
Retrieves an element for the codec index.
[in] | oCodecIndex | The codec index. |
throws | tResult if not found. |
const std::string& GetElementBaseName | ( | const tCodecIndex & | oCodecIndex | ) | const |
Retrieves the base name of the element within its structured element.
If the element is an array you get the elements base name respresentation : "element_name" for each array element. If the element is not an array you get the elements name respresentation is also the base name respresentation: "element_name" .
[in] | oCodecIndex | The codec index of the element. |
throws | tResult if not found. |
size_t GetElementChildCount | ( | const tCodecIndex & | oCodecIndex | ) | const |
Retrieves the amount of child elements for the given codec index.
[in] | oCodecIndex | The codec index of the element. |
0 | has no children. May be a leaf element. |
>0 | has children. May be a structured element. |
throws | tResult if not found. |
std::string GetElementFullName | ( | const tCodecIndex & | oCodecIndex | ) | const |
Retrieves the full name of the element within its main structure.
If the element is an array you get the elements array name respresentation: "main_element.element_name[0]" or main_element.element_name[1] ... etc. If the element is not an array you get the elements name respresentation: "main_element.element_name".
[in] | oCodecIndex | The codec index of the element. |
throws | tResult if not found. |
std::string GetElementName | ( | const tCodecIndex & | oCodecIndex | ) | const |
Retrieves the name of the element within its structured element.
If the element is an array you get the elements array name respresentation: "element_name[0]" or element_name[1] ... etc. If the element is not an array you get the elements name respresentation: "element_name".
[in] | oCodecIndex | The codec index of the element. |
throws | tResult if not found. |
const tElements& GetElements | ( | ) | const |
Retrieves the elements of the factory to get element information.
size_t GetStaticBufferSize | ( | ddl::tDataRepresentation | eRep = ddl::tDataRepresentation::Deserialized | ) | const |
Gets the static buffer size in bytes for the structure.
eRep | option to retrieve size in bytes for the deserialized or serialized representation. |
size_t | size in bytes of the structure depending on the given representation eRep |
tResult IsValid | ( | ) | const |
Check if the factory is in a valid state.
Referenced by md_sample_data_factory< T >::md_sample_data_factory().
|
inline |
Creates a codec for the given sample using the default data representation.
[in] | oSample | The sample. |
Definition at line 1274 of file sample_codec.h.
References cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeCodecFor().
cSampleCodec MakeCodecFor | ( | adtf::streaming::ISample & | oSample, |
ddl::tDataRepresentation | eDataRepresentation | ||
) | const |
Creates a codec for the given sample.
[out] | oSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Referenced by cSampleCodecFactory::MakeCodecFor(), and encoding_sample_writer< WriterImplementation >::MakeSample().
|
inline |
Creates a codec for the given sample using the default data representation.
[in] | pSample | The sample. |
Definition at line 1234 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeCodecFor().
|
inline |
Creates a codec for the given sample.
[out] | pSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Definition at line 1197 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), and cSampleCodecFactory::MakeCodecFor().
|
inline |
Creates a decoder for the given sample using the default data representation.
[in] | oSample | The sample. |
Definition at line 1254 of file sample_codec.h.
References cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeDecoderFor().
cSampleDecoder MakeDecoderFor | ( | const adtf::streaming::ISample & | oSample, |
ddl::tDataRepresentation | eDataRepresentation | ||
) | const |
Creates a decoder for the given sample.
[in] | oSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Referenced by decoding_sample_reader< ReaderImplementation >::GetLastDecoder(), decoding_sample_reader< ReaderImplementation >::GetNextDecoder(), md_sample_data_factory< T >::Make(), and cSampleCodecFactory::MakeDecoderFor().
|
inline |
Creates a decoder for the given sample using the default data representation.
[in] | pSample | The sample. |
Definition at line 1216 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeDecoderFor().
|
inline |
Creates a decoder for the given sample.
[in] | pSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Definition at line 1175 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), and cSampleCodecFactory::MakeDecoderFor().
|
inline |
Creates a static codec for the given sample using the default data representation.
[in] | oSample | The sample. |
Definition at line 1264 of file sample_codec.h.
References cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeStaticCodecFor().
cStaticSampleCodec MakeStaticCodecFor | ( | adtf::streaming::ISample & | oSample, |
ddl::tDataRepresentation | eDataRepresentation | ||
) | const |
Creates a static codec for the given sample.
[out] | oSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Referenced by cSampleCodecFactory::MakeStaticCodecFor().
|
inline |
Creates a static codec for the given sample using the default data representation.
[in] | pSample | The sample. |
Definition at line 1225 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeStaticCodecFor().
|
inline |
Creates a static codec for the given sample.
[out] | pSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Definition at line 1186 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), and cSampleCodecFactory::MakeStaticCodecFor().
|
inline |
Creates a static decoder for the given sample using the default data representation.
[in] | oSample | The sample. |
Definition at line 1244 of file sample_codec.h.
References cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeStaticDecoderFor().
cStaticSampleDecoder MakeStaticDecoderFor | ( | const adtf::streaming::ISample & | oSample, |
ddl::tDataRepresentation | eDataRepresentation | ||
) | const |
Creates a static decoder for the given sample.
[in] | oSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Referenced by cSampleCodecFactory::MakeStaticDecoderFor().
|
inline |
Creates a static decoder for the given sample using the default data representation.
[in] | pSample | The sample. |
Definition at line 1207 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), cSampleCodecFactory::m_eDefaultDataRepresentation, and cSampleCodecFactory::MakeStaticDecoderFor().
|
inline |
Creates a static decoder for the given sample.
[in] | pSample | The sample. |
[in] | eDataRepresentation | The data representation that the sample is in. |
Definition at line 1163 of file sample_codec.h.
References iobject_ptr_base< T >::Get(), and cSampleCodecFactory::MakeStaticDecoderFor().
void Resolve | ( | tCodecIndex & | oCodecIndex | ) | const |
retrieves the lyoutinformation for the given codec index.
[in] | oCodecIndex | The codec index of the element to retrieve. |