xrpld
Loading...
Searching...
No Matches
prop.h
1#pragma once
2
3#include <test/jtx/Env.h>
4
5#include <memory>
6
7namespace xrpl::test::jtx {
8
10template <class T>
11struct Prop
12{
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
A transaction testing environment.
Definition Env.h:143
STL namespace.
Execution context for applying a JSON transaction.
Definition JTx.h:23
void set(std::unique_ptr< BasicProp > p)
Set a property If the property already exists, it is replaced.
Definition JTx.h:99
void operator()(Env &env, JTx &jt) const
Definition prop.h:21
Prop(Args &&... args)
Definition prop.h:16
std::unique_ptr< BasicProp > p
Definition prop.h:13