CatapultServer  v0.5.0.1 (Elephant)
AccountImportanceSnapshots.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "CompactArrayStack.h"
24 
25 namespace catapult { namespace state {
26 
29  public:
34 
37  };
38 
39  private:
41 
42  public:
44  Importance current() const;
45 
48 
51 
52  public:
54  void set(Importance importance, model::ImportanceHeight height);
55 
57  void pop();
58 
59  public:
61  SnapshotStack::const_iterator begin() const;
62 
64  SnapshotStack::const_iterator end() const;
65 
66  private:
68  };
69 }}
ImportanceHeight.h
catapult::state::AccountImportanceSnapshots::height
model::ImportanceHeight height() const
Gets the height at which the current importance was calculated.
Definition: AccountImportanceSnapshots.cpp:30
catapult::state::AccountImportanceSnapshots::get
Importance get(model::ImportanceHeight height) const
Gets the importance of the account at height.
Definition: AccountImportanceSnapshots.cpp:34
catapult::state::AccountImportanceSnapshots::ImportanceSnapshot
Temporal importance information.
Definition: AccountImportanceSnapshots.h:31
catapult::state::AccountImportanceSnapshots::set
void set(Importance importance, model::ImportanceHeight height)
Sets the current account importance to importance at height.
Definition: AccountImportanceSnapshots.cpp:42
catapult::state::AccountImportanceSnapshots::end
SnapshotStack::const_iterator end() const
Returns a const iterator to the element following the last element of the underlying container.
Definition: AccountImportanceSnapshots.cpp:61
catapult::state::AccountImportanceSnapshots::ImportanceSnapshot::Importance
catapult::Importance Importance
Account importance.
Definition: AccountImportanceSnapshots.h:33
catapult::state::AccountImportanceSnapshots::begin
SnapshotStack::const_iterator begin() const
Returns a const iterator to the first element of the underlying container.
Definition: AccountImportanceSnapshots.cpp:57
catapult::state::AccountImportanceSnapshots::m_snapshots
SnapshotStack m_snapshots
Definition: AccountImportanceSnapshots.h:67
CompactArrayStack.h
catapult::state::CompactArrayStack::begin
const_iterator begin() const
Returns a const iterator to the first element of the underlying container.
Definition: CompactArrayStack.h:150
catapult::utils::BaseValue< uint64_t, Importance_tag >
AccountImportanceSnapshots.h
catapult::state::AccountImportanceSnapshots::current
Importance current() const
Gets the current importance of the account.
Definition: AccountImportanceSnapshots.cpp:26
catapult::state::CompactArrayStack< ImportanceSnapshot, Importance_History_Size >
catapult::state::AccountImportanceSnapshots
Stack of account importance snapshots.
Definition: AccountImportanceSnapshots.h:28
catapult::state::CompactArrayStack::end
const_iterator end() const
Returns a const iterator to the element following the last element of the underlying container.
Definition: CompactArrayStack.h:155
catapult::state::CompactArrayStack::push
void push(const T &value)
Pushes value onto the stack.
Definition: CompactArrayStack.h:178
catapult::state::AccountImportanceSnapshots::ImportanceSnapshot::Height
model::ImportanceHeight Height
Importance height.
Definition: AccountImportanceSnapshots.h:36
CATAPULT_THROW_RUNTIME_ERROR
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
catapult::state::AccountImportanceSnapshots::pop
void pop()
Pops the current importance.
Definition: AccountImportanceSnapshots.cpp:53
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::state::CompactArrayStack::pop
void pop()
Pops the top value from the stack.
Definition: CompactArrayStack.h:190