FSTR::Array< ElementType > Class Template Reference

Class to access an array of integral values stored in flash. More...

#include <Array.hpp>

Inheritance diagram for FSTR::Array< ElementType >:
Collaboration diagram for FSTR::Array< ElementType >:

Public Member Functions

ArrayPrinter< Arrayprinter () const
 Returns a printer object for this array. More...
 
size_t printTo (Print &p) const
 
- Public Member Functions inherited from FSTR::Object< Array< ElementType >, ElementType >
 Object ()
 Creates a null object. More...
 
 Object (const Object &obj)
 Copy constructor. More...
 
Iterator begin () const
 
Iterator end () const
 
constexpr const size_t length () const
 Get the length of the content in elements. More...
 
int indexOf (const ValueType &value) const
 
ElementType valueAt (unsigned index) const
 
ElementType operator[] (unsigned index) const
 Array operator[]. More...
 
size_t elementSize () const
 
DataPtrType data () const
 
size_t read (size_t index, ElementType *buffer, size_t count) const
 Read content into RAM. More...
 
size_t readFlash (size_t index, ElementType *buffer, size_t count) const
 Read content into RAM,using flashmem_read() More...
 
ElementType unsafeValueAt (const DataPtrType dataptr, unsigned index) const
 
- Public Member Functions inherited from FSTR::ObjectBase
constexpr FSTR_NOINLINE const size_t length () const
 Get the length of the object data in bytes. More...
 
constexpr const size_t size () const
 Get the object data size in bytes. More...
 
bool operator== (const ObjectBase &other) const
 
template<class ObjectType >
constexpr const ObjectType & as () const
 Cast to a different object type. More...
 
const uint8_t * data () const
 Get a pointer to the flash data. 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 offset, void *buffer, size_t count) const
 Read contents of a String into RAM, using flashread() More...
 
constexpr const bool isCopy () const
 
constexpr const bool isNull () const
 Indicates an invalid String, used for return value from lookups, etc. More...
 

Additional Inherited Members

- Public Types inherited from FSTR::Object< Array< ElementType >, ElementType >
using DataPtrType = const ElementType *
 
using Iterator = ObjectIterator< Array< ElementType >, ElementType >
 
- Static Public Member Functions inherited from FSTR::Object< Array< ElementType >, ElementType >
static constexpr const Array< ElementType > & empty ()
 Return an empty object which evaluates to null. More...
 
- Public Attributes inherited from FSTR::ObjectBase
const uint32_t flashLength_
 
- Static Protected Attributes inherited from FSTR::ObjectBase
static const ObjectBase empty_
 
static constexpr uint32_t copyBit = 0x80000000U
 Set to indicate copy. More...
 
static constexpr uint32_t lengthInvalid = copyBit | 0
 Indicates null string in a copy. More...
 

Detailed Description

template<typename ElementType>
class FSTR::Array< ElementType >

Class to access an array of integral values stored in flash.

Template Parameters
ElementType

Member Function Documentation

◆ printer()

template<typename ElementType >
ArrayPrinter<Array> FSTR::Array< ElementType >::printer ( ) const
inline

Returns a printer object for this array.

Note
ElementType must be supported by Print

◆ printTo()

template<typename ElementType >
size_t FSTR::Array< ElementType >::printTo ( Print p) const
inline

The documentation for this class was generated from the following file: