pstore2
Public Types | Static Public Member Functions | List of all members
pstore::serialize::serializer< indirect_string > Struct Template Reference

A serializer for indirect_string. More...

#include <indirect_string.hpp>

Public Types

using value_type = indirect_string
 

Static Public Member Functions

static auto write (archive::database_writer &&archive, value_type const &value) -> archive_result_type< archive::database_writer >
 Writes an instance of indirect_string to an archiver. More...
 
static auto write (archive::database_writer &archive, value_type const &value) -> archive_result_type< archive::database_writer >
 Writes an instance of indirect_string to an archiver. More...
 
static void read (archive::database_reader &archive, value_type &value)
 Reads an instance of indirect_string from an archiver. More...
 
static void read (archive::database_reader &&archive, value_type &value)
 Reads an instance of indirect_string from an archiver. More...
 

Detailed Description

template<>
struct pstore::serialize::serializer< indirect_string >

A serializer for indirect_string.

Note that this reads and writes an address: the body of the string must be read and written separately. For writing, see indirect_string::write_body_and_patch_address().

Member Function Documentation

◆ read() [1/2]

void pstore::serialize::serializer< indirect_string >::read ( archive::database_reader archive,
value_type value 
)
static

Reads an instance of indirect_string from an archiver.

Parameters
archiveThe Archiver from which a string will be read.
valueA reference to uninitialized memory that is suitable for a new string instance.
Note
This function only reads from the database.

◆ read() [2/2]

void pstore::serialize::serializer< indirect_string >::read ( archive::database_reader &&  archive,
value_type value 
)
static

Reads an instance of indirect_string from an archiver.

Parameters
archiveThe Archiver from which a string will be read.
valueA reference to uninitialized memory that is suitable for a new string instance.
Note
This function only reads from the database.

◆ write() [1/2]

static auto pstore::serialize::serializer< indirect_string >::write ( archive::database_writer &&  archive,
value_type const &  value 
) -> archive_result_type<archive::database_writer>
inlinestatic

Writes an instance of indirect_string to an archiver.

Parameters
archiveThe Archiver to which the string will be written.
valueThe indirect_string instance to be serialized.
Returns
The address at which the data was written.
Note
This function only writes to a database.

◆ write() [2/2]

static auto pstore::serialize::serializer< indirect_string >::write ( archive::database_writer archive,
value_type const &  value 
) -> archive_result_type<archive::database_writer>
inlinestatic

Writes an instance of indirect_string to an archiver.

Parameters
archiveThe Archiver to which the string will be written.
valueThe indirect_string instance to be serialized.
Returns
The address at which the data was written.
Note
This function only writes to a database.

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