rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
ripple::test::jtx::JTxField< SField, StoredValue, OutputValue > Struct Template Referenceabstract

Generic helper class for helper clases that set a field on a JTx. More...

#include <TestHelpers.h>

Collaboration diagram for ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >:
Collaboration graph
[legend]

Public Types

using SF = SField
 
using SV = StoredValue
 
using OV = OutputValue
 

Public Member Functions

 JTxField (SF const &sfield, SV const &value)
 
virtual ~JTxField ()=default
 
virtual OV value () const =0
 
virtual void operator() (Env &, JTx &jt) const
 

Protected Attributes

SF const & sfield_
 
SV value_
 

Detailed Description

template<class SField, class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
struct ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >

Generic helper class for helper clases that set a field on a JTx.

Not every helper will be able to use this because of conversions and other issues, but for classes where it's straightforward, this can simplify things.

Definition at line 41 of file TestHelpers.h.

Member Typedef Documentation

◆ SF

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
using ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::SF = SField

Definition at line 43 of file TestHelpers.h.

◆ SV

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
using ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::SV = StoredValue

Definition at line 44 of file TestHelpers.h.

◆ OV

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
using ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::OV = OutputValue

Definition at line 45 of file TestHelpers.h.

Constructor & Destructor Documentation

◆ JTxField()

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::JTxField ( SF const &  sfield,
SV const &  value 
)
explicit

Definition at line 52 of file TestHelpers.h.

◆ ~JTxField()

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
virtual ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::~JTxField ( )
virtualdefault

Member Function Documentation

◆ value()

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
virtual OV ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::value ( ) const
pure virtual

◆ operator()()

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
virtual void ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::operator() ( Env ,
JTx jt 
) const
virtual

Definition at line 63 of file TestHelpers.h.

Member Data Documentation

◆ sfield_

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
SF const& ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::sfield_
protected

Definition at line 48 of file TestHelpers.h.

◆ value_

template<class SField , class StoredValue = typename SField::type::value_type, class OutputValue = StoredValue>
SV ripple::test::jtx::JTxField< SField, StoredValue, OutputValue >::value_
protected

Definition at line 49 of file TestHelpers.h.