PMDK C++ bindings
1.5.2
This is the C++ bindings documentation for PMDK's libpmemobj.
|
Non-const iterator which adds elements to a transaction in a bulk. More...
#include <libpmemobj++/experimental/contiguous_iterator.hpp>
Public Member Functions | |
range_snapshotting_iterator (pointer ptr=nullptr, pointer data=nullptr, std::size_t size=0, std::size_t snapshot_size=1) | |
Constructor taking pointer to data, pointer to the beginning of the array and snapshot_size. | |
reference | operator[] (std::ptrdiff_t n) |
Element access operator. More... | |
Public Member Functions inherited from pmem::obj::experimental::contiguous_iterator< range_snapshotting_iterator< T >, T &, T * > | |
constexpr | contiguous_iterator (T * begin) |
Constructor taking a pointer. | |
T & | operator* () const |
Dereference operator. | |
T * | operator-> () const |
Arrow operator. | |
range_snapshotting_iterator< T > & | operator++ () |
Prefix increment operator. | |
range_snapshotting_iterator< T > | operator++ (int) |
Postfix increment operator. | |
range_snapshotting_iterator< T > & | operator-- () |
Prefix decrement operator. | |
range_snapshotting_iterator< T > | operator-- (int) |
Postfix decrement operator. | |
range_snapshotting_iterator< T > & | operator+= (std::ptrdiff_t n) |
Addition assignment operator. | |
range_snapshotting_iterator< T > & | operator-= (std::ptrdiff_t n) |
Subtraction assignment operator. | |
range_snapshotting_iterator< T > | operator+ (std::ptrdiff_t n) |
Addition operator. | |
range_snapshotting_iterator< T > | operator- (std::ptrdiff_t n) |
Subtraction operator overload for integral type. | |
T & | operator[] (std::ptrdiff_t n) |
Element access operator. | |
Friends | |
void | swap (range_snapshotting_iterator &lhs, range_snapshotting_iterator &rhs) |
Non-member swap function. | |
Additional Inherited Members | |
Protected Member Functions inherited from pmem::obj::experimental::contiguous_iterator< range_snapshotting_iterator< T >, T &, T * > | |
void | change_by (std::ptrdiff_t n) |
Function for changing underlying pointer. More... | |
Non-const iterator which adds elements to a transaction in a bulk.
This is done by dividing underlying array into ranges of specified (snapshot_size) size. If iterator is incremented/decremented/etc. so that it is moved to another range, this new range is added to a transaction.
For example, let's assume snapshot_size = 2, N = 6. This gives us: 0 1 | 2 3 | 4 5
If iterator is moved from 1 to 3, that means it is now in another range, and that range must be added to a transaction (elements 2 and 3).
|
inline |
Element access operator.
Adds element to a transaction.