|
sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
|
Base class for move-only RAII wrappers around C handles. More...
#include <cxx-api.h>
Public Member Functions | |
| MoveOnly ()=default | |
| Construct an empty wrapper. | |
| MoveOnly (const T *p) | |
| Construct a wrapper from a raw C handle. | |
| ~MoveOnly () | |
| Destroy the wrapped handle if present. | |
| MoveOnly (const MoveOnly &)=delete | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| MoveOnly (MoveOnly &&other) | |
| MoveOnly & | operator= (MoveOnly &&other) |
| const T * | Get () const |
| Return the wrapped raw pointer without transferring ownership. | |
| const T * | Release () |
| Release ownership of the wrapped raw pointer. | |
Protected Attributes | |
| const T * | p_ = nullptr |
Derived classes implement Destroy(const T *) const and inherit automatic destruction, Get(), and Release().
|
default |
|
inlineexplicit |
|
inline |
|
delete |
|
inline |
|
inline |
|
delete |
|
inline |
|
inline |
|
protected |