Snorktracker
 All Data Structures Files Functions Variables Macros Pages
Public Member Functions | Protected Attributes
HtmlTag Class Reference

#include <HtmlTag.h>

Public Member Functions

 HtmlTag (String &h, const String &tn, String attributes="")
 
 ~HtmlTag ()
 

Protected Attributes

String & html
 The html content.
 
String tagName
 The current element name.
 

Detailed Description

Helper class for nested HTML elements, Works with the scope of the instances { HtmlTag begin("html"); xyz; } generate <html> xyz; </html>

Definition at line 34 of file HtmlTag.h.

Constructor & Destructor Documentation

HtmlTag::HtmlTag ( String &  h,
const String &  tn,
String  attributes = "" 
)

Creates the begin element

Definition at line 48 of file HtmlTag.h.

References html, and tagName.

49  : html(h)
50  , tagName(tn)
51 {
52  html += F("<");
53  html += tagName;
54  html += F(" ");
55  html += attributes;
56  html += F(">");
57 }
String & html
The html content.
Definition: HtmlTag.h:37
String tagName
The current element name.
Definition: HtmlTag.h:38
HtmlTag::~HtmlTag ( )

Creates the end element

Definition at line 60 of file HtmlTag.h.

References html, and tagName.

61 {
62  html += F("</");
63  html += tagName;
64  html += F(">");
65 }
String & html
The html content.
Definition: HtmlTag.h:37
String tagName
The current element name.
Definition: HtmlTag.h:38

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