CatapultServer
v0.5.0.1 (Elephant)
|
Calculator for calculating the inflation at a given height and the total inflation up to a given height. More...
Public Member Functions | |
size_t | size () const |
Gets the number of inflation entries. More... | |
bool | contains (Height height, Amount amount) const |
Returns true if the inflation map contains entry with height and amount. More... | |
Amount | getSpotAmount (Height height) const |
Gets the inflation amount at height. More... | |
Amount | getCumulativeAmount (Height height) const |
Gets the total inflation amount up to (but not including) height. More... | |
std::pair< Amount, bool > | sumAll () const |
Calculates the total inflation. More... | |
void | add (Height height, Amount amount) |
Adds inflation of amount starting at height. More... | |
Private Attributes | |
std::map< Height, Amount > | m_inflationMap |
Calculator for calculating the inflation at a given height and the total inflation up to a given height.
Adds inflation of amount starting at height.
Returns true
if the inflation map contains entry with height and amount.
Gets the total inflation amount up to (but not including) height.
Gets the inflation amount at height.
size_t catapult::model::InflationCalculator::size | ( | ) | const |
Gets the number of inflation entries.
std::pair< Amount, bool > catapult::model::InflationCalculator::sumAll | ( | ) | const |
Calculates the total inflation.