xrpld
Loading...
Searching...
No Matches
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 >:

Public Types

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

Public Member Functions

 JTxField (SF const &sfield, SV 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 67 of file jtx/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 69 of file jtx/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 70 of file jtx/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 71 of file jtx/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 value )
explicit

Definition at line 78 of file jtx/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
nodiscardpure 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 88 of file jtx/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 74 of file jtx/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 75 of file jtx/TestHelpers.h.