Krita Source Code Documentation
Loading...
Searching...
No Matches
KoXmlWriter::Tag Struct Reference

Public Member Functions

 Tag (const char *t=0, bool ind=true)
 
 Tag (const Tag &original)
 
 ~Tag ()
 

Public Attributes

bool hasChildren: 1
 element or text children
 
bool indentInside: 1
 whether to indent the contents of this tag
 
bool lastChildIsText: 1
 last child is a text node
 
bool openingTagClosed: 1
 true once the '>' in <tag a="b"> is written out
 
char * tagName {0}
 

Detailed Description

Definition at line 151 of file KoXmlWriter.h.

Constructor & Destructor Documentation

◆ Tag() [1/2]

KoXmlWriter::Tag::Tag ( const char * t = 0,
bool ind = true )
inline

Definition at line 152 of file KoXmlWriter.h.

153 : hasChildren(false)
154 , lastChildIsText(false)
155 , openingTagClosed(false)
156 , indentInside(ind)
157 {
158 tagName = new char[qstrlen(t) + 1];
159 qstrcpy(tagName, t);
160 }
bool indentInside
whether to indent the contents of this tag
bool openingTagClosed
true once the '>' in <tag a="b"> is written out
bool lastChildIsText
last child is a text node
bool hasChildren
element or text children

◆ ~Tag()

KoXmlWriter::Tag::~Tag ( )
inline

Definition at line 162 of file KoXmlWriter.h.

162 {
163 delete[] tagName;
164 }

◆ Tag() [2/2]

KoXmlWriter::Tag::Tag ( const Tag & original)
inline

Definition at line 166 of file KoXmlWriter.h.

167 {
168 tagName = new char[qstrlen(original.tagName) + 1];
169 qstrcpy(tagName, original.tagName);
170
171 hasChildren = original.hasChildren;
172 lastChildIsText = original.lastChildIsText;
173 openingTagClosed = original.openingTagClosed;
174 indentInside = original.indentInside;
175 }

References hasChildren, indentInside, lastChildIsText, openingTagClosed, and tagName.

Member Data Documentation

◆ hasChildren

bool KoXmlWriter::Tag::hasChildren

element or text children

Definition at line 178 of file KoXmlWriter.h.

◆ indentInside

bool KoXmlWriter::Tag::indentInside

whether to indent the contents of this tag

Definition at line 181 of file KoXmlWriter.h.

◆ lastChildIsText

bool KoXmlWriter::Tag::lastChildIsText

last child is a text node

Definition at line 179 of file KoXmlWriter.h.

◆ openingTagClosed

bool KoXmlWriter::Tag::openingTagClosed

true once the '>' in <tag a="b"> is written out

Definition at line 180 of file KoXmlWriter.h.

◆ tagName

char* KoXmlWriter::Tag::tagName {0}

Definition at line 177 of file KoXmlWriter.h.

177{0};

The documentation for this struct was generated from the following file: