Botan 2.19.5 Crypto and TLS for C&

Public Member Functions | List of all members
Botan_FFI::botan_struct< T, MAGIC > Struct Template Reference

`#include <ffi_util.h>`

## Public Member Functions
| botan_struct (T *obj)
bool | magic_ok () const
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()

template<typename T , uint32_t MAGIC>

Botan_FFI::botan_struct< T, MAGIC >::botan_struct | ( | T * | obj | ) |
| inline

Definition at line 39 of file ffi_util.h.

39: m_magic(MAGIC), m_obj(obj) {}

## ◆ ~botan_struct()

template<typename T , uint32_t MAGIC>

virtual Botan_FFI::botan_struct< T, MAGIC >::~botan_struct | ( |  | ) |
| inline virtual

Definition at line 40 of file ffi_util.h.

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

## 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 42 of file ffi_util.h.

42{ return (m_magic == MAGIC); }

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

## ◆ unsafe_get()

template<typename T , uint32_t MAGIC>

T * Botan_FFI::botan_struct< T, MAGIC >::unsafe_get | ( |  | ) | const
| inline

Definition at line 44 of file ffi_util.h.

45 {
46 return m_obj.get();
47 }

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

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

- src/lib/ffi/ffi_util.h