Loading src/html.cpp +24 −0 Changes for src/html.cpp: 24 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -502,10 +502,20 @@ void libhtmlpp::HtmlElement::appendChild(libhtmlpp::Element* el){ } libhtmlpp::HtmlElement & libhtmlpp::HtmlElement::operator=(const libhtmlpp::Element& hel){ delete _firstAttr; delete _childElement; delete _nextElement; _copy(nullptr,this,&hel); return *this; } libhtmlpp::HtmlElement & libhtmlpp::HtmlElement::operator=(const libhtmlpp::Element* hel){ delete _firstAttr; delete _childElement; delete _nextElement; _copy(nullptr,this,hel); return *this; } namespace libhtmlpp { void _copy(const libhtmlpp::Element* prev,libhtmlpp::Element *dest,const libhtmlpp::Element *src){ Loading Loading @@ -585,10 +595,17 @@ void libhtmlpp::Element::insertAfter(libhtmlpp::Element* el){ } libhtmlpp::Element& libhtmlpp::Element::operator=(const Element &hel){ delete _nextElement; _copy(nullptr,this,&hel); return *this; } libhtmlpp::Element& libhtmlpp::Element::operator=(const Element *hel){ delete _nextElement; _copy(nullptr,this,hel); return *this; } libhtmlpp::Element *libhtmlpp::Element::nextElement() const{ return _nextElement; } Loading Loading @@ -628,10 +645,17 @@ libhtmlpp::TextElement::~TextElement(){ } libhtmlpp::TextElement & libhtmlpp::TextElement::operator=(const libhtmlpp::Element& hel){ delete _nextElement; _copy(nullptr,this,&hel); return *this; } libhtmlpp::TextElement & libhtmlpp::TextElement::operator=(const libhtmlpp::Element* hel){ delete _nextElement; _copy(nullptr,this,hel); return *this; } void libhtmlpp::TextElement::setText(const char* txt){ _Text=txt; } Loading src/html.h +3 −0 Changes for src/html.h: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ namespace libhtmlpp { void insertBefore(Element* el); Element& operator=(const Element &hel); Element& operator=(const Element *hel); Element* nextElement() const; Element* prevElement() const; Loading @@ -78,6 +79,7 @@ namespace libhtmlpp { ~HtmlElement(); HtmlElement& operator=(const Element &hel); HtmlElement& operator=(const Element *hel); void setAttribute(const char* name, const char* value); void setIntAttribute(const char* name, int value); Loading Loading @@ -126,6 +128,7 @@ namespace libhtmlpp { ~TextElement(); TextElement& operator=(const Element &hel); TextElement& operator=(const Element *hel); const char *getText(); void setText(const char *txt); Loading Loading
src/html.cpp +24 −0 Changes for src/html.cpp: 24 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -502,10 +502,20 @@ void libhtmlpp::HtmlElement::appendChild(libhtmlpp::Element* el){ } libhtmlpp::HtmlElement & libhtmlpp::HtmlElement::operator=(const libhtmlpp::Element& hel){ delete _firstAttr; delete _childElement; delete _nextElement; _copy(nullptr,this,&hel); return *this; } libhtmlpp::HtmlElement & libhtmlpp::HtmlElement::operator=(const libhtmlpp::Element* hel){ delete _firstAttr; delete _childElement; delete _nextElement; _copy(nullptr,this,hel); return *this; } namespace libhtmlpp { void _copy(const libhtmlpp::Element* prev,libhtmlpp::Element *dest,const libhtmlpp::Element *src){ Loading Loading @@ -585,10 +595,17 @@ void libhtmlpp::Element::insertAfter(libhtmlpp::Element* el){ } libhtmlpp::Element& libhtmlpp::Element::operator=(const Element &hel){ delete _nextElement; _copy(nullptr,this,&hel); return *this; } libhtmlpp::Element& libhtmlpp::Element::operator=(const Element *hel){ delete _nextElement; _copy(nullptr,this,hel); return *this; } libhtmlpp::Element *libhtmlpp::Element::nextElement() const{ return _nextElement; } Loading Loading @@ -628,10 +645,17 @@ libhtmlpp::TextElement::~TextElement(){ } libhtmlpp::TextElement & libhtmlpp::TextElement::operator=(const libhtmlpp::Element& hel){ delete _nextElement; _copy(nullptr,this,&hel); return *this; } libhtmlpp::TextElement & libhtmlpp::TextElement::operator=(const libhtmlpp::Element* hel){ delete _nextElement; _copy(nullptr,this,hel); return *this; } void libhtmlpp::TextElement::setText(const char* txt){ _Text=txt; } Loading
src/html.h +3 −0 Changes for src/html.h: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ namespace libhtmlpp { void insertBefore(Element* el); Element& operator=(const Element &hel); Element& operator=(const Element *hel); Element* nextElement() const; Element* prevElement() const; Loading @@ -78,6 +79,7 @@ namespace libhtmlpp { ~HtmlElement(); HtmlElement& operator=(const Element &hel); HtmlElement& operator=(const Element *hel); void setAttribute(const char* name, const char* value); void setIntAttribute(const char* name, int value); Loading Loading @@ -126,6 +128,7 @@ namespace libhtmlpp { ~TextElement(); TextElement& operator=(const Element &hel); TextElement& operator=(const Element *hel); const char *getText(); void setText(const char *txt); Loading