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

Public Functions

QDomNodePrivatecloneNode (bool deep=true)
 
virtual bool isAttr () const
 
QDomNode::NodeType nodeType () const
 
 QDomAttrPrivate (QDomDocumentPrivate *, QDomNodePrivate *, const QString &name)
 
 QDomAttrPrivate (QDomDocumentPrivate *, QDomNodePrivate *, const QString &nsURI, const QString &qName)
 
 QDomAttrPrivate (QDomAttrPrivate *n, bool deep)
 
virtual void save (QTextStream &s, int, int) const
 
void setNodeValue (const QString &v)
 
bool specified () 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 isCDATASection () const
 
virtual bool isCharacterData () const
 
virtual bool isComment () 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)
 
void setNoParent ()
 
void setOwnerDocument (QDomDocumentPrivate *doc)
 
void setParent (QDomNodePrivate *p)
 
virtual ~QDomNodePrivate ()
 

Public Variables

bool m_specified
 
- 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 358 of file qdom.cpp.

Constructors and Destructors

◆ QDomAttrPrivate() [1/3]

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

Definition at line 4188 of file qdom.cpp.

Referenced by cloneNode().

4189  : QDomNodePrivate(d, parent)
4190 {
4191  name = name_;
4192  m_specified = false;
4193 }
bool m_specified
Definition: qdom.cpp:375
QDomNodePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent=0)
Definition: qdom.cpp:1482

◆ QDomAttrPrivate() [2/3]

QDomAttrPrivate::QDomAttrPrivate ( QDomDocumentPrivate d,
QDomNodePrivate p,
const QString nsURI,
const QString qName 
)

Definition at line 4195 of file qdom.cpp.

4196  : QDomNodePrivate(d, p)
4197 {
4198  qt_split_namespace(prefix, name, qName, !nsURI.isNull());
4199  namespaceURI = nsURI;
4200  createdWithDom1Interface = false;
4201  m_specified = false;
4202 }
bool createdWithDom1Interface
Definition: qdom.cpp:202
QString name
Definition: qdom.cpp:198
bool m_specified
Definition: qdom.cpp:375
static void qt_split_namespace(QString &prefix, QString &name, const QString &qName, bool hasURI)
Definition: qdom.cpp:104
QDomNodePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent=0)
Definition: qdom.cpp:1482
bool isNull() const
Returns true if this string is null; otherwise returns false.
Definition: qstring.h:505
QString namespaceURI
Definition: qdom.cpp:201
QString prefix
Definition: qdom.cpp:200

◆ QDomAttrPrivate() [3/3]

QDomAttrPrivate::QDomAttrPrivate ( QDomAttrPrivate n,
bool  deep 
)

Definition at line 4204 of file qdom.cpp.

4205  : QDomNodePrivate(n, deep)
4206 {
4207  m_specified = n->specified();
4208 }
bool specified() const
Definition: qdom.cpp:4230
bool m_specified
Definition: qdom.cpp:375
QDomNodePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent=0)
Definition: qdom.cpp:1482

Functions

◆ cloneNode()

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

Reimplemented from QDomNodePrivate.

Definition at line 4222 of file qdom.cpp.

4223 {
4224  QDomNodePrivate* p = new QDomAttrPrivate(this, deep);
4225  // We are not interested in this node
4226  p->ref.deref();
4227  return p;
4228 }
QDomAttrPrivate(QDomDocumentPrivate *, QDomNodePrivate *, const QString &name)
Definition: qdom.cpp:4188
QAtomicInt ref
Definition: qdom.cpp:191
bool deref()
Atomically decrements the value of this QAtomicInt.

◆ isAttr()

virtual bool QDomAttrPrivate::isAttr ( ) const
inlinevirtual

Reimplemented from QDomNodePrivate.

Definition at line 370 of file qdom.cpp.

370 { return true; }

◆ nodeType()

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

Reimplemented from QDomNodePrivate.

Definition at line 371 of file qdom.cpp.

◆ save()

void QDomAttrPrivate::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 4312 of file qdom.cpp.

4313 {
4314  if (namespaceURI.isNull()) {
4315  s << name << "=\"" << encodeText(value, s, true, true) << '\"';
4316  } else {
4317  s << prefix << ':' << name << "=\"" << encodeText(value, s, true, true) << '\"';
4318  /* This is a fix for 138243, as good as it gets.
4319  *
4320  * QDomElementPrivate::save() output a namespace declaration if
4321  * the element is in a namespace, no matter what. This function do as well, meaning
4322  * that we get two identical namespace declaration if we don't have the if-
4323  * statement below.
4324  *
4325  * This doesn't work when the parent element has the same prefix as us but
4326  * a different namespace. However, this can only occur by the user modifying the element,
4327  * and we don't do fixups by that anyway, and hence it's the user responsibility to not
4328  * arrive in those situations. */
4329  if(!ownerNode ||
4330  ownerNode->prefix != prefix) {
4331  s << " xmlns:" << prefix << "=\"" << encodeText(namespaceURI, s, true, true) << '\"';
4332  }
4333  }
4334 }
QString name
Definition: qdom.cpp:198
QDomNodePrivate * ownerNode
Definition: qdom.cpp:194
QString value
Definition: qdom.cpp:199
bool isNull() const
Returns true if this string is null; otherwise returns false.
Definition: qstring.h:505
QString namespaceURI
Definition: qdom.cpp:201
static QString encodeText(const QString &str, QTextStream &s, const bool encodeQuotes=true, const bool performAVN=false, const bool encodeEOLs=false)
Definition: qdom.cpp:4245
QString prefix
Definition: qdom.cpp:200

◆ setNodeValue()

void QDomAttrPrivate::setNodeValue ( const QString v)
virtual

Reimplemented from QDomNodePrivate.

Definition at line 4210 of file qdom.cpp.

4211 {
4212  value = v;
4213  QDomTextPrivate *t = new QDomTextPrivate(0, this, v);
4214  // keep the refcount balanced: appendChild() does a ref anyway.
4215  t->ref.deref();
4216  if (first) {
4217  delete removeChild(first);
4218  }
4219  appendChild(t);
4220 }
virtual QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:1887
QAtomicInt ref
Definition: qdom.cpp:191
QString value
Definition: qdom.cpp:199
bool deref()
Atomically decrements the value of this QAtomicInt.
QDomNodePrivate * first
Definition: qdom.cpp:195
virtual QDomNodePrivate * removeChild(QDomNodePrivate *oldChild)
Definition: qdom.cpp:1851

◆ specified()

bool QDomAttrPrivate::specified ( ) const

Definition at line 4230 of file qdom.cpp.

Referenced by QDomAttrPrivate().

4231 {
4232  return m_specified;
4233 }
bool m_specified
Definition: qdom.cpp:375

Properties

◆ m_specified

bool QDomAttrPrivate::m_specified

Definition at line 375 of file qdom.cpp.

Referenced by QDomAttrPrivate(), and specified().


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