added override specifiers, some doc fixes
This commit is contained in:
@ -5,19 +5,24 @@
|
||||
#include <framework/serialize/SerialArrayListAdapter.h>
|
||||
|
||||
/**
|
||||
* @brief This adapter provides an interface for SerializeIF to serialize and deserialize
|
||||
* buffers with a header containing the buffer length.
|
||||
* @brief This adapter provides an interface for SerializeIF to serialize and
|
||||
* deserialize buffers with a header containing the buffer length.
|
||||
* @details
|
||||
*
|
||||
* Can be used by SerialLinkedListAdapter by declaring
|
||||
* as a linked element with SerializeElement<SerialFixedArrayListAdapter<...>>.
|
||||
* The sequence of objects is defined in the constructor by using the setStart and setNext functions.
|
||||
* The sequence of objects is defined in the constructor by
|
||||
* using the setStart and setNext functions.
|
||||
*
|
||||
* 1. Buffers with a size header inside that class can be declared with
|
||||
* SerialFixedArrayListAdapter<BUFFER_TYPE, MAX_BUFFER_LENGTH, LENGTH_FIELD_TYPE>.
|
||||
* 2. MAX_BUFFER_LENGTH specifies the maximum allowed number of elements in FixedArrayList
|
||||
* 3. LENGTH_FIELD_TYPE specifies the data type of the buffer header containing the buffer size
|
||||
* (defaults to 1 byte length field) that follows
|
||||
* @code
|
||||
* SerialFixedArrayListAdapter<BUFFER_TYPE,
|
||||
* MAX_BUFFER_LENGTH, LENGTH_FIELD_TYPE> mySerialFixedArrayList(...).
|
||||
* @endcode
|
||||
* 2. MAX_BUFFER_LENGTH specifies the maximum allowed number of elements
|
||||
* in FixedArrayList.
|
||||
* 3. LENGTH_FIELD_TYPE specifies the data type of the buffer header
|
||||
* containing the buffer size (defaults to 1 byte length field)
|
||||
* that follows.
|
||||
*
|
||||
* @ingroup serialize
|
||||
*/
|
||||
@ -27,7 +32,8 @@ class SerialFixedArrayListAdapter :
|
||||
public SerializeIF {
|
||||
public:
|
||||
/**
|
||||
* Constructor Arguments are forwarded to FixedArrayList constructor
|
||||
* Constructor Arguments are forwarded to FixedArrayList constructor.
|
||||
* Refer to the fixed array list constructors for different options.
|
||||
* @param args
|
||||
*/
|
||||
template<typename... Args>
|
||||
@ -35,8 +41,8 @@ public:
|
||||
FixedArrayList<BUFFER_TYPE, MAX_SIZE, count_t>(std::forward<Args>(args)...)
|
||||
{}
|
||||
|
||||
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const {
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const override {
|
||||
return SerialArrayListAdapter<BUFFER_TYPE, count_t>::serialize(this,
|
||||
buffer, size, max_size, bigEndian);
|
||||
}
|
||||
@ -45,8 +51,9 @@ public:
|
||||
return SerialArrayListAdapter<BUFFER_TYPE, count_t>::
|
||||
getSerializedSize(this);
|
||||
}
|
||||
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||
bool bigEndian) {
|
||||
|
||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||
bool bigEndian) override {
|
||||
return SerialArrayListAdapter<BUFFER_TYPE, count_t>::deSerialize(this,
|
||||
buffer, size, bigEndian);
|
||||
}
|
||||
|
Reference in New Issue
Block a user