PMDK C++ bindings  1.13.0-git107.g7e59f08f
This is the C++ bindings documentation for PMDK's libpmemobj.
pmem::obj::persistent_ptr< void > Class Reference

persistent_ptr void specialization. More...

#include <libpmemobj++/persistent_ptr.hpp>

Inheritance diagram for pmem::obj::persistent_ptr< void >:

Public Types

typedef void element_type
 
typedef persistent_ptr< void > this_type
 

Public Member Functions

 persistent_ptr (void *ptr)
 
element_type * get () const noexcept
 
template<typename Y , typename = typename std::enable_if< std::is_convertible<Y *, void *>::value>::type>
persistent_ptr< void > & operator= (persistent_ptr< void > const &r)
 
 operator bool () const noexcept
 
 persistent_ptr_base () noexcept
 Default constructor, zeroes the PMEMoid.
 
 persistent_ptr_base (PMEMoid oid) noexcept
 PMEMoid constructor. More...
 
 persistent_ptr_base (persistent_ptr_base const &r) noexcept
 
 persistent_ptr_base (persistent_ptr_base &&r) noexcept
 Move constructor.
 
void swap (persistent_ptr_base &other)
 Swaps two persistent_ptr objects of the same type. More...
 
const PMEMoid & raw () const noexcept
 Get PMEMoid encapsulated by this object. More...
 
PMEMoid * raw_ptr () noexcept
 Get pointer to PMEMoid encapsulated by this object. More...
 

Protected Attributes

PMEMoid oid
 

Detailed Description

persistent_ptr void specialization.

It's truncated specialization to disallow some of the (unnecessary) functionalities.

Member Function Documentation

◆ persistent_ptr_base()

pmem::obj::persistent_ptr_base::persistent_ptr_base
inlinenoexcept

PMEMoid constructor.

Provided for easy interoperability between C++ and C API's.

Parameters
oidC-style persistent pointer

◆ raw()

const PMEMoid& pmem::obj::persistent_ptr_base::raw ( ) const
inlinenoexceptinherited

Get PMEMoid encapsulated by this object.

For C API compatibility.

Returns
const reference to the PMEMoid

◆ raw_ptr()

PMEMoid* pmem::obj::persistent_ptr_base::raw_ptr ( )
inlinenoexceptinherited

Get pointer to PMEMoid encapsulated by this object.

For C API compatibility.

Returns
pointer to the PMEMoid

◆ swap()

void pmem::obj::persistent_ptr_base::swap ( persistent_ptr_base other)
inlineinherited

Swaps two persistent_ptr objects of the same type.

Parameters
[in,out]otherthe other persistent_ptr to swap.

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