ADTF  3.14.3
CodecFactory

Factory class for ddl codecs. More...

Public Member Functions

 CodecFactory ()
 Empty constructor. More...
 
 CodecFactory (const std::string &struct_name, const std::string &dd_string)
 Constructor that take a DataDefinition string for initialization. More...
 
 CodecFactory (const ddl::dd::StructType &struct_type, const dd::DataDefinition &dd)
 Constructor that uses an OO-DataDefinition struct for initialization. More...
 
 CodecFactory (const ddl::dd::StructTypeAccess &struct_type_access)
 Constructor that uses an valid struct type access for initialization. More...
 
 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

a_util::memory::shared_ptr< const StructLayout > _layout
 For internal use only.
 
a_util::result::Result _constructor_result
 For internal use only.
 

Detailed Description

Constructor & Destructor Documentation

◆ CodecFactory() [1/5]

Empty constructor.

This exists to enable uninitialized member variables of this type that are move-assigned later on.

◆ CodecFactory() [2/5]

CodecFactory ( const std::string &  struct_name,
const std::string &  dd_string 
)

Constructor that take a DataDefinition string for initialization.

Parameters
[in]struct_nameThe name of the struct for which codecs should be generated.
[in]dd_stringThe DataDefinition description within a (xml)string.

◆ CodecFactory() [3/5]

CodecFactory ( const ddl::dd::StructType struct_type,
const dd::DataDefinition dd 
)

Constructor that uses an OO-DataDefinition struct for initialization.

Parameters
[in]struct_typeThe struct definition.
[in]ddThe DD

◆ CodecFactory() [4/5]

CodecFactory ( const ddl::dd::StructTypeAccess struct_type_access)

Constructor that uses an valid struct type access for initialization.

Parameters
[in]struct_type_accessThe struct type access.

◆ CodecFactory() [5/5]

CodecFactory ( const DDStructure dd_struct)

Constructor that uses an OO-DataDefinition struct for initialization.

Parameters
[in]dd_structThe struct definition.

Member Function Documentation

◆ getStaticBufferSize()

size_t getStaticBufferSize ( DataRepresentation  rep = deserialized) const
Parameters
[in]repThe data representation for which the buffer size should be returned.
Returns
The size of the structure in the requested data representation.

◆ getStaticElement()

a_util::result::Result getStaticElement ( size_t  index,
const StructElement *&  element 
) const

Access information about an element.

Parameters
[in]indexThe index of the element.
[out]elementPointer that will be updated to point to the element information.
Return values
ERR_INVALID_INDEXInvalid index.

◆ getStaticElementCount()

size_t getStaticElementCount ( ) const
Returns
The amount of static elements contained in the handled structure.

◆ isValid()

a_util::result::Result isValid ( ) const

Check if the factory is in a valid state.

Returns
Any errors during construction.

◆ makeCodecFor()

Codec makeCodecFor ( void *  data,
size_t  data_size,
DataRepresentation  rep = deserialized 
) const
inline

Creates a codec for the given data.

Parameters
[in]dataThe pointer to the raw data.
[in]data_sizeThe size of the raw data.
[in]repThe representation that the data is encoded in.
Returns
a codec.

Definition at line 123 of file conan_home_relwithdebinfo/.conan/data/dev_essential/1.1.4/fep/stable/package/5bba22a1f4e8057d230d54fdd86f43a9aa5ca5fe/include/ddl/codec/codec_factory.h.

References CodecFactory::_layout.

◆ makeDecoderFor()

Decoder makeDecoderFor ( const void *  data,
size_t  data_size,
DataRepresentation  rep = deserialized 
) const
inline

Creates a decoder for the given data.

Parameters
[in]dataThe pointer to the raw data.
[in]data_sizeThe size of the raw data.
[in]repThe representation that the data is encoded in.
Returns
a decoder.

Definition at line 109 of file conan_home_relwithdebinfo/.conan/data/dev_essential/1.1.4/fep/stable/package/5bba22a1f4e8057d230d54fdd86f43a9aa5ca5fe/include/ddl/codec/codec_factory.h.

References CodecFactory::_layout.

◆ makeStaticCodecFor()

StaticCodec makeStaticCodecFor ( void *  data,
size_t  data_size,
DataRepresentation  rep = deserialized 
) const
inline

Creates a static codec for the given data.

Parameters
[in]dataThe pointer to the raw data.
[in]data_sizeThe size of the raw data.
[in]repThe representation that the data is encoded in.
Returns
a static codec.

Definition at line 95 of file conan_home_relwithdebinfo/.conan/data/dev_essential/1.1.4/fep/stable/package/5bba22a1f4e8057d230d54fdd86f43a9aa5ca5fe/include/ddl/codec/codec_factory.h.

References CodecFactory::_layout.

◆ makeStaticDecoderFor()

StaticDecoder makeStaticDecoderFor ( const void *  data,
size_t  data_size,
DataRepresentation  rep = deserialized 
) const
inline

Creates a static decoder for the given data.

Parameters
[in]dataThe pointer to the raw data.
[in]data_sizeThe size of the raw data.
[in]repThe representation that the data is encoded in.
Returns
a static decoder.

Definition at line 81 of file conan_home_relwithdebinfo/.conan/data/dev_essential/1.1.4/fep/stable/package/5bba22a1f4e8057d230d54fdd86f43a9aa5ca5fe/include/ddl/codec/codec_factory.h.

References CodecFactory::_layout.


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)