NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nstd::function< R(Args...)>::_function< _R(_Args...)> 模板结构体 参考

Public 类型

using result_type = typename result_traits< _R >::type
 
using invoke_fn_t = _R(*)(char *, _Args...)
 
using construct_fn_t = void(*)(char *, char *)
 
using destroy_fn_t = void(*)(char *)
 
using functor_container = nstd::vector< char >
 

Public 成员函数

 _function ()
 
 _function (std::nullptr_t)
 
template<typename Functor >
 _function (const Functor &f)
 
 _function (const _function &rhs)
 
_function & operator= (const _function &rhs)
 
template<typename Functor >
_function & operator= (const Functor &f)
 
_function & operator= (std::nullptr_t)
 
 ~_function ()
 
bool operator== (std::nullptr_t) const
 
bool operator!= (std::nullptr_t) const
 
bool operator== (const _function &other) const
 
bool operator!= (const _function &other) const
 
 operator bool () const
 
_R operator() (_Args... args)
 
_R operator() (_Args... args) const
 

静态 Public 成员函数

template<typename Functor >
static result_type invoke_fn (Functor *fn, _Args... args)
 
template<typename Functor >
static void construct_fn (Functor *construct_dst, Functor *construct_src)
 
template<typename Functor >
static void destroy_fn (Functor *&f)
 

Public 属性

invoke_fn_t invoke_f
 
construct_fn_t construct_f
 
nstd::shared_ptr< functor_containerdata_ptr
 
std::size_t data_size
 

成员类型定义说明

◆ construct_fn_t

template<typename R , typename... Args>
template<typename _R , typename... _Args>
using nstd::function< R(Args...)>::_function< _R(_Args...)>::construct_fn_t = void (*)(char*, char*)

◆ destroy_fn_t

template<typename R , typename... Args>
template<typename _R , typename... _Args>
using nstd::function< R(Args...)>::_function< _R(_Args...)>::destroy_fn_t = void (*)(char*)

◆ functor_container

template<typename R , typename... Args>
template<typename _R , typename... _Args>
using nstd::function< R(Args...)>::_function< _R(_Args...)>::functor_container = nstd::vector<char>

◆ invoke_fn_t

template<typename R , typename... Args>
template<typename _R , typename... _Args>
using nstd::function< R(Args...)>::_function< _R(_Args...)>::invoke_fn_t = _R (*)(char*, _Args...)

◆ result_type

template<typename R , typename... Args>
template<typename _R , typename... _Args>
using nstd::function< R(Args...)>::_function< _R(_Args...)>::result_type = typename result_traits<_R>::type

构造及析构函数说明

◆ _function() [1/4]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
nstd::function< R(Args...)>::_function< _R(_Args...)>::_function ( )
inline

◆ _function() [2/4]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
nstd::function< R(Args...)>::_function< _R(_Args...)>::_function ( std::nullptr_t  )
inline

◆ _function() [3/4]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
template<typename Functor >
nstd::function< R(Args...)>::_function< _R(_Args...)>::_function ( const Functor &  f)
inline

◆ _function() [4/4]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
nstd::function< R(Args...)>::_function< _R(_Args...)>::_function ( const _function< R(Args...)>::_function< _R(_Args...)> &  rhs)
inline

◆ ~_function()

template<typename R , typename... Args>
template<typename _R , typename... _Args>
nstd::function< R(Args...)>::_function< _R(_Args...)>::~_function ( )
inline

成员函数说明

◆ construct_fn()

template<typename R , typename... Args>
template<typename _R , typename... _Args>
template<typename Functor >
static void nstd::function< R(Args...)>::_function< _R(_Args...)>::construct_fn ( Functor *  construct_dst,
Functor *  construct_src 
)
inlinestatic

◆ destroy_fn()

template<typename R , typename... Args>
template<typename _R , typename... _Args>
template<typename Functor >
static void nstd::function< R(Args...)>::_function< _R(_Args...)>::destroy_fn ( Functor *&  f)
inlinestatic

◆ invoke_fn()

template<typename R , typename... Args>
template<typename _R , typename... _Args>
template<typename Functor >
static result_type nstd::function< R(Args...)>::_function< _R(_Args...)>::invoke_fn ( Functor *  fn,
_Args...  args 
)
inlinestatic

◆ operator bool()

template<typename R , typename... Args>
template<typename _R , typename... _Args>
nstd::function< R(Args...)>::_function< _R(_Args...)>::operator bool ( ) const
inline

◆ operator!=() [1/2]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
bool nstd::function< R(Args...)>::_function< _R(_Args...)>::operator!= ( const _function< R(Args...)>::_function< _R(_Args...)> &  other) const
inline

◆ operator!=() [2/2]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
bool nstd::function< R(Args...)>::_function< _R(_Args...)>::operator!= ( std::nullptr_t  ) const
inline

◆ operator()() [1/2]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
_R nstd::function< R(Args...)>::_function< _R(_Args...)>::operator() ( _Args...  args)
inline

◆ operator()() [2/2]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
_R nstd::function< R(Args...)>::_function< _R(_Args...)>::operator() ( _Args...  args) const
inline

◆ operator=() [1/3]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
_function & nstd::function< R(Args...)>::_function< _R(_Args...)>::operator= ( const _function< R(Args...)>::_function< _R(_Args...)> &  rhs)
inline

◆ operator=() [2/3]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
template<typename Functor >
_function & nstd::function< R(Args...)>::_function< _R(_Args...)>::operator= ( const Functor &  f)
inline

◆ operator=() [3/3]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
_function & nstd::function< R(Args...)>::_function< _R(_Args...)>::operator= ( std::nullptr_t  )
inline

◆ operator==() [1/2]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
bool nstd::function< R(Args...)>::_function< _R(_Args...)>::operator== ( const _function< R(Args...)>::_function< _R(_Args...)> &  other) const
inline

◆ operator==() [2/2]

template<typename R , typename... Args>
template<typename _R , typename... _Args>
bool nstd::function< R(Args...)>::_function< _R(_Args...)>::operator== ( std::nullptr_t  ) const
inline

类成员变量说明

◆ construct_f

template<typename R , typename... Args>
template<typename _R , typename... _Args>
construct_fn_t nstd::function< R(Args...)>::_function< _R(_Args...)>::construct_f

◆ data_ptr

template<typename R , typename... Args>
template<typename _R , typename... _Args>
nstd::shared_ptr<functor_container> nstd::function< R(Args...)>::_function< _R(_Args...)>::data_ptr

◆ data_size

template<typename R , typename... Args>
template<typename _R , typename... _Args>
std::size_t nstd::function< R(Args...)>::_function< _R(_Args...)>::data_size

◆ invoke_f

template<typename R , typename... Args>
template<typename _R , typename... _Args>
invoke_fn_t nstd::function< R(Args...)>::_function< _R(_Args...)>::invoke_f

该结构体的文档由以下文件生成: