xrpld
Loading...
Searching...
No Matches
MPT.h
1#pragma once
2
3#include <xrpl/protocol/MPTIssue.h>
4
5namespace xrpl {
6
7class PathFindMPT final
8{
9private:
11 // If true then holder's balance is 0, always false for issuer
12 bool const zeroBalance_;
13 // OutstandingAmount is equal to MaximumAmount
14 bool const maxedOut_;
15
16public:
17 PathFindMPT(MPTID const& mptID) : mptID_(mptID), zeroBalance_(false), maxedOut_(false)
18 {
19 }
20 PathFindMPT(MPTID const& mptID, bool zeroBalance, bool maxedOut)
21 : mptID_(mptID), zeroBalance_(zeroBalance), maxedOut_(maxedOut)
22 {
23 }
24 operator MPTID const&() const
25 {
26 return mptID_;
27 }
28 [[nodiscard]] MPTID const&
29 getMptID() const
30 {
31 return mptID_;
32 }
33 [[nodiscard]] bool
35 {
36 return zeroBalance_;
37 }
38 [[nodiscard]] bool
39 isMaxedOut() const
40 {
41 return maxedOut_;
42 }
43};
44
45} // namespace xrpl
bool const maxedOut_
Definition MPT.h:14
PathFindMPT(MPTID const &mptID)
Definition MPT.h:17
bool isZeroBalance() const
Definition MPT.h:34
bool isMaxedOut() const
Definition MPT.h:39
MPTID const mptID_
Definition MPT.h:10
MPTID const & getMptID() const
Definition MPT.h:29
PathFindMPT(MPTID const &mptID, bool zeroBalance, bool maxedOut)
Definition MPT.h:20
bool const zeroBalance_
Definition MPT.h:12
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
Definition UintTypes.h:44