9 mChecksum(initializeChecksum())
19 mState({{aKey, aValue}}),
20 mChecksum(initializeChecksum())
29 mState(aKeysAndValues),
30 mChecksum(initializeChecksum())
39 mState(aKeysAndValues),
40 mChecksum(initializeChecksum())
49 mState(
std::move(aKeysAndValues)),
50 mChecksum(initializeChecksum())
59 mState(aCopyFrom.mState)
61 for (
const auto & kav: aAdditionalKeysAndValues)
63 mState[kav.first] = kav.second;
73 mState(aCopyFrom.mState)
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;
Represents the state of a single block (previously known as "block meta").
UInt32 partialChecksum(const AString &aString)
Calculates the partial checksum of a single string.
BlockState()
Creates a new instance with an empty map.
bool operator<(const BlockState &aOther) const
Less-than comparison.
UInt32 initializeChecksum()
Normalizes mState and calculates the checksum from it.
const AString & value(const AString &aKey) const
Returns the value at the specified key.
UInt32 mChecksum
The checksum used for the fast equality check.
bool operator==(const BlockState &aOther) const
Fast equality check.
void removeEmptyKeys()
Removes all the keys from mState that have an empty value.
std::map< AString, AString > mState
The state, represented as a string->string map.