PMDK C++ bindings  1.8.2
This is the C++ bindings documentation for PMDK's libpmemobj.
Public Member Functions | Protected Member Functions | Friends | List of all members
pmem::detail::contiguous_iterator< Iterator, Reference, Pointer > Struct Template Reference

Base class for iterators which satisfies RandomAccessIterator and operate on contiguous memory. More...

#include <libpmemobj++/container/detail/contiguous_iterator.hpp>

Public Member Functions

constexpr contiguous_iterator (Pointer begin)
 Constructor taking a pointer.
 
Reference operator * () const
 Dereference operator.
 
Pointer operator-> () const
 Arrow operator.
 
Iterator & operator++ ()
 Prefix increment operator.
 
Iterator operator++ (int)
 Postfix increment operator.
 
Iterator & operator-- ()
 Prefix decrement operator.
 
Iterator operator-- (int)
 Postfix decrement operator.
 
Iterator & operator+= (std::ptrdiff_t n)
 Addition assignment operator.
 
Iterator & operator-= (std::ptrdiff_t n)
 Subtraction assignment operator.
 
Iterator operator+ (std::ptrdiff_t n) const
 Addition operator.
 
Iterator operator- (std::ptrdiff_t n) const
 Subtraction operator overload for integral type.
 
Reference operator[] (std::ptrdiff_t n)
 Element access operator.
 

Protected Member Functions

void change_by (std::ptrdiff_t n)
 Function for changing underlying pointer. More...
 

Friends

std::ptrdiff_t operator- (const Iterator &lhs, const Iterator &rhs)
 Subtraction operator overload Iterator type.
 

Detailed Description

template<typename Iterator, typename Reference, typename Pointer>
struct pmem::detail::contiguous_iterator< Iterator, Reference, Pointer >

Base class for iterators which satisfies RandomAccessIterator and operate on contiguous memory.

Member Function Documentation

◆ change_by()

template<typename Iterator, typename Reference, typename Pointer>
void pmem::detail::contiguous_iterator< Iterator, Reference, Pointer >::change_by ( std::ptrdiff_t  n)
inlineprotected

Function for changing underlying pointer.

This is where static polymorphism is used. Derived classes can override this method and snapshot data if necessary.


The documentation for this struct was generated from the following file: