9 #ifndef LIBPMEMOBJ_CPP_CTL_HPP
10 #define LIBPMEMOBJ_CPP_CTL_HPP
12 #include <libpmemobj/ctl.h>
28 ctl_get_detail(PMEMobjpool *pool,
const std::string &name)
33 int ret = pmemobj_ctl_getU(pool, name.c_str(), &tmp);
35 int ret = pmemobj_ctl_get(pool, name.c_str(), &tmp);
38 throw detail::exception_with_errormsg<pmem::ctl_error>(
46 ctl_set_detail(PMEMobjpool *pool,
const std::string &name, T arg)
49 int ret = pmemobj_ctl_setU(pool, name.c_str(), &arg);
51 int ret = pmemobj_ctl_set(pool, name.c_str(), &arg);
54 throw detail::exception_with_errormsg<pmem::ctl_error>(
62 ctl_exec_detail(PMEMobjpool *pool,
const std::string &name, T arg)
65 int ret = pmemobj_ctl_execU(pool, name.c_str(), &arg);
67 int ret = pmemobj_ctl_exec(pool, name.c_str(), &arg);
70 throw detail::exception_with_errormsg<pmem::ctl_error>(
78 ctl_get_detail(PMEMobjpool *pool,
const std::wstring &name)
82 int ret = pmemobj_ctl_getW(pool, name.c_str(), &tmp);
84 throw detail::exception_with_errormsg<pmem::ctl_error>(
92 ctl_set_detail(PMEMobjpool *pool,
const std::wstring &name, T arg)
94 int ret = pmemobj_ctl_setW(pool, name.c_str(), &arg);
96 throw detail::exception_with_errormsg<pmem::ctl_error>(
102 template <
typename T>
104 ctl_exec_detail(PMEMobjpool *pool,
const std::wstring &name, T arg)
106 int ret = pmemobj_ctl_execW(pool, name.c_str(), &arg);
108 throw detail::exception_with_errormsg<pmem::ctl_error>(
basic_string< char > string
The most typical string usage - the char specialization.
Definition: string.hpp:24
basic_string< wchar_t > wstring
The wide char specialization.
Definition: string.hpp:30
Persistent memory namespace.
Definition: allocation_flag.hpp:15