Add device layer

This commit is contained in:
John Zhao
2018-04-04 10:50:27 +08:00
parent 1f3ec9d621
commit 905bafd26d
14 changed files with 211 additions and 30 deletions

36
src/device/context.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef MYNTEYE_CONTEXT_H_ // NOLINT
#define MYNTEYE_CONTEXT_H_
#pragma once
#include <memory>
#include <vector>
#include "mynteye/mynteye.h"
MYNTEYE_BEGIN_NAMESPACE
namespace uvc {
struct context;
} // namespace uvc
class Device;
class Context {
public:
Context();
~Context();
std::vector<std::shared_ptr<Device>> devices() const {
return devices_;
}
private:
std::shared_ptr<uvc::context> context_;
std::vector<std::shared_ptr<Device>> devices_;
};
MYNTEYE_END_NAMESPACE
#endif // MYNTEYE_CONTEXT_H_ NOLINT