xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
entries
SponsorshipEntry.h
1
#pragma once
2
3
#include <xrpl/beast/utility/Journal.h>
4
#include <xrpl/ledger/ApplyView.h>
5
#include <xrpl/ledger/ReadView.h>
6
#include <xrpl/ledger/entries/SLEBase.h>
7
#include <xrpl/protocol/AccountID.h>
8
#include <xrpl/protocol/Indexes.h>
9
#include <xrpl/protocol/LedgerFormats.h>
10
11
namespace
xrpl
{
12
13
template
<
typename
ViewT>
14
class
SponsorshipEntry
:
public
SLEBase
<ViewT, ltSPONSORSHIP>
15
{
16
public
:
17
using
Base
=
SLEBase<ViewT, ltSPONSORSHIP>
;
18
19
// Inherit base constructors: adopt an existing SLE, or resolve one from a
20
// Keylet against the view.
21
using
Base::Base;
22
23
explicit
SponsorshipEntry
(
24
AccountID
const
& sponsor,
25
AccountID
const
& sponsee,
26
Base::ViewRefType
view,
27
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
28
: Base(
keylet
::sponsorship(sponsor, sponsee), view, j)
29
{
30
}
31
};
32
33
using
SponsorshipEntryR
=
SponsorshipEntry<ReadView>
;
34
using
SponsorshipEntryW
=
SponsorshipEntry<ApplyView>
;
35
36
}
// 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::SLEBase::ViewRefType
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition
SLEBase.h:106
xrpl::SLEBase< ViewT, ltSPONSORSHIP >::SLEBase
SLEBase(SLEBase const &)=default
xrpl::SponsorshipEntry
Definition
SponsorshipEntry.h:15
xrpl::SponsorshipEntry::SponsorshipEntry
SponsorshipEntry(AccountID const &sponsor, AccountID const &sponsee, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
SponsorshipEntry.h:23
xrpl::SponsorshipEntry::Base
SLEBase< ViewT, ltSPONSORSHIP > Base
Definition
SponsorshipEntry.h:17
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::SponsorshipEntryR
SponsorshipEntry< ReadView > SponsorshipEntryR
Definition
SponsorshipEntry.h:33
xrpl::SponsorshipEntryW
SponsorshipEntry< ApplyView > SponsorshipEntryW
Definition
SponsorshipEntry.h:34
xrpl::AccountID
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition
AccountID.h:34
Generated by
1.17.0