|
LibQuicR
|
Non-owning-position view that shares ownership of a DataStorage<>.
More...
#include <data_storage.h>
Public Member Functions | |
| DataStorageDynView (std::shared_ptr< DataStorage<>> storage, std::size_t start_pos=0, std::optional< std::size_t > end_pos=std::nullopt) | |
| Constructs a view over an absolute half-open range. More... | |
| DataStorageDynView (const DataStorageDynView &other)=default | |
| Copies the view and shares ownership of its storage. More... | |
| DataStorageDynView (DataStorageDynView &&other)=default | |
| Moves the view. More... | |
| DataStorageDynView & | operator= (const DataStorageDynView &other)=default |
| Copies the view and shares ownership of its storage. More... | |
| DataStorageDynView & | operator= (DataStorageDynView &&other)=default |
| Moves the view. More... | |
| DataStorageDynView | Subspan (std::size_t start_pos, std::optional< std::size_t > end_pos=std::nullopt) const noexcept |
| Creates another absolute view of the same storage. More... | |
| std::size_t | size () const noexcept |
| DataStorage ::iterator | begin () noexcept |
| DataStorage ::iterator | end () noexcept |
| DataStorage ::const_iterator | begin () const noexcept |
| DataStorage ::const_iterator | end () const noexcept |
Non-owning-position view that shares ownership of a DataStorage<>.
Positions are absolute flattened byte offsets into the underlying storage. The storage object remains alive with the view, but mutation is not synchronized and front erasure changes what offsets identify.
|
inline |
Constructs a view over an absolute half-open range.
| storage | Storage retained by shared ownership. |
| start_pos | Absolute inclusive byte offset. |
| end_pos | Optional absolute exclusive byte offset; no value tracks the storage's current end. |
storage is non-null, start_pos is within its flattened size, and a supplied end_pos is between start_pos and the storage size.
|
default |
Copies the view and shares ownership of its storage.
| other | View to copy. |
|
default |
Moves the view.
| other | View to move. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
default |
Copies the view and shares ownership of its storage.
| other | View to copy. |
*this.
|
default |
Moves the view.
| other | View to move. |
*this.
|
inlinenoexcept |
|
inlinenoexcept |
Creates another absolute view of the same storage.
| start_pos | Absolute inclusive storage offset, not relative to this view. |
| end_pos | Optional absolute exclusive offset; absent or beyond the current storage size is clamped to the current storage size. |
start_pos does not exceed the selected end position.