pstore2
Classes | Public Member Functions | Static Public Member Functions | List of all members
pstore::repo::generic_section Class Reference
Inheritance diagram for pstore::repo::generic_section:
Inheritance graph
[legend]
Collaboration diagram for pstore::repo::generic_section:
Collaboration graph
[legend]

Classes

struct  sources
 Describes the three members of a section as three pairs of iterators: one each for the data, internal fixups, and external fixups ranges. More...
 

Public Member Functions

void * operator new (std::size_t const size, void *const ptr)
 
void operator delete (void *const ptr, void *const p)
 
template<typename DataRange , typename IFixupRange , typename XFixupRange >
 generic_section (DataRange const &d, IFixupRange const &i, XFixupRange const &x, std::uint8_t align)
 
template<typename DataRange , typename IFixupRange , typename XFixupRange >
 generic_section (sources< DataRange, IFixupRange, XFixupRange > const &src, std::uint8_t align)
 
 generic_section (generic_section const &)=delete
 
 generic_section (generic_section &&)=delete
 
generic_sectionoperator= (generic_section const &)=delete
 
generic_sectionoperator= (generic_section &&)=delete
 
unsigned align () const noexcept
 
std::uint64_t size () const noexcept
 The number of data bytes contained by this section.
 
container< std::uint8_t > payload () const noexcept
 
container< internal_fixupifixups () const
 
container< external_fixupxfixups () const
 

Static Public Member Functions

template<typename DataRange , typename IFixupRange , typename XFixupRange >
static auto make_sources (DataRange const &d, IFixupRange const &i, XFixupRange const &x) -> sources< DataRange, IFixupRange, XFixupRange >
 
std::size_t size_bytes () const
 A group of member functions which return the number of bytes occupied by a fragment instance. More...
 
static std::size_t size_bytes (std::size_t data_size, std::size_t num_ifixups, std::size_t num_xfixups)
 
template<typename DataRange , typename IFixupRange , typename XFixupRange >
static std::size_t size_bytes (DataRange const &d, IFixupRange const &i, XFixupRange const &x)
 
template<typename DataRange , typename IFixupRange , typename XFixupRange >
static std::size_t size_bytes (sources< DataRange, IFixupRange, XFixupRange > const &src)
 

Member Function Documentation

◆ size_bytes() [1/2]

std::size_t pstore::repo::generic_section::size_bytes ( ) const

A group of member functions which return the number of bytes occupied by a fragment instance.

Returns
The number of bytes occupied by this fragment section.

◆ size_bytes() [2/2]

std::size_t pstore::repo::generic_section::size_bytes ( std::size_t  data_size,
std::size_t  num_ifixups,
std::size_t  num_xfixups 
)
static
Returns
The number of bytes needed to accommodate a fragment section with the given number of data bytes and fixups.

Member Data Documentation

◆ align_

bit_field<std::uint32_t, 0, 8> pstore::repo::generic_section::align_

The alignment of this section expressed as a power of two (i.e.

8 byte alignment is expressed as an align_ value of 3).


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