Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
context.h
Go to the documentation of this file.
1// License: Apache 2.0. See LICENSE file in root directory.
2// Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3
4#pragma once
5#ifndef LIBREALSENSE_CONTEXT_H
6#define LIBREALSENSE_CONTEXT_H
7
8#include "types.h"
9#include "uvc.h"
10
12{
13 std::shared_ptr<rsimpl::uvc::context> context;
14 std::vector<std::shared_ptr<rs_device>> devices;
15
18
20 static void release_instance();
21
22 size_t get_device_count() const override;
23 rs_device * get_device(int index) const override;
24private:
25 static int ref_count;
26 static std::mutex instance_lock;
27 static rs_context* instance;
28 static std::string api_version;
29};
30
31#endif
Definition: context.h:12
size_t get_device_count() const override
std::shared_ptr< rsimpl::uvc::context > context
Definition: context.h:13
static rs_context * acquire_instance()
static void release_instance()
std::vector< std::shared_ptr< rs_device > > devices
Definition: context.h:14
rs_device * get_device(int index) const override
Definition: rscore.hpp:119
Definition: rscore.hpp:65