The transaction footer structure.
More...
#include <file_header.hpp>
|
| struct | body |
| | Represents the portion of the trailer structure which is covered by the computed CRC value. More...
|
| |
|
| enum | indices : unsigned { last
} |
| |
|
using | index_records_array = std::array< typed_address< index::header_block >, static_cast< std::underlying_type< indices >::type >(indices::last)> |
| |
|
|
bool | crc_is_valid () const noexcept |
| |
|
bool | signature_is_valid () const noexcept |
| |
|
std::uint32_t | get_crc () const noexcept |
| | Computes the trailer's CRC value.
|
| |
|
|
body | a |
| |
| std::uint32_t | crc = 0 |
| | The fields of a transaction footer are not modified as the code interacts with the data store. More...
|
| |
|
std::uint32_t | unused1 = 0 |
| |
|
std::array< std::uint8_t, 8 > | signature2 = default_signature2 |
| |
|
| static std::array< std::uint8_t, 8 > const | default_signature1 |
| |
| static std::array< std::uint8_t, 8 > const | default_signature2 |
| |
The transaction footer structure.
An copy of this structure is written to the data store at the end of each transaction block. pstore::header::footer_pos holds the address of the latest complete instance and is updated once a transaction has been completely written to memory. Once written it is read-only.
◆ validate()
Checks that the address given by 'pos' appears to point to a valid transaction trailer.
Raises exception::footer_corrupt if not.
◆ crc
| std::uint32_t pstore::trailer::crc = 0 |
The fields of a transaction footer are not modified as the code interacts with the data store.
The memory that is occupies as marked as read-only as soon as the host OS and hardware permits. Despite this guarantee it's useful to be able to ensure that the reverse-order linked list of transactions – whose head is given by header::footer_pos is intact and that we don't have a stray pointer.
◆ default_signature1
| std::array< std::uint8_t, 8 > const pstore::trailer::default_signature1 |
|
static |
Initial value:{
{'h', 'P', 'P', 'y', 'f', 'o', 'o', 'T'}}
◆ default_signature2
| std::array< std::uint8_t, 8 > const pstore::trailer::default_signature2 |
|
static |
Initial value:{
{'h', 'P', 'P', 'y', 'T', 'a', 'i', 'l'}}
The documentation for this struct was generated from the following files: