9 mChecksum(initializeChecksum())
61 for (
const auto & kav: aAdditionalKeysAndValues)
63 mState[kav.first] = kav.second;
75 for (
const auto & kav: aAdditionalKeysAndValues)
77 mState[kav.first] = kav.second;
100 auto itA =
mState.begin();
101 auto itOther = aOther.
mState.begin();
104 while (itA !=
mState.end())
107 const auto cmp = itA->first.compare(itOther->first);
114 const auto cmp = itA->second.compare(itOther->second);
150 auto itr =
mState.find(aKey);
170 for (
const auto & kv:
mState)
186 if (itr->second.empty())
205 for (
auto ch: aString)
209 shift = (shift + 1) % 24;
UInt32 partialChecksum(const AString &aString)
Calculates the partial checksum of a single string.
void removeEmptyKeys()
Removes all the keys from mState that have an empty value.
UInt32 initializeChecksum()
Normalizes mState and calculates the checksum from it.
bool operator==(const BlockState &aOther) const
Fast equality check.
BlockState()
Creates a new instance with an empty map.
const AString & value(const AString &aKey) const
Returns the value at the specified key.
bool operator<(const BlockState &aOther) const
Less-than comparison.
std::map< AString, AString > mState
The state, represented as a string->string map.
UInt32 mChecksum
The checksum used for the fast equality check.
Represents the state of a single block (previously known as "block meta").