Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
ParamsStream< SubStream, Params > Class Template Reference

Wrapper that overrides the GetParams() function of a stream. More...

#include <serialize.h>

Public Member Functions

 ParamsStream (SubStream &&substream, const Params &params LIFETIMEBOUND)
 
template<typename NestedSubstream , typename Params1 , typename Params2 , typename... NestedParams>
 ParamsStream (NestedSubstream &&s, const Params1 &params1 LIFETIMEBOUND, const Params2 &params2 LIFETIMEBOUND, const NestedParams &... params LIFETIMEBOUND)
 
template<typename U >
ParamsStreamoperator<< (const U &obj)
 
template<typename U >
ParamsStreamoperator>> (U &&obj)
 
void write (Span< const std::byte > src)
 
void read (Span< std::byte > dst)
 
void ignore (size_t num)
 
bool eof () const
 
size_t size () const
 
template<typename P >
const auto & GetParams () const
 Get reference to stream parameters. More...
 
auto & GetStream ()
 Get reference to underlying stream. More...
 
const auto & GetStream () const
 

Private Attributes

const Paramsm_params
 
SubStream m_substream
 

Detailed Description

template<typename SubStream, typename Params>
class ParamsStream< SubStream, Params >

Wrapper that overrides the GetParams() function of a stream.

Definition at line 1112 of file serialize.h.

Constructor & Destructor Documentation

◆ ParamsStream() [1/2]

template<typename SubStream , typename Params >
ParamsStream< SubStream, Params >::ParamsStream ( SubStream &&  substream,
const Params &params  LIFETIMEBOUND 
)
inline

Definition at line 1125 of file serialize.h.

◆ ParamsStream() [2/2]

template<typename SubStream , typename Params >
template<typename NestedSubstream , typename Params1 , typename Params2 , typename... NestedParams>
ParamsStream< SubStream, Params >::ParamsStream ( NestedSubstream &&  s,
const Params1 &params1  LIFETIMEBOUND,
const Params2 &params2  LIFETIMEBOUND,
const NestedParams &... params  LIFETIMEBOUND 
)
inline

Definition at line 1128 of file serialize.h.

Member Function Documentation

◆ eof()

template<typename SubStream , typename Params >
bool ParamsStream< SubStream, Params >::eof ( ) const
inline

Definition at line 1136 of file serialize.h.

Here is the call graph for this function:

◆ GetParams()

template<typename SubStream , typename Params >
template<typename P >
const auto & ParamsStream< SubStream, Params >::GetParams ( ) const
inline

Get reference to stream parameters.

Definition at line 1141 of file serialize.h.

◆ GetStream() [1/2]

template<typename SubStream , typename Params >
auto & ParamsStream< SubStream, Params >::GetStream ( )
inline

Get reference to underlying stream.

Definition at line 1151 of file serialize.h.

Here is the caller graph for this function:

◆ GetStream() [2/2]

template<typename SubStream , typename Params >
const auto & ParamsStream< SubStream, Params >::GetStream ( ) const
inline

Definition at line 1159 of file serialize.h.

◆ ignore()

template<typename SubStream , typename Params >
void ParamsStream< SubStream, Params >::ignore ( size_t  num)
inline

Definition at line 1135 of file serialize.h.

Here is the call graph for this function:

◆ operator<<()

template<typename SubStream , typename Params >
template<typename U >
ParamsStream & ParamsStream< SubStream, Params >::operator<< ( const U &  obj)
inline

Definition at line 1131 of file serialize.h.

Here is the call graph for this function:

◆ operator>>()

template<typename SubStream , typename Params >
template<typename U >
ParamsStream & ParamsStream< SubStream, Params >::operator>> ( U &&  obj)
inline

Definition at line 1132 of file serialize.h.

Here is the call graph for this function:

◆ read()

template<typename SubStream , typename Params >
void ParamsStream< SubStream, Params >::read ( Span< std::byte >  dst)
inline

Definition at line 1134 of file serialize.h.

Here is the call graph for this function:

◆ size()

template<typename SubStream , typename Params >
size_t ParamsStream< SubStream, Params >::size ( ) const
inline

Definition at line 1137 of file serialize.h.

Here is the call graph for this function:

◆ write()

template<typename SubStream , typename Params >
void ParamsStream< SubStream, Params >::write ( Span< const std::byte >  src)
inline

Definition at line 1133 of file serialize.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_params

template<typename SubStream , typename Params >
const Params& ParamsStream< SubStream, Params >::m_params
private

Definition at line 1114 of file serialize.h.

◆ m_substream

template<typename SubStream , typename Params >
SubStream ParamsStream< SubStream, Params >::m_substream
private

Definition at line 1122 of file serialize.h.


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