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

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

#include <data_stream_message.h>

Static Public Member Functions

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

Detailed Description

How to read unsigned int from a message.

Definition at line 115 of file data_stream_message.h.

Member Function Documentation

◆ data_stream() [1/2]

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

Read the 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 366 of file data_stream_message.cpp.

366  {
367  char* srcByte = (char*)&data;
368  memcpy(srcByte, ds, sizeof(unsigned int));
369  ds += sizeof(unsigned int);
370  return true;
371 }

◆ data_stream() [2/2]

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

Read the 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 379 of file data_stream_message.cpp.

379  {
380  char* srcByte = (char*)data;
381  memcpy(srcByte, ds, sizeof(unsigned int)*nbElement);
382  ds += sizeof(unsigned int)*nbElement;
383  return true;
384 }

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