Commit 02ce627b authored by Charles Samuels's avatar Charles Samuels
Browse files

This adds a copy constructor to [almost] all Node subclasses. Almost

because I surely missed a couple thanks to the fact that they're in
classes that don't have an operator =([..]Node[..]).

But I did so many, that adding a few others yourself probably will not
be very strenuous (if you know what I mean.. [cough] :)

Or you could just ask me to do it.  (yay!)

svn path=/trunk/kdelibs/; revision=45340
parent 0c675324
......@@ -81,10 +81,6 @@ Document::Document(bool create) : Node()
impl = 0;
}
Document::Document(const Document &other) : Node(other)
{
}
Document::Document(DocumentImpl *i) : Node(i)
{
}
......
......@@ -109,6 +109,8 @@ public:
*/
Document(bool);
Document(const Document &other);
Document(const Node &other) : Node()
{(*this)=other;}
Document & operator = (const Node &other);
Document & operator = (const Document &other);
......@@ -348,6 +350,8 @@ class DocumentFragment : public Node
public:
DocumentFragment();
DocumentFragment(const DocumentFragment &other);
DocumentFragment(const Node &other) : Node()
{(*this)=other;}
DocumentFragment & operator = (const Node &other);
DocumentFragment & operator = (const DocumentFragment &other);
......@@ -380,6 +384,8 @@ public:
DocumentType();
DocumentType(const DocumentType &other);
DocumentType(const Node &other) : Node()
{(*this)=other;}
DocumentType & operator = (const Node &other);
DocumentType & operator = (const DocumentType &other);
......
......@@ -81,7 +81,8 @@ class Attr : public Node
public:
Attr();
Attr(const Node &other)
{(*this)=other;}
Attr(const Attr &other);
Attr & operator = (const Node &other);
......
......@@ -45,6 +45,8 @@ class CharacterData : public Node
public:
CharacterData();
CharacterData(const CharacterData &other);
CharacterData(const Node &other) : Node()
{(*this)=other;}
CharacterData & operator = (const Node &other);
CharacterData & operator = (const CharacterData &other);
......@@ -213,6 +215,8 @@ class Comment : public CharacterData
public:
Comment();
Comment(const Comment &other);
Comment(const Node &other) : CharacterData()
{(*this)=other;}
Comment & operator = (const Node &other);
Comment & operator = (const Comment &other);
......@@ -253,6 +257,8 @@ class Text : public CharacterData
public:
Text();
Text(const Text &other);
Text(const Node &other) : CharacterData()
{(*this)=other;}
Text & operator = (const Node &other);
Text & operator = (const Text &other);
......
......@@ -54,6 +54,8 @@ class CDATASection : public Text
public:
CDATASection();
CDATASection(const CDATASection &other);
CDATASection(const Node &other) : Text()
{(*this)=other;}
CDATASection & operator = (const Node &other);
CDATASection & operator = (const CDATASection &other);
......@@ -107,6 +109,8 @@ class Entity : public Node
public:
Entity();
Entity(const Entity &other);
Entity(const Node &other) : Node()
{(*this)=other;}
Entity & operator = (const Node &other);
Entity & operator = (const Entity &other);
......@@ -169,6 +173,8 @@ class EntityReference : public Node
public:
EntityReference();
EntityReference(const EntityReference &other);
EntityReference(const Node &other) : Node()
{(*this)=other;}
EntityReference & operator = (const Node &other);
EntityReference & operator = (const EntityReference &other);
......@@ -198,6 +204,8 @@ class Notation : public Node
public:
Notation();
Notation(const Notation &other);
Notation(const Node &other) : Node()
{(*this)=other;}
Notation & operator = (const Node &other);
Notation & operator = (const Notation &other);
......@@ -231,6 +239,8 @@ class ProcessingInstruction : public Node
public:
ProcessingInstruction();
ProcessingInstruction(const ProcessingInstruction &other);
ProcessingInstruction(const Node &other) : Node()
{(*this)=other;}
ProcessingInstruction & operator = (const Node &other);
ProcessingInstruction & operator = (const ProcessingInstruction &other);
......
......@@ -41,6 +41,8 @@ class HTMLBodyElement : public HTMLElement
public:
HTMLBodyElement();
HTMLBodyElement(const HTMLBodyElement &other);
HTMLBodyElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLBodyElement(HTMLBodyElementImpl *impl);
public:
......@@ -152,6 +154,8 @@ class HTMLFrameElement : public HTMLElement
public:
HTMLFrameElement();
HTMLFrameElement(const HTMLFrameElement &other);
HTMLFrameElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLFrameElement(HTMLFrameElementImpl *impl);
public:
......@@ -285,6 +289,8 @@ class HTMLFrameSetElement : public HTMLElement
public:
HTMLFrameSetElement();
HTMLFrameSetElement(const HTMLFrameSetElement &other);
HTMLFrameSetElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLFrameSetElement(HTMLFrameSetElementImpl *impl);
public:
......@@ -337,6 +343,8 @@ class HTMLHeadElement : public HTMLElement
public:
HTMLHeadElement();
HTMLHeadElement(const HTMLHeadElement &other);
HTMLHeadElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLHeadElement(HTMLHeadElementImpl *impl);
public:
......@@ -376,6 +384,8 @@ class HTMLHtmlElement : public HTMLElement
public:
HTMLHtmlElement();
HTMLHtmlElement(const HTMLHtmlElement &other);
HTMLHtmlElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLHtmlElement(HTMLHtmlElementImpl *impl);
public:
......
......@@ -39,6 +39,8 @@ class HTMLBlockquoteElement : public HTMLElement
public:
HTMLBlockquoteElement();
HTMLBlockquoteElement(const HTMLBlockquoteElement &other);
HTMLBlockquoteElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLBlockquoteElement(HTMLBlockquoteElementImpl *impl);
public:
......@@ -78,6 +80,8 @@ class HTMLDivElement : public HTMLElement
public:
HTMLDivElement();
HTMLDivElement(const HTMLDivElement &other);
HTMLDivElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLDivElement(HTMLDivElementImpl *impl);
public:
......@@ -118,6 +122,8 @@ class HTMLHRElement : public HTMLElement
public:
HTMLHRElement();
HTMLHRElement(const HTMLHRElement &other);
HTMLHRElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLHRElement(HTMLHRElementImpl *impl);
public:
......@@ -201,6 +207,8 @@ class HTMLHeadingElement : public HTMLElement
public:
HTMLHeadingElement();
HTMLHeadingElement(const HTMLHeadingElement &other);
HTMLHeadingElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLHeadingElement(HTMLHeadingElementImpl *impl);
public:
......@@ -241,6 +249,8 @@ class HTMLParagraphElement : public HTMLElement
public:
HTMLParagraphElement();
HTMLParagraphElement(const HTMLParagraphElement &other);
HTMLParagraphElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLParagraphElement(HTMLParagraphElementImpl *impl);
public:
......@@ -280,6 +290,8 @@ class HTMLPreElement : public HTMLElement
public:
HTMLPreElement();
HTMLPreElement(const HTMLPreElement &other);
HTMLPreElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLPreElement(HTMLPreElementImpl *impl);
public:
......
......@@ -75,6 +75,8 @@ public:
*/
HTMLDocument(KHTMLView *parent);
HTMLDocument(const HTMLDocument &other);
HTMLDocument(const Node &other) : Document()
{(*this)=other;}
protected:
HTMLDocument(HTMLDocumentImpl *impl);
public:
......
......@@ -67,6 +67,9 @@ class HTMLElement : public Element
public:
HTMLElement();
HTMLElement(const HTMLElement &other);
HTMLElement(const Node &other) : Element()
{(*this)=other;}
protected:
HTMLElement(HTMLElementImpl *impl);
public:
......
......@@ -44,6 +44,8 @@ class HTMLButtonElement : public HTMLElement
public:
HTMLButtonElement();
HTMLButtonElement(const HTMLButtonElement &other);
HTMLButtonElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLButtonElement(HTMLButtonElementImpl *impl);
public:
......@@ -152,6 +154,8 @@ class HTMLFieldSetElement : public HTMLElement
public:
HTMLFieldSetElement();
HTMLFieldSetElement(const HTMLFieldSetElement &other);
HTMLFieldSetElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLFieldSetElement(HTMLFieldSetElementImpl *impl);
public:
......@@ -198,6 +202,8 @@ class HTMLFormElement : public HTMLElement
public:
HTMLFormElement();
HTMLFormElement(const HTMLFormElement &other);
HTMLFormElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLFormElement(HTMLFormElementImpl *impl);
public:
......@@ -328,6 +334,8 @@ class HTMLInputElement : public HTMLElement
public:
HTMLInputElement();
HTMLInputElement(const HTMLInputElement &other);
HTMLInputElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLInputElement(HTMLInputElementImpl *impl);
public:
......@@ -618,6 +626,8 @@ class HTMLLabelElement : public HTMLElement
public:
HTMLLabelElement();
HTMLLabelElement(const HTMLLabelElement &other);
HTMLLabelElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLLabelElement(HTMLLabelElementImpl *impl);
public:
......@@ -679,6 +689,8 @@ class HTMLLegendElement : public HTMLElement
public:
HTMLLegendElement();
HTMLLegendElement(const HTMLLegendElement &other);
HTMLLegendElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLLegendElement(HTMLLegendElementImpl *impl);
public:
......@@ -739,6 +751,8 @@ class HTMLOptGroupElement : public HTMLElement
public:
HTMLOptGroupElement();
HTMLOptGroupElement(const HTMLOptGroupElement &other);
HTMLOptGroupElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLOptGroupElement(HTMLOptGroupElementImpl *impl);
public:
......@@ -791,6 +805,8 @@ class HTMLSelectElement : public HTMLElement
public:
HTMLSelectElement();
HTMLSelectElement(const HTMLSelectElement &other);
HTMLSelectElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLSelectElement(HTMLSelectElementImpl *impl);
public:
......@@ -968,6 +984,8 @@ class HTMLTextAreaElement : public HTMLElement
public:
HTMLTextAreaElement();
HTMLTextAreaElement(const HTMLTextAreaElement &other);
HTMLTextAreaElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTextAreaElement(HTMLTextAreaElementImpl *impl);
public:
......@@ -1138,6 +1156,8 @@ class HTMLOptionElement : public HTMLElement
public:
HTMLOptionElement();
HTMLOptionElement(const HTMLOptionElement &other);
HTMLOptionElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLOptionElement(HTMLOptionElementImpl *impl);
public:
......
......@@ -41,6 +41,8 @@ class HTMLBaseElement : public HTMLElement
public:
HTMLBaseElement();
HTMLBaseElement(const HTMLBaseElement &other);
HTMLBaseElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLBaseElement(HTMLBaseElementImpl *impl);
public:
......@@ -94,6 +96,8 @@ class HTMLIsIndexElement : public HTMLElement
public:
HTMLIsIndexElement();
HTMLIsIndexElement(const HTMLIsIndexElement &other);
HTMLIsIndexElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLIsIndexElement(HTMLIsIndexElementImpl *impl);
public:
......@@ -143,6 +147,8 @@ class HTMLLinkElement : public HTMLElement
public:
HTMLLinkElement();
HTMLLinkElement(const HTMLLinkElement &other);
HTMLLinkElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLLinkElement(HTMLLinkElementImpl *impl);
public:
......@@ -287,6 +293,8 @@ class HTMLMetaElement : public HTMLElement
public:
HTMLMetaElement();
HTMLMetaElement(const HTMLMetaElement &other);
HTMLMetaElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLMetaElement(HTMLMetaElementImpl *impl);
public:
......@@ -364,6 +372,8 @@ class HTMLScriptElement : public HTMLElement
public:
HTMLScriptElement();
HTMLScriptElement(const HTMLScriptElement &other);
HTMLScriptElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLScriptElement(HTMLScriptElementImpl *impl);
public:
......@@ -476,6 +486,8 @@ class HTMLStyleElement : public HTMLElement
public:
HTMLStyleElement();
HTMLStyleElement(const HTMLStyleElement &other);
HTMLStyleElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLStyleElement(HTMLStyleElementImpl *impl);
public:
......@@ -538,6 +550,8 @@ class HTMLTitleElement : public HTMLElement
public:
HTMLTitleElement();
HTMLTitleElement(const HTMLTitleElement &other);
HTMLTitleElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTitleElement(HTMLTitleElementImpl *impl);
public:
......
......@@ -41,6 +41,8 @@ class HTMLAreaElement : public HTMLElement
public:
HTMLAreaElement();
HTMLAreaElement(const HTMLAreaElement &other);
HTMLAreaElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLAreaElement(HTMLAreaElementImpl *impl);
public:
......@@ -177,6 +179,8 @@ class HTMLImageElement : public HTMLElement
public:
HTMLImageElement();
HTMLImageElement(const HTMLImageElement &other);
HTMLImageElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLImageElement(HTMLImageElementImpl *impl);
public:
......@@ -378,6 +382,8 @@ class HTMLMapElement : public HTMLElement
public:
HTMLMapElement();
HTMLMapElement(const HTMLMapElement &other);
HTMLMapElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLMapElement(HTMLMapElementImpl *impl);
public:
......
......@@ -41,6 +41,8 @@ class HTMLAnchorElement : public HTMLElement
public:
HTMLAnchorElement();
HTMLAnchorElement(const HTMLAnchorElement &other);
HTMLAnchorElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLAnchorElement(HTMLAnchorElementImpl *impl);
public:
......@@ -243,6 +245,8 @@ class HTMLBRElement : public HTMLElement
public:
HTMLBRElement();
HTMLBRElement(const HTMLBRElement &other);
HTMLBRElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLBRElement(HTMLBRElementImpl *impl);
public:
......@@ -284,6 +288,8 @@ class HTMLFontElement : public HTMLElement
public:
HTMLFontElement();
HTMLFontElement(const HTMLFontElement &other);
HTMLFontElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLFontElement(HTMLFontElementImpl *impl);
public:
......@@ -351,6 +357,8 @@ class HTMLIFrameElement : public HTMLElement
public:
HTMLIFrameElement();
HTMLIFrameElement(const HTMLIFrameElement &other);
HTMLIFrameElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLIFrameElement(HTMLIFrameElementImpl *impl);
public:
......@@ -514,6 +522,8 @@ class HTMLModElement : public HTMLElement
public:
HTMLModElement();
HTMLModElement(const HTMLModElement &other);
HTMLModElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLModElement(HTMLModElementImpl *impl);
public:
......@@ -570,6 +580,8 @@ class HTMLQuoteElement : public HTMLElement
public:
HTMLQuoteElement();
HTMLQuoteElement(const HTMLQuoteElement &other);
HTMLQuoteElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLQuoteElement(HTMLQuoteElementImpl *impl);
public:
......
......@@ -47,6 +47,8 @@ class HTMLDListElement : public HTMLElement
public:
HTMLDListElement();
HTMLDListElement(const HTMLDListElement &other);
HTMLDListElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLDListElement(HTMLDListElementImpl *impl);
public:
......@@ -85,6 +87,8 @@ class HTMLDirectoryElement : public HTMLElement
public:
HTMLDirectoryElement();
HTMLDirectoryElement(const HTMLDirectoryElement &other);
HTMLDirectoryElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLDirectoryElement(HTMLDirectoryElementImpl *impl);
public:
......@@ -122,6 +126,9 @@ class HTMLLIElement : public HTMLElement
public:
HTMLLIElement();
HTMLLIElement(const HTMLLIElement &other);
HTMLLIElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLLIElement(HTMLLIElementImpl *impl);
public:
......@@ -174,6 +181,9 @@ class HTMLMenuElement : public HTMLElement
public:
HTMLMenuElement();
HTMLMenuElement(const HTMLMenuElement &other);
HTMLMenuElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLMenuElement(HTMLMenuElementImpl *impl);
public:
......@@ -211,6 +221,8 @@ class HTMLOListElement : public HTMLElement
public:
HTMLOListElement();
HTMLOListElement(const HTMLOListElement &other);
HTMLOListElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLOListElement(HTMLOListElementImpl *impl);
public:
......@@ -277,6 +289,8 @@ class HTMLUListElement : public HTMLElement
public:
HTMLUListElement();
HTMLUListElement(const HTMLUListElement &other);
HTMLUListElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLUListElement(HTMLUListElementImpl *impl);
public:
......
......@@ -43,6 +43,8 @@ class HTMLBaseFontElement : public HTMLElement
public:
HTMLBaseFontElement();
HTMLBaseFontElement(const HTMLBaseFontElement &other);
HTMLBaseFontElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLBaseFontElement(HTMLBaseFontElementImpl *impl);
public:
......
......@@ -45,6 +45,8 @@ class HTMLAppletElement : public HTMLElement
public:
HTMLAppletElement();
HTMLAppletElement(const HTMLAppletElement &other);
HTMLAppletElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLAppletElement(HTMLAppletElementImpl *impl);
public:
......@@ -231,6 +233,8 @@ class HTMLObjectElement : public HTMLElement
public:
HTMLObjectElement();
HTMLObjectElement(const HTMLObjectElement &other);
HTMLObjectElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLObjectElement(HTMLObjectElementImpl *impl);
public:
......@@ -497,6 +501,8 @@ class HTMLParamElement : public HTMLElement
public:
HTMLParamElement();
HTMLParamElement(const HTMLParamElement &other);
HTMLParamElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLParamElement(HTMLParamElementImpl *impl);
public:
......
......@@ -44,6 +44,8 @@ class HTMLTableCaptionElement : public HTMLElement
public:
HTMLTableCaptionElement();
HTMLTableCaptionElement(const HTMLTableCaptionElement &other);
HTMLTableCaptionElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTableCaptionElement(HTMLTableCaptionElementImpl *impl);
public:
......@@ -86,6 +88,8 @@ class HTMLTableCellElement : public HTMLElement
public:
HTMLTableCellElement();
HTMLTableCellElement(const HTMLTableCellElement &other);
HTMLTableCellElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTableCellElement(HTMLTableCellElementImpl *impl);
public:
......@@ -312,6 +316,8 @@ class HTMLTableColElement : public HTMLElement
public:
HTMLTableColElement();
HTMLTableColElement(const HTMLTableColElement &other);
HTMLTableColElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTableColElement(HTMLTableColElementImpl *impl);
public:
......@@ -427,6 +433,9 @@ class HTMLTableElement : public HTMLElement
public:
HTMLTableElement();
HTMLTableElement(const HTMLTableElement &other);
HTMLTableElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTableElement(HTMLTableElementImpl *impl);
public:
......@@ -699,6 +708,9 @@ class HTMLTableRowElement : public HTMLElement
public:
HTMLTableRowElement();
HTMLTableRowElement(const HTMLTableRowElement &other);
HTMLTableRowElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTableRowElement(HTMLTableRowElementImpl *impl);
public:
......@@ -850,6 +862,10 @@ class HTMLTableSectionElement : public HTMLElement
public:
HTMLTableSectionElement();
HTMLTableSectionElement(const HTMLTableSectionElement &other);
HTMLTableSectionElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTableSectionElement(HTMLTableSectionElementImpl *impl);
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment