rippled
Loading...
Searching...
No Matches
memo.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_TEST_JTX_MEMO_H_INCLUDED
21#define RIPPLE_TEST_JTX_MEMO_H_INCLUDED
22
23#include <test/jtx/Env.h>
24
25namespace ripple {
26namespace test {
27namespace jtx {
28
34class memo
35{
36private:
40
41public:
43 std::string const& data,
44 std::string const& format,
45 std::string const& type)
46 : data_(data), format_(format), type_(type)
47 {
48 }
49
50 void
51 operator()(Env&, JTx& jt) const;
52};
53
55{
56private:
58
59public:
60 memodata(std::string const& s) : s_(s)
61 {
62 }
63
64 void
65 operator()(Env&, JTx& jt) const;
66};
67
69{
70private:
72
73public:
74 memoformat(std::string const& s) : s_(s)
75 {
76 }
77
78 void
79 operator()(Env&, JTx& jt) const;
80};
81
83{
84private:
86
87public:
88 memotype(std::string const& s) : s_(s)
89 {
90 }
91
92 void
93 operator()(Env&, JTx& jt) const;
94};
95
97{
98private:
101
102public:
103 memondata(std::string const& format, std::string const& type)
104 : format_(format), type_(type)
105 {
106 }
107
108 void
109 operator()(Env&, JTx& jt) const;
110};
111
113{
114private:
117
118public:
120 : data_(data), type_(type)
121 {
122 }
123
124 void
125 operator()(Env&, JTx& jt) const;
126};
127
129{
130private:
133
134public:
135 memontype(std::string const& data, std::string const& format)
136 : data_(data), format_(format)
137 {
138 }
139
140 void
141 operator()(Env&, JTx& jt) const;
142};
143
144} // namespace jtx
145} // namespace test
146} // namespace ripple
147
148#endif
A transaction testing environment.
Definition Env.h:121
Add a memo to a JTx.
Definition memo.h:35
memo(std::string const &data, std::string const &format, std::string const &type)
Definition memo.h:42
void operator()(Env &, JTx &jt) const
Definition memo.cpp:27
std::string data_
Definition memo.h:37
std::string format_
Definition memo.h:38
std::string type_
Definition memo.h:39
void operator()(Env &, JTx &jt) const
Definition memo.cpp:39
memodata(std::string const &s)
Definition memo.h:60
memoformat(std::string const &s)
Definition memo.h:74
void operator()(Env &, JTx &jt) const
Definition memo.cpp:49
memondata(std::string const &format, std::string const &type)
Definition memo.h:103
void operator()(Env &, JTx &jt) const
Definition memo.cpp:69
void operator()(Env &, JTx &jt) const
Definition memo.cpp:80
memonformat(std::string const &data, std::string const &type)
Definition memo.h:119
void operator()(Env &, JTx &jt) const
Definition memo.cpp:91
memontype(std::string const &data, std::string const &format)
Definition memo.h:135
memotype(std::string const &s)
Definition memo.h:88
void operator()(Env &, JTx &jt) const
Definition memo.cpp:59
auto const data
General field definitions, or fields used in multiple transaction namespaces.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
Execution context for applying a JSON transaction.
Definition JTx.h:45