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

Leaf node representing plain text content of an HTML document. More...

#include <html.h>

Inheritance diagram for libhtmlpp::TextElement:
[legend]

Public Member Functions

 TextElement ()
 
 TextElement (const std::string &txt)
 
 TextElement (const TextElement &texel)
 
 ~TextElement ()
 
TextElementoperator= (const Element &hel)
 
TextElementoperator= (const Element *hel)
 
const std::string getText ()
 
void setText (const std::string &txt)
 
int getType () const
 
- Public Member Functions inherited from libhtmlpp::Element
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)
 

Static Public Member Functions

static size_t parseElement (const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
 

Protected Attributes

std::vector< char > _Text
 
- Protected Attributes inherited from libhtmlpp::Element
std::unique_ptr< Element_nextElement
 
Element_prevElement
 

Friends

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)
 

Additional Inherited Members

- Protected Member Functions inherited from libhtmlpp::Element
 Element ()
 

Detailed Description

Leaf node representing plain text content of an HTML document.

Definition at line 189 of file html.h.

Constructor & Destructor Documentation

◆ TextElement() [1/3]

libhtmlpp::TextElement::TextElement ( )

Definition at line 1366 of file html.cpp.

◆ TextElement() [2/3]

libhtmlpp::TextElement::TextElement ( const std::string &  txt)

Definition at line 1369 of file html.cpp.

◆ TextElement() [3/3]

libhtmlpp::TextElement::TextElement ( const TextElement texel)

Definition at line 1373 of file html.cpp.

◆ ~TextElement()

libhtmlpp::TextElement::~TextElement ( )

Definition at line 1377 of file html.cpp.

Member Function Documentation

◆ getText()

const std::string libhtmlpp::TextElement::getText ( )

Definition at line 1395 of file html.cpp.

◆ getType()

int libhtmlpp::TextElement::getType ( ) const
virtual

Implements libhtmlpp::Element.

Definition at line 1399 of file html.cpp.

◆ operator=() [1/2]

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

Definition at line 1381 of file html.cpp.

◆ operator=() [2/2]

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

Definition at line 1386 of file html.cpp.

◆ parseElement()

size_t libhtmlpp::TextElement::parseElement ( const std::vector< char > &  in,
std::unique_ptr< libhtmlpp::Element > &  el,
size_t  start,
bool &  termination 
)
static

Definition at line 1403 of file html.cpp.

◆ setText()

void libhtmlpp::TextElement::setText ( const std::string &  txt)

Definition at line 1391 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.

◆ HtmlString

friend class HtmlString
friend

Definition at line 208 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.

Member Data Documentation

◆ _Text

std::vector<char> libhtmlpp::TextElement::_Text
protected

Definition at line 207 of file html.h.


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