Bitcoin Core 29.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
mp::ReadDestUpdate< Value > Struct Template Reference

Destination parameter type that can be passed to ReadField function as an alternative to ReadDestEmplace. More...

#include <proxy-types.h>

Public Member Functions

 ReadDestUpdate (Value &value)
 
template<typename UpdateFn >
Value & update (UpdateFn &&update_fn)
 Simple case. If ReadField works by calling update() just forward arguments to update_fn. More...
 
template<typename... Args>
Value & construct (Args &&... args)
 More complicated case. More...
 

Public Attributes

Value & m_value
 

Detailed Description

template<typename Value>
struct mp::ReadDestUpdate< Value >

Destination parameter type that can be passed to ReadField function as an alternative to ReadDestEmplace.

Instead of requiring an emplace callback to construct a new value, it just takes a reference to an existing value and assigns a new value to it.

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

Constructor & Destructor Documentation

◆ ReadDestUpdate()

template<typename Value >
mp::ReadDestUpdate< Value >::ReadDestUpdate ( Value &  value)
inline

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

Member Function Documentation

◆ construct()

template<typename Value >
template<typename... Args>
Value & mp::ReadDestUpdate< Value >::construct ( Args &&...  args)
inline

More complicated case.

If ReadField works by calling construct(), need to reconstruct m_value in place.

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

◆ update()

template<typename Value >
template<typename UpdateFn >
Value & mp::ReadDestUpdate< Value >::update ( UpdateFn &&  update_fn)
inline

Simple case. If ReadField works by calling update() just forward arguments to update_fn.

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

Member Data Documentation

◆ m_value

template<typename Value >
Value& mp::ReadDestUpdate< Value >::m_value

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


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