3 #include <initializer_list>
32 BlockState(std::initializer_list<std::pair<const AString, AString>> aKeysAndValues);
37 BlockState(
const std::map<AString, AString> & aKeysAndValues);
41 BlockState(std::map<AString, AString> && aKeysAndValues);
47 BlockState(
const BlockState & aCopyFrom, std::initializer_list<std::pair<const AString, AString>> aAdditionalKeysAndValues);
53 BlockState(
const BlockState & aCopyFrom,
const std::map<AString, AString> & aAdditionalKeysAndValues);
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.
bool operator!=(const BlockState &aOther) const
Fast inequality check.
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.