38 #ifndef LIBPMEMOBJ_CPP_CTL_HPP
39 #define LIBPMEMOBJ_CPP_CTL_HPP
41 #include <libpmemobj/ctl.h>
57 ctl_get_detail(PMEMobjpool *pool,
const std::string &name)
62 int ret = pmemobj_ctl_getU(pool, name.c_str(), &tmp);
64 int ret = pmemobj_ctl_get(pool, name.c_str(), &tmp);
74 ctl_set_detail(PMEMobjpool *pool,
const std::string &name, T arg)
77 int ret = pmemobj_ctl_setU(pool, name.c_str(), &arg);
79 int ret = pmemobj_ctl_set(pool, name.c_str(), &arg);
89 ctl_exec_detail(PMEMobjpool *pool,
const std::string &name, T arg)
92 int ret = pmemobj_ctl_execU(pool, name.c_str(), &arg);
94 int ret = pmemobj_ctl_exec(pool, name.c_str(), &arg);
98 .with_pmemobj_errormsg();
104 template <
typename T>
106 ctl_get_detail(PMEMobjpool *pool,
const std::wstring &name)
110 int ret = pmemobj_ctl_getW(pool, name.c_str(), &tmp);
117 template <
typename T>
119 ctl_set_detail(PMEMobjpool *pool,
const std::wstring &name, T arg)
121 int ret = pmemobj_ctl_setW(pool, name.c_str(), &arg);
128 template <
typename T>
130 ctl_exec_detail(PMEMobjpool *pool,
const std::wstring &name, T arg)
132 int ret = pmemobj_ctl_execW(pool, name.c_str(), &arg);
135 .with_pmemobj_errormsg();