Files
salmanoff/hcore/include/senseApis/senseApiManager.h
T

42 lines
974 B
C++
Raw Normal View History

#ifndef SENSE_API_MANAGER_H
#define SENSE_API_MANAGER_H
#include <config.h>
#include <memory>
#include <vector>
#include <string>
#include <optional>
#include <functional>
#include <senseApis/senseApiLib.h>
namespace hk {
namespace sense_api {
class SenseApiManager {
public:
static SenseApiManager& getInstance()
{
static SenseApiManager instance;
return instance;
}
SenseApiLib& loadSenseApiLib(const std::string& libraryPath);
std::optional<std::reference_wrapper<SenseApiLib>> getSenseApiLib(
const std::string& libraryPath);
void unloadSenseApiLib(const std::string& libraryPath);
private:
SenseApiManager() = default;
~SenseApiManager() = default;
SenseApiManager(const SenseApiManager&) = delete;
SenseApiManager& operator=(const SenseApiManager&) = delete;
std::vector<std::unique_ptr<SenseApiLib>> senseApiLibs;
};
} // namespace sense_api
} // namespace hk
#endif // SENSE_API_MANAGER_H