Botan 3.9.0
Crypto and TLS for C&
Botan_FFI::botan_struct< T, MAGIC > Struct Template Reference

#include <ffi_util.h>

Public Member Functions

 botan_struct (botan_struct &&other)=delete
 botan_struct (const botan_struct &other)=delete
 botan_struct (std::unique_ptr< T > obj)
bool magic_ok () const
botan_structoperator= (botan_struct &&other)=delete
botan_structoperator= (const botan_struct &other)=delete
T * unsafe_get () const
virtual ~botan_struct ()

Detailed Description

template<typename T, uint32_t MAGIC>
struct Botan_FFI::botan_struct< T, MAGIC >

Definition at line 36 of file ffi_util.h.

Constructor & Destructor Documentation

◆ botan_struct() [1/3]

template<typename T, uint32_t MAGIC>
Botan_FFI::botan_struct< T, MAGIC >::botan_struct ( std::unique_ptr< T > obj)
inlineexplicit

Definition at line 38 of file ffi_util.h.

38: m_magic(MAGIC), m_obj(std::move(obj)) {}

Referenced by botan_struct(), botan_struct(), operator=(), and operator=().

◆ ~botan_struct()

template<typename T, uint32_t MAGIC>
virtual Botan_FFI::botan_struct< T, MAGIC >::~botan_struct ( )
inlinevirtual

Definition at line 40 of file ffi_util.h.

40 {
41 m_magic = 0;
42 m_obj.reset();
43 }

◆ botan_struct() [2/3]

template<typename T, uint32_t MAGIC>
Botan_FFI::botan_struct< T, MAGIC >::botan_struct ( const botan_struct< T, MAGIC > & other)
delete

References botan_struct().

◆ botan_struct() [3/3]

template<typename T, uint32_t MAGIC>
Botan_FFI::botan_struct< T, MAGIC >::botan_struct ( botan_struct< T, MAGIC > && other)
delete

References botan_struct().

Member Function Documentation

◆ magic_ok()

template<typename T, uint32_t MAGIC>
bool Botan_FFI::botan_struct< T, MAGIC >::magic_ok ( ) const
inline

Definition at line 50 of file ffi_util.h.

50{ return (m_magic == MAGIC); }

Referenced by Botan_FFI::botan_ffi_visit(), Botan_FFI::ffi_delete_object(), and Botan_FFI::safe_get().

◆ operator=() [1/2]

template<typename T, uint32_t MAGIC>
botan_struct & Botan_FFI::botan_struct< T, MAGIC >::operator= ( botan_struct< T, MAGIC > && other)
delete

References botan_struct().

◆ operator=() [2/2]

template<typename T, uint32_t MAGIC>
botan_struct & Botan_FFI::botan_struct< T, MAGIC >::operator= ( const botan_struct< T, MAGIC > & other)
delete

References botan_struct().

◆ unsafe_get()

template<typename T, uint32_t MAGIC>
T * Botan_FFI::botan_struct< T, MAGIC >::unsafe_get ( ) const
inline

Definition at line 52 of file ffi_util.h.

52{ return m_obj.get(); }

Referenced by Botan_FFI::botan_ffi_visit(), and Botan_FFI::safe_get().


The documentation for this struct was generated from the following file: