xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
entries
RippleStateEntry.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/Issue.h>
10
#include <xrpl/protocol/LedgerFormats.h>
11
#include <xrpl/protocol/UintTypes.h>
12
13
namespace
xrpl
{
14
15
template
<
typename
ViewT>
16
class
RippleStateEntry
:
public
SLEBase
<ViewT, ltRIPPLE_STATE>
17
{
18
public
:
19
using
Base
=
SLEBase<ViewT, ltRIPPLE_STATE>
;
20
21
// Inherit base constructors: adopt an existing SLE, or resolve one from a
22
// Keylet against the view.
23
using
Base::Base;
24
25
explicit
RippleStateEntry
(
26
AccountID
const
& id0,
27
AccountID
const
& id1,
28
Currency
const
& currency,
29
Base::ViewRefType
view,
30
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
31
: Base(
keylet
::trustLine(id0, id1, currency), view, j)
32
{
33
}
34
35
explicit
RippleStateEntry
(
36
AccountID
const
&
id
,
37
Issue
const
& issue,
38
Base::ViewRefType
view,
39
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
40
: Base(
keylet
::trustLine(id, issue), view, j)
41
{
42
}
43
};
44
45
using
RippleStateEntryR
=
RippleStateEntry<ReadView>
;
46
using
RippleStateEntryW
=
RippleStateEntry<ApplyView>
;
47
48
}
// 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::Issue
A currency issued by an account.
Definition
Issue.h:18
xrpl::RippleStateEntry
Definition
RippleStateEntry.h:17
xrpl::RippleStateEntry::RippleStateEntry
RippleStateEntry(AccountID const &id0, AccountID const &id1, Currency const ¤cy, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
RippleStateEntry.h:25
xrpl::RippleStateEntry::RippleStateEntry
RippleStateEntry(AccountID const &id, Issue const &issue, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
RippleStateEntry.h:35
xrpl::RippleStateEntry::Base
SLEBase< ViewT, ltRIPPLE_STATE > Base
Definition
RippleStateEntry.h:19
xrpl::SLEBase::ViewRefType
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition
SLEBase.h:106
xrpl::SLEBase< ViewT, ltRIPPLE_STATE >::SLEBase
SLEBase(SLEBase const &)=default
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::RippleStateEntryW
RippleStateEntry< ApplyView > RippleStateEntryW
Definition
RippleStateEntry.h:46
xrpl::Currency
BaseUInt< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
Definition
UintTypes.h:42
xrpl::RippleStateEntryR
RippleStateEntry< ReadView > RippleStateEntryR
Definition
RippleStateEntry.h:45
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