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, PRE, SPAN, TABLE, TR, TH, TD, UL};
98 NodeHTML(
const Html::tag_t & t = Html::tag_t(0));
151 void handleType()
override final;
163 ostr <<
"<!DOCTYPE html>\n";
169TreeHTML & TreeHTML::operator[](
const Html::tag_t & type);
173const TreeHTML & TreeHTML::operator[](
const Html::tag_t & type)
const;
179TreeHTML & TreeHTML::operator=(std::initializer_list<std::pair<const char *,const Variable> > l){
187TreeHTML & TreeHTML::operator=(
const std::string & arg){
196TreeHTML & TreeHTML::operator=(
const T & arg){
208std::ostream & operator<<(std::ostream &ostr,
const NodeHTML & node){
209 return node.nodeToStream(ostr);
214std::ostream & operator<<(std::ostream &ostr,
const TreeHTML & tree){
244const NodeXML<Html::tag_t>::xml_default_elem_map_t NodeXML<Html::tag_t>::xml_default_elems;
249TreeHTML & TreeHTML::addChild(
const TreeHTML::key_t & key){
258TreeHTML & 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:168
virtual bool isExplicit() const override final
Tell if this element should always have separate opening and closing tags even when empty,...
Definition TreeHTML.cpp:189
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 T & xmlAssign(T &dst, const T &src)
Assign another tree structure to another.
Definition XML.h:609
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:725
static TX & xmlSetType(TX &tree, const typename TX::node_data_t::xml_tag_t &type)
Definition XML.h:762
static T & xmlAddChild(T &tree, const std::string &key)
Definition XML.h:775
static N & xmlAssignNode(N &dst, const N &src)
Assign tree node (data) to another.
Definition XML.h:654
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.
A container for a static dictionary of enumeration values.
Definition EnumFlags.h:69