Map.hpp
Go to the documentation of this file.
42 #define DECLARE_FSTR_MAP(name, KeyType, ContentType) DECLARE_FSTR_OBJECT(name, DECL((FSTR::Map<KeyType, ContentType>)))
72 static DEFINE_FSTR_MAP_DATA_SIZED(FSTR_DATA_NAME(name), KeyType, ContentType, size, __VA_ARGS__); \
79 static DEFINE_FSTR_MAP_DATA_SIZED(FSTR_DATA_NAME(name), KeyType, ContentType, size, __VA_ARGS__); \
106 } FSTR_PACKED name PROGMEM = {{sizeof(FSTR::MapPair<KeyType, ContentType>) * size}, {__VA_ARGS__}}; \
142 FSTR_ALIGN32 typename std::enable_if<!std::is_class<T>::value, int>::type indexOf(const TRefKey& key) const
Class template to provide a simple way to print the contents of a Map.
Definition: MapPrinter.hpp:31
FSTR_ALIGN32 std::enable_if<!std::is_class< T >::value, int >::type indexOf(const TRefKey &key) const
Lookup an integral key and return the index.
Definition: Map.hpp:142
FSTR_ALIGN32 const Pair valueAt(unsigned index) const
Get a map entry by index, if it exists.
Definition: Map.hpp:126
const Pair operator[](const TRefKey &key) const
Lookup a key and return the entry, if found.
Definition: Map.hpp:185
FSTR_ALIGN32 std::enable_if< std::is_same< T, String >::value, int >::type indexOf(const TRefKey &key, bool ignoreCase=true) const
Lookup a String key and return the index.
Definition: Map.hpp:163
MapPrinter< Map > printer() const
Returns a printer object for this array.
Definition: Map.hpp:196
constexpr size_t length() const
Get the length of the content in elements.
Definition: Object.hpp:132
DataPtrType data() const
Definition: Object.hpp:169
Definition: Array.hpp:118
std::enable_if< sizeof(T)==1, T >::type readValue(const T *ptr)
Read a typed value from flash memory ensuring correct alignment of access.
Definition: Utility.hpp:134
1.9.1