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

Specialisation to write std::string into a message. More...

#include <data_stream_message.h>

Static Public Member Functions

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

Detailed Description

Specialisation to write std::string into a message.

Definition at line 179 of file data_stream_message.h.

Member Function Documentation

◆ data_stream()

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

Save a std::string into a message.

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

Definition at line 582 of file data_stream_message.cpp.

582  {
583  size_t nbElement(data.size());
585  if(nbElement == 0lu || !b){return b;}
586  memcpy(ds, (const char*)data.data(), nbElement);
587  ds += nbElement;
588  return b;
589 }

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