mdbx++: add to mdbx::env overloads with const char* pathname parameter.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2022-07-13 21:37:50 +03:00
parent 9bbf09b5c4
commit 69b495d559
2 changed files with 48 additions and 31 deletions

View File

@@ -3228,6 +3228,8 @@ public:
#endif /* Windows */
env &copy(const ::std::string &destination, bool compactify,
bool force_dynamic_size = false);
env &copy(const char *destination, bool compactify,
bool force_dynamic_size = false);
/// \brief Copy an environment to the specified file descriptor.
env &copy(filehandle fd, bool compactify, bool force_dynamic_size = false);
@@ -3252,14 +3254,16 @@ public:
/// \brief Removes the environment's files in a proper and multiprocess-safe
/// way.
#ifdef MDBX_STD_FILESYSTEM_PATH
static bool remove(const MDBX_STD_FILESYSTEM_PATH &,
static bool remove(const MDBX_STD_FILESYSTEM_PATH &pathname,
const remove_mode mode = just_remove);
#endif /* MDBX_STD_FILESYSTEM_PATH */
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
static bool remove(const ::std::wstring &,
static bool remove(const ::std::wstring &pathname,
const remove_mode mode = just_remove);
#endif /* Windows */
static bool remove(const ::std::string &,
static bool remove(const ::std::string &pathname,
const remove_mode mode = just_remove);
static bool remove(const char *pathname,
const remove_mode mode = just_remove);
/// \brief Statistics for a database in the MDBX environment.
@@ -3497,15 +3501,17 @@ public:
/// \brief Open existing database.
#ifdef MDBX_STD_FILESYSTEM_PATH
env_managed(const MDBX_STD_FILESYSTEM_PATH &, const operate_parameters &,
bool accede = true);
env_managed(const MDBX_STD_FILESYSTEM_PATH &pathname,
const operate_parameters &, bool accede = true);
#endif /* MDBX_STD_FILESYSTEM_PATH */
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
env_managed(const ::std::wstring &, const operate_parameters &,
env_managed(const ::std::wstring &pathname, const operate_parameters &,
bool accede = true);
#endif /* Windows */
env_managed(const ::std::string &, const operate_parameters &,
env_managed(const ::std::string &pathname, const operate_parameters &,
bool accede = true);
explicit env_managed(const char *pathname, const operate_parameters &,
bool accede = true);
/// \brief Additional parameters for creating a new database.
struct create_parameters {
@@ -3518,15 +3524,18 @@ public:
/// \brief Create new or open existing database.
#ifdef MDBX_STD_FILESYSTEM_PATH
env_managed(const MDBX_STD_FILESYSTEM_PATH &, const create_parameters &,
const operate_parameters &, bool accede = true);
env_managed(const MDBX_STD_FILESYSTEM_PATH &pathname,
const create_parameters &, const operate_parameters &,
bool accede = true);
#endif /* MDBX_STD_FILESYSTEM_PATH */
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
env_managed(const ::std::wstring &, const create_parameters &,
env_managed(const ::std::wstring &pathname, const create_parameters &,
const operate_parameters &, bool accede = true);
#endif /* Windows */
env_managed(const ::std::string &, const create_parameters &,
env_managed(const ::std::string &pathname, const create_parameters &,
const operate_parameters &, bool accede = true);
explicit env_managed(const char *pathname, const create_parameters &,
const operate_parameters &, bool accede = true);
/// \brief Explicitly closes the environment and release the memory map.
///