xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
entries
LoanEntry.h
1
#pragma once
2
3
#include <xrpl/basics/base_uint.h>
4
#include <xrpl/beast/utility/Journal.h>
5
#include <xrpl/ledger/ApplyView.h>
6
#include <xrpl/ledger/ReadView.h>
7
#include <xrpl/ledger/entries/SLEBase.h>
8
#include <xrpl/protocol/Indexes.h>
9
#include <xrpl/protocol/LedgerFormats.h>
10
#include <xrpl/protocol/SeqProxy.h>
11
12
namespace
xrpl
{
13
14
template
<
typename
ViewT>
15
class
LoanEntry
:
public
SLEBase
<ViewT, ltLOAN>
16
{
17
public
:
18
using
Base
=
SLEBase<ViewT, ltLOAN>
;
19
20
// Inherit base constructors: adopt an existing SLE, or resolve one from a
21
// Keylet against the view.
22
using
Base::Base;
23
24
explicit
LoanEntry
(
25
UInt256
const
& loanBrokerID,
26
SeqProxy
const
& loanSeq,
27
Base::ViewRefType
view,
28
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
29
: Base(
keylet
::loan(loanBrokerID, loanSeq), view, j)
30
{
31
}
32
33
explicit
LoanEntry
(
34
UInt256
const
& loanID,
35
Base::ViewRefType
view,
36
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
37
: Base(
keylet
::loan(loanID), view, j)
38
{
39
}
40
};
41
42
using
LoanEntryR
=
LoanEntry<ReadView>
;
43
using
LoanEntryW
=
LoanEntry<ApplyView>
;
44
45
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
beast::Journal::getNullSink
static Sink & getNullSink()
Returns a Sink which does nothing.
Definition
beast_Journal.cpp:63
xrpl::LoanEntry
Definition
LoanEntry.h:16
xrpl::LoanEntry::LoanEntry
LoanEntry(UInt256 const &loanBrokerID, SeqProxy const &loanSeq, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
LoanEntry.h:24
xrpl::LoanEntry::Base
SLEBase< ViewT, ltLOAN > Base
Definition
LoanEntry.h:18
xrpl::LoanEntry::LoanEntry
LoanEntry(UInt256 const &loanID, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
LoanEntry.h:33
xrpl::SLEBase::ViewRefType
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition
SLEBase.h:106
xrpl::SLEBase< ViewT, ltLOAN >::SLEBase
SLEBase(SLEBase const &)=default
xrpl::SeqProxy
A type that represents either a sequence value or a ticket value.
Definition
SeqProxy.h:37
xrpl::keylet
Keylet computation functions.
Definition
Indexes.h:40
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::LoanEntryW
LoanEntry< ApplyView > LoanEntryW
Definition
LoanEntry.h:43
xrpl::UInt256
BaseUInt< 256 > UInt256
Definition
base_uint.h:580
xrpl::LoanEntryR
LoanEntry< ReadView > LoanEntryR
Definition
LoanEntry.h:42
Generated by
1.17.0