TemplateStream.h
Go to the documentation of this file.
void setDoubleBraces(bool enable)
Use two braces {{X}} to mark tags.
Definition: TemplateStream.h:149
void onGetValue(GetValueDelegate callback)
Set a callback to obtain variable values.
Definition: TemplateStream.h:121
String eval(String expr)
Evaluate an expression in-situ.
Definition: TemplateStream.h:173
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
StreamType getStreamType() const override
Get the stream type.
Definition: TemplateStream.h:72
String getName() const override
Returns name of the resource.
Definition: TemplateStream.h:112
void setVars(const Variables &vars)
Set multiple variables in the template file.
Definition: TemplateStream.h:99
bool isFinished() override
Check if all data has been read.
Definition: TemplateStream.h:81
void enableOutput(bool enable)
During processing applications may suppress output of certain sections by calling this method from wi...
Definition: TemplateStream.h:130
Stream which performs variable-value substitution on-the-fly.
Definition: TemplateStream.h:41
bool isOutputEnabled() const
Determine if stream output is active.
Definition: TemplateStream.h:140
virtual String getName() const
Returns name of the resource.
Definition: DataSourceStream.h:156
int seekFrom(int offset, SeekOrigin origin) override
Change position in stream.
Variables & variables()
Get the template variables.
Definition: TemplateStream.h:107
TemplateStream(IDataSourceStream *stream, bool owned=true)
Create a template stream.
Definition: TemplateStream.h:58
void setVar(const String &name, const String &value)
Set value of a variable in the template file.
Definition: TemplateStream.h:91
1.8.13