SectionTemplate.h
Go to the documentation of this file.
44 "{!pad:A:B:C} Copy of A padded to at least B characters with C (default is space). Use -ve B to left-pad. C") \
#define SECTION_TEMPLATE_COMMAND_MAP(XX)
Command map.
Definition: SectionTemplate.h:36
Virtual class to perform format-specific String adjustments.
Definition: Formatter.h:24
virtual MimeType mimeType() const =0
Corresponding MIME type for this format.
Presents each section within a source stream as a separate stream.
Definition: SectionStream.h:26
Delegate< bool()> NextRecord
Application callback to move to next record.
Definition: SectionStream.h:49
size_t count() const
Get number of sections in this stream.
Definition: SectionStream.h:100
Provides enhanced template tag processing for use with a SectionStream.
Definition: SectionTemplate.h:74
void onNextRecord(NextRecord callback)
Set a callback to be invoked when a new record is required.
Definition: SectionTemplate.h:191
bool gotoSection(uint8_t index)
Discard current output and change current section.
int sectionIndex() const
Get the index for the current section.
Definition: SectionTemplate.h:156
virtual bool nextRecord()
Move to next record.
Definition: SectionTemplate.h:204
SectionTemplate(IDataSourceStream *source, uint8_t maxSections=5)
void onGetValue(GetValue callback)
Set a callback to be invoked.
Definition: SectionTemplate.h:108
uint8_t sectionCount() const
Get number of sections in source stream.
Definition: SectionTemplate.h:165
MimeType getMimeType() const override
Get the MIME type associated with this template stream.
Definition: SectionTemplate.h:135
XX(name, comment)
@ Qunknown
XX(name, comment)
@ unknown
Formatter & formatter() const
Get the stream format.
Definition: SectionTemplate.h:126
int recordIndex() const
Get current record index.
Definition: SectionTemplate.h:174
const SectionStream & stream() const
Access the underlying section stream.
Definition: SectionTemplate.h:147
Delegate< String(const char *name)> GetValue
Application callback to process additional fields.
Definition: SectionTemplate.h:99
void setFormatter(Formatter &formatter)
Associate a text format with this template stream.
Definition: SectionTemplate.h:117
Stream which performs variable-value substitution on-the-fly.
Definition: TemplateStream.h:42
void enable(Handler &commandHandler, HardwareSerial &serial)
Standard standard