HDK
|
Used internally by the C++ API. C++ wrapper types inherit from this. This is a zero cost abstraction to wrap the C API objects and delete them on destruction. More...
#include <onnxruntime_cxx_api.h>
Public Types | |
using | contained_type = T |
Public Member Functions | |
constexpr | Base ()=default |
constexpr | Base (contained_type *p) noexcept |
~Base () | |
Base (const Base &)=delete | |
Base & | operator= (const Base &)=delete |
Base (Base &&v) noexcept | |
Base & | operator= (Base &&v) noexcept |
constexpr | operator contained_type * () const noexcept |
contained_type * | release () |
Relinquishes ownership of the contained C object pointer The underlying object is not destroyed. More... | |
Protected Attributes | |
contained_type * | p_ {} |
Used internally by the C++ API. C++ wrapper types inherit from this. This is a zero cost abstraction to wrap the C API objects and delete them on destruction.
All of the C++ classes a) serve as containers for pointers to objects that are created by the underlying C API. Their size is just a pointer size, no need to dynamically allocate them. Use them by value. b) Each of struct XXXX, XXX instances function as smart pointers to the underlying C API objects. they would release objects owned automatically when going out of scope, they are move-only. c) ConstXXXX and UnownedXXX structs function as non-owning, copyable containers for the above pointers. ConstXXXX allow calling const interfaces only. They give access to objects that are owned by somebody else such as Onnxruntime or instances of XXXX classes. d) serve convenient interfaces that return C++ objects and further enhance exception and type safety so they can be used in C++ code.
This is a non-const pointer holder that is move-only. Disposes of the pointer on destruction.
Definition at line 256 of file onnxruntime_cxx_api.h.
using Ort::detail::Base< T >::contained_type = T |
Definition at line 257 of file onnxruntime_cxx_api.h.
|
default |
|
inlineexplicitnoexcept |
Definition at line 260 of file onnxruntime_cxx_api.h.
|
inline |
Definition at line 261 of file onnxruntime_cxx_api.h.
|
delete |
|
inlinenoexcept |
Definition at line 266 of file onnxruntime_cxx_api.h.
|
inlinenoexcept |
Definition at line 273 of file onnxruntime_cxx_api.h.
|
delete |
|
inlinenoexcept |
Definition at line 267 of file onnxruntime_cxx_api.h.
|
inline |
Relinquishes ownership of the contained C object pointer The underlying object is not destroyed.
Definition at line 277 of file onnxruntime_cxx_api.h.
|
protected |
Definition at line 284 of file onnxruntime_cxx_api.h.