PhoenixClockMock  2.0.0
Tool to manipulate mock of clock (split, merge and get info)
DataStream< size_t, DataStreamMode::WRITE, std::string > Struct Reference

Specialisation to get the size of a std::string. More...

#include <data_stream_size.h>

Static Public Member Functions

static bool data_stream (size_t &ds, std::string &data)
 Get the size of a std::string. More...
 

Detailed Description

Specialisation to get the size of a std::string.

Definition at line 88 of file data_stream_size.h.

Member Function Documentation

◆ data_stream()

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

Get the size of a std::string.

Parameters
[out]ds: size of the std::string
data: data to be used
Returns
true on success, false otherwise

Definition at line 37 of file data_stream_size.cpp.

37  {
38  ds += data.size() + sizeof(size_t); //Number of char + sizeof(size_t) to store the number of char
39  return true;
40 }

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