rippled
Loading...
Searching...
No Matches
prop.h
1#pragma once
2
3#include <test/jtx/Env.h>
4
5#include <memory>
6
7namespace xrpl {
8namespace test {
9namespace jtx {
10
12template <class Prop>
13struct prop
14{
16
17 template <class... Args>
18 prop(Args&&... args) : p_(std::make_unique<prop_type<Prop>>(std::forward<Args>(args)...))
19 {
20 }
21
22 void
23 operator()(Env& env, JTx& jt) const
24 {
25 jt.set(p_->clone());
26 }
27};
28
29} // namespace jtx
30} // namespace test
31} // namespace xrpl
A transaction testing environment.
Definition Env.h:119
STL namespace.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
Execution context for applying a JSON transaction.
Definition JTx.h:25
void set(std::unique_ptr< basic_prop > p)
Set a property If the property already exists, it is replaced.
Definition JTx.h:104
Set a property on a JTx.
Definition prop.h:14
prop(Args &&... args)
Definition prop.h:18
std::unique_ptr< basic_prop > p_
Definition prop.h:15
void operator()(Env &env, JTx &jt) const
Definition prop.h:23