Qt 4.8
Public Functions | List of all members
QDomCommentPrivate Class Reference
Inheritance diagram for QDomCommentPrivate:
QDomCharacterDataPrivate QDomNodePrivate

Public Functions

QDomNodePrivatecloneNode (bool deep=true)
 
virtual bool isComment () const
 
QDomNode::NodeType nodeType () const
 
 QDomCommentPrivate (QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val)
 
 QDomCommentPrivate (QDomCommentPrivate *n, bool deep)
 
virtual void save (QTextStream &s, int, int) const
 
- Public Functions inherited from QDomCharacterDataPrivate
void appendData (const QString &arg)
 
uint dataLength () const
 
void deleteData (unsigned long offset, unsigned long count)
 
void insertData (unsigned long offset, const QString &arg)
 
virtual bool isCharacterData () const
 
 QDomCharacterDataPrivate (QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data)
 
 QDomCharacterDataPrivate (QDomCharacterDataPrivate *n, bool deep)
 
void replaceData (unsigned long offset, unsigned long count, const QString &arg)
 
QString substringData (unsigned long offset, unsigned long count) const
 
- Public Functions inherited from QDomNodePrivate
virtual QDomNodePrivateappendChild (QDomNodePrivate *newChild)
 
virtual void clear ()
 
virtual QDomNodePrivateinsertAfter (QDomNodePrivate *newChild, QDomNodePrivate *refChild)
 
virtual QDomNodePrivateinsertBefore (QDomNodePrivate *newChild, QDomNodePrivate *refChild)
 
virtual bool isAttr () const
 
virtual bool isCDATASection () const
 
virtual bool isDocument () const
 
virtual bool isDocumentFragment () const
 
virtual bool isDocumentType () const
 
virtual bool isElement () const
 
virtual bool isEntity () const
 
virtual bool isEntityReference () const
 
virtual bool isNotation () const
 
virtual bool isProcessingInstruction () const
 
virtual bool isText () const
 
QDomNodePrivatenamedItem (const QString &name)
 
QString nodeName () const
 
QString nodeValue () const
 
virtual void normalize ()
 
QDomDocumentPrivateownerDocument ()
 
QDomNodePrivateparent () const
 
 QDomNodePrivate (QDomDocumentPrivate *, QDomNodePrivate *parent=0)
 
 QDomNodePrivate (QDomNodePrivate *n, bool deep)
 
virtual QDomNodePrivateremoveChild (QDomNodePrivate *oldChild)
 
virtual QDomNodePrivatereplaceChild (QDomNodePrivate *newChild, QDomNodePrivate *oldChild)
 
void setLocation (int lineNumber, int columnNumber)
 
virtual void setNodeValue (const QString &v)
 
void setNoParent ()
 
void setOwnerDocument (QDomDocumentPrivate *doc)
 
void setParent (QDomNodePrivate *p)
 
virtual ~QDomNodePrivate ()
 

Additional Inherited Members

- Public Variables inherited from QDomNodePrivate
int columnNumber
 
bool createdWithDom1Interface: 1
 
QDomNodePrivatefirst
 
bool hasParent: 1
 
QDomNodePrivatelast
 
int lineNumber
 
QString name
 
QString namespaceURI
 
QDomNodePrivatenext
 
QDomNodePrivateownerNode
 
QString prefix
 
QDomNodePrivateprev
 
QAtomicInt ref
 
QString value
 

Detailed Description

Definition at line 414 of file qdom.cpp.

Constructors and Destructors

◆ QDomCommentPrivate() [1/2]

QDomCommentPrivate::QDomCommentPrivate ( QDomDocumentPrivate d,
QDomNodePrivate parent,
const QString val 
)

Definition at line 5424 of file qdom.cpp.

5425  : QDomCharacterDataPrivate(d, parent, val)
5426 {
5427  name = QLatin1String("#comment");
5428 }
QString name
Definition: qdom.cpp:198
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QDomCharacterDataPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data)
Definition: qdom.cpp:3966

◆ QDomCommentPrivate() [2/2]

QDomCommentPrivate::QDomCommentPrivate ( QDomCommentPrivate n,
bool  deep 
)

Definition at line 5430 of file qdom.cpp.

5431  : QDomCharacterDataPrivate(n, deep)
5432 {
5433 }
QDomCharacterDataPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data)
Definition: qdom.cpp:3966

Functions

◆ cloneNode()

QDomNodePrivate * QDomCommentPrivate::cloneNode ( bool  deep = true)
virtual

Reimplemented from QDomCharacterDataPrivate.

Definition at line 5436 of file qdom.cpp.

5437 {
5438  QDomNodePrivate* p = new QDomCommentPrivate(this, deep);
5439  // We are not interested in this node
5440  p->ref.deref();
5441  return p;
5442 }
QDomCommentPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val)
Definition: qdom.cpp:5424
QAtomicInt ref
Definition: qdom.cpp:191
bool deref()
Atomically decrements the value of this QAtomicInt.

◆ isComment()

virtual bool QDomCommentPrivate::isComment ( ) const
inlinevirtual

Reimplemented from QDomNodePrivate.

Definition at line 422 of file qdom.cpp.

422 { return true; }

◆ nodeType()

QDomNode::NodeType QDomCommentPrivate::nodeType ( ) const
inlinevirtual

Reimplemented from QDomCharacterDataPrivate.

Definition at line 423 of file qdom.cpp.

◆ save()

void QDomCommentPrivate::save ( QTextStream s,
int  depth,
int  indent 
) const
virtual
Warning
This function is not part of the public interface. depth is used for indentation, it seems.

Reimplemented from QDomNodePrivate.

Definition at line 5444 of file qdom.cpp.

5445 {
5446  /* We don't output whitespace if we would pollute a text node. */
5447  if (!(prev && prev->isText()))
5448  s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
5449 
5450  s << "<!--" << value;
5451  if (value.endsWith(QLatin1Char('-')))
5452  s << ' '; // Ensures that XML comment doesn't end with --->
5453  s << "-->";
5454 
5455  if (!(next && next->isText()))
5456  s << endl;
5457 }
QDomNodePrivate * prev
Definition: qdom.cpp:192
virtual bool isText() const
Definition: qdom.cpp:177
The QString class provides a Unicode character string.
Definition: qstring.h:83
QString value
Definition: qdom.cpp:199
QDomNodePrivate * next
Definition: qdom.cpp:193
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
Q_CORE_EXPORT QTextStream & endl(QTextStream &s)

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