shared_library.cpp
Go to the documentation of this file.
2 
3 BT::SharedLibrary::SharedLibrary(const std::string& path, int flags)
4 {
5  load(path, flags);
6 }
7 
8 void* BT::SharedLibrary::getSymbol(const std::string& name)
9 {
10  void* result = findSymbol(name);
11  if (result)
12  return result;
13  else
14  throw std::runtime_error(name);
15 }
16 
17 bool BT::SharedLibrary::hasSymbol(const std::string& name)
18 {
19  return findSymbol(name) != 0;
20 }
21 
22 std::string BT::SharedLibrary::getOSName(const std::string& name)
23 {
24  return prefix() + name + suffix();
25 }
static std::string prefix()
bool hasSymbol(const std::string &name)
Returns true iff a library has been loaded.
static std::string getOSName(const std::string &name)
static std::string suffix()
void * getSymbol(const std::string &name)
Simple class for manipulating paths on Linux/Windows/Mac OS.
Definition: path.h:42
void load(const std::string &path, int flags=0)
void * findSymbol(const std::string &name)


behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sun Feb 3 2019 03:14:32