Bitcoin Core 29.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
mp::ReadDestEmplace< LocalType, EmplaceFn > Struct Template Reference

#include <proxy-types.h>

Public Member Functions

 ReadDestEmplace (TypeList< LocalType >, EmplaceFn &&emplace_fn)
 
template<typename... Args>
decltype(auto) construct (Args &&... args)
 Simple case. More...
 
template<typename UpdateFn >
decltype(auto) update (UpdateFn &&update_fn)
 More complicated case. More...
 

Public Attributes

EmplaceFn & m_emplace_fn
 

Detailed Description

template<typename LocalType, typename EmplaceFn>
struct mp::ReadDestEmplace< LocalType, EmplaceFn >

Definition at line 68 of file proxy-types.h.

Constructor & Destructor Documentation

◆ ReadDestEmplace()

template<typename LocalType , typename EmplaceFn >
mp::ReadDestEmplace< LocalType, EmplaceFn >::ReadDestEmplace ( TypeList< LocalType >  ,
EmplaceFn &&  emplace_fn 
)
inline

Definition at line 70 of file proxy-types.h.

Member Function Documentation

◆ construct()

template<typename LocalType , typename EmplaceFn >
template<typename... Args>
decltype(auto) mp::ReadDestEmplace< LocalType, EmplaceFn >::construct ( Args &&...  args)
inline

Simple case.

If ReadField impementation calls this construct() method with constructor arguments, just pass them on to the emplace function.

Definition at line 75 of file proxy-types.h.

Here is the caller graph for this function:

◆ update()

template<typename LocalType , typename EmplaceFn >
template<typename UpdateFn >
decltype(auto) mp::ReadDestEmplace< LocalType, EmplaceFn >::update ( UpdateFn &&  update_fn)
inline

More complicated case.

If ReadField implementation works by calling this update() method, adapt it call construct() instead. This requires LocalType to have a default constructor to create new object that can be passed to update()

Definition at line 85 of file proxy-types.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_emplace_fn

template<typename LocalType , typename EmplaceFn >
EmplaceFn& mp::ReadDestEmplace< LocalType, EmplaceFn >::m_emplace_fn

Definition at line 101 of file proxy-types.h.


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