Refers to an entry in-place in the queue. Entries may be discontiguous.
Public Types | |
| using | element_type = T |
| using | value_type = std::remove_cv_t< T > |
| using | size_type = uint32_t |
| using | pointer = T * |
| using | const_pointer = const T * |
| using | reference = T & |
| using | const_reference = const T & |
| using | iterator = VarLenEntryIterator< T > |
| using | const_iterator = VarLenEntryIterator< const T > |
Public Member Functions | |
| constexpr | VarLenEntry (const VarLenEntry &)=default |
| constexpr VarLenEntry & | operator= (const VarLenEntry &)=default |
| constexpr | operator VarLenEntry< const T > () const |
| constexpr bool | empty () const |
| constexpr size_t | size () const |
| constexpr reference | at (size_t index) const |
| constexpr reference | operator[] (size_t index) const |
| constexpr reference | front () const |
| constexpr reference | back () const |
| constexpr std::pair< span< T >, span< T > > | contiguous_data () const |
| constexpr size_t | copy (value_type *dest, size_t count) const |
| constexpr iterator | begin () const |
| constexpr const_iterator | cbegin () const |
| constexpr iterator | end () const |
| constexpr const_iterator | cend () const |
Friends | |
| class | VarLenEntryC |
| template<typename > | |
| class | VarLenEntryQueueIterator |
| constexpr bool | operator== (const VarLenEntry &lhs, const VarLenEntry &rhs) |
| constexpr bool | operator!= (const VarLenEntry &lhs, const VarLenEntry &rhs) |
| using pw::containers::internal::VarLenEntry< T >::iterator = VarLenEntryIterator<T> |
Iterator for the bytes in an Entry. Entries may be discontiguous, so a pointer cannot serve as an iterator.
|
constexpr |
Returns a reference to the byte at the specified index.
| index | The index of the byte to return. |
|
inlineconstexpr |
Entries may be stored in up to two segments, so this returns spans referring to both portions of the entry. If the entry is contiguous, the second span is empty.
|
constexpr |
Copies the contents of the entry to the provided buffer. The entry may be split into two regions; this serializes it into one buffer.
Truncates the data if the buffer is smaller than the dest buffer. Returns the size of the entry; if this is larger than dest.size(), the data was truncated.
| dest | Buffer into which to copy the serialized entry |
| count | Length of the buffer, in bytes. |