Qt 6.x
The Qt SDK
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 QDomNodePrivatecloneNode (bool deep=true)
 
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
 
virtual QDomNode::NodeType nodeType () const
 
virtual void save (QTextStream &, int, int) 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 299 of file qdom_p.h.

Constructor & Destructor Documentation

◆ QDomElementPrivate() [1/3]

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

Definition at line 3834 of file qdom.cpp.

References m_attr.

◆ QDomElementPrivate() [2/3]

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

Definition at line 3842 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 3852 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 3860 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 3874 of file qdom.cpp.

References m_attr, and QDomNamedNodeMapPrivate::namedItem().

+ Here is the call graph for this function:

◆ attributeNode()

QDomAttrPrivate * QDomElementPrivate::attributeNode ( const QString name)

Definition at line 3934 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 3939 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 3883 of file qdom.cpp.

References m_attr, and QDomNamedNodeMapPrivate::namedItemNS().

+ Here is the call graph for this function:

◆ attributes()

QDomNamedNodeMapPrivate * QDomElementPrivate::attributes ( )
inline

Definition at line 325 of file qdom_p.h.

References m_attr.

◆ cloneNode()

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

Reimplemented from QDomNodePrivate.

Definition at line 3866 of file qdom.cpp.

◆ hasAttribute()

bool QDomElementPrivate::hasAttribute ( const QString name)

Definition at line 3973 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 3978 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 326 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 327 of file qdom_p.h.

References QDomNode::ElementNode.

◆ removeAttribute()

void QDomElementPrivate::removeAttribute ( const QString name)

Definition at line 3927 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 3968 of file qdom.cpp.

References m_attr, QDomNodePrivate::nodeName(), 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 3999 of file qdom.cpp.

References QVarLengthArray< T, Prealloc >::begin(), QString::compare(), encodeText(), QVarLengthArray< T, Prealloc >::end(), Qt::endl(), QDuplicateTracker< T, Prealloc >::hasSeen(), 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, QVarLengthArray< T, Prealloc >::push_back(), Q_UNUSED, QStringLiteral, QVarLengthArray< T, Prealloc >::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 3892 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 3944 of file qdom.cpp.

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

+ Here is the call graph for this function:

◆ setAttributeNodeNS()

QDomAttrPrivate * QDomElementPrivate::setAttributeNodeNS ( QDomAttrPrivate newAttr)

Definition at line 3956 of file qdom.cpp.

References QString::isNull(), m_attr, QDomNodePrivate::name, QDomNamedNodeMapPrivate::namedItemNS(), QDomNodePrivate::namespaceURI, QDomNodePrivate::prefix, 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 3908 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 3983 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: