CCF
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR > Class Template Reference

#include <openssl_wrappers.h>

Public Member Functions

 Unique_SSL_OBJECT ()
 C-tor with new pointer via T's c-tor.
 
 Unique_SSL_OBJECT (T *ptr, void(*dtor)(T *), bool check_null=true)
 C-tor with pointer created in base class.
 
 operator T* ()
 Type cast to underlying pointer.
 
 operator T* () const
 Type cast to underlying pointer.
 
void reset (T *other)
 Reset pointer, free old if any.
 
T * release ()
 Release pointer, so it's freed elsewhere (CAUTION!)
 

Protected Attributes

std::unique_ptr< T, void(*)(T *)> p
 Pointer owning storage.
 

Detailed Description

template<class T, T *(*)() CTOR, void(*)(T *) DTOR>
class ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >

Generic template interface for different types of objects below If there are no c-tors in the derived class that matches this one, pass nullptr to the CTOR/DTOR parameters and make sure to implement and delete the appropriate c-tors in the derived class.

Constructor & Destructor Documentation

◆ Unique_SSL_OBJECT() [1/2]

template<class T , T *(*)() CTOR, void(*)(T *) DTOR>
ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >::Unique_SSL_OBJECT ( )
inline

C-tor with new pointer via T's c-tor.

◆ Unique_SSL_OBJECT() [2/2]

template<class T , T *(*)() CTOR, void(*)(T *) DTOR>
ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >::Unique_SSL_OBJECT ( T *  ptr,
void(*)(T *)  dtor,
bool  check_null = true 
)
inline

C-tor with pointer created in base class.

Member Function Documentation

◆ operator T*() [1/2]

template<class T , T *(*)() CTOR, void(*)(T *) DTOR>
ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >::operator T* ( )
inline

Type cast to underlying pointer.

◆ operator T*() [2/2]

template<class T , T *(*)() CTOR, void(*)(T *) DTOR>
ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >::operator T* ( ) const
inline

Type cast to underlying pointer.

◆ release()

template<class T , T *(*)() CTOR, void(*)(T *) DTOR>
T * ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >::release ( )
inline

Release pointer, so it's freed elsewhere (CAUTION!)

◆ reset()

template<class T , T *(*)() CTOR, void(*)(T *) DTOR>
void ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >::reset ( T *  other)
inline

Reset pointer, free old if any.

Member Data Documentation

◆ p

template<class T , T *(*)() CTOR, void(*)(T *) DTOR>
std::unique_ptr<T, void (*)(T*)> ccf::crypto::OpenSSL::Unique_SSL_OBJECT< T, CTOR, DTOR >::p
protected

Pointer owning storage.


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