DataStream  1.8.8
DataStream : framework to save/load/serialize/deserialize data
DataStream< char *, DataStreamMode::READ, long unsigned int > Struct Reference

How to read long unsigned int from a message. More...

#include <data_stream_message.h>

Static Public Member Functions

static bool data_stream (char *&ds, long unsigned int &data)
 Read the long unsigned int in the message. More...
 
static bool data_stream (char *&ds, long unsigned int *data, size_t nbElement)
 Read the long unsigned int in the message. More...
 

Detailed Description

How to read long unsigned int from a message.

Definition at line 129 of file data_stream_message.h.

Member Function Documentation

◆ data_stream() [1/2]

bool DataStream< char *, DataStreamMode::READ, long unsigned int >::data_stream ( char *&  ds,
long unsigned int &  data 
)
static

Read the long unsigned int in the message.

Parameters
[out]ds: message to be read
[out]data: data to be set
Returns
true on success, false otherwise

Definition at line 416 of file data_stream_message.cpp.

416  {
417  char* srcByte = (char*)&data;
418  memcpy(srcByte, ds, sizeof(long unsigned int));
419  ds += sizeof(long unsigned int);
420  return true;
421 }

◆ data_stream() [2/2]

bool DataStream< char *, DataStreamMode::READ, long unsigned int >::data_stream ( char *&  ds,
long unsigned int *  data,
size_t  nbElement 
)
static

Read the long unsigned int in the message.

Parameters
[out]ds: message to be read
[out]data: data to be set
nbElement: number of element of the data
Returns
true on success, false otherwise

Definition at line 429 of file data_stream_message.cpp.

429  {
430  char* srcByte = (char*)data;
431  memcpy(srcByte, ds, sizeof(long unsigned int)*nbElement);
432  ds += sizeof(long unsigned int)*nbElement;
433  return true;
434 }

The documentation for this struct was generated from the following files: