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

Specialisation to read std::string from a message. More...

#include <data_stream_message.h>

Static Public Member Functions

static bool data_stream (char *&ds, std::string &data)
 Load a std::string from a message. More...
 

Detailed Description

Specialisation to read std::string from a message.

Definition at line 173 of file data_stream_message.h.

Member Function Documentation

◆ data_stream()

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

Load a std::string from a message.

Parameters
[out]ds: message iterator which contains std::string
data: std::string to be loaded
Returns
true on success, false otherwise

Definition at line 566 of file data_stream_message.cpp.

566  {
567  size_t nbElement(0lu);
569  if(nbElement == 0lu || !b){return b;}
570  data.resize(nbElement);
571  memcpy((char*)data.data(), ds, nbElement);
572  ds += nbElement;
573  return b;
574 }

References DataStream< Stream, Mode, T >::data_stream().

+ Here is the call graph for this function:

The documentation for this struct was generated from the following files:
DataStream::data_stream
static bool data_stream(Stream &ds, T &data)
Definition: data_stream_include.h:28