xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
test
jtx
prop.h
1
#pragma once
2
3
#include <test/jtx/Env.h>
4
#include <test/jtx/JTx.h>
5
#include <test/jtx/basic_prop.h>
6
7
#include <
memory
>
8
9
namespace
xrpl::test::jtx
{
10
14
template
<
class
T>
15
struct
Prop
16
{
17
std::unique_ptr<BasicProp>
p
;
18
19
template
<
class
... Args>
20
Prop
(Args&&... args) :
p
(
std
::make_unique<
PropType
<T>>(
std
::forward<Args>(args)...))
21
{
22
}
23
24
void
25
operator()
(
Env
& env,
JTx
& jt)
const
26
{
27
jt.
set
(
p
->clone());
28
}
29
};
30
31
}
// namespace xrpl::test::jtx
xrpl::test::jtx::Env
A transaction testing environment.
Definition
Env.h:161
memory
std
STL namespace.
xrpl::test::jtx
Definition
Oracle_test.cpp:34
xrpl::test::jtx::JTx
Execution context for applying a JSON transaction.
Definition
JTx.h:27
xrpl::test::jtx::JTx::set
void set(std::unique_ptr< BasicProp > p)
Set a property If the property already exists, it is replaced.
Definition
JTx.h:105
xrpl::test::jtx::PropType
Definition
basic_prop.h:18
xrpl::test::jtx::Prop::operator()
void operator()(Env &env, JTx &jt) const
Definition
prop.h:25
xrpl::test::jtx::Prop::Prop
Prop(Args &&... args)
Definition
prop.h:20
xrpl::test::jtx::Prop::p
std::unique_ptr< BasicProp > p
Definition
prop.h:17
std::unique_ptr
Generated by
1.17.0