1#ifndef OSMIUM_MEMORY_ITEM_HPP
2#define OSMIUM_MEMORY_ITEM_HPP
64 inline constexpr std::size_t
padded_length(std::size_t length)
noexcept {
81 ItemHelper() noexcept = default;
83 ItemHelper(const ItemHelper&) noexcept = default;
84 ItemHelper(ItemHelper&&) noexcept = default;
86 ItemHelper& operator=(const ItemHelper&) noexcept = default;
87 ItemHelper& operator=(ItemHelper&&) noexcept = default;
89 ~ItemHelper() noexcept = default;
93 unsigned char* data() noexcept {
94 return reinterpret_cast<unsigned char*
>(
this);
97 const unsigned char* data() const noexcept {
98 return reinterpret_cast<const unsigned char*
>(
this);
105 class Item :
public osmium::memory::detail::ItemHelper {
113 template <
typename TMember>
116 template <
typename TMember>
155 unsigned char*
next() noexcept {
159 const unsigned char*
next() const noexcept {
188 static constexpr const char* diff_chars =
"*-+ ";
189 return diff_chars[
m_diff];
Definition: builder.hpp:56
uint32_t size() const noexcept
Definition: builder.hpp:136
Definition: collection.hpp:47
Definition: item_iterator.hpp:59
char diff_as_char() const noexcept
Definition: item.hpp:187
Item & set_type(const item_type item_type) noexcept
Definition: item.hpp:136
item_type type() const noexcept
Definition: item.hpp:171
static constexpr bool is_compatible_to(osmium::item_type) noexcept
Definition: item.hpp:151
uint16_t m_diff
Definition: item.hpp:110
item_size_type m_size
Definition: item.hpp:107
Item(const Item &)=delete
diff_indicator_type diff() const noexcept
Definition: item.hpp:183
uint16_t m_removed
Definition: item.hpp:109
bool removed() const noexcept
Definition: item.hpp:175
void set_removed(const bool removed) noexcept
Definition: item.hpp:179
Item(item_size_type size=0, item_type type=item_type{}) noexcept
Definition: item.hpp:128
item_size_type byte_size() const noexcept
Definition: item.hpp:163
Item & operator=(Item &&)=delete
Item & operator=(const Item &)=delete
const unsigned char * next() const noexcept
Definition: item.hpp:159
Item & add_size(const item_size_type size) noexcept
Definition: item.hpp:121
unsigned char * next() noexcept
Definition: item.hpp:155
void set_diff(const diff_indicator_type diff) noexcept
Definition: item.hpp:192
uint16_t m_padding
Definition: item.hpp:111
item_type m_type
Definition: item.hpp:108
item_size_type padded_size() const
Definition: item.hpp:167
constexpr std::size_t padded_length(std::size_t length) noexcept
Definition: item.hpp:64
@ align_bytes
Definition: item.hpp:61
uint32_t item_size_type
Definition: item.hpp:57
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
diff_indicator_type
Definition: item.hpp:48
item_type
Definition: item_type.hpp:45