Go to the documentation of this file.
36 template <
typename KeyType,
class ContentType>
class MapPair
38 typedef typename std::conditional<std::is_same<KeyType, String>::value,
const KeyType*, KeyType>::type KeyStoreType;
57 static const MapPair
empty()
59 return MapPair{KeyStoreType(0),
nullptr};
65 template <
typename T = KeyType>
typename std::enable_if<!std::is_class<T>::value, KeyType>::type
key()
const
68 return readValue<KeyType>(&
key_);
74 template <
typename T = KeyType>
75 typename std::enable_if<std::is_same<T, String>::value,
const KeyType&>::type
key()
const
108 count += p.
print(
" => ");
111 count += p.
print(
"(invalid)");
::String WString
A Wiring String.
Definition: String.hpp:168
size_t print(char c)
Prints a single character to output stream.
Definition: Print.h:97
static const MapPair empty()
Get an empty Pair object, identifies as invalid when lookup fails.
Definition: MapPair.hpp:95
size_t printTo(Print &p) const
Definition: MapPair.hpp:140
void IfHelper() const
Definition: MapPair.hpp:80
const ContentType * content_
Definition: MapPair.hpp:158
void(MapPair::* IfHelperType)() const
Definition: MapPair.hpp:79
KeyStoreType key_
Definition: MapPair.hpp:157
Definition: Array.hpp:107
const ContentType & content() const
Accessor to get a reference to the content.
Definition: MapPair.hpp:121
static const String & empty()
Return an empty object which evaluates to null.
Definition: Object.hpp:156
Definition: WebConstants.h:71
Provides formatted output to stream.
Definition: Print.h:36
std::enable_if< std::is_class< ObjectType >::value, size_t >::type print(Print &p, const ObjectType &object)
Print an object.
Definition: Print.hpp:40
std::enable_if<!std::is_class< T >::value, KeyType >::type key() const
Get the key (non-class key types)
Definition: MapPair.hpp:103