Base class template for all types.
More...
#include <Object.hpp>
|
| | Object (const Object &)=delete |
| |
| | Object (const Object &&)=delete |
| |
| Object & | operator= (const Object &)=delete |
| |
| Object & | operator= (const Object &&)=delete |
| |
| Iterator | begin () const |
| |
| Iterator | end () const |
| |
| constexpr size_t | length () const |
| | Get the length of the content in elements. More...
|
| |
| template<typename ValueType > |
| 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 |
| |
| constexpr size_t | length () const |
| | Get the length of the object data in bytes. More...
|
| |
| constexpr 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 bool | isNull () const |
| | Indicates an invalid String, used for return value from lookups, etc. More...
|
| |
|
| static constexpr const ObjectType & | empty () |
| | Return an empty object which evaluates to null. More...
|
| |
template<class ObjectType, typename ElementType>
class FSTR::Object< ObjectType, ElementType >
Base class template for all types.
- Template Parameters
-
| ObjectType | The object type actually being instantiated |
| ElementType | |
- See also
- https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern
◆ DataPtrType
template<class ObjectType , typename ElementType >
◆ Iterator
template<class ObjectType , typename ElementType >
◆ Object() [1/2]
template<class ObjectType , typename ElementType >
◆ Object() [2/2]
template<class ObjectType , typename ElementType >
◆ begin()
template<class ObjectType , typename ElementType >
◆ data()
template<class ObjectType , typename ElementType >
◆ elementSize()
template<class ObjectType , typename ElementType >
| size_t FSTR::Object< ObjectType, ElementType >::elementSize |
( |
| ) |
const |
|
inline |
◆ empty()
template<class ObjectType , typename ElementType >
| static constexpr const ObjectType& FSTR::Object< ObjectType, ElementType >::empty |
( |
| ) |
|
|
inlinestaticconstexpr |
Return an empty object which evaluates to null.
◆ end()
template<class ObjectType , typename ElementType >
◆ indexOf()
template<class ObjectType , typename ElementType >
template<typename ValueType >
| int FSTR::Object< ObjectType, ElementType >::indexOf |
( |
const ValueType & |
value | ) |
const |
|
inline |
◆ length()
template<class ObjectType , typename ElementType >
| constexpr size_t FSTR::Object< ObjectType, ElementType >::length |
( |
void |
| ) |
const |
|
inlineconstexpr |
Get the length of the content in elements.
◆ operator=() [1/2]
template<class ObjectType , typename ElementType >
◆ operator=() [2/2]
template<class ObjectType , typename ElementType >
◆ operator[]()
template<class ObjectType , typename ElementType >
◆ read()
template<class ObjectType , typename ElementType >
| size_t FSTR::Object< ObjectType, ElementType >::read |
( |
size_t |
index, |
|
|
ElementType * |
buffer, |
|
|
size_t |
count |
|
) |
| const |
|
inline |
Read content into RAM.
- Parameters
-
| index | First element to read |
| buffer | Where to store data |
| count | How many elements to read |
- Return values
-
| size_t | Number of elements actually read |
◆ readFlash()
template<class ObjectType , typename ElementType >
| size_t FSTR::Object< ObjectType, ElementType >::readFlash |
( |
size_t |
index, |
|
|
ElementType * |
buffer, |
|
|
size_t |
count |
|
) |
| const |
|
inline |
Read content into RAM,using flashmem_read()
- Parameters
-
| index | First element to read |
| buffer | Where to store data |
| count | How many elements to read |
- Return values
-
| size_t | Number of elements actually read |
◆ unsafeValueAt()
template<class ObjectType , typename ElementType >
◆ valueAt()
template<class ObjectType , typename ElementType >
The documentation for this class was generated from the following file: