utils.hpp File Reference

Libpmemobj C++ utils. More...

`#include "libpmemobj++/detail/pexceptions.hpp"`
`#include "libpmemobj++/persistent_ptr.hpp"`
`#include "libpmemobj/base.h"`
Include dependency graph for utils.hpp:

Go to the source code of this file.

## Functions

template<typename T >
pool_base | pmem::obj::pool_by_vptr (const T *that)
| Retrieve pool handle for the given pointer. More...
template<typename T >
pool_base | pmem::obj::pool_by_pptr (const persistent_ptr< T > ptr)
| Retrieve pool handle for the given persistent_ptr. More...

## Detailed Description

Libpmemobj C++ utils.

## Function Documentation

## 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] | ptr | pointer to an object from a persistent memory pool.

Returns
  handle to the pool containing the object.

Exceptions

  pool_error | if 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] | that | pointer to an object from a persistent memory pool.

Returns
  handle to the pool containing the object.

Exceptions

  pool_error | if the given pointer does not belong to an open pool.