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

Element representing an embedded <svg> tag and its attributes/content. More...

#include <html.h>

Inheritance diagram for libhtmlpp::SvgElement:
[legend]

Public Member Functions

 SvgElement ()
 
 SvgElement (const SvgElement &svgsrc)
 
 ~SvgElement ()
 
SvgElementoperator= (const Element &hel)
 
SvgElementoperator= (const Element *hel)
 
const std::vector< char > getSvg ()
 
void setSvg (const std::string &svg)
 
int getType () const
 
void insertChild (const Element *el)=delete
 
void insertChild (const Element &el)=delete
 
void appendChild (const Element *el)=delete
 
void appendChild (const Element &el)=delete
 
- Public Member Functions inherited from libhtmlpp::HtmlElement
 HtmlElement ()
 
 HtmlElement (const std::string &tag)
 
 HtmlElement (const HtmlElement &hel)
 
 HtmlElement (const HtmlElement *hel)
 
 ~HtmlElement ()
 
HtmlElementoperator= (const HtmlElement &hel)
 
HtmlElementoperator= (const HtmlElement *hel)
 
bool operator== (const HtmlElement *hel)
 
bool operator== (const HtmlElement &hel)
 
void setAttribute (const std::string &name, const std::string &value)
 
void setIntAttribute (const std::string &name, int value)
 
const std::string getAtributte (const std::string &name) const
 
int getIntAtributte (const std::string &name) const
 
void insertChild (const Element *el)
 
void insertChild (const Element &el)
 
void appendChild (const Element *el)
 
void appendChild (const Element &el)
 
void setTagname (const std::string &name)
 
const std::string getTagname () const
 
HtmlElementgetElementbyID (const std::string &id) const
 
HtmlElementgetElementbyTag (const std::string &tag) const
 
ElementfirstChild () const
 
const AttributesfirstAttribute () const
 
void remove (Element *el)
 
- 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
 

Static Public Member Functions

static size_t parseElement (const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
 
- Static Public Member Functions inherited from libhtmlpp::HtmlElement
static size_t parseElement (const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
 

Protected Attributes

std::unique_ptr< Element_childElement =nullptr
 
std::vector< char > _Svg
 
- Protected Attributes inherited from libhtmlpp::HtmlElement
std::unique_ptr< Element_childElement =nullptr
 
- 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::HtmlElement
void _serialelize (const std::vector< char > &in)
 Extracts tag name and attributes from a token vector into an HtmlElement.
 
- Protected Member Functions inherited from libhtmlpp::Element
 Element ()
 

Detailed Description

Element representing an embedded <svg> tag and its attributes/content.

Definition at line 274 of file html.h.

Constructor & Destructor Documentation

◆ SvgElement() [1/2]

libhtmlpp::SvgElement::SvgElement ( )

Definition at line 1687 of file html.cpp.

◆ SvgElement() [2/2]

libhtmlpp::SvgElement::SvgElement ( const SvgElement svgsrc)

Definition at line 1690 of file html.cpp.

◆ ~SvgElement()

libhtmlpp::SvgElement::~SvgElement ( )

Definition at line 1694 of file html.cpp.

Member Function Documentation

◆ appendChild() [1/2]

void libhtmlpp::SvgElement::appendChild ( const Element el)
delete

◆ appendChild() [2/2]

void libhtmlpp::SvgElement::appendChild ( const Element el)
delete

◆ getSvg()

const std::vector< char > libhtmlpp::SvgElement::getSvg ( )

Definition at line 1713 of file html.cpp.

◆ getType()

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

Reimplemented from libhtmlpp::HtmlElement.

Definition at line 1717 of file html.cpp.

◆ insertChild() [1/2]

void libhtmlpp::SvgElement::insertChild ( const Element el)
delete

◆ insertChild() [2/2]

void libhtmlpp::SvgElement::insertChild ( const Element el)
delete

◆ operator=() [1/2]

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

Definition at line 1698 of file html.cpp.

◆ operator=() [2/2]

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

Definition at line 1703 of file html.cpp.

◆ parseElement()

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

Definition at line 1721 of file html.cpp.

◆ setSvg()

void libhtmlpp::SvgElement::setSvg ( const std::string &  svg)

Definition at line 1708 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 299 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

◆ _childElement

std::unique_ptr<Element> libhtmlpp::SvgElement::_childElement =nullptr
protected

Definition at line 296 of file html.h.

◆ _Svg

std::vector<char> libhtmlpp::SvgElement::_Svg
protected

Definition at line 298 of file html.h.


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