rippled
Loading...
Searching...
No Matches
quality.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2016 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_QUALITY_H_INCLUDED
21#define RIPPLE_TEST_JTX_QUALITY_H_INCLUDED
22
23#include <test/jtx/Env.h>
24
25namespace ripple {
26namespace test {
27namespace jtx {
28
31{
32private:
34
35public:
36 explicit qualityIn(std::uint32_t qIn) : qIn_(qIn)
37 {
38 }
39
40 void
41 operator()(Env&, JTx& jtx) const;
42};
43
46{
47private:
49
50public:
51 explicit qualityInPercent(double percent);
52
53 void
54 operator()(Env&, JTx& jtx) const;
55};
56
59{
60private:
62
63public:
64 explicit qualityOut(std::uint32_t qOut) : qOut_(qOut)
65 {
66 }
67
68 void
69 operator()(Env&, JTx& jtx) const;
70};
71
74{
75private:
77
78public:
79 explicit qualityOutPercent(double percent);
80
81 void
82 operator()(Env&, JTx& jtx) const;
83};
84
85} // namespace jtx
86} // namespace test
87} // namespace ripple
88
89#endif
A transaction testing environment.
Definition: Env.h:121
Sets the QualityIn on a trust JTx.
Definition: quality.h:46
void operator()(Env &, JTx &jtx) const
Definition: quality2.cpp:54
Sets the literal QualityIn on a trust JTx.
Definition: quality.h:31
void operator()(Env &, JTx &jtx) const
Definition: quality2.cpp:48
qualityIn(std::uint32_t qIn)
Definition: quality.h:36
Sets the QualityOut on a trust JTx as a percentage.
Definition: quality.h:74
void operator()(Env &, JTx &jtx) const
Definition: quality2.cpp:66
Sets the literal QualityOut on a trust JTx.
Definition: quality.h:59
qualityOut(std::uint32_t qOut)
Definition: quality.h:64
void operator()(Env &, JTx &jtx) const
Definition: quality2.cpp:60
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26
Execution context for applying a JSON transaction.
Definition: JTx.h:45