PhoenixSerializer  3.0.0
PhoenixSerializer is a framework to save/load/serialize/deserialize data
Loading...
Searching...
No Matches
data_message.h File Reference
#include "data_stream.h"
Include dependency graph for data_message.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T>
bool data_message_load (SerializeIter &iter, T &data)
 Load data from a message.
template<typename T>
bool data_message_load (SerializeIter &iter, T *data, size_t nbElement)
 Load data from a message.
template<typename T>
bool data_message_save (SerializeIter &iter, const T &data)
 Save data in a message.
template<typename T>
bool data_message_save (SerializeIter &iter, const T *data, size_t nbElement)
 Save data in a message.
template<typename T>
bool data_message_save (SerializeIter &iter, T &data)
 Save data in a message.
template<typename T>
bool data_message_save (SerializeIter &iter, T *data, size_t nbElement)
 Save data in a message.

Function Documentation

◆ data_message_load() [1/2]

template<typename T>
bool data_message_load ( SerializeIter & iter,
T & data )

Load data from a message.

Parameters
[out]iter: message to be read
[out]data: data to be loaded from the message
Returns
true on success, false otherwise

Definition at line 60 of file data_message.h.

60 {
62}
static bool phoenix_serialize(Stream &ds, T &data)
Dummy function to catch if a type is not specialised.

References data_message_load(), and Serializer< Stream, Mode, T >::phoenix_serialize().

Referenced by data_message_load(), and data_message_load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_message_load() [2/2]

template<typename T>
bool data_message_load ( SerializeIter & iter,
T * data,
size_t nbElement )

Load data from a message.

Parameters
[out]iter: message to be read
[out]data: data to be loaded from the message
nbElement: number of elements to be loaded
Returns
true on success, false otherwise

Definition at line 71 of file data_message.h.

References data_message_load(), and Serializer< Stream, Mode, T >::phoenix_serialize().

Here is the call graph for this function:

◆ data_message_save() [1/4]

template<typename T>
bool data_message_save ( SerializeIter & iter,
const T & data )

Save data in a message.

Parameters
[out]iter: message to be written
data: data to be saved in the message
Returns
true on success, false otherwise

Definition at line 28 of file data_message.h.

28 {
29 return Serializer<SerializeIter, SerializeMode::WRITE, T>::phoenix_serialize(iter, (T &)data); // NOLINT(modernize-avoid-c-style-cast) WRITE never modifies data, but Serializer takes T & to share one function with READ
30}

References data_message_save(), and Serializer< Stream, Mode, T >::phoenix_serialize().

Here is the call graph for this function:

◆ data_message_save() [2/4]

template<typename T>
bool data_message_save ( SerializeIter & iter,
const T * data,
size_t nbElement )

Save data in a message.

Parameters
[out]iter: message to be written
data: data to be saved in the message
nbElement: number of elements to be saved
Returns
true on success, false otherwise

Definition at line 50 of file data_message.h.

50 {
51 return Serializer<SerializeIter, SerializeMode::WRITE, T>::phoenix_serialize(iter, (T *)data, nbElement); // NOLINT(modernize-avoid-c-style-cast) WRITE never modifies data, but Serializer takes T & to share one function with READ
52}

References data_message_save(), and Serializer< Stream, Mode, T >::phoenix_serialize().

Here is the call graph for this function:

◆ data_message_save() [3/4]

template<typename T>
bool data_message_save ( SerializeIter & iter,
T & data )

Save data in a message.

Parameters
[out]iter: message to be written
data: data to be saved in the message
Returns
true on success, false otherwise

Definition at line 18 of file data_message.h.

References data_message_save(), and Serializer< Stream, Mode, T >::phoenix_serialize().

Referenced by data_message_save(), data_message_save(), data_message_save(), and data_message_save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_message_save() [4/4]

template<typename T>
bool data_message_save ( SerializeIter & iter,
T * data,
size_t nbElement )

Save data in a message.

Parameters
[out]iter: message to be written
data: data to be saved in the message
nbElement: number of elements to be saved
Returns
true on success, false otherwise

Definition at line 39 of file data_message.h.

References data_message_save(), and Serializer< Stream, Mode, T >::phoenix_serialize().

Here is the call graph for this function: