mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 14:50:54 +00:00
respond to comments
This commit is contained in:
@@ -18,9 +18,8 @@ Historically, ledger entries are passed around as bare `std::shared_ptr<SLE>` (o
|
||||
|
||||
`SLEBase.h` introduces a single template class `SLEBase<ViewT>` that pairs an SLE with its view context and enforces read/write semantics at compile time via `requires` clauses.
|
||||
|
||||
**`SLEBase<ReadView>`** (aliased as `ReadOnlySLE`) holds a `std::shared_ptr<SLE const>` and a `ReadView const&`. Write-only members are excluded at compile time.
|
||||
|
||||
**`SLEBase<ApplyView>`** (aliased as `WritableSLE`) holds a mutable `std::shared_ptr<SLE>`, an `ApplyView&`, and a `Keylet`. It exposes `insert()`, `update()`, `erase()`, and `newSLE()` to keep the SLE and its view in sync automatically.
|
||||
**`SLEBase<ReadView>`** holds a `std::shared_ptr<SLE const>` and a `ReadView const&`. Write-only members are excluded at compile time.
|
||||
holds a mutable `std::shared_ptr<SLE>`, an `ApplyView&`, and a `Keylet`. It exposes `insert()`, `update()`, `erase()`, and `newSLE()` to keep the SLE and its view in sync automatically.
|
||||
|
||||
A converting constructor allows implicit conversion from `SLEBase<ApplyView>` to `SLEBase<ReadView>`, so functions taking a read-only wrapper can accept a writable one without a cast.
|
||||
|
||||
|
||||
@@ -42,9 +42,8 @@ namespace xrpl {
|
||||
*
|
||||
* @details
|
||||
* Populates the provided JSON value with the description of the specified
|
||||
* ledger entry. If the entry is an account root and contains an email hash,
|
||||
* ledger entry. If the entry contains an email hash,
|
||||
* adds a 'urlgravatar' field with the corresponding Gravatar URL.
|
||||
* If the entry is not an account root, sets the 'Invalid' field to true.
|
||||
*/
|
||||
void
|
||||
injectSLE(Json::Value& jv, RAccountRoot const& account)
|
||||
|
||||
Reference in New Issue
Block a user