PMDK C++ bindings  1.9.1
This is the C++ bindings documentation for PMDK's libpmemobj.
Namespaces | Classes | Typedefs | Functions
pmem::obj Namespace Reference

Main libpmemobj namespace. More...

Namespaces

 experimental
 Experimental implementations.
 

Classes

struct  allocation_flag
 Type of flag which can be passed to make_persistent. More...
 
struct  allocation_flag_atomic
 Type of flag which can be passed to make_persistent_atomic. More...
 
class  allocator
 (EXPERIMENTAL) Encapsulates the information about the persistent memory allocation model using PMDK's libpmemobj. More...
 
struct  array
 pmem::obj::array - persistent container with std::array compatible interface. More...
 
class  basic_string
 pmem::obj::string - persistent container with std::basic_string compatible interface. More...
 
class  concurrent_hash_map
 Persistent memory aware implementation of Intel TBB concurrent_hash_map. More...
 
class  condition_variable
 Persistent memory resident condition variable. More...
 
class  defrag
 Defrag class. More...
 
class  mutex
 Persistent memory resident mutex implementation. More...
 
class  object_traits
 Encapsulates object specific allocator functionality. More...
 
class  object_traits< void >
 Object traits specialization for the void type. More...
 
class  p
 Resides on pmem class. More...
 
class  persistent_ptr
 Persistent pointer class. More...
 
class  persistent_ptr< const void >
 persistent_ptr const void specialization. More...
 
class  persistent_ptr< void >
 persistent_ptr void specialization. More...
 
class  persistent_ptr_base
 Persistent_ptr base (non-template) class. More...
 
class  pool
 PMEMobj pool class. More...
 
class  pool_base
 The non-template pool base class. More...
 
class  segment_vector
 Segment table is a data type with a vector-like interface The difference is that it does not do reallocations and iterators are not invalidated when adding new elements. More...
 
class  shared_mutex
 Persistent memory resident shared_mutex implementation. More...
 
class  slice
 pmem::obj::slice - provides interface to access sequence of objects. More...
 
class  standard_alloc_policy
 The allocation policy template for a given type. More...
 
class  standard_alloc_policy< void >
 Void specialization of the standard allocation policy. More...
 
class  timed_mutex
 Persistent memory resident timed_mutex implementation. More...
 
class  transaction
 C++ transaction handler class. More...
 
class  vector
 pmem::obj::vector - persistent container with std::vector compatible interface. More...
 

Typedefs

template<template< typename > class SegmentType = pmem::obj::vector>
using exponential_size_array_policy = segment_vector_internal::exponential_size_policy< segment_vector_internal::array_64, SegmentType >
 Exponential size policy with pmemobj array of size 64 as a type of segment vector, so this is a static array of segments and each segment is of SegmentType. More...
 
template<size_t SegmentSize = 1024, template< typename > class SegmentType = pmem::obj::vector>
using fixed_size_vector_policy = segment_vector_internal::fixed_size_policy< pmem::obj::vector, SegmentType, SegmentSize >
 Fixed size policy with pmemobj vector of a given size as a type of segment vector, so this is a dynamic vector of segments and each segment is of SegmentType. More...
 
template<template< typename > class SegmentType = pmem::obj::vector>
using exponential_size_vector_policy = segment_vector_internal::exponential_size_policy< pmem::obj::vector, SegmentType >
 Exponential size policy with pmemobj vector as a type of segment vector, so this is a dynamic vector of segments and each segment is of SegmentType. More...
 

Functions

template<typename T , typename T2 >
bool operator== (standard_alloc_policy< T > const &, standard_alloc_policy< T2 > const &)
 Determines if memory from another allocator can be deallocated from this one. More...
 
template<typename T , typename OtherAllocator >
bool operator== (standard_alloc_policy< T > const &, OtherAllocator const &)
 Determines if memory from another allocator can be deallocated from this one. More...
 
template<typename T , typename P , typename Tr , typename T2 , typename P2 , typename Tr2 >
bool operator== (const allocator< T, P, Tr > &lhs, const allocator< T2, P2, Tr2 > &rhs)
 Determines if memory from another allocator can be deallocated from this one. More...
 
template<typename T , typename P , typename Tr , typename OtherAllocator >
bool operator!= (const allocator< T, P, Tr > &lhs, const OtherAllocator &rhs)
 Determines if memory from another allocator can be deallocated from this one. More...
 
template<typename T , std::size_t N>
bool operator== (const array< T, N > &lhs, const array< T, N > &rhs)
 Non-member equal operator.
 
template<typename T , std::size_t N>
bool operator!= (const array< T, N > &lhs, const array< T, N > &rhs)
 Non-member not-equal operator.
 
template<typename T , std::size_t N>
bool operator< (const array< T, N > &lhs, const array< T, N > &rhs)
 Non-member less than operator.
 
template<typename T , std::size_t N>
bool operator> (const array< T, N > &lhs, const array< T, N > &rhs)
 Non-member greater than operator.
 
template<typename T , std::size_t N>
bool operator>= (const array< T, N > &lhs, const array< T, N > &rhs)
 Non-member greater or equal operator.
 
template<typename T , std::size_t N>
bool operator<= (const array< T, N > &lhs, const array< T, N > &rhs)
 Non-member less or equal operator.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_iterator cbegin (const pmem::obj::array< T, N > &a)
 Non-member cbegin.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_iterator cend (const pmem::obj::array< T, N > &a)
 Non-member cend.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_reverse_iterator crbegin (const pmem::obj::array< T, N > &a)
 Non-member crbegin.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_reverse_iterator crend (const pmem::obj::array< T, N > &a)
 Non-member crend.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::iterator begin (pmem::obj::array< T, N > &a)
 Non-member begin.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_iterator begin (const pmem::obj::array< T, N > &a)
 Non-member begin.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::iterator end (pmem::obj::array< T, N > &a)
 Non-member end.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_iterator end (const pmem::obj::array< T, N > &a)
 Non-member end.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::reverse_iterator rbegin (pmem::obj::array< T, N > &a)
 Non-member rbegin.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_reverse_iterator rbegin (const pmem::obj::array< T, N > &a)
 Non-member rbegin.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::reverse_iterator rend (pmem::obj::array< T, N > &a)
 Non-member rend.
 
template<typename T , std::size_t N>
pmem::obj::array< T, N >::const_reverse_iterator rend (const pmem::obj::array< T, N > &a)
 Non-member rend.
 
template<typename T , size_t N>
void swap (pmem::obj::array< T, N > &lhs, pmem::obj::array< T, N > &rhs)
 Non-member swap function.
 
template<size_t I, typename T , size_t N>
T & get (pmem::obj::array< T, N > &a)
 Non-member get function.
 
template<size_t I, typename T , size_t N>
T && get (pmem::obj::array< T, N > &&a)
 Non-member get function.
 
template<size_t I, typename T , size_t N>
const T & get (const pmem::obj::array< T, N > &a) noexcept
 Non-member get function.
 
template<size_t I, typename T , size_t N>
const T && get (const pmem::obj::array< T, N > &&a) noexcept
 Non-member get function.
 
template<class CharT , class Traits >
bool operator== (const basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member equal operator.
 
template<class CharT , class Traits >
bool operator!= (const basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member not equal operator.
 
template<class CharT , class Traits >
bool operator< (const basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member less than operator.
 
template<class CharT , class Traits >
bool operator<= (const basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member less or equal operator.
 
template<class CharT , class Traits >
bool operator> (const basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member greater than operator.
 
template<class CharT , class Traits >
bool operator>= (const basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member greater or equal operator.
 
template<class CharT , class Traits >
bool operator== (const CharT *lhs, const basic_string< CharT, Traits > &rhs)
 Non-member equal operator.
 
template<class CharT , class Traits >
bool operator!= (const CharT *lhs, const basic_string< CharT, Traits > &rhs)
 Non-member not equal operator.
 
template<class CharT , class Traits >
bool operator< (const CharT *lhs, const basic_string< CharT, Traits > &rhs)
 Non-member less than operator.
 
template<class CharT , class Traits >
bool operator<= (const CharT *lhs, const basic_string< CharT, Traits > &rhs)
 Non-member less or equal operator.
 
template<class CharT , class Traits >
bool operator> (const CharT *lhs, const basic_string< CharT, Traits > &rhs)
 Non-member greater than operator.
 
template<class CharT , class Traits >
bool operator>= (const CharT *lhs, const basic_string< CharT, Traits > &rhs)
 Non-member greater or equal operator.
 
template<class CharT , class Traits >
bool operator== (const basic_string< CharT, Traits > &lhs, const CharT *rhs)
 Non-member equal operator.
 
template<class CharT , class Traits >
bool operator!= (const basic_string< CharT, Traits > &lhs, const CharT *rhs)
 Non-member not equal operator.
 
template<class CharT , class Traits >
bool operator< (const basic_string< CharT, Traits > &lhs, const CharT *rhs)
 Non-member less than operator.
 
template<class CharT , class Traits >
bool operator<= (const basic_string< CharT, Traits > &lhs, const CharT *rhs)
 Non-member less or equal operator.
 
template<class CharT , class Traits >
bool operator> (const basic_string< CharT, Traits > &lhs, const CharT *rhs)
 Non-member greater than operator.
 
template<class CharT , class Traits >
bool operator>= (const basic_string< CharT, Traits > &lhs, const CharT *rhs)
 Non-member greater or equal operator.
 
template<class CharT , class Traits >
bool operator== (const std::basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member equal operator.
 
template<class CharT , class Traits >
bool operator!= (const std::basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member not equal operator.
 
template<class CharT , class Traits >
bool operator< (const std::basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member less than operator.
 
template<class CharT , class Traits >
bool operator<= (const std::basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member less or equal operator.
 
template<class CharT , class Traits >
bool operator> (const std::basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member greater than operator.
 
template<class CharT , class Traits >
bool operator>= (const std::basic_string< CharT, Traits > &lhs, const basic_string< CharT, Traits > &rhs)
 Non-member greater or equal operator.
 
template<class CharT , class Traits >
bool operator== (const basic_string< CharT, Traits > &lhs, const std::basic_string< CharT, Traits > &rhs)
 Non-member equal operator.
 
template<class CharT , class Traits >
bool operator!= (const basic_string< CharT, Traits > &lhs, const std::basic_string< CharT, Traits > &rhs)
 Non-member not equal operator.
 
template<class CharT , class Traits >
bool operator< (const basic_string< CharT, Traits > &lhs, const std::basic_string< CharT, Traits > &rhs)
 Non-member less than operator.
 
template<class CharT , class Traits >
bool operator<= (const basic_string< CharT, Traits > &lhs, const std::basic_string< CharT, Traits > &rhs)
 Non-member less or equal operator.
 
template<class CharT , class Traits >
bool operator> (const basic_string< CharT, Traits > &lhs, const std::basic_string< CharT, Traits > &rhs)
 Non-member greater than operator.
 
template<class CharT , class Traits >
bool operator>= (const basic_string< CharT, Traits > &lhs, const std::basic_string< CharT, Traits > &rhs)
 Non-member greater or equal operator.
 
template<typename T , typename Policy >
void swap (segment_vector< T, Policy > &lhs, segment_vector< T, Policy > &rhs)
 Swaps the contents of lhs and rhs. More...
 
template<typename T , typename Policy >
bool operator== (const segment_vector< T, Policy > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator!= (const segment_vector< T, Policy > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator< (const segment_vector< T, Policy > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator<= (const segment_vector< T, Policy > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator> (const segment_vector< T, Policy > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator>= (const segment_vector< T, Policy > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator== (const segment_vector< T, Policy > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator!= (const segment_vector< T, Policy > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator< (const segment_vector< T, Policy > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator<= (const segment_vector< T, Policy > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator> (const segment_vector< T, Policy > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator>= (const segment_vector< T, Policy > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator== (const std::vector< T > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator!= (const std::vector< T > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator< (const std::vector< T > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator<= (const std::vector< T > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator> (const std::vector< T > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T , typename Policy >
bool operator>= (const std::vector< T > &lhs, const segment_vector< T, Policy > &rhs)
 Comparison operator. More...
 
template<typename T >
void swap (vector< T > &lhs, vector< T > &rhs)
 Swaps the contents of lhs and rhs. More...
 
template<typename T >
bool operator== (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator!= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator< (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator<= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator> (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator>= (const vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator== (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator!= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator< (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator<= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator> (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator>= (const vector< T > &lhs, const std::vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator== (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator!= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator< (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator<= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator> (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T >
bool operator>= (const std::vector< T > &lhs, const vector< T > &rhs)
 Comparison operator. More...
 
template<typename T , typename... Args>
detail::pp_if_not_array< T >::type make_persistent (allocation_flag flag, Args &&... args)
 Transactionally allocate and construct an object of type T. More...
 
template<typename T , typename... Args>
std::enable_if< !detail::is_first_arg_same< allocation_flag, Args... >::value, typename detail::pp_if_not_array< T >::type >::type make_persistent (Args &&... args)
 Transactionally allocate and construct an object of type T. More...
 
template<typename T >
void delete_persistent (typename detail::pp_if_not_array< T >::type ptr)
 Transactionally free an object of type T held in a persistent_ptr. More...
 
template<typename T >
detail::pp_if_array< T >::type make_persistent (std::size_t N, allocation_flag flag=allocation_flag::none())
 Transactionally allocate and construct an array of objects of type T. More...
 
template<typename T >
detail::pp_if_size_array< T >::type make_persistent (allocation_flag flag=allocation_flag::none())
 Transactionally allocate and construct an array of objects of type T. More...
 
template<typename T >
void delete_persistent (typename detail::pp_if_array< T >::type ptr, std::size_t N)
 Transactionally free an array of objects of type T held in a persistent_ptr. More...
 
template<typename T >
void delete_persistent (typename detail::pp_if_size_array< T >::type ptr)
 Transactionally free an array of objects of type T held in a persistent_ptr. More...
 
template<typename T >
void make_persistent_atomic (pool_base &pool, typename detail::pp_if_array< T >::type &ptr, std::size_t N, allocation_flag_atomic flag=allocation_flag_atomic::none())
 Atomically allocate an array of objects. More...
 
template<typename T >
void make_persistent_atomic (pool_base &pool, typename detail::pp_if_size_array< T >::type &ptr, allocation_flag_atomic flag=allocation_flag_atomic::none())
 Atomically allocate an array of objects. More...
 
template<typename T >
void delete_persistent_atomic (typename detail::pp_if_array< T >::type &ptr, std::size_t)
 Atomically deallocate an array of objects. More...
 
template<typename T >
void delete_persistent_atomic (typename detail::pp_if_size_array< T >::type &ptr)
 Atomically deallocate an array of objects. More...
 
template<typename T , typename... Args>
void make_persistent_atomic (pool_base &pool, typename detail::pp_if_not_array< T >::type &ptr, allocation_flag_atomic flag, Args &&... args)
 Atomically allocate and construct an object. More...
 
template<typename T , typename... Args>
std::enable_if<!detail::is_first_arg_same< allocation_flag_atomic, Args... >::value >::type make_persistent_atomic (pool_base &pool, typename detail::pp_if_not_array< T >::type &ptr, Args &&... args)
 Atomically allocate and construct an object. More...
 
template<typename T >
void delete_persistent_atomic (typename detail::pp_if_not_array< T >::type &ptr) noexcept
 Atomically deallocate an object. More...
 
template<class T >
void swap (p< T > &a, p< T > &b)
 Swaps two p objects of the same type. More...
 
template<class T >
void swap (persistent_ptr< T > &a, persistent_ptr< T > &b)
 Swaps two persistent_ptr objects of the same type. More...
 
template<typename T , typename Y >
bool operator== (persistent_ptr< T > const &lhs, persistent_ptr< Y > const &rhs) noexcept
 Equality operator. More...
 
template<typename T , typename Y >
bool operator!= (persistent_ptr< T > const &lhs, persistent_ptr< Y > const &rhs) noexcept
 Inequality operator.
 
template<typename T >
bool operator== (persistent_ptr< T > const &lhs, std::nullptr_t) noexcept
 Equality operator with nullptr.
 
template<typename T >
bool operator== (std::nullptr_t, persistent_ptr< T > const &lhs) noexcept
 Equality operator with nullptr.
 
template<typename T >
bool operator!= (persistent_ptr< T > const &lhs, std::nullptr_t) noexcept
 Inequality operator with nullptr.
 
template<typename T >
bool operator!= (std::nullptr_t, persistent_ptr< T > const &lhs) noexcept
 Inequality operator with nullptr.
 
template<typename T , typename Y >
bool operator< (persistent_ptr< T > const &lhs, persistent_ptr< Y > const &rhs) noexcept
 Less than operator. More...
 
template<typename T , typename Y >
bool operator<= (persistent_ptr< T > const &lhs, persistent_ptr< Y > const &rhs) noexcept
 Less or equal than operator. More...
 
template<typename T , typename Y >
bool operator> (persistent_ptr< T > const &lhs, persistent_ptr< Y > const &rhs) noexcept
 Greater than operator. More...
 
template<typename T , typename Y >
bool operator>= (persistent_ptr< T > const &lhs, persistent_ptr< Y > const &rhs) noexcept
 Greater or equal than operator. More...
 
template<typename T >
bool operator< (persistent_ptr< T > const &lhs, std::nullptr_t) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
bool operator< (std::nullptr_t, persistent_ptr< T > const &rhs) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
bool operator<= (persistent_ptr< T > const &lhs, std::nullptr_t) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
bool operator<= (std::nullptr_t, persistent_ptr< T > const &rhs) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
bool operator> (persistent_ptr< T > const &lhs, std::nullptr_t) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
bool operator> (std::nullptr_t, persistent_ptr< T > const &rhs) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
bool operator>= (persistent_ptr< T > const &lhs, std::nullptr_t) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
bool operator>= (std::nullptr_t, persistent_ptr< T > const &rhs) noexcept
 Compare a persistent_ptr with a null pointer.
 
template<typename T >
persistent_ptr< T > operator+ (persistent_ptr< T > const &lhs, std::ptrdiff_t s)
 Addition operator for persistent pointers.
 
template<typename T >
persistent_ptr< T > operator- (persistent_ptr< T > const &lhs, std::ptrdiff_t s)
 Subtraction operator for persistent pointers.
 
template<typename T , typename Y , typename = typename std::enable_if< std::is_same<typename std::remove_cv<T>::type, typename std::remove_cv<Y>::type>::value>>
ptrdiff_t operator- (persistent_ptr< T > const &lhs, persistent_ptr< Y > const &rhs)
 Subtraction operator for persistent pointers of identical type. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, persistent_ptr< T > const &pptr)
 Ostream operator for the persistent pointer.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const p< T > &pp)
 Ostream operator overload.
 
template<typename T >
std::istream & operator>> (std::istream &is, p< T > &pp)
 Istream operator overload.
 
template<typename T >
p< T > & operator++ (p< T > &pp)
 Prefix increment operator overload.
 
template<typename T >
p< T > & operator-- (p< T > &pp)
 Prefix decrement operator overload.
 
template<typename T >
p< T > operator++ (p< T > &pp, int)
 Postfix increment operator overload.
 
template<typename T >
p< T > operator-- (p< T > &pp, int)
 Postfix decrement operator overload.
 
template<typename T , typename Y >
p< T > & operator+= (p< T > &lhs, const p< Y > &rhs)
 Addition assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator+= (p< T > &lhs, const Y &rhs)
 Addition assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator-= (p< T > &lhs, const p< Y > &rhs)
 Subtraction assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator-= (p< T > &lhs, const Y &rhs)
 Subtraction assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator*= (p< T > &lhs, const p< Y > &rhs)
 Multiplication assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator*= (p< T > &lhs, const Y &rhs)
 Multiplication assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator/= (p< T > &lhs, const p< Y > &rhs)
 Division assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator/= (p< T > &lhs, const Y &rhs)
 Division assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator%= (p< T > &lhs, const p< Y > &rhs)
 Modulo assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator%= (p< T > &lhs, const Y &rhs)
 Modulo assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator&= (p< T > &lhs, const p< Y > &rhs)
 Bitwise AND assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator&= (p< T > &lhs, const Y &rhs)
 Bitwise AND assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator|= (p< T > &lhs, const p< Y > &rhs)
 Bitwise OR assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator|= (p< T > &lhs, const Y &rhs)
 Bitwise OR assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator^= (p< T > &lhs, const p< Y > &rhs)
 Bitwise XOR assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator^= (p< T > &lhs, const Y &rhs)
 Bitwise XOR assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator<<= (p< T > &lhs, const p< Y > &rhs)
 Bitwise left shift assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator<<= (p< T > &lhs, const Y &rhs)
 Bitwise left shift assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator>>= (p< T > &lhs, const p< Y > &rhs)
 Bitwise right shift assignment operator overload.
 
template<typename T , typename Y >
p< T > & operator>>= (p< T > &lhs, const Y &rhs)
 Bitwise right shift assignment operator overload.
 
template<typename T >
ctl_get (const std::string &name)
 Query libpmemobj state at global scope. More...
 
template<typename T >
ctl_set (const std::string &name, T arg)
 Modify libpmemobj state at global scope. More...
 
template<typename T >
ctl_exec (const std::string &name, T arg)
 Execute function at global scope. More...
 
template<typename T >
ctl_get (const std::wstring &name)
 Query libpmemobj state at global scope. More...
 
template<typename T >
ctl_set (const std::wstring &name, T arg)
 Modify libpmemobj state at global scope. More...
 
template<typename T >
ctl_exec (const std::wstring &name, T arg)
 Execute function at global scope. More...
 
template<typename T >
pool_base pool_by_vptr (const T *that)
 Retrieve pool handle for the given pointer. More...
 
template<typename T >
pool_base pool_by_pptr (const persistent_ptr< T > ptr)
 Retrieve pool handle for the given persistent_ptr. More...
 

Detailed Description

Main libpmemobj namespace.

It contains all libpmemobj's public types, enums, classes with their functions and members. It is located within pmem namespace.

Typedef Documentation

◆ exponential_size_array_policy

template<template< typename > class SegmentType = pmem::obj::vector>
using pmem::obj::exponential_size_array_policy = typedef segment_vector_internal::exponential_size_policy< segment_vector_internal::array_64, SegmentType>

Exponential size policy with pmemobj array of size 64 as a type of segment vector, so this is a static array of segments and each segment is of SegmentType.

  • requires more memory than exponential_size_vector_policy
  • is faster and more efficient than exponential_size_vector_policy

◆ exponential_size_vector_policy

template<template< typename > class SegmentType = pmem::obj::vector>
using pmem::obj::exponential_size_vector_policy = typedef segment_vector_internal::exponential_size_policy<pmem::obj::vector, SegmentType>

Exponential size policy with pmemobj vector as a type of segment vector, so this is a dynamic vector of segments and each segment is of SegmentType.

  • requires less memory than exponential_size_array_policy
  • is slower and less efficient than exponential_size_array_policy

◆ fixed_size_vector_policy

template<size_t SegmentSize = 1024, template< typename > class SegmentType = pmem::obj::vector>
using pmem::obj::fixed_size_vector_policy = typedef segment_vector_internal::fixed_size_policy<pmem::obj::vector, SegmentType, SegmentSize>

Fixed size policy with pmemobj vector of a given size as a type of segment vector, so this is a dynamic vector of segments and each segment is of SegmentType.

  • is slower than the exponential one (because it has more segments)
  • causes less fragmentation than the exponential one

Function Documentation

◆ ctl_exec() [1/2]

template<typename T >
T pmem::obj::ctl_exec ( const std::string &  name,
arg 
)

Execute function at global scope.

Parameters
[in]namename of entry point
[in]argextra argument
Returns
copy of arg, possibly modified by query

For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3

◆ ctl_exec() [2/2]

template<typename T >
T pmem::obj::ctl_exec ( const std::wstring &  name,
arg 
)

Execute function at global scope.

Parameters
[in]namename of entry point
[in]argextra argument
Returns
copy of arg, possibly modified by query

For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3

◆ ctl_get() [1/2]

template<typename T >
T pmem::obj::ctl_get ( const std::string &  name)

Query libpmemobj state at global scope.

Parameters
[in]namename of entry point
Returns
variable representing internal state

For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3

◆ ctl_get() [2/2]

template<typename T >
T pmem::obj::ctl_get ( const std::wstring &  name)

Query libpmemobj state at global scope.

Parameters
[in]namename of entry point
Returns
variable representing internal state

For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3

◆ ctl_set() [1/2]

template<typename T >
T pmem::obj::ctl_set ( const std::string &  name,
arg 
)

Modify libpmemobj state at global scope.

Parameters
[in]namename of entry point
[in]argextra argument
Returns
copy of arg, possibly modified by query

For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3

◆ ctl_set() [2/2]

template<typename T >
T pmem::obj::ctl_set ( const std::wstring &  name,
arg 
)

Modify libpmemobj state at global scope.

Parameters
[in]namename of entry point
[in]argextra argument
Returns
copy of arg, possibly modified by query

For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3

◆ delete_persistent() [1/3]

template<typename T >
void pmem::obj::delete_persistent ( typename detail::pp_if_array< T >::type  ptr,
std::size_t  N 
)

Transactionally free an array of objects of type T held in a persistent_ptr.

This function can be used to transactionally free an array of objects. Calls the objects' destructors before freeing memory. This overload only participates in overload resolution if T is an array.

To ensure that proper recovery is possible, ptr should be set to null after delete_persistent call and within the same transaction.

Parameters
[in,out]ptrpersistent pointer to an array of objects.
[in]Nthe size of the array.
Exceptions
transaction_scope_errorif called outside of an active transaction
transaction_free_erroron transactional free failure.

◆ delete_persistent() [2/3]

template<typename T >
void pmem::obj::delete_persistent ( typename detail::pp_if_not_array< T >::type  ptr)

Transactionally free an object of type T held in a persistent_ptr.

This function can be used to transactionally free an object. Calls the object's destructor before freeing memory. Cannot be used for array types.

To ensure that proper recovery is possible, ptr should be set to null after delete_persistent call and within the same transaction.

Parameters
[in,out]ptrpersistent pointer to an object that is not an array.
Exceptions
transaction_scope_errorif called outside of an active transaction
transaction_free_erroron transactional free failure.

◆ delete_persistent() [3/3]

template<typename T >
void pmem::obj::delete_persistent ( typename detail::pp_if_size_array< T >::type  ptr)

Transactionally free an array of objects of type T held in a persistent_ptr.

This function can be used to transactionally free an array of objects. Calls the objects' destructors before freeing memory. This overload only participates in overload resolution if T is an array.

To ensure that proper recovery is possible, ptr should be set to null after delete_persistent call and within the same transaction.

Parameters
[in,out]ptrpersistent pointer to an array of objects.
Exceptions
transaction_scope_errorif called outside of an active transaction
transaction_free_erroron transactional free failure.

◆ delete_persistent_atomic() [1/3]

template<typename T >
void pmem::obj::delete_persistent_atomic ( typename detail::pp_if_array< T >::type &  ptr,
std::size_t   
)

Atomically deallocate an array of objects.

There is no way to atomically destroy an object. Any object specific cleanup must be performed elsewhere. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.

param[in,out] ptr the persistent_ptr whose pointee is to be deallocated.

◆ delete_persistent_atomic() [2/3]

template<typename T >
void pmem::obj::delete_persistent_atomic ( typename detail::pp_if_not_array< T >::type &  ptr)
noexcept

Atomically deallocate an object.

There is no way to atomically destroy an object. Any object specific cleanup must be performed elsewhere. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.

param[in,out] ptr the persistent_ptr whose pointee is to be deallocated.

◆ delete_persistent_atomic() [3/3]

template<typename T >
void pmem::obj::delete_persistent_atomic ( typename detail::pp_if_size_array< T >::type &  ptr)

Atomically deallocate an array of objects.

There is no way to atomically destroy an object. Any object specific cleanup must be performed elsewhere. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.

param[in,out] ptr the persistent_ptr whose pointee is to be deallocated.

◆ make_persistent() [1/4]

template<typename T , typename... Args>
detail::pp_if_not_array<T>::type pmem::obj::make_persistent ( allocation_flag  flag,
Args &&...  args 
)

Transactionally allocate and construct an object of type T.

This function can be used to transactionally allocate an object. Cannot be used for array types.

Parameters
[in]flagaffects behaviour of allocator
[in,out]argsa list of parameters passed to the constructor.
Returns
persistent_ptr<T> on success
Exceptions
transaction_scope_errorif called outside of an active transaction
transaction_alloc_erroron transactional allocation failure.
rethrowexception from T constructor

◆ make_persistent() [2/4]

template<typename T >
detail::pp_if_size_array<T>::type pmem::obj::make_persistent ( allocation_flag  flag = allocation_flag::none())

Transactionally allocate and construct an array of objects of type T.

This function can be used to transactionally allocate an array. This overload only participates in overload resolution if T is an array.

Parameters
[in]flagaffects behaviour of allocator
Returns
persistent_ptr<T[N]> on success
Exceptions
transaction_scope_errorif called outside of an active transaction
transaction_alloc_erroron transactional allocation failure.
rethrowexception from T constructor

◆ make_persistent() [3/4]

template<typename T , typename... Args>
std::enable_if< !detail::is_first_arg_same<allocation_flag, Args...>::value, typename detail::pp_if_not_array<T>::type>::type pmem::obj::make_persistent ( Args &&...  args)

Transactionally allocate and construct an object of type T.

This function can be used to transactionally allocate an object. Cannot be used for array types.

Parameters
[in,out]argsa list of parameters passed to the constructor.
Returns
persistent_ptr<T> on success
Exceptions
transaction_scope_errorif called outside of an active transaction
transaction_alloc_erroron transactional allocation failure.
rethrowexception from T constructor

◆ make_persistent() [4/4]

template<typename T >
detail::pp_if_array<T>::type pmem::obj::make_persistent ( std::size_t  N,
allocation_flag  flag = allocation_flag::none() 
)

Transactionally allocate and construct an array of objects of type T.

This function can be used to transactionally allocate an array. This overload only participates in overload resolution if T is an array.

Parameters
[in]Nthe number of array elements.
[in]flagaffects behaviour of allocator
Returns
persistent_ptr<T[]> on success
Exceptions
transaction_scope_errorif called outside of an active transaction
transaction_alloc_erroron transactional allocation failure.
rethrowexception from T constructor

◆ make_persistent_atomic() [1/4]

template<typename T >
void pmem::obj::make_persistent_atomic ( pool_base pool,
typename detail::pp_if_array< T >::type &  ptr,
std::size_t  N,
allocation_flag_atomic  flag = allocation_flag_atomic::none() 
)

Atomically allocate an array of objects.

This function can be used to atomically allocate an array of objects. Cannot be used for simple objects. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.

Parameters
[in,out]poolthe pool from which the object will be allocated.
[in,out]ptrthe persistent pointer to which the allocation will take place.
[in]Nthe number of array elements.
[in]flagaffects behaviour of allocator
Exceptions
std::bad_allocon allocation failure.

◆ make_persistent_atomic() [2/4]

template<typename T , typename... Args>
void pmem::obj::make_persistent_atomic ( pool_base pool,
typename detail::pp_if_not_array< T >::type &  ptr,
allocation_flag_atomic  flag,
Args &&...  args 
)

Atomically allocate and construct an object.

Constructor parameters are passed through variadic parameters. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.

Parameters
[in,out]poolthe pool from which the object will be allocated.
[in,out]ptrthe persistent pointer to which the allocation will take place.
[in]flagaffects behaviour of allocator
[in]argsvariadic function parameter containing all parameters passed to the objects constructor.
Exceptions
std::bad_allocon allocation failure.

◆ make_persistent_atomic() [3/4]

template<typename T , typename... Args>
std::enable_if<!detail::is_first_arg_same<allocation_flag_atomic, Args...>::value>::type pmem::obj::make_persistent_atomic ( pool_base pool,
typename detail::pp_if_not_array< T >::type &  ptr,
Args &&...  args 
)

Atomically allocate and construct an object.

Constructor parameters are passed through variadic parameters. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.

Parameters
[in,out]poolthe pool from which the object will be allocated.
[in,out]ptrthe persistent pointer to which the allocation will take place.
[in]argsvariadic function parameter containing all parameters passed to the objects constructor.
Exceptions
std::bad_allocon allocation failure.

◆ make_persistent_atomic() [4/4]

template<typename T >
void pmem::obj::make_persistent_atomic ( pool_base pool,
typename detail::pp_if_size_array< T >::type &  ptr,
allocation_flag_atomic  flag = allocation_flag_atomic::none() 
)

Atomically allocate an array of objects.

This function can be used to atomically allocate an array of objects. Cannot be used for simple objects. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.

Parameters
[in,out]poolthe pool from which the object will be allocated.
[in,out]ptrthe persistent pointer to which the allocation will take place.
[in]flagaffects behaviour of allocator
Exceptions
std::bad_allocon allocation failure.

◆ operator!=() [1/7]

template<typename T , typename P , typename Tr , typename OtherAllocator >
bool pmem::obj::operator!= ( const allocator< T, P, Tr > &  lhs,
const OtherAllocator &  rhs 
)
inline

Determines if memory from another allocator can be deallocated from this one.

Parameters
[in]lhsleft hand side allocator.
[in]rhsright hand side allocator.
Returns
false if allocators are equivalent in terms of deallocation, true otherwise.

◆ operator!=() [2/7]

template<typename T , typename Policy >
bool pmem::obj::operator!= ( const segment_vector< T, Policy > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the different number of elements or at least one element in lhs is not equal to element in rhs at the same position.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of the containers are not equal, false otherwise.

◆ operator!=() [3/7]

template<typename T , typename Policy >
bool pmem::obj::operator!= ( const segment_vector< T, Policy > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, SegmentPolicy, StoragePolicy>
[in]rhsis std::vector<T>.
Returns
true if contents of the containers are not equal, false otherwise.

◆ operator!=() [4/7]

template<typename T , typename Policy >
bool pmem::obj::operator!= ( const std::vector< T > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsis std::vector<T>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of the containers are not equal, false otherwise.

◆ operator!=() [5/7]

template<typename T >
bool pmem::obj::operator!= ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator!=() [6/7]

template<typename T >
bool pmem::obj::operator!= ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator!=() [7/7]

template<typename T >
bool pmem::obj::operator!= ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are not equal, false otherwise

◆ operator-()

template<typename T , typename Y , typename = typename std::enable_if< std::is_same<typename std::remove_cv<T>::type, typename std::remove_cv<Y>::type>::value>>
ptrdiff_t pmem::obj::operator- ( persistent_ptr< T > const &  lhs,
persistent_ptr< Y > const &  rhs 
)
inline

Subtraction operator for persistent pointers of identical type.

Calculates the offset difference of PMEMoids in terms of represented objects. Calculating the difference of pointers from objects of different pools is not allowed.

◆ operator<() [1/7]

template<typename T , typename Policy >
bool pmem::obj::operator< ( const segment_vector< T, Policy > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise.

◆ operator<() [2/7]

template<typename T , typename Policy >
bool pmem::obj::operator< ( const segment_vector< T, Policy > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, SegmentPolicy, StoragePolicy>
[in]rhsis std::vector<T>.
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise.

◆ operator<() [3/7]

template<typename T , typename Policy >
bool pmem::obj::operator< ( const std::vector< T > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis std::vector<T>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise.

◆ operator<() [4/7]

template<typename T >
bool pmem::obj::operator< ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise

◆ operator<() [5/7]

template<typename T >
bool pmem::obj::operator< ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise

◆ operator<() [6/7]

template<typename T >
bool pmem::obj::operator< ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically less than contents of rhs, false otherwise

◆ operator<() [7/7]

template<typename T , typename Y >
bool pmem::obj::operator< ( persistent_ptr< T > const &  lhs,
persistent_ptr< Y > const &  rhs 
)
inlinenoexcept

Less than operator.

Returns
true if the uuid_lo of lhs is less than the uuid_lo of rhs, should they be equal, the offsets are compared. Returns false otherwise.

◆ operator<=() [1/7]

template<typename T , typename Policy >
bool pmem::obj::operator<= ( const segment_vector< T, Policy > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy>.
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise.

◆ operator<=() [2/7]

template<typename T , typename Policy >
bool pmem::obj::operator<= ( const segment_vector< T, Policy > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, SegmentPolicy, StoragePolicy>
[in]rhsis std::vector<T>.
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise.

◆ operator<=() [3/7]

template<typename T , typename Policy >
bool pmem::obj::operator<= ( const std::vector< T > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis std::vector<T>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise.

◆ operator<=() [4/7]

template<typename T >
bool pmem::obj::operator<= ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of ype std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise

◆ operator<=() [5/7]

template<typename T >
bool pmem::obj::operator<= ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of ype std::vector<T>
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise

◆ operator<=() [6/7]

template<typename T >
bool pmem::obj::operator<= ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically lesser than or equal to contents of rhs, false otherwise

◆ operator<=() [7/7]

template<typename T , typename Y >
bool pmem::obj::operator<= ( persistent_ptr< T > const &  lhs,
persistent_ptr< Y > const &  rhs 
)
inlinenoexcept

Less or equal than operator.

See less than operator for comparison rules.

◆ operator==() [1/10]

template<typename T , typename P , typename Tr , typename T2 , typename P2 , typename Tr2 >
bool pmem::obj::operator== ( const allocator< T, P, Tr > &  lhs,
const allocator< T2, P2, Tr2 > &  rhs 
)
inline

Determines if memory from another allocator can be deallocated from this one.

Parameters
[in]lhsleft hand side allocator.
[in]rhsright hand side allocator.
Returns
true if allocators are equivalent in terms of deallocation, false otherwise.

◆ operator==() [2/10]

template<typename T , typename Policy >
bool pmem::obj::operator== ( const segment_vector< T, Policy > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of the containers are equal, false otherwise.

◆ operator==() [3/10]

template<typename T , typename Policy >
bool pmem::obj::operator== ( const segment_vector< T, Policy > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, SegmentPolicy, StoragePolicy>
[in]rhsis std::vector<T>.
Returns
true if contents of the containers are equal, false otherwise.

◆ operator==() [4/10]

template<typename T , typename Policy >
bool pmem::obj::operator== ( const std::vector< T > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsis std::vector<T>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of the containers are equal, false otherwise.

◆ operator==() [5/10]

template<typename T >
bool pmem::obj::operator== ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator==() [6/10]

template<typename T >
bool pmem::obj::operator== ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator==() [7/10]

template<typename T >
bool pmem::obj::operator== ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers.

Checks if containers have the same number of elements and each element in lhs is equal to element in rhs at the same position.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of the containers are equal, false otherwise

◆ operator==() [8/10]

template<typename T , typename Y >
bool pmem::obj::operator== ( persistent_ptr< T > const &  lhs,
persistent_ptr< Y > const &  rhs 
)
inlinenoexcept

Equality operator.

This checks if underlying PMEMoids are equal.

◆ operator==() [9/10]

template<typename T , typename OtherAllocator >
bool pmem::obj::operator== ( standard_alloc_policy< T > const &  ,
OtherAllocator const &   
)
inline

Determines if memory from another allocator can be deallocated from this one.

Returns
false.

◆ operator==() [10/10]

template<typename T , typename T2 >
bool pmem::obj::operator== ( standard_alloc_policy< T > const &  ,
standard_alloc_policy< T2 > const &   
)
inline

Determines if memory from another allocator can be deallocated from this one.

Returns
true.

◆ operator>() [1/7]

template<typename T , typename Policy >
bool pmem::obj::operator> ( const segment_vector< T, Policy > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise.

◆ operator>() [2/7]

template<typename T , typename Policy >
bool pmem::obj::operator> ( const segment_vector< T, Policy > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, SegmentPolicy, StoragePolicy>
[in]rhsis std::vector<T>.
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise.

◆ operator>() [3/7]

template<typename T , typename Policy >
bool pmem::obj::operator> ( const std::vector< T > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis std::vector<T>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise.

◆ operator>() [4/7]

template<typename T >
bool pmem::obj::operator> ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise

◆ operator>() [5/7]

template<typename T >
bool pmem::obj::operator> ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise

◆ operator>() [6/7]

template<typename T >
bool pmem::obj::operator> ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than contents of rhs, false otherwise

◆ operator>() [7/7]

template<typename T , typename Y >
bool pmem::obj::operator> ( persistent_ptr< T > const &  lhs,
persistent_ptr< Y > const &  rhs 
)
inlinenoexcept

Greater than operator.

See less than operator for comparison rules.

◆ operator>=() [1/7]

template<typename T , typename Policy >
bool pmem::obj::operator>= ( const segment_vector< T, Policy > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise.

◆ operator>=() [2/7]

template<typename T , typename Policy >
bool pmem::obj::operator>= ( const segment_vector< T, Policy > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis pmem::obj::experimental::segment_vector<T, SegmentPolicy, StoragePolicy>
[in]rhsis std::vector<T>.
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise.

◆ operator>=() [3/7]

template<typename T , typename Policy >
bool pmem::obj::operator>= ( const std::vector< T > &  lhs,
const segment_vector< T, Policy > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsis std::vector<T>.
[in]rhsis pmem::obj::experimental::segment_vector<T, Policy, SPolicy>.
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise.

◆ operator>=() [4/7]

template<typename T >
bool pmem::obj::operator>= ( const std::vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type std::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise

◆ operator>=() [5/7]

template<typename T >
bool pmem::obj::operator>= ( const vector< T > &  lhs,
const std::vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type std::vector<T>
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise

◆ operator>=() [6/7]

template<typename T >
bool pmem::obj::operator>= ( const vector< T > &  lhs,
const vector< T > &  rhs 
)

Comparison operator.

Compares the contents of two containers lexicographically.

Parameters
[in]lhsfirst vector of type pmem::obj::vector<T>
[in]rhssecond vector of type pmem::obj::vector<T>
Returns
true if contents of lhs are lexicographically greater than or equal to contents of rhs, false otherwise

◆ operator>=() [7/7]

template<typename T , typename Y >
bool pmem::obj::operator>= ( persistent_ptr< T > const &  lhs,
persistent_ptr< Y > const &  rhs 
)
inlinenoexcept

Greater or equal than operator.

See less than operator for comparison rules.

◆ pool_by_pptr()

template<typename T >
pool_base pmem::obj::pool_by_pptr ( const persistent_ptr< T >  ptr)
inline

Retrieve pool handle for the given persistent_ptr.

Parameters
[in]ptrpointer to an object from a persistent memory pool.
Returns
handle to the pool containing the object.
Exceptions
pool_errorif the given pointer does not belong to an open pool.

◆ pool_by_vptr()

template<typename T >
pool_base pmem::obj::pool_by_vptr ( const T *  that)
inline

Retrieve pool handle for the given pointer.

Parameters
[in]thatpointer to an object from a persistent memory pool.
Returns
handle to the pool containing the object.
Exceptions
pool_errorif the given pointer does not belong to an open pool.

◆ swap() [1/4]

template<class T >
void pmem::obj::swap ( p< T > &  a,
p< T > &  b 
)
inline

Swaps two p objects of the same type.

Non-member swap function as required by Swappable concept. en.cppreference.com/w/cpp/concept/Swappable

◆ swap() [2/4]

template<class T >
void pmem::obj::swap ( persistent_ptr< T > &  a,
persistent_ptr< T > &  b 
)
inline

Swaps two persistent_ptr objects of the same type.

Non-member swap function as required by Swappable concept. en.cppreference.com/w/cpp/concept/Swappable

◆ swap() [3/4]

template<typename T , typename Policy >
void pmem::obj::swap ( segment_vector< T, Policy > &  lhs,
segment_vector< T, Policy > &  rhs 
)

Swaps the contents of lhs and rhs.

Parameters
[in]lhsfirst segment_vector.
[in]rhssecond segment_vector.

◆ swap() [4/4]

template<typename T >
void pmem::obj::swap ( vector< T > &  lhs,
vector< T > &  rhs 
)

Swaps the contents of lhs and rhs.

Parameters
[in]lhsfirst vector
[in]rhssecond vector