61 std::size_t size = str.size();
62 stream.
append(
reinterpret_cast<const char*
>(&size),
sizeof(size));
64 for (
const auto& c : str)
84 char* localIt =
reinterpret_cast<char*
>(it);
85 std::size_t* size =
reinterpret_cast<std::size_t*
>(it);
86 localIt +=
sizeof(*size);
88 str = std::string(localIt, *size);
Manages memory a byte buffer, offering dynamic appending. This class is designed for scenarios where ...
Definition buffer.hpp:50
virtual void append(const void *buffer_to_append, const std::size_t length_of_buffer)
append the given buffer to the end of the current buffer. If there is no current buffer yet,...
Definition buffer.hpp:96
Offers advanced container types with unique approaches to stability and interprocess sharing....
Definition buffer.hpp:44
Implements traits-based serialization for complex data types, including standard containers and custo...
Definition direct.hpp:38
void * serialized_object
Represents a serialized value in memory.
Definition traits.hpp:42
static void serialize(const std::string &str, container::buffer &stream)
Serializes a std::string into a binary buffer.
Definition string.hpp:59
static void deserialize(serialized_object &it, std::string &str)
Deserializes a std::string from a binary buffer.
Definition string.hpp:79
Defines the traits required for serializing and deserializing objects of type T.
Definition traits.hpp:52
static void serialize(const T &val, container::buffer &stream)
Required to serialize an object of type T into a shared_buffer stream.
Definition traits.hpp:63