Update api & link libs
This commit is contained in:
@@ -2,9 +2,13 @@
|
||||
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include "mynteye/utils.h"
|
||||
|
||||
#include "device/device.h"
|
||||
|
||||
MYNTEYE_BEGIN_NAMESPACE
|
||||
|
||||
API::API() {
|
||||
API::API(std::shared_ptr<Device> device) : device_(device) {
|
||||
VLOG(2) << __func__;
|
||||
}
|
||||
|
||||
@@ -12,4 +16,12 @@ API::~API() {
|
||||
VLOG(2) << __func__;
|
||||
}
|
||||
|
||||
std::shared_ptr<API> API::Create() {
|
||||
return Create(device::select());
|
||||
}
|
||||
|
||||
std::shared_ptr<API> API::Create(std::shared_ptr<Device> device) {
|
||||
return std::make_shared<API>(device);
|
||||
}
|
||||
|
||||
MYNTEYE_END_NAMESPACE
|
||||
|
||||
@@ -2,14 +2,24 @@
|
||||
#define MYNTEYE_API_H_
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "mynteye/mynteye.h"
|
||||
|
||||
MYNTEYE_BEGIN_NAMESPACE
|
||||
|
||||
class Device;
|
||||
|
||||
class MYNTEYE_API API {
|
||||
public:
|
||||
API();
|
||||
~API();
|
||||
explicit API(std::shared_ptr<Device> device);
|
||||
/*virtual*/ ~API();
|
||||
|
||||
static std::shared_ptr<API> Create();
|
||||
static std::shared_ptr<API> Create(std::shared_ptr<Device> device);
|
||||
|
||||
private:
|
||||
std::shared_ptr<Device> device_;
|
||||
};
|
||||
|
||||
MYNTEYE_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user