xrpld
Loading...
Searching...
No Matches
test
jtx
prop.h
1
#pragma once
2
3
#include <test/jtx/Env.h>
4
5
#include <
memory
>
6
7
namespace
xrpl::test::jtx
{
8
10
template
<
class
T>
11
struct
Prop
12
{
13
std::unique_ptr<BasicProp>
p
;
14
15
template
<
class
... Args>
16
Prop
(Args&&... args) :
p
(
std
::make_unique<
PropType
<T>>(
std
::forward<Args>(args)...))
17
{
18
}
19
20
void
21
operator()
(
Env
& env,
JTx
& jt)
const
22
{
23
jt.
set
(
p
->clone());
24
}
25
};
26
27
}
// namespace xrpl::test::jtx
xrpl::test::jtx::Env
A transaction testing environment.
Definition
Env.h:143
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:23
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:99
xrpl::test::jtx::PropType
Definition
basic_prop.h:18
xrpl::test::jtx::Prop::operator()
void operator()(Env &env, JTx &jt) const
Definition
prop.h:21
xrpl::test::jtx::Prop::Prop
Prop(Args &&... args)
Definition
prop.h:16
xrpl::test::jtx::Prop::p
std::unique_ptr< BasicProp > p
Definition
prop.h:13
std::unique_ptr
Generated by
1.16.1