19 #ifndef LUNCHBOX_DSO_H 20 #define LUNCHBOX_DSO_H 22 #include <boost/noncopyable.hpp> 38 class DSO :
public boost::noncopyable
45 LUNCHBOX_API
explicit DSO(
const std::string& name);
57 LUNCHBOX_API
bool open(
const std::string& fileName);
63 LUNCHBOX_API
void close();
71 void* getFunctionPointer(
const std::string& functionName)
const;
81 return (F)(getFunctionPointer(func));
85 LUNCHBOX_API
bool isOpen()
const;
91 LUNCHBOX_API
bool operator==(
const DSO& rhs)
const;
97 bool operator!=(
const DSO& rhs)
const {
return !(*
this == rhs); }
99 detail::DSO*
const _impl;
103 #endif // LUNCHBOX_DSO_H Helper to access dynamic shared objects (DSO)
F getFunctionPointer(const std::string &func) const
Defines export visibility macros for library Lunchbox.
Abstraction layer and common utilities for multi-threaded programming.
bool operator!=(const DSO &rhs) const