libhtmlpp 1.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
libhtmlpp::Element Class Referenceabstract

Abstract base class for all nodes in the HTML tree. More...

#include <html.h>

Inheritance diagram for libhtmlpp::Element:
[legend]

Public Member Functions

virtual ~Element ()
 
 Element (const Element &el)
 
void insertAfter (Element *el)
 
void insertBefore (Element *el)
 
Elementoperator= (const Element &hel)
 
Elementoperator= (const Element *hel)
 
ElementnextElement () const
 
ElementprevElement () const
 
virtual void remove (Element *el)
 
virtual int getType () const =0
 

Protected Member Functions

 Element ()
 

Protected Attributes

std::unique_ptr< Element_nextElement
 
Element_prevElement
 

Friends

class HtmlElement
 
class TextElement
 
class HtmlString
 
void print (const Element &element, HtmlString &output, bool formated)
 Serializes an element (and its subtree) into an HtmlString.
 
void _copy (libhtmlpp::Element *dest, const libhtmlpp::Element *src)
 

Detailed Description

Abstract base class for all nodes in the HTML tree.

Provides linkage and common operations.

Definition at line 76 of file html.h.

Constructor & Destructor Documentation

◆ ~Element()

libhtmlpp::Element::~Element ( )
virtual

Definition at line 1338 of file html.cpp.

◆ Element() [1/2]

libhtmlpp::Element::Element ( const Element el)

Definition at line 1332 of file html.cpp.

◆ Element() [2/2]

libhtmlpp::Element::Element ( )
protected

Definition at line 1327 of file html.cpp.

Member Function Documentation

◆ getType()

int libhtmlpp::Element::getType ( ) const
pure virtual

◆ insertAfter()

void libhtmlpp::Element::insertAfter ( libhtmlpp::Element el)

Definition at line 1268 of file html.cpp.

◆ insertBefore()

void libhtmlpp::Element::insertBefore ( libhtmlpp::Element el)

Definition at line 1236 of file html.cpp.

◆ nextElement()

libhtmlpp::Element * libhtmlpp::Element::nextElement ( ) const

Definition at line 1319 of file html.cpp.

◆ operator=() [1/2]

libhtmlpp::Element & libhtmlpp::Element::operator= ( const Element hel)

Definition at line 1309 of file html.cpp.

◆ operator=() [2/2]

libhtmlpp::Element & libhtmlpp::Element::operator= ( const Element hel)

Definition at line 1314 of file html.cpp.

◆ prevElement()

libhtmlpp::Element * libhtmlpp::Element::prevElement ( ) const

Definition at line 1323 of file html.cpp.

◆ remove()

void libhtmlpp::Element::remove ( libhtmlpp::Element el)
virtual

Reimplemented in libhtmlpp::HtmlElement.

Definition at line 1345 of file html.cpp.

Friends And Related Symbol Documentation

◆ _copy

void _copy ( libhtmlpp::Element dest,
const libhtmlpp::Element src 
)
friend

Definition at line 1056 of file html.cpp.

◆ HtmlElement

friend class HtmlElement
friend

Definition at line 101 of file html.h.

◆ HtmlString

friend class HtmlString
friend

Definition at line 103 of file html.h.

◆ print

void print ( const Element element,
HtmlString output,
bool  formated 
)
friend

Serializes an element (and its subtree) into an HtmlString.

Parameters
elementRoot element to print.
outputOutput buffer to append serialized HTML to.
formatedIf true, pretty-prints the output with line breaks/indentation.

◆ TextElement

friend class TextElement
friend

Definition at line 102 of file html.h.

Member Data Documentation

◆ _nextElement

std::unique_ptr<Element> libhtmlpp::Element::_nextElement
protected

Definition at line 98 of file html.h.

◆ _prevElement

Element* libhtmlpp::Element::_prevElement
protected

Definition at line 99 of file html.h.


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