CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 #include <unordered_map>
28 namespace catapult {
namespace state {
MosaicId optimizedMosaicId() const
Gets the optimized mosaic id.
Definition: AccountBalances.cpp:50
constexpr void HexFormat(const ByteArray< N, TTag > &)
utils::BaseValue< uint64_t, Amount_tag > Amount
Definition: src/catapult/types.h:76
Container holding information about account.
Definition: AccountBalances.h:31
void optimize(MosaicId id)
Optimizes access of the mosaic with id.
Definition: AccountBalances.cpp:94
Amount get(MosaicId mosaicId) const
Returns amount of funds of a given mosaic (mosaicId).
Definition: AccountBalances.cpp:54
void erase(MosaicId id)
Erases the mosaic with id.
Definition: CompactMosaicMap.cpp:259
auto begin() const
Returns a const iterator to the first element of the underlying set.
Definition: AccountBalances.h:56
const_iterator find(MosaicId id) const
Finds the mosaic with id.
Definition: CompactMosaicMap.cpp:199
auto end() const
Returns a const iterator to the element following the last element of the underlying set.
Definition: AccountBalances.h:61
void insert(const Mosaic &pair)
Inserts a mosaic pair.
Definition: CompactMosaicMap.cpp:222
AccountBalances & operator=(const AccountBalances &accountBalances)
Assignment operator that makes a deep copy of accountBalances.
Definition: AccountBalances.cpp:39
AccountBalances & credit(MosaicId mosaicId, Amount amount)
Adds amount funds to a given mosaic (mosaicId).
Definition: AccountBalances.cpp:59
CompactMosaicMap m_balances
Definition: AccountBalances.h:82
size_t size() const
Gets the number of mosaics in the map.
Definition: CompactMosaicMap.cpp:185
size_t size() const
Returns the number of mosaics owned.
Definition: AccountBalances.h:51
void optimize(MosaicId id)
Optimizes access of the mosaic with id.
Definition: CompactMosaicMap.cpp:286
Definition: CompactMosaicMap.h:33
AccountBalances & debit(MosaicId mosaicId, Amount amount)
Subtracts amount funds from a given mosaic (mosaicId).
Definition: AccountBalances.cpp:72
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
const_iterator end() const
Returns a const iterator to the element following the last element of the underlying container.
Definition: CompactMosaicMap.cpp:169
Definition: AddressExtractionExtension.cpp:28
AccountBalances()
Creates an empty account balances.
MosaicId m_optimizedMosaicId
Definition: AccountBalances.h:83
const_iterator begin() const
Returns a const iterator to the first element of the underlying container.
Definition: CompactMosaicMap.cpp:165