Refactor View classes:

The View hierarchy of classes is reorganized to include new
classes with member functions moved and renamed, to solve
defects in the original design:

OpenView accumulates raw state and tx changes and
can be applied to the base. ApplyView accumulates changes
for a single transaction, including metadata, and can be
applied to an OpenView. The Sandbox allows changes with
the option to apply or throw them out. The PaymentSandbox
provides a sandbox with account credit deferral.

Call sites are changed to use the class appropriate for
the task.
This commit is contained in:
Vinnie Falco
2015-07-04 10:55:07 -07:00
parent f3b172b0c9
commit 367c3a5bfc
116 changed files with 4392 additions and 3565 deletions

View File

@@ -28,8 +28,8 @@
namespace ripple {
ApplyContext::ApplyContext(
BasicView& base, STTx const& tx_,
ViewFlags flags, Config const& config_,
OpenView& base, STTx const& tx_,
ApplyFlags flags, Config const& config_,
beast::Journal journal_)
: tx (tx_)
, config (config_)
@@ -37,13 +37,13 @@ ApplyContext::ApplyContext(
, base_ (base)
, flags_(flags)
{
view_.emplace(base_, flags_);
view_.emplace(&base_, flags_);
}
void
ApplyContext::discard()
{
view_.emplace(base_, flags_);
view_.emplace(&base_, flags_);
}
void