Factory class for ddl codecs.
More...
#include <codec_factory.h>
|
| cCodecFactory () |
| Empty constructor.
|
|
| cCodecFactory (const char *strStructName, const char *strMediaDescription) |
| Constructor that take a DDL string for initialization.
|
|
| cCodecFactory (const cDDLComplex *pStruct) |
| Constructor that uses an OO-DDL struct for initialization.
|
|
| cCodecFactory (cCodecFactory &)=default |
| Copy constructor.
|
|
| cCodecFactory (const cCodecFactory &)=default |
| Copy constructor.
|
|
| cCodecFactory (cCodecFactory &&)=default |
| Move constructor.
|
|
cCodecFactory & | operator= (cCodecFactory &)=default |
| Assignment operator.
|
|
cCodecFactory & | operator= (cCodecFactory &&)=default |
| Move assignment operator.
|
|
tResult | IsValid () const |
| Check if the factory is in a valid state.
|
|
cStaticDecoder | MakeStaticDecoderFor (const void *pData, size_t nDataSize, tDataRepresentation eRep=tDataRepresentation::Deserialized) const |
| Creates a static decoder for the given data.
|
|
cStaticCodec | MakeStaticCodecFor (void *pData, size_t nDataSize, tDataRepresentation eRep=tDataRepresentation::Deserialized) const |
| Creates a static codec for the given data.
|
|
cDecoder | MakeDecoderFor (const void *pData, size_t nDataSize, tDataRepresentation eRep=tDataRepresentation::Deserialized) const |
| Creates a decoder for the given data.
|
|
cCodec | MakeCodecFor (void *pData, size_t nDataSize, tDataRepresentation eRep=tDataRepresentation::Deserialized) const |
| Creates a codec for the given data.
|
|
size_t | GetStaticElementCount () const |
|
tResult | GetStaticElement (size_t nIndex, const tStructElement *&pElement) const |
| Access information about an element.
|
|
size_t | GetStaticBufferSize (tDataRepresentation eRep=tDataRepresentation::Deserialized) const |
|
◆ cCodecFactory() [1/3]
◆ cCodecFactory() [2/3]
cCodecFactory |
( |
const char * | strStructName, |
|
|
const char * | strMediaDescription ) |
Constructor that take a DDL string for initialization.
- Parameters
-
[in] | strStructName | The name of the struct for which codecs should be generated. |
[in] | strMediaDescription | The DDL description. |
References cCodecFactory(), and PKG_ADTF_DDL_DEPRECATED.
◆ cCodecFactory() [3/3]
Constructor that uses an OO-DDL struct for initialization.
- Parameters
-
[in] | pStruct | The struct definition. |
References cCodecFactory().
◆ GetStaticBufferSize()
size_t GetStaticBufferSize |
( |
tDataRepresentation | eRep = tDataRepresentation::Deserialized | ) |
const |
- Parameters
-
[in] | eRep | The data representation for which the buffer size should be returned. |
- Returns
- The size of the structure in the requested data representation.
◆ GetStaticElement()
Access information about an element.
- Parameters
-
[in] | nIndex | The index of the element. |
[out] | pElement | Pointer that will be updated to point to the element information. |
- Return values
-
ERR_INVALID_INDEX | Invalid index. |
◆ GetStaticElementCount()
size_t GetStaticElementCount |
( |
| ) |
const |
- Returns
- The amount of static elements contained in the handled structure.
◆ GetStaticStructElementName()
static const char * GetStaticStructElementName |
( |
const tStructElement * | pElement | ) |
|
|
static |
Access information about an element.
- Parameters
-
[out] | pElement | Pointer that will be updated to point to the element information. |
- Return values
-
ERR_INVALID_INDEX | Invalid index. |
◆ IsValid()
Check if the factory is in a valid state.
- Returns
- Any errors during construction.
◆ MakeCodecFor()
◆ MakeDecoderFor()
◆ MakeStaticCodecFor()
◆ MakeStaticDecoderFor()
◆ m_oConstructorResult
◆ m_pLayout
std::shared_ptr<const cStructLayout> m_pLayout |
|
private |