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

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

#include <TestHelpers.h>

Collaboration diagram for xrpl::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 xrpl::test::jtx::JTxField< SField, StoredValue, OutputValue >

Generic helper class for helper classes 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 xrpl::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 xrpl::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 xrpl::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>
xrpl::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 xrpl::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 xrpl::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 xrpl::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& xrpl::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 xrpl::test::jtx::JTxField< SField, StoredValue, OutputValue >::value_
protected

Definition at line 49 of file TestHelpers.h.