|
Botan 3.14.1
Crypto and TLS for C&
|
#include <ffi_util.h>
Public Types | |
| using | element_type = T |
| using | smart_pointer_type = PtrType<T> |
Public Member Functions | |
| bool | appears_to_be_valid_ffi_handle () const |
| botan_ffi_obj (botan_ffi_obj &&other)=delete | |
| botan_ffi_obj (const botan_ffi_obj &other)=delete | |
| botan_ffi_obj (smart_pointer_type obj) | |
| bool | is_shared () const final |
| bool | magic_ok () const |
| botan_ffi_obj & | operator= (botan_ffi_obj &&other)=delete |
| botan_ffi_obj & | operator= (const botan_ffi_obj &other)=delete |
| T * | unsafe_get () const |
| Retrieve the raw pointer to the underlying object. May be nullptr. | |
| smart_pointer_type & | unsafe_get_sp () |
| Retrieve the smart pointer to the underlying object. May be invalid. | |
| const smart_pointer_type & | unsafe_get_sp () const |
| Retrieve the smart pointer to the underlying object. May be invalid. | |
| size_t | use_count () const final |
| virtual | ~botan_ffi_obj () |
Protected Member Functions | |
| void | invalidate_magic () |
| uint32_t | magic () const |
Base class for all FFI object handles wrapped around some specific type in the library. The inner type is managed by a configurable smart pointer type (e.g. std::unique_ptr or std::shared_ptr).
Definition at line 116 of file ffi_util.h.
| using Botan_FFI::botan_ffi_obj< T, MAGIC, PtrType >::element_type = T |
Definition at line 118 of file ffi_util.h.
| using Botan_FFI::botan_ffi_obj< T, MAGIC, PtrType >::smart_pointer_type = PtrType<T> |
Definition at line 119 of file ffi_util.h.
|
inlineexplicit |
Definition at line 122 of file ffi_util.h.
References Botan_FFI::botan_ffi_obj_base::botan_ffi_obj_base().
Referenced by botan_ffi_obj(), botan_ffi_obj(), operator=(), and operator=().
|
inlinevirtual |
Definition at line 124 of file ffi_util.h.
References Botan_FFI::botan_ffi_obj_base::invalidate_magic().
|
delete |
References botan_ffi_obj().
|
delete |
References botan_ffi_obj().
|
inlineinherited |
Heuristic, type-agnostic check whether some casted void* pointer plausibly points to a live FFI object handle. This deliberately does not use virtual dispatch, so that the check works without relying on a potentially bogus vtable.
Definition at line 97 of file ffi_util.h.
|
inlineprotectedinherited |
Definition at line 100 of file ffi_util.h.
Referenced by Botan_FFI::botan_ffi_obj< T, MAGIC, PtrType >::~botan_ffi_obj().
|
inlinefinalvirtual |
Implements Botan_FFI::botan_ffi_obj_base.
Definition at line 136 of file ffi_util.h.
|
inlineprotectedinherited |
Definition at line 102 of file ffi_util.h.
Referenced by botan_ffi_obj_base(), and Botan_FFI::botan_ffi_obj< T, MAGIC, PtrType >::magic_ok().
|
inline |
|
delete |
References botan_ffi_obj().
|
delete |
References botan_ffi_obj().
|
inline |
Retrieve the raw pointer to the underlying object. May be nullptr.
Definition at line 147 of file ffi_util.h.
|
inline |
Retrieve the smart pointer to the underlying object. May be invalid.
Definition at line 150 of file ffi_util.h.
|
inline |
Retrieve the smart pointer to the underlying object. May be invalid.
Definition at line 153 of file ffi_util.h.
|
inlinefinalvirtual |
Implements Botan_FFI::botan_ffi_obj_base.
Definition at line 138 of file ffi_util.h.