Opts: Make singleton; senseApi: check senseApiLibPath, get senseApiDescFn pointer.
* OptionsParser now has a singleton.
* We now use the cmdline opt -p <senseApiLibPath>, and search for
the specified library in:
* senseApiLibPath, then CWD, then the place where our executable
is running from, and then finally we let the hosting OS do
its own search.
* We now call dlsym() on dlopen()'d libs to to get the senseApiDescFn
pointer.
This commit is contained in:
@@ -39,7 +39,7 @@ public:
|
||||
class SenseApiLib
|
||||
{
|
||||
public:
|
||||
typedef const CSenseApiDesc *(SenseApiDescGetterFn)(void);
|
||||
typedef const CSenseApiDesc* (SenseApiDescGetterFn)(void);
|
||||
|
||||
public:
|
||||
SenseApiLib(const std::string& path)
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
* This getter function should be visible to dlsym() so that Harikoff can
|
||||
* find it in the lib after loading it, and call it.
|
||||
*/
|
||||
SenseApiDescGetterFn *getSenseApiDescriptor;
|
||||
std::function<SenseApiDescGetterFn> getSenseApiDescriptor;
|
||||
|
||||
/**
|
||||
* @brief Harikoff will call the `getSenseApiDescriptor` getter function and
|
||||
|
||||
Reference in New Issue
Block a user