Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
wrappers
unrealengine4
Plugins
RealSense
Source
RealSense
Public
RealSenseNative.h
Go to the documentation of this file.
1
#pragma once
2
3
#pragma warning(push)
4
#pragma warning(disable: 4456)
5
#pragma warning(disable: 4458)
6
#pragma warning(disable: 4577)
7
#include <
librealsense2/rs.hpp
>
8
#pragma warning(pop)
9
10
namespace
rs2
{
11
12
inline
void
release_context_ref
(
rs2_context
* Handle) {}
// do nothing
13
14
class
context_ref
:
public
context
{
15
public
:
16
context_ref
(
rs2_context
* Handle) :
context
(
std
::shared_ptr<
rs2_context
>(Handle,
release_context_ref
)) { }
17
};
18
19
class
error_ref
{
20
public
:
21
inline
error_ref
() : m_error(nullptr) {}
22
inline
~error_ref
() { release(); }
23
inline
void
release
() {
if
(m_error) {
rs2_free_error
(m_error); m_error =
nullptr
; } }
24
inline
rs2_error
**
operator&
() { release();
return
&m_error; }
25
26
inline
bool
success
()
const
{
return
m_error ?
false
:
true
; }
27
inline
const
char
*
get_message
()
const
{
return
rs2_get_error_message
(m_error); }
28
inline
rs2_exception_type
get_type
()
const
{
return
rs2_get_librealsense_exception_type
(m_error); }
29
private
:
30
rs2_error
*
m_error
;
31
};
32
33
}
// namespace
rs2::error_ref::get_message
const char * get_message() const
Definition:
RealSenseNative.h:27
rs2_exception_type
rs2_exception_type
Exception types are the different categories of errors that RealSense API might return.
Definition:
rs_types.h:30
rs2_free_error
void rs2_free_error(rs2_error *error)
Definition:
rs.cpp:1256
rs2::error_ref::error_ref
error_ref()
Definition:
RealSenseNative.h:21
rs2::release_context_ref
void release_context_ref(rs2_context *Handle)
Definition:
RealSenseNative.h:12
rs2::context_ref::context_ref
context_ref(rs2_context *Handle)
Definition:
RealSenseNative.h:16
rs2_error
Definition:
rs.cpp:139
std
Definition:
android_helpers.h:13
rs.hpp
rs2::error_ref::get_type
rs2_exception_type get_type() const
Definition:
RealSenseNative.h:28
rs2
Definition:
cah-model.h:10
rs2::context
Definition:
rs_context.hpp:96
rs2_context
Definition:
rs.cpp:82
rs2::error_ref::release
void release()
Definition:
RealSenseNative.h:23
rs2::error_ref::success
bool success() const
Definition:
RealSenseNative.h:26
rs2_get_error_message
const char * rs2_get_error_message(const rs2_error *error)
Definition:
rs.cpp:1259
rs2::error_ref
Definition:
RealSenseNative.h:19
rs2_get_librealsense_exception_type
rs2_exception_type rs2_get_librealsense_exception_type(const rs2_error *error)
Definition:
rs.cpp:1260
rs2::error_ref::operator&
rs2_error ** operator&()
Definition:
RealSenseNative.h:24
rs2::error_ref::~error_ref
~error_ref()
Definition:
RealSenseNative.h:22
rs2::error_ref::m_error
rs2_error * m_error
Definition:
RealSenseNative.h:30
rs2::context_ref
Definition:
RealSenseNative.h:14
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:47:39