pstore2
Classes | Functions
sstring_view_archive.hpp File Reference

Defines serializer<> specializations for strings. More...

#include "pstore/adt/sstring_view.hpp"
#include "pstore/core/db_archive.hpp"
#include "pstore/serialize/standard_types.hpp"
#include "pstore/serialize/types.hpp"
#include "pstore/support/varint.hpp"
Include dependency graph for sstring_view_archive.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pstore::serialize::serializer< sstring_view< std::shared_ptr< char const > > >
 A serializer for sstring_view<std::shared_ptr<char const>>. More...
 
struct  pstore::serialize::serializer< sstring_view< char const * > >
 
struct  pstore::serialize::is_compatible< sstring_view< Pointer >, sstring_view< Pointer > >
 Any two sstring_view instances with the same Pointer type have the same serialized representation. More...
 
struct  pstore::serialize::is_compatible< sstring_view< Pointer1 >, sstring_view< Pointer2 > >
 Any two sstring_view instances with the different Pointer type have the same serialized representation. More...
 
struct  pstore::serialize::is_compatible< sstring_view< Pointer1 >, std::string >
 sstring_view instances are serialized using the same format as std::string. More...
 
struct  pstore::serialize::is_compatible< std::string, sstring_view< Pointer1 > >
 sstring_view instances are serialized using the same format as std::string. More...
 
struct  pstore::serialize::serializer< sstring_view< PointerType > const >
 A serializer for sstring_view const. More...
 

Functions

sstring_view< std::shared_ptr< char const > > pstore::serialize::read_string_view (database const &db, typed_address< char > addr, std::size_t const length)
 

Detailed Description

Defines serializer<> specializations for strings.

Function Documentation

◆ read_string_view()

sstring_view<std::shared_ptr<char const> > pstore::serialize::read_string_view ( database const &  db,
typed_address< char >  addr,
std::size_t const  length 
)
inline
Parameters
dbThe database containing the string to be read.
addrThe pstore address of the string value.
lengthThe number of bytes occupied by the string.
Returns
A sstring_view<> object which provides a std::string_view-like view of the store-based string.