Add api create methods
This commit is contained in:
parent
c6586cf164
commit
fbc7c3b6ef
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <thread>
|
||||
|
||||
#include "mynteye/glog_init.h"
|
||||
#include "mynteye/utils.h"
|
||||
|
||||
#include "api/synthetic.h"
|
||||
|
@ -28,6 +29,17 @@ std::shared_ptr<API> API::Create(std::shared_ptr<Device> device) {
|
|||
return std::make_shared<API>(device);
|
||||
}
|
||||
|
||||
std::shared_ptr<API> API::Create(int argc, char *argv[]) {
|
||||
static glog_init _(argc, argv);
|
||||
return std::make_shared<API>(device::select());
|
||||
}
|
||||
|
||||
std::shared_ptr<API> API::Create(
|
||||
int argc, char *argv[], std::shared_ptr<Device> device) {
|
||||
static glog_init _(argc, argv);
|
||||
return std::make_shared<API>(device);
|
||||
}
|
||||
|
||||
Model API::GetModel() const {
|
||||
return device_->GetModel();
|
||||
}
|
||||
|
|
|
@ -40,6 +40,9 @@ class MYNTEYE_API API {
|
|||
|
||||
static std::shared_ptr<API> Create();
|
||||
static std::shared_ptr<API> Create(std::shared_ptr<Device> device);
|
||||
static std::shared_ptr<API> Create(int argc, char *argv[]);
|
||||
static std::shared_ptr<API> Create(
|
||||
int argc, char *argv[], std::shared_ptr<Device> device);
|
||||
|
||||
Model GetModel() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user