Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QDomElementPrivate Class Reference

#include <qdom_p.h>

+ Inheritance diagram for QDomElementPrivate:
+ Collaboration diagram for QDomElementPrivate:

Public Member Functions

 QDomElementPrivate (QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name)
 
 QDomElementPrivate (QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &nsURI, const QString &qName)
 
 QDomElementPrivate (QDomElementPrivate *n, bool deep)
 
 ~QDomElementPrivate ()
 
QString attribute (const QString &name, const QString &defValue) const
 
QString attributeNS (const QString &nsURI, const QString &localName, const QString &defValue) const
 
void setAttribute (const QString &name, const QString &value)
 
void setAttributeNS (const QString &nsURI, const QString &qName, const QString &newValue)
 
void removeAttribute (const QString &name)
 
QDomAttrPrivateattributeNode (const QString &name)
 
QDomAttrPrivateattributeNodeNS (const QString &nsURI, const QString &localName)
 
QDomAttrPrivatesetAttributeNode (QDomAttrPrivate *newAttr)
 
QDomAttrPrivatesetAttributeNodeNS (QDomAttrPrivate *newAttr)
 
QDomAttrPrivateremoveAttributeNode (QDomAttrPrivate *oldAttr)
 
bool hasAttribute (const QString &name)
 
bool hasAttributeNS (const QString &nsURI, const QString &localName)
 
QString text ()
 
QDomNamedNodeMapPrivateattributes ()
 
bool hasAttributes ()
 
QDomNode::NodeType nodeType () const override
 
QDomNodePrivatecloneNode (bool deep=true) override
 
virtual void save (QTextStream &s, int, int) const override
 
- Public Member Functions inherited from QDomNodePrivate
 QDomNodePrivate (QDomDocumentPrivate *, QDomNodePrivate *parent=nullptr)
 
 QDomNodePrivate (QDomNodePrivate *n, bool deep)
 
virtual ~QDomNodePrivate ()
 
QString nodeName () const
 
QString nodeValue () const
 
virtual void setNodeValue (const QString &v)
 
QDomDocumentPrivateownerDocument ()
 
void setOwnerDocument (QDomDocumentPrivate *doc)
 
virtual QDomNodePrivateinsertBefore (QDomNodePrivate *newChild, QDomNodePrivate *refChild)
 
virtual QDomNodePrivateinsertAfter (QDomNodePrivate *newChild, QDomNodePrivate *refChild)
 
virtual QDomNodePrivatereplaceChild (QDomNodePrivate *newChild, QDomNodePrivate *oldChild)
 
virtual QDomNodePrivateremoveChild (QDomNodePrivate *oldChild)
 
virtual QDomNodePrivateappendChild (QDomNodePrivate *newChild)
 
QDomNodePrivatenamedItem (const QString &name)
 
virtual void normalize ()
 
virtual void clear ()
 
QDomNodePrivateparent () const
 
void setParent (QDomNodePrivate *p)
 
void setNoParent ()
 
bool isAttr () const
 
bool isCDATASection () const
 
bool isDocumentFragment () const
 
bool isDocument () const
 
bool isDocumentType () const
 
bool isElement () const
 
bool isEntityReference () const
 
bool isText () const
 
bool isEntity () const
 
bool isNotation () const
 
bool isProcessingInstruction () const
 
bool isCharacterData () const
 
bool isComment () const
 
void setLocation (int lineNumber, int columnNumber)
 

Public Attributes

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

Detailed Description

Definition at line 300 of file qdom_p.h.

Constructor & Destructor Documentation

◆ QDomElementPrivate() [1/3]

QDomElementPrivate::QDomElementPrivate ( QDomDocumentPrivate * d,
QDomNodePrivate * parent,
const QString & name )

Definition at line 3833 of file qdom.cpp.

References m_attr.

Referenced by cloneNode().

+ Here is the caller graph for this function:

◆ QDomElementPrivate() [2/3]

QDomElementPrivate::QDomElementPrivate ( QDomDocumentPrivate * d,
QDomNodePrivate * parent,
const QString & nsURI,
const QString & qName )

Definition at line 3841 of file qdom.cpp.

References QDomNodePrivate::createdWithDom1Interface, QString::isNull(), m_attr, QDomNodePrivate::namespaceURI, QDomNodePrivate::prefix, and qt_split_namespace().

+ Here is the call graph for this function:

◆ QDomElementPrivate() [3/3]

QDomElementPrivate::QDomElementPrivate ( QDomElementPrivate * n,
bool deep )

Definition at line 3851 of file qdom.cpp.

References QDomNamedNodeMapPrivate::clone(), m_attr, QBasicAtomicInteger< T >::ref(), and QDomNamedNodeMapPrivate::ref.

+ Here is the call graph for this function:

◆ ~QDomElementPrivate()

QDomElementPrivate::~QDomElementPrivate ( )

Definition at line 3859 of file qdom.cpp.

References QBasicAtomicInteger< T >::deref(), m_attr, and QDomNamedNodeMapPrivate::ref.

+ Here is the call graph for this function:

Member Function Documentation

◆ attribute()

QString QDomElementPrivate::attribute ( const QString & name,
const QString & defValue ) const

Definition at line 3873 of file qdom.cpp.

References m_attr, QDomNamedNodeMapPrivate::namedItem(), and QDomNodePrivate::nodeValue().

+ Here is the call graph for this function:

◆ attributeNode()

QDomAttrPrivate * QDomElementPrivate::attributeNode ( const QString & name)

Definition at line 3933 of file qdom.cpp.

References m_attr, and QDomNamedNodeMapPrivate::namedItem().

+ Here is the call graph for this function:

◆ attributeNodeNS()

QDomAttrPrivate * QDomElementPrivate::attributeNodeNS ( const QString & nsURI,
const QString & localName )

Definition at line 3938 of file qdom.cpp.

References m_attr, and QDomNamedNodeMapPrivate::namedItemNS().

+ Here is the call graph for this function:

◆ attributeNS()

QString QDomElementPrivate::attributeNS ( const QString & nsURI,
const QString & localName,
const QString & defValue ) const

Definition at line 3882 of file qdom.cpp.

References m_attr, QDomNamedNodeMapPrivate::namedItemNS(), and QDomNodePrivate::nodeValue().

+ Here is the call graph for this function:

◆ attributes()

QDomNamedNodeMapPrivate * QDomElementPrivate::attributes ( )
inline

Definition at line 326 of file qdom_p.h.

References m_attr.

◆ cloneNode()

QDomNodePrivate * QDomElementPrivate::cloneNode ( bool deep = true)
overridevirtual

Reimplemented from QDomNodePrivate.

Definition at line 3865 of file qdom.cpp.

References QDomElementPrivate().

+ Here is the call graph for this function:

◆ hasAttribute()

bool QDomElementPrivate::hasAttribute ( const QString & name)

Definition at line 3972 of file qdom.cpp.

References QDomNamedNodeMapPrivate::contains(), and m_attr.

+ Here is the call graph for this function:

◆ hasAttributeNS()

bool QDomElementPrivate::hasAttributeNS ( const QString & nsURI,
const QString & localName )

Definition at line 3977 of file qdom.cpp.

References QDomNamedNodeMapPrivate::containsNS(), and m_attr.

+ Here is the call graph for this function:

◆ hasAttributes()

bool QDomElementPrivate::hasAttributes ( )
inline

Definition at line 327 of file qdom_p.h.

References QDomNamedNodeMapPrivate::length(), and m_attr.

+ Here is the call graph for this function:

◆ nodeType()

QDomNode::NodeType QDomElementPrivate::nodeType ( ) const
inlineoverridevirtual

Reimplemented from QDomNodePrivate.

Definition at line 328 of file qdom_p.h.

References QDomNode::ElementNode.

◆ removeAttribute()

void QDomElementPrivate::removeAttribute ( const QString & name)

Definition at line 3926 of file qdom.cpp.

References m_attr, and QDomNamedNodeMapPrivate::removeNamedItem().

+ Here is the call graph for this function:

◆ removeAttributeNode()

QDomAttrPrivate * QDomElementPrivate::removeAttributeNode ( QDomAttrPrivate * oldAttr)

Definition at line 3967 of file qdom.cpp.

References m_attr, and QDomNamedNodeMapPrivate::removeNamedItem().

+ Here is the call graph for this function:

◆ save()

void QDomElementPrivate::save ( QTextStream & s,
int depth,
int indent ) const
overridevirtual

depth is used for indentation, it seems.

If we still have QDom, optimize this so that we only declare namespaces that are not yet declared. We loose default namespace mappings, so maybe we should rather store the information that we get from startPrefixMapping()/endPrefixMapping() and use them. Modifications becomes more complex then, however.

We cannot do this in a patch release because it would require too invasive changes, and hence possibly behavioral changes.

Reimplemented from QDomNodePrivate.

Definition at line 3998 of file qdom.cpp.

References QString::compare(), encodeText(), Qt::endl(), QString::isEmpty(), QMultiHash< Key, T >::isEmpty(), QString::isNull(), QDomNodePrivate::isText(), QDomNodePrivate::last, m_attr, QDomNamedNodeMapPrivate::map, QDomNodePrivate::name, QDomNodePrivate::namespaceURI, QDomNodePrivate::next, QDomNodePrivate::prefix, QDomNodePrivate::prev, Q_UNUSED, QStringLiteral, QString::reserve(), QDomNodePrivate::save(), and QMultiHash< Key, T >::size().

+ Here is the call graph for this function:

◆ setAttribute()

void QDomElementPrivate::setAttribute ( const QString & name,
const QString & value )

Definition at line 3891 of file qdom.cpp.

References m_attr, QDomNamedNodeMapPrivate::namedItem(), QDomNodePrivate::ownerDocument(), QDomNamedNodeMapPrivate::setNamedItem(), and QDomNodePrivate::setNodeValue().

+ Here is the call graph for this function:

◆ setAttributeNode()

QDomAttrPrivate * QDomElementPrivate::setAttributeNode ( QDomAttrPrivate * newAttr)

Definition at line 3943 of file qdom.cpp.

References m_attr, QDomNamedNodeMapPrivate::namedItem(), QDomNamedNodeMapPrivate::setNamedItem(), and QDomNodePrivate::setParent().

+ Here is the call graph for this function:

◆ setAttributeNodeNS()

QDomAttrPrivate * QDomElementPrivate::setAttributeNodeNS ( QDomAttrPrivate * newAttr)

Definition at line 3955 of file qdom.cpp.

References m_attr, QDomNamedNodeMapPrivate::namedItemNS(), and QDomNamedNodeMapPrivate::setNamedItem().

+ Here is the call graph for this function:

◆ setAttributeNS()

void QDomElementPrivate::setAttributeNS ( const QString & nsURI,
const QString & qName,
const QString & newValue )

Definition at line 3907 of file qdom.cpp.

References m_attr, QDomNamedNodeMapPrivate::namedItemNS(), QDomNodePrivate::ownerDocument(), QDomNodePrivate::prefix, qt_split_namespace(), QDomNamedNodeMapPrivate::setNamedItem(), and QDomNodePrivate::setNodeValue().

Referenced by QDomBuilder::startElement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ text()

QString QDomElementPrivate::text ( )

Definition at line 3982 of file qdom.cpp.

References QDomNodePrivate::first, QDomNodePrivate::nodeValue(), and text().

Referenced by text().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_attr


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