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/tools/qstring.cpp:6903 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QConstString 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>QConstString Class Reference</h1>
|
---|
33 |
|
---|
34 | <p>The QConstString class provides string objects using constant Unicode data.
|
---|
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="qstring-h.html">qstring.h</a>></tt>
|
---|
38 | <p><a href="qconststring-members.html">List of all member functions.</a>
|
---|
39 | <h2>Public Members</h2>
|
---|
40 | <ul>
|
---|
41 | <li class=fn><a href="#QConstString"><b>QConstString</b></a> ( const QChar * unicode, uint length )</li>
|
---|
42 | <li class=fn><a href="#~QConstString"><b>~QConstString</b></a> ()</li>
|
---|
43 | <li class=fn>const QString & <a href="#string"><b>string</b></a> () const</li>
|
---|
44 | </ul>
|
---|
45 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
46 |
|
---|
47 |
|
---|
48 |
|
---|
49 |
|
---|
50 | The QConstString class provides string objects using constant Unicode data.
|
---|
51 | <p> In order to minimize copying, highly optimized applications can
|
---|
52 | use QConstString to provide a <a href="qstring.html">QString</a>-compatible object from
|
---|
53 | existing Unicode data. It is then the programmer's responsibility
|
---|
54 | to ensure that the Unicode data exists for the entire lifetime of
|
---|
55 | the QConstString object.
|
---|
56 | <p> A QConstString is created with the QConstString constructor. The
|
---|
57 | string held by the object can be obtained by calling <a href="#string">string</a>().
|
---|
58 | <p>See also <a href="text.html">Text Related Classes</a>.
|
---|
59 |
|
---|
60 | <hr><h2>Member Function Documentation</h2>
|
---|
61 | <h3 class=fn><a name="QConstString"></a>QConstString::QConstString ( const <a href="qchar.html">QChar</a> * unicode, uint length )
|
---|
62 | </h3>
|
---|
63 | Constructs a QConstString that uses the first <em>length</em> Unicode
|
---|
64 | characters in the array <em>unicode</em>. Any attempt to modify copies
|
---|
65 | of the string will cause it to create a copy of the data, thus it
|
---|
66 | remains forever unmodified.
|
---|
67 | <p> The data in <em>unicode</em> is not copied. The caller must be able to
|
---|
68 | guarantee that <em>unicode</em> will not be deleted or modified.
|
---|
69 |
|
---|
70 | <h3 class=fn><a name="~QConstString"></a>QConstString::~QConstString ()
|
---|
71 | </h3>
|
---|
72 | Destroys the QConstString, creating a copy of the data if other
|
---|
73 | strings are still using it.
|
---|
74 |
|
---|
75 | <h3 class=fn>const <a href="qstring.html">QString</a> & <a name="string"></a>QConstString::string () const
|
---|
76 | </h3>
|
---|
77 |
|
---|
78 | <p> Returns a constant string referencing the data passed during
|
---|
79 | construction.
|
---|
80 |
|
---|
81 | <!-- eof -->
|
---|
82 | <hr><p>
|
---|
83 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
84 | Copyright © 1995-2007
|
---|
85 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
86 | <table width=100% cellspacing=0 border=0><tr>
|
---|
87 | <td>Copyright © 2007
|
---|
88 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
89 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
90 | </table></div></address></body>
|
---|
91 | </html>
|
---|