25 #ifndef PSTORE_CORE_SSTRING_VIEW_ARCHIVE_HPP 26 #define PSTORE_CORE_SSTRING_VIEW_ARCHIVE_HPP 42 inline sstring_view<std::shared_ptr<char const>>
52 template <
typename Archive>
53 static auto write (Archive && archive, value_type
const & str)
54 -> archive_result_type<Archive> {
64 readsv (archive, str);
67 readsv (archive, str);
71 template <
typename DBReader>
72 static void readsv (DBReader && archive, value_type & str) {
73 std::size_t
const length =
74 string_helper::read_length (std::forward<DBReader> (archive));
77 archive.skip (length);
85 template <
typename Archive>
87 -> archive_result_type<Archive> {
95 template <
typename Po
inter>
100 template <
typename Po
inter1,
typename Po
inter2>
104 template <
typename Po
inter1>
108 template <
typename Po
inter1>
114 template <
typename Po
interType>
117 template <
typename Archive>
118 static auto write (Archive && archive, value_type
const & str)
119 -> archive_result_type<Archive> {
122 template <
typename Archive>
123 static void read (Archive && archive, value_type & str) {
124 serialize::read_uninit (std::forward<Archive> (archive), str);
131 #endif // PSTORE_CORE_SSTRING_VIEW_ARCHIVE_HPP Provides the database_reader and database_writer class which enable the serializer to read and write ...
Implements sstring_view, a class which is based on std::string_view but holds a pointer which may be ...
std::shared_ptr< void const > getro(address const addr, std::size_t const size) const
Definition: database.hpp:128
The primary template for serialization of non standard layout types.
Definition: types.hpp:118
An archive-reader which reads data from a database.
Definition: db_archive.hpp:102
static auto write(Archive &&archive, StringType const &str) -> archive_result_type< Archive >
Writes an instance of a string type (e.g.
Definition: standard_types.hpp:52
static auto write(Archive &&archive, Ty const &v) -> archive_result_type< Archive >
Writes an single value of type Ty to an archive.
Definition: types.hpp:133
Definition: chunked_sequence.hpp:607
Provides serialization capabilities for trivial and user-defined types.
Definition: address.hpp:231
static void read(archive::database_reader &&archive, value_type &str)
Reads an instance of sstring_view from an archiver.
Definition: sstring_view_archive.hpp:63
Provides serialization capabilities for common types.
static void read(Archive &&archive, Ty &v)
Reads a value of type Ty from an archive.
Definition: types.hpp:153
Definition: nonpod2.cpp:40
Definition: database.hpp:40
sstring_view< std::shared_ptr< char const > > read_string_view(database const &db, typed_address< char > addr, std::size_t const length)
Definition: sstring_view_archive.hpp:43
Definition: sstring_view.hpp:113
Implements a prefix-style variable-length integer.
If the two types T1 and T2 have a compatible representation when serialized, provides the member cons...
Definition: types.hpp:321