[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/xml/qdom.cpp:3415 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QDomCharacterData Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QDomCharacterData Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QDomCharacterData class represents a generic string in the DOM.
|
---|
| 35 | <a href="#details">More...</a>
|
---|
| 36 | <p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when Qt is built with thread support.</p>
|
---|
| 37 | <p><tt>#include <<a href="qdom-h.html">qdom.h</a>></tt>
|
---|
| 38 | <p>Inherits <a href="qdomnode.html">QDomNode</a>.
|
---|
| 39 | <p>Inherited by <a href="qdomtext.html">QDomText</a> and <a href="qdomcomment.html">QDomComment</a>.
|
---|
| 40 | <p><a href="qdomcharacterdata-members.html">List of all member functions.</a>
|
---|
| 41 | <h2>Public Members</h2>
|
---|
| 42 | <ul>
|
---|
| 43 | <li class=fn><a href="#QDomCharacterData"><b>QDomCharacterData</b></a> ()</li>
|
---|
| 44 | <li class=fn><a href="#QDomCharacterData-2"><b>QDomCharacterData</b></a> ( const QDomCharacterData & x )</li>
|
---|
| 45 | <li class=fn>QDomCharacterData & <a href="#operator-eq"><b>operator=</b></a> ( const QDomCharacterData & x )</li>
|
---|
| 46 | <li class=fn><a href="#~QDomCharacterData"><b>~QDomCharacterData</b></a> ()</li>
|
---|
| 47 | <li class=fn>virtual QString <a href="#substringData"><b>substringData</b></a> ( unsigned long offset, unsigned long count )</li>
|
---|
| 48 | <li class=fn>virtual void <a href="#appendData"><b>appendData</b></a> ( const QString & arg )</li>
|
---|
| 49 | <li class=fn>virtual void <a href="#insertData"><b>insertData</b></a> ( unsigned long offset, const QString & arg )</li>
|
---|
| 50 | <li class=fn>virtual void <a href="#deleteData"><b>deleteData</b></a> ( unsigned long offset, unsigned long count )</li>
|
---|
| 51 | <li class=fn>virtual void <a href="#replaceData"><b>replaceData</b></a> ( unsigned long offset, unsigned long count, const QString & arg )</li>
|
---|
| 52 | <li class=fn>virtual uint <a href="#length"><b>length</b></a> () const</li>
|
---|
| 53 | <li class=fn>virtual QString <a href="#data"><b>data</b></a> () const</li>
|
---|
| 54 | <li class=fn>virtual void <a href="#setData"><b>setData</b></a> ( const QString & v )</li>
|
---|
| 55 | <li class=fn>virtual QDomNode::NodeType <a href="#nodeType"><b>nodeType</b></a> () const</li>
|
---|
| 56 | <li class=fn>virtual bool <a href="#isCharacterData"><b>isCharacterData</b></a> () const</li>
|
---|
| 57 | </ul>
|
---|
| 58 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | The QDomCharacterData class represents a generic string in the DOM.
|
---|
| 63 |
|
---|
| 64 | <p>
|
---|
| 65 |
|
---|
| 66 | <p> Character data as used in XML specifies a generic data string.
|
---|
| 67 | More specialized versions of this class are <a href="qdomtext.html">QDomText</a>, <a href="qdomcomment.html">QDomComment</a>
|
---|
| 68 | and <a href="qdomcdatasection.html">QDomCDATASection</a>.
|
---|
| 69 | <p> The data string is set with <a href="#setData">setData</a>() and retrieved with <a href="#data">data</a>().
|
---|
| 70 | You can retrieve a portion of the data string using
|
---|
| 71 | <a href="#substringData">substringData</a>(). Extra data can be appended with <a href="#appendData">appendData</a>(), or
|
---|
| 72 | inserted with <a href="#insertData">insertData</a>(). Portions of the data string can be
|
---|
| 73 | deleted with <a href="#deleteData">deleteData</a>() or replaced with <a href="#replaceData">replaceData</a>(). The
|
---|
| 74 | length of the data string is returned by <a href="#length">length</a>().
|
---|
| 75 | <p> The node type of the node containing this character data is
|
---|
| 76 | returned by <a href="#nodeType">nodeType</a>().
|
---|
| 77 | <p> <p>See also <a href="qdomtext.html">QDomText</a>, <a href="qdomcomment.html">QDomComment</a>, <a href="qdomcdatasection.html">QDomCDATASection</a>, and <a href="xml-tools.html">XML</a>.
|
---|
| 78 |
|
---|
| 79 | <hr><h2>Member Function Documentation</h2>
|
---|
| 80 | <h3 class=fn><a name="QDomCharacterData"></a>QDomCharacterData::QDomCharacterData ()
|
---|
| 81 | </h3>
|
---|
| 82 | Constructs an empty character data object.
|
---|
| 83 |
|
---|
| 84 | <h3 class=fn><a name="QDomCharacterData-2"></a>QDomCharacterData::QDomCharacterData ( const <a href="qdomcharacterdata.html">QDomCharacterData</a> & x )
|
---|
| 85 | </h3>
|
---|
| 86 | Constructs a copy of <em>x</em>.
|
---|
| 87 | <p> The data of the copy is shared (shallow copy): modifying one node
|
---|
| 88 | will also change the other. If you want to make a <a href="shclass.html#deep-copy">deep copy</a>, use
|
---|
| 89 | <a href="qdomnode.html#cloneNode">cloneNode</a>().
|
---|
| 90 |
|
---|
| 91 | <h3 class=fn><a name="~QDomCharacterData"></a>QDomCharacterData::~QDomCharacterData ()
|
---|
| 92 | </h3>
|
---|
| 93 | Destroys the object and frees its resources.
|
---|
| 94 |
|
---|
| 95 | <h3 class=fn>void <a name="appendData"></a>QDomCharacterData::appendData ( const <a href="qstring.html">QString</a> & arg )<tt> [virtual]</tt>
|
---|
| 96 | </h3>
|
---|
| 97 | Appends the string <em>arg</em> to the stored string.
|
---|
| 98 |
|
---|
| 99 | <h3 class=fn><a href="qstring.html">QString</a> <a name="data"></a>QDomCharacterData::data () const<tt> [virtual]</tt>
|
---|
| 100 | </h3>
|
---|
| 101 | Returns the string stored in this object.
|
---|
| 102 | <p> If the node is a <a href="qdomnode.html#isNull">null node</a>, it will return
|
---|
| 103 | <a href="qstring.html#QString-null">QString::null</a>.
|
---|
| 104 |
|
---|
| 105 | <h3 class=fn>void <a name="deleteData"></a>QDomCharacterData::deleteData ( unsigned long offset, unsigned long count )<tt> [virtual]</tt>
|
---|
| 106 | </h3>
|
---|
| 107 | Deletes a substring of length <em>count</em> from position <em>offset</em>.
|
---|
| 108 |
|
---|
| 109 | <h3 class=fn>void <a name="insertData"></a>QDomCharacterData::insertData ( unsigned long offset, const <a href="qstring.html">QString</a> & arg )<tt> [virtual]</tt>
|
---|
| 110 | </h3>
|
---|
| 111 | Inserts the string <em>arg</em> into the stored string at position <em>offset</em>.
|
---|
| 112 |
|
---|
| 113 | <h3 class=fn>bool <a name="isCharacterData"></a>QDomCharacterData::isCharacterData () const<tt> [virtual]</tt>
|
---|
| 114 | </h3>
|
---|
| 115 | Returns TRUE.
|
---|
| 116 |
|
---|
| 117 | <p>Reimplemented from <a href="qdomnode.html#isCharacterData">QDomNode</a>.
|
---|
| 118 | <h3 class=fn>uint <a name="length"></a>QDomCharacterData::length () const<tt> [virtual]</tt>
|
---|
| 119 | </h3>
|
---|
| 120 | Returns the length of the stored string.
|
---|
| 121 |
|
---|
| 122 | <h3 class=fn><a href="qdomnode.html#NodeType-enum">QDomNode::NodeType</a> <a name="nodeType"></a>QDomCharacterData::nodeType () const<tt> [virtual]</tt>
|
---|
| 123 | </h3>
|
---|
| 124 | Returns the type of node this object refers to (i.e. <a href="qdomnode.html#NodeType-enum">TextNode</a>,
|
---|
| 125 | <a href="qdomnode.html#NodeType-enum">CDATASectionNode</a>, <a href="qdomnode.html#NodeType-enum">CommentNode</a> or <a href="qdomnode.html#NodeType-enum">CharacterDataNode</a>). For
|
---|
| 126 | a <a href="qdomnode.html#isNull">null node</a> <a href="qdomnode.html#NodeType-enum">CharacterDataNode</a> is
|
---|
| 127 | returned.
|
---|
| 128 |
|
---|
| 129 | <p>Reimplemented from <a href="qdomnode.html#nodeType">QDomNode</a>.
|
---|
| 130 | <p>Reimplemented in <a href="qdomtext.html#nodeType">QDomText</a> and <a href="qdomcomment.html#nodeType">QDomComment</a>.
|
---|
| 131 | <h3 class=fn><a href="qdomcharacterdata.html">QDomCharacterData</a> & <a name="operator-eq"></a>QDomCharacterData::operator= ( const <a href="qdomcharacterdata.html">QDomCharacterData</a> & x )
|
---|
| 132 | </h3>
|
---|
| 133 | Assigns <em>x</em> to this character data.
|
---|
| 134 | <p> The data of the copy is shared (shallow copy): modifying one node
|
---|
| 135 | will also change the other. If you want to make a <a href="shclass.html#deep-copy">deep copy</a>, use
|
---|
| 136 | <a href="qdomnode.html#cloneNode">cloneNode</a>().
|
---|
| 137 |
|
---|
| 138 | <h3 class=fn>void <a name="replaceData"></a>QDomCharacterData::replaceData ( unsigned long offset, unsigned long count, const <a href="qstring.html">QString</a> & arg )<tt> [virtual]</tt>
|
---|
| 139 | </h3>
|
---|
| 140 | Replaces the substring of length <em>count</em> starting at position <em>offset</em> with the string <em>arg</em>.
|
---|
| 141 |
|
---|
| 142 | <h3 class=fn>void <a name="setData"></a>QDomCharacterData::setData ( const <a href="qstring.html">QString</a> & v )<tt> [virtual]</tt>
|
---|
| 143 | </h3>
|
---|
| 144 | Sets this object's string to <em>v</em>.
|
---|
| 145 |
|
---|
| 146 | <h3 class=fn><a href="qstring.html">QString</a> <a name="substringData"></a>QDomCharacterData::substringData ( unsigned long offset, unsigned long count )<tt> [virtual]</tt>
|
---|
| 147 | </h3>
|
---|
| 148 | Returns the substring of length <em>count</em> from position <em>offset</em>.
|
---|
| 149 |
|
---|
| 150 | <!-- eof -->
|
---|
| 151 | <hr><p>
|
---|
| 152 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 153 | Copyright © 1995-2007
|
---|
| 154 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 155 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 156 | <td>Copyright © 2007
|
---|
| 157 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 158 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 159 | </table></div></address></body>
|
---|
| 160 | </html>
|
---|