OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::Function< R(A...), N, INTERN_ONLY > Class Template Reference

#include <function.hpp>

Classes

class  Extern
 
class  Intern
 
struct  Methods
 

Public Member Functions

 Function () noexcept
 
template<typename T >
 Function (T &&functor) noexcept
 
 Function (Function &&other) noexcept
 
Functionoperator= (Function &&other) noexcept
 
 ~Function ()
 
template<typename T >
void reset (T &&functor) noexcept
 
void reset () noexcept
 
operator() (A... args) const
 
 operator bool () const noexcept
 

Private Member Functions

template<typename T , typename std::enable_if< is_intern< T >(), int >::type = 0>
void construct (T &&functor) noexcept
 
template<typename T , typename std::enable_if<!is_intern< T >(), int >::type = 0>
void construct (T &&functor) noexcept
 
template<typename T >
void setup_methods_intern ()
 
template<typename T >
void setup_methods_extern ()
 

Static Private Member Functions

template<typename T >
static constexpr bool is_intern ()
 

Private Attributes

const Methods * methods
 
void * data [N]
 

Detailed Description

template<typename R, typename... A, std::size_t N, bool INTERN_ONLY>
class openvpn::Function< R(A...), N, INTERN_ONLY >

Definition at line 30 of file function.hpp.

Constructor & Destructor Documentation

◆ Function() [1/3]

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
openvpn::Function< R(A...), N, INTERN_ONLY >::Function ( )
inlinenoexcept

Definition at line 33 of file function.hpp.

◆ Function() [2/3]

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
template<typename T >
openvpn::Function< R(A...), N, INTERN_ONLY >::Function ( T &&  functor)
inlinenoexcept

Definition at line 39 of file function.hpp.

◆ Function() [3/3]

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
openvpn::Function< R(A...), N, INTERN_ONLY >::Function ( Function< R(A...), N, INTERN_ONLY > &&  other)
inlinenoexcept

Definition at line 44 of file function.hpp.

◆ ~Function()

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
openvpn::Function< R(A...), N, INTERN_ONLY >::~Function ( )
inline

Definition at line 63 of file function.hpp.

Member Function Documentation

◆ construct() [1/2]

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
template<typename T , typename std::enable_if< is_intern< T >(), int >::type = 0>
void openvpn::Function< R(A...), N, INTERN_ONLY >::construct ( T &&  functor)
inlineprivatenoexcept

Definition at line 127 of file function.hpp.

◆ construct() [2/2]

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
template<typename T , typename std::enable_if<!is_intern< T >(), int >::type = 0>
void openvpn::Function< R(A...), N, INTERN_ONLY >::construct ( T &&  functor)
inlineprivatenoexcept

Definition at line 136 of file function.hpp.

◆ is_intern()

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
template<typename T >
static constexpr bool openvpn::Function< R(A...), N, INTERN_ONLY >::is_intern ( )
inlinestaticconstexprprivate

Definition at line 120 of file function.hpp.

◆ operator bool()

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
openvpn::Function< R(A...), N, INTERN_ONLY >::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 91 of file function.hpp.

◆ operator()()

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
R openvpn::Function< R(A...), N, INTERN_ONLY >::operator() ( A...  args) const
inline

Definition at line 86 of file function.hpp.

◆ operator=()

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
Function & openvpn::Function< R(A...), N, INTERN_ONLY >::operator= ( Function< R(A...), N, INTERN_ONLY > &&  other)
inlinenoexcept

Definition at line 52 of file function.hpp.

◆ reset() [1/2]

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
void openvpn::Function< R(A...), N, INTERN_ONLY >::reset ( )
inlinenoexcept

Definition at line 77 of file function.hpp.

◆ reset() [2/2]

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
template<typename T >
void openvpn::Function< R(A...), N, INTERN_ONLY >::reset ( T &&  functor)
inlinenoexcept

Definition at line 70 of file function.hpp.

◆ setup_methods_extern()

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
template<typename T >
void openvpn::Function< R(A...), N, INTERN_ONLY >::setup_methods_extern ( )
inlineprivate

Definition at line 166 of file function.hpp.

◆ setup_methods_intern()

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
template<typename T >
void openvpn::Function< R(A...), N, INTERN_ONLY >::setup_methods_intern ( )
inlineprivate

Definition at line 155 of file function.hpp.

Member Data Documentation

◆ data

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
void* openvpn::Function< R(A...), N, INTERN_ONLY >::data[N]
mutableprivate

Definition at line 243 of file function.hpp.

◆ methods

template<typename R , typename... A, std::size_t N, bool INTERN_ONLY>
const Methods* openvpn::Function< R(A...), N, INTERN_ONLY >::methods
private

Definition at line 242 of file function.hpp.


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