Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
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)
template<typename UpdateFn>
decltype(auto) update (UpdateFn &&update_fn)

Public Attributes

EmplaceFn m_emplace_fn

Detailed Description

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

Definition at line 94 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 96 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 implementation calls this construct() method with constructor arguments, just pass them on to the emplace function.

Definition at line 101 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 111 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 127 of file proxy-types.h.


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