|
RADPx-OS Kernel (Radical Posix OS)
Crimson 0.1.4
POSIX-inspired kernel API with embedded and desktop VM targets
|
Move-only RAII owner for nullable RADPx-OS handles. More...
#include <rad_cpp.h>
Public Member Functions | |
| constexpr | UniqueHandle ()=default |
| Create an empty owner. | |
| constexpr | UniqueHandle (Handle handle) |
| Take ownership of handle. | |
| ~UniqueHandle () | |
| Close the owned handle if present. | |
| UniqueHandle (const UniqueHandle &)=delete | |
| UniqueHandle & | operator= (const UniqueHandle &)=delete |
| UniqueHandle (UniqueHandle &&other) noexcept | |
| Move ownership from another handle owner. | |
| UniqueHandle & | operator= (UniqueHandle &&other) noexcept |
| Replace this owner with another owner's handle. | |
| constexpr Handle | get () const |
| Return the raw handle without releasing ownership. | |
| constexpr | operator bool () const |
| Return true when a handle is owned. | |
| Handle | release () |
| Release ownership and return the raw handle. | |
| void | reset (Handle handle=nullptr) |
| Close any current handle and optionally take a replacement. | |
Move-only RAII owner for nullable RADPx-OS handles.