40#ifndef DRAIN_TREE_HTML
41#define DRAIN_TREE_HTML
46#include "ReferenceMap.h"
62typedef drain::UnorderedMultiTree<NodeHTML,false, NodeXML<>::path_t>
TreeHTML;
76 HEAD, BASE, LINK, META, TITLE,
77 BODY, A, BR, CAPTION, DIV, H1, H2, H3, HR, IMG, LI, OL, P, SPAN, TABLE, TR, TH, TD, UL};
101 NodeHTML(
const html::tag_t & t = html::tag_t(0));
152 void handleType(
const html::tag_t &t)
override final;
164 ostr <<
"<!DOCTYPE html>\n";
170TreeHTML & TreeHTML::operator[](
const html::tag_t & type);
174const TreeHTML & TreeHTML::operator[](
const html::tag_t & type)
const;
180TreeHTML & TreeHTML::operator=(std::initializer_list<std::pair<const char *,const Variable> > l){
188TreeHTML & TreeHTML::operator=(
const std::string & arg){
197TreeHTML & TreeHTML::operator=(
const T & arg){
209std::ostream & operator<<(std::ostream &ostr,
const NodeHTML & node){
210 return node.nodeToStream(ostr);
215std::ostream & operator<<(std::ostream &ostr,
const TreeHTML & tree){
245const NodeXML<html::tag_t>::xml_default_elem_map_t NodeXML<html::tag_t>::xml_default_elems;
250TreeHTML & TreeHTML::addChild(
const TreeHTML::key_t & key){
259TreeHTML & TreeHTML::operator()(
const html::tag_t & type){
Two-way mapping between strings and objects of template class T.
Definition Dictionary.h:63
virtual bool isSingular() const override final
Tell if this element should always be a single tag, not separate opening and closing tags.
Definition TreeHTML.cpp:163
virtual void handleType(const html::tag_t &t) override final
Internal function called after setType()
Definition TreeHTML.cpp:147
virtual bool isExplicit() const override final
Tell if this element should always have separate opening and closing tags even when empty,...
Definition TreeHTML.cpp:184
static std::ostream & docTypeToStream(std::ostream &ostr)
Write the XML definition beginning any XML document.
Definition TreeXML.h:751
static std::ostream & docToStream(std::ostream &ostr, const V &tree)
Definition TreeXML.h:733
static TX & xmlAssignString(TX &tree, const std::string &s)
When assigning a string, create new element unless the element itself is of type CTEXT.
Definition XML.h:618
static TX & xmlSetType(TX &tree, const typename TX::node_data_t::xml_tag_t &type)
Definition XML.h:679
static T & xmlAddChild(T &tree, const std::string &key)
Definition XML.h:692
static X & xmlAssignNode(X &dst, const X &src)
Assign another tree structure to another.
Definition XML.h:554
static TX & xmlAssign(TX &dst, const TX &src)
Assign another tree structure to another.
Definition XML.h:513
Definition DataSelector.cpp:1277
drain::UnorderedMultiTree< NodeHTML, false, NodeXML<>::path_t > TreeHTML
The HTML data structure.
Definition TreeHTML.h:62
DRAIN_TYPENAME(void)
Add a specialization for each type of those you want to support.
Wrapper for unique (static) dictionary of enum values.
Definition EnumFlags.h:66