xrpld
Loading...
Searching...
No Matches
include
xrpl
protocol
STTakesAsset.h
1
#pragma once
2
3
#include <xrpl/protocol/Asset.h>
4
#include <xrpl/protocol/STBase.h>
5
6
#include <
optional
>
7
8
namespace
xrpl
{
9
24
class
STTakesAsset
:
public
STBase
25
{
26
protected
:
27
std::optional<Asset>
asset_
;
28
29
public
:
30
using
STBase::STBase
;
31
using
STBase::operator=;
32
33
virtual
void
34
associateAsset
(
Asset
const
& a);
35
};
36
37
inline
void
38
STTakesAsset::associateAsset
(
Asset
const
& a)
39
{
40
asset_
.emplace(a);
41
}
42
43
class
STLedgerEntry
;
44
60
void
61
associateAsset
(
STLedgerEntry
& sle,
Asset
const
& asset);
62
63
}
// namespace xrpl
xrpl::Asset
Definition
Asset.h:52
xrpl::STBase::STBase
STBase()
Definition
STBase.cpp:15
xrpl::STLedgerEntry
Definition
STLedgerEntry.h:26
xrpl::STTakesAsset
Intermediate class for any STBase-derived class to store an Asset.
Definition
STTakesAsset.h:25
xrpl::STTakesAsset::associateAsset
virtual void associateAsset(Asset const &a)
Definition
STTakesAsset.h:38
xrpl::STTakesAsset::STBase
STBase()
Definition
STBase.cpp:15
xrpl::STTakesAsset::asset_
std::optional< Asset > asset_
Definition
STTakesAsset.h:27
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::associateAsset
void associateAsset(STLedgerEntry &sle, Asset const &asset)
Associate an Asset with all sMD_NeedsAsset fields in a ledger entry.
optional
Generated by
1.16.1