CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
28 namespace catapult {
namespace state {
38 using Mosaic = std::pair<const MosaicId, Amount>;
52 Mosaic = std::move(rhs.Mosaic);
std::unique_ptr< SecondLevelStorage > pNextStorage
Definition: CompactMosaicMap.h:76
std::ptrdiff_t difference_type
Definition: CompactMosaicMap.h:114
Stage
Iterator stage.
Definition: CompactMosaicMap.h:119
MosaicMap & map() const
Definition: CompactMosaicMap.cpp:48
CompactMosaicMap::Mosaic ConstMosaic
Definition: CompactMosaicMap.h:59
bool hasValue() const
Definition: CompactMosaicMap.cpp:28
void eraseFromArray(size_t index)
Definition: CompactMosaicMap.cpp:355
constexpr void HexFormat(const ByteArray< N, TTag > &)
basic_iterator(FirstLevelStorage &storage, Stage stage)
Creates an iterator around storage with initial stage.
Definition: CompactMosaicMap.cpp:56
static constexpr auto Array_Size
Definition: CompactMosaicMap.h:35
MosaicMap::iterator MapIterator
Definition: CompactMosaicMap.h:107
void advance()
Definition: CompactMosaicMap.cpp:112
Definition: CompactMosaicMap.h:96
MosaicId m_optimizedMosaicId
Definition: CompactMosaicMap.h:247
void erase(MosaicId id)
Erases the mosaic with id.
Definition: CompactMosaicMap.cpp:259
#define CATAPULT_THROW_INVALID_ARGUMENT_2(MESSAGE, PARAM1, PARAM2)
Macro used to throw a catapult invalid argument with two parameters.
Definition: exceptions.h:187
void setValueMosaic()
Definition: CompactMosaicMap.cpp:139
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
std::pair< const MosaicId, Amount > Mosaic
Definition: CompactMosaicMap.h:38
Stage m_stage
Definition: CompactMosaicMap.h:161
value_type & reference
Definition: CompactMosaicMap.h:175
Mosaic & current() const
Gets a reference to the current value.
Definition: CompactMosaicMap.cpp:105
constexpr const T & as_const(T &ref)
Coerces a reference (ref) to a const reference.
Definition: Casting.h:31
T value_type
Definition: CompactMosaicMap.h:173
const_iterator find(MosaicId id) const
Finds the mosaic with id.
Definition: CompactMosaicMap.cpp:199
uint32_t Value
Definition: BlockScorer.cpp:32
std::forward_iterator_tag iterator_category
Definition: CompactMosaicMap.h:115
A basic typed iterator that adds support for dereferencing.
Definition: CompactMosaicMap.h:171
std::unique_ptr< MosaicMap > pMapStorage
Definition: CompactMosaicMap.h:70
bool empty() const
Returns true if the map is empty.
Definition: CompactMosaicMap.cpp:181
#define CATAPULT_THROW_OUT_OF_RANGE(MESSAGE)
Macro used to throw a catapult out of range.
Definition: exceptions.h:191
value_type * pointer
Definition: CompactMosaicMap.h:174
void setEnd()
Definition: CompactMosaicMap.cpp:154
void insert(const Mosaic &pair)
Inserts a mosaic pair.
Definition: CompactMosaicMap.cpp:222
basic_iterator & operator++()
Advances the iterator to the next position.
Definition: CompactMosaicMap.cpp:91
void insertIntoArray(size_t index, const Mosaic &pair)
Definition: CompactMosaicMap.cpp:335
pointer operator->() const
Returns a pointer to the current value.
Definition: CompactMosaicMap.h:187
bool hasArray() const
Definition: CompactMosaicMap.cpp:32
size_t m_arrayIndex
Definition: CompactMosaicMap.h:165
MosaicArray & array() const
Definition: CompactMosaicMap.cpp:44
MosaicUnion(MosaicUnion &&rhs)
Definition: CompactMosaicMap.h:47
MutableMosaic Mosaic
Definition: CompactMosaicMap.h:58
MosaicArray ArrayStorage
Definition: CompactMosaicMap.h:68
bool operator!=(const basic_iterator &rhs) const
Returns true if this iterator and rhs are not equal.
Definition: CompactMosaicMap.cpp:87
MosaicSource
Definition: CompactMosaicMap.h:94
Definition: CompactMosaicMap.h:73
Base of mosaic iterators.
Definition: CompactMosaicMap.h:112
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
Mosaic * m_pCurrent
Definition: CompactMosaicMap.h:162
MosaicMap::iterator m_mapIterator
Definition: CompactMosaicMap.h:166
bool operator==(const basic_iterator &rhs) const
Returns true if this iterator and rhs are equal.
Definition: CompactMosaicMap.cpp:83
bool hasMap() const
Definition: CompactMosaicMap.cpp:36
std::pair< MosaicId, Amount > MutableMosaic
Definition: CompactMosaicMap.h:39
A class that can be moved but not copied.
Definition: NonCopyable.h:43
Definition: CompactMosaicMap.h:42
basic_iterator_t< const Mosaic > const_iterator
Mosaic const iterator.
Definition: CompactMosaicMap.h:194
size_t size() const
Gets the number of mosaics in the map.
Definition: CompactMosaicMap.cpp:185
std::map< MosaicId, Amount > MosaicMap
Definition: CompactMosaicMap.h:64
basic_iterator_t< Mosaic > iterator
Mosaic non-const iterator.
Definition: CompactMosaicMap.h:197
void optimize(MosaicId id)
Optimizes access of the mosaic with id.
Definition: CompactMosaicMap.cpp:286
uint8_t ArraySize
Definition: CompactMosaicMap.h:69
bool isEnd() const
Definition: CompactMosaicMap.cpp:159
std::array< MosaicUnion, Array_Size > MosaicArray
Definition: CompactMosaicMap.h:63
Definition: CompactMosaicMap.h:33
void setMapMosaic()
Definition: CompactMosaicMap.cpp:149
MosaicUnion Value
Definition: CompactMosaicMap.h:75
size_t ArrayIndex
Definition: CompactMosaicMap.h:106
const_iterator end() const
Returns a const iterator to the element following the last element of the underlying container.
Definition: CompactMosaicMap.cpp:169
MosaicUnion()
Definition: CompactMosaicMap.h:44
Definition: AddressExtractionExtension.cpp:28
MosaicSource Source
Definition: CompactMosaicMap.h:105
void setArrayMosaic()
Definition: CompactMosaicMap.cpp:144
Definition: CompactMosaicMap.h:67
MosaicLocation()
Definition: CompactMosaicMap.h:98
void insertIntoMap(const Mosaic &pair)
Definition: CompactMosaicMap.cpp:348
FirstLevelStorage m_storage
Definition: CompactMosaicMap.h:246
FirstLevelStorage & m_storage
Definition: CompactMosaicMap.h:160
void compact()
Definition: CompactMosaicMap.cpp:362
uint8_t & arraySize() const
Definition: CompactMosaicMap.cpp:40
const_iterator begin() const
Returns a const iterator to the first element of the underlying container.
Definition: CompactMosaicMap.cpp:165
MosaicUnion & operator=(MosaicUnion &&rhs)
Definition: CompactMosaicMap.h:51
reference operator*() const
Returns a reference to the current value.
Definition: CompactMosaicMap.h:182