ADTF
|
Factory class for ddl codecs. More...
Public Member Functions | |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY | CodecFactory () |
Empty constructor. More... | |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY | CodecFactory (const std::string &struct_name, const std::string &dd_string) |
Constructor that take a DataDefinition string for initialization. More... | |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY | CodecFactory (const ddl::dd::StructType &struct_type, const dd::DataDefinition &dd) |
Constructor that uses an OO-DataDefinition struct for initialization. More... | |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY | CodecFactory (const ddl::dd::StructTypeAccess &struct_type_access) |
Constructor that uses an valid struct type access for initialization. More... | |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY | CodecFactory (const DDStructure &dd_struct) |
Constructor that uses an OO-DataDefinition struct for initialization. More... | |
a_util::result::Result | isValid () const |
Check if the factory is in a valid state. More... | |
StaticDecoder | makeStaticDecoderFor (const void *data, size_t data_size, DataRepresentation rep=deserialized) const |
Creates a static decoder for the given data. More... | |
StaticCodec | makeStaticCodecFor (void *data, size_t data_size, DataRepresentation rep=deserialized) const |
Creates a static codec for the given data. More... | |
Decoder | makeDecoderFor (const void *data, size_t data_size, DataRepresentation rep=deserialized) const |
Creates a decoder for the given data. More... | |
Codec | makeCodecFor (void *data, size_t data_size, DataRepresentation rep=deserialized) const |
Creates a codec for the given data. More... | |
size_t | getStaticElementCount () const |
a_util::result::Result | getStaticElement (size_t index, const StructElement *&element) const |
Access information about an element. More... | |
size_t | getStaticBufferSize (DataRepresentation rep=deserialized) const |
Private Attributes | |
std::shared_ptr< const StructLayout > | _layout |
For internal use only. More... | |
a_util::result::Result | _dummy_constructor_result |
This must stay for binary compatibility! | |
Factory class for ddl codecs.
Definition at line 36 of file codec_factory_legacy.h.
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY CodecFactory | ( | ) |
Empty constructor.
This exists to enable uninitialized member variables of this type that are move-assigned later on.
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY CodecFactory | ( | const std::string & | struct_name, |
const std::string & | dd_string | ||
) |
Constructor that take a DataDefinition string for initialization.
[in] | struct_name | The name of the struct for which codecs should be generated. |
[in] | dd_string | The DataDefinition description within a (xml)string. |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY CodecFactory | ( | const ddl::dd::StructType & | struct_type, |
const dd::DataDefinition & | dd | ||
) |
Constructor that uses an OO-DataDefinition struct for initialization.
[in] | struct_type | The struct definition. |
[in] | dd | The DD |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY CodecFactory | ( | const ddl::dd::StructTypeAccess & | struct_type_access | ) |
Constructor that uses an valid struct type access for initialization.
[in] | struct_type_access | The struct type access. |
DEV_ESSENTIAL_DEPRECATED_CODEC_FACTORY CodecFactory | ( | const DDStructure & | dd_struct | ) |
Constructor that uses an OO-DataDefinition struct for initialization.
[in] | dd_struct | The struct definition. |
size_t getStaticBufferSize | ( | DataRepresentation | rep = deserialized | ) | const |
[in] | rep | The data representation for which the buffer size should be returned. |
a_util::result::Result getStaticElement | ( | size_t | index, |
const StructElement *& | element | ||
) | const |
Access information about an element.
[in] | index | The index of the element. |
[out] | element | Pointer that will be updated to point to the element information. |
ERR_INVALID_INDEX | Invalid index. |
size_t getStaticElementCount | ( | ) | const |
a_util::result::Result isValid | ( | ) | const |
Check if the factory is in a valid state.
|
inline |
Creates a codec for the given data.
[in] | data | The pointer to the raw data. |
[in] | data_size | The size of the raw data. |
[in] | rep | The representation that the data is encoded in. |
Definition at line 130 of file codec_factory_legacy.h.
References CodecFactory::_layout.
|
inline |
Creates a decoder for the given data.
[in] | data | The pointer to the raw data. |
[in] | data_size | The size of the raw data. |
[in] | rep | The representation that the data is encoded in. |
Definition at line 116 of file codec_factory_legacy.h.
References CodecFactory::_layout.
|
inline |
Creates a static codec for the given data.
[in] | data | The pointer to the raw data. |
[in] | data_size | The size of the raw data. |
[in] | rep | The representation that the data is encoded in. |
Definition at line 102 of file codec_factory_legacy.h.
References CodecFactory::_layout.
|
inline |
Creates a static decoder for the given data.
[in] | data | The pointer to the raw data. |
[in] | data_size | The size of the raw data. |
[in] | rep | The representation that the data is encoded in. |
Definition at line 88 of file codec_factory_legacy.h.
References CodecFactory::_layout.
|
private |
For internal use only.
The std::shared_ptr is used due to binary compatibility!
Definition at line 157 of file codec_factory_legacy.h.
Referenced by CodecFactory::makeCodecFor(), CodecFactory::makeDecoderFor(), CodecFactory::makeStaticCodecFor(), and CodecFactory::makeStaticDecoderFor().