|
const Pair | valueAt (unsigned index) const |
| Get a map entry by index, if it exists. More...
|
|
template<typename TRefKey , typename T = KeyType> |
std::enable_if<!std::is_class< T >::value, int >::type | indexOf (const TRefKey &key) const |
| Lookup an integral key and return the index. More...
|
|
template<typename TRefKey , typename T = KeyType> |
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. More...
|
|
template<typename TRefKey > |
const Pair | operator[] (const TRefKey &key) const |
| Lookup a key and return the entry, if found. More...
|
|
MapPrinter< Map > | printer () const |
| Returns a printer object for this array. More...
|
|
size_t | printTo (Print &p) const |
|
Iterator | begin () const |
|
Iterator | end () const |
|
size_t | length () const |
| Get the length of the content in elements. More...
|
|
int | indexOf (const ValueType &value) const |
|
Pair | operator[] (unsigned index) const |
| Array operator[]. More...
|
|
size_t | elementSize () const |
|
const Pair * | data () const |
|
size_t | read (size_t index, Pair *buffer, size_t count) const |
| Read content into RAM. More...
|
|
size_t | read (size_t offset, void *buffer, size_t count) const |
| Read contents of a String into RAM. More...
|
|
size_t | readFlash (size_t index, Pair *buffer, size_t count) const |
| Read content into RAM,using flashmem_read() More...
|
|
size_t | readFlash (size_t offset, void *buffer, size_t count) const |
| Read contents of a String into RAM, using flashread() More...
|
|
size_t | size () const |
| Get the object data size in bytes. More...
|
|
template<class ObjectType > |
constexpr const ObjectType & | as () const |
| Cast to a different object type. More...
|
|
bool | isCopy () const |
|
bool | isNull () const |
| Indicates an invalid String, used for return value from lookups, etc. More...
|
|
template<typename KeyType, class ContentType, class Pair = MapPair<KeyType, ContentType>>
class FSTR::Map< KeyType, ContentType, Pair >
Class template to access an associative map.
- Template Parameters
-
size_t FSTR::ObjectBase::readFlash |
( |
size_t |
offset, |
|
|
void * |
buffer, |
|
|
size_t |
count |
|
) |
| const |
|
inherited |
Read contents of a String into RAM, using flashread()
- Parameters
-
offset | Zero-based offset from start of flash data to start reading |
buffer | Where to store data |
count | How many bytes to read |
- Return values
-
size_t | Number of bytes actually read |
- See also
- See also
FlashMemoryStream
class.
PROGMEM data is accessed via the CPU data cache, so to avoid degrading performance you can use this method to read data directly from flash memory. This is appropriate for infrequently accessed data, especially if it is large. For example, if storing content using IMPORT_FSTR
instead of SPIFFS then it is generally better to avoid contaminating the cache.