37#if FB_CPP_USE_BOOST_DLL != 0
38#include <boost/dll.hpp>
64#if FB_CPP_USE_BOOST_DLL != 0
69 explicit Client(
const boost::dll::fs::path& fbclientLibPath,
70 boost::dll::load_mode::type loadMode = boost::dll::load_mode::append_decorations |
71 boost::dll::load_mode::search_system_folders)
72 :
Client{boost::dll::shared_library{fbclientLibPath, loadMode}}
80 explicit Client(boost::dll::shared_library fbclientLib)
81 : fbclientLib(fbclientLib)
83 const auto fbGetMasterInterface =
84 fbclientLib.get<
decltype(fb::fb_get_master_interface)>(
"fb_get_master_interface");
85 master = fbGetMasterInterface();
97 int128Util{o.int128Util},
98 decFloat16Util{o.decFloat16Util},
99 decFloat34Util{o.decFloat34Util}
100#if FB_CPP_USE_BOOST_DLL != 0
102 fbclientLib{std::move(o.fbclientLib)}
107 o.int128Util =
nullptr;
108 o.decFloat16Util =
nullptr;
109 o.decFloat34Util =
nullptr;
130 return master !=
nullptr;
149 util = master->getUtilInterface();
157 template <std::derived_from<fb::IStatus> StatusType>
163 int128Util =
getUtil()->getInt128(status);
171 template <std::derived_from<fb::IStatus> StatusType>
177 decFloat16Util =
getUtil()->getDecFloat16(status);
179 return decFloat16Util;
185 template <std::derived_from<fb::IStatus> StatusType>
191 decFloat34Util =
getUtil()->getDecFloat34(status);
193 return decFloat34Util;
202 return fbUnique(master->getStatus());
212 fb::IUtil* util =
nullptr;
213 fb::IInt128* int128Util =
nullptr;
214 fb::IDecFloat16* decFloat16Util =
nullptr;
215 fb::IDecFloat34* decFloat34Util =
nullptr;
216#if FB_CPP_USE_BOOST_DLL != 0
217 boost::dll::shared_library fbclientLib;
Represents a Firebird client library instance.
fb::IUtil * getUtil()
Returns a Firebird IUtil interface.
Client(fb::IMaster *master)
Constructs a Client object that uses the specified IMaster interface.
FbUniquePtr< fb::IStatus > newStatus()
Creates and returns a Firebird IStatus instance.
fb::IDecFloat16 * getDecFloat16Util(StatusType *status)
Returns a Firebird IDecFloat16 interface.
fb::IMaster * getMaster() noexcept
Returns the Firebird IMaster interface.
void shutdown()
Shuts down the Firebird client library (or embedded engine) instance.
Client(const boost::dll::fs::path &fbclientLibPath, boost::dll::load_mode::type loadMode=boost::dll::load_mode::append_decorations|boost::dll::load_mode::search_system_folders)
Constructs a Client object that loads the Firebird client library (or embedded engine) from the speci...
Client(boost::dll::shared_library fbclientLib)
Constructs a Client object that uses the specified Boost.DLL shared_library representing the Firebird...
~Client() noexcept=default
If the Client object was created using Boost.DLL, this destructor just releases the internal boost::d...
fb::IDecFloat34 * getDecFloat34Util(StatusType *status)
Returns a Firebird IDecFloat34 interface.
fb::IInt128 * getInt128Util(StatusType *status)
Returns a Firebird IInt128 interface.
bool isValid() noexcept
Returns whether the Client object is valid.
Client(Client &&o) noexcept
Move constructor.