8 #ifndef BOOSTER_SHARED_OBJECT_H 9 #define BOOSTER_SHARED_OBJECT_H 11 #include <booster/config.h> 12 #include <booster/noncopyable.h> 13 #include <booster/hold_ptr.h> 14 #include <booster/backtrace.h> 15 #include <booster/cstdint.h> 24 static const int load_lazy = 1;
25 static const int load_now = 2;
26 static const int load_global = 4;
27 static const int load_local = 8;
64 bool open(std::string
const &file_name);
72 bool open(std::string
const &file_name,std::string &error_message);
81 bool open(std::string
const &file_name,
int flags);
91 bool open(std::string
const &file_name,std::string &error_message,
int flags);
103 void *resolve_symbol(std::string
const &name)
const;
110 void symbol(T &s,std::string
const &name)
const 112 void *p = resolve_symbol(name);
116 s =
reinterpret_cast<T
>(
reinterpret_cast<size_t>(p));
130 static std::string name(std::string
const &module);
143 static std::string name(std::string
const &module,std::string
const &soversion);
Same as std::runtime_error but records stack trace.
Definition: backtrace.h:158
Class that allows loading dynamic libraries: shared objects and dlls.
Definition: shared_object.h:22
void symbol(T &s, std::string const &name) const
Definition: shared_object.h:110
Booster library namespace. The library that implements Boost Like API in ABI backward compatible way...
Definition: application.h:23
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15