~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to doc/class_ipe_string.html

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2004-06-08 00:44:02 UTC
  • Revision ID: james.westby@ubuntu.com-20040608004402-72yu51xlh7vt6p9m
Tags: upstream-6.0pre16
ImportĀ upstreamĀ versionĀ 6.0pre16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
 
3
<title>Ipelib: IpeString class Reference</title>
 
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
 
5
</head><body>
 
6
<!-- Generated by Doxygen 1.3.4 -->
 
7
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
 
8
<h1>IpeString Class Reference<br>
 
9
<small>
 
10
[<a class="el" href="group__base.html">Ipe Base</a>]</small>
 
11
</h1>Strings and buffers.  
 
12
<a href="#_details">More...</a>
 
13
<p>
 
14
<a href="class_ipe_string-members.html">List of all members.</a><h2>Public Member Functions</h2>
 
15
<ul>
 
16
<li><a class="anchor" name="a1" doxytag="IpeString::IpeString" ></a>
 
17
<b>IpeString</b> (const  char *str)
 
18
<li><a class="anchor" name="a2" doxytag="IpeString::IpeString" ></a>
 
19
<b>IpeString</b> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs)
 
20
<li><a class="anchor" name="a3" doxytag="IpeString::IpeString" ></a>
 
21
<b>IpeString</b> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs, int index, int len)
 
22
<li><a class="anchor" name="a4" doxytag="IpeString::operator=" ></a>
 
23
<a class="el" href="class_ipe_string.html">IpeString</a> &amp; <b>operator=</b> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs)
 
24
<li>char <a class="el" href="class_ipe_string.html#a6">operator[]</a> (int i) const 
 
25
<li>bool <a class="el" href="class_ipe_string.html#a7">empty</a> () const 
 
26
<li>const  char * <a class="el" href="class_ipe_string.html#a8">data</a> () const 
 
27
<li>int <a class="el" href="class_ipe_string.html#a9">size</a> () const 
 
28
<li>void <a class="el" href="class_ipe_string.html#a10">operator+=</a> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs)
 
29
<li>void <a class="el" href="class_ipe_string.html#a11">operator+=</a> (char ch)
 
30
<li><a class="el" href="class_ipe_string.html">IpeString</a> <a class="el" href="class_ipe_string.html#a12">substr</a> (int i, int len=-1) const 
 
31
<li>bool <a class="el" href="class_ipe_string.html#a13">operator!=</a> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs) const 
 
32
<li><a class="anchor" name="a14" doxytag="IpeString::erase" ></a>
 
33
void <b>erase</b> ()
 
34
<li><a class="anchor" name="a15" doxytag="IpeString::append" ></a>
 
35
void <b>append</b> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs)
 
36
<li><a class="anchor" name="a16" doxytag="IpeString::append" ></a>
 
37
void <b>append</b> (char ch)
 
38
<li><a class="anchor" name="a17" doxytag="IpeString::operator==" ></a>
 
39
bool <b>operator==</b> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs) const 
 
40
<li><a class="anchor" name="a18" doxytag="IpeString::operator<" ></a>
 
41
bool <b>operator&lt;</b> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs) const 
 
42
<li><a class="anchor" name="a19" doxytag="IpeString::operator+" ></a>
 
43
<a class="el" href="class_ipe_string.html">IpeString</a> <b>operator+</b> (const  <a class="el" href="class_ipe_string.html">IpeString</a> &amp;rhs) const 
 
44
<li><a class="anchor" name="a20" doxytag="IpeString::CString" ></a>
 
45
const  char * <b>CString</b> () const 
 
46
</ul>
 
47
<hr><a name="_details"></a><h2>Detailed Description</h2>
 
48
Strings and buffers. 
 
49
<p>
 
50
IpeString is is an implicitly shared UTF-8 encoded string. It is designed to be efficient for strings of arbitrary length, and supposed to be passed by value (the size of IpeString is a single pointer). Sharing is implicit---the string creates its own representation as soon as it is modified. (Before I can publicize the Unicode support, I have to find the best way of getting UTF-8 encoded text through Pdflatex.)<p>
 
51
Ipe is not using the STL string type because the C++ standard does neither guarantee that passing by value is efficient, nor that std::string is efficient for very long strings (although in practice that is probably true). However, IpeString is designed to be plug-in compatible with std::string, so Ipe can switch any time it is deemed appropriate (in particular, unlike the rest of Ipe, IpeString uses lower-case member names!). 
 
52
<p>
 
53
<hr><h2>Member Function Documentation</h2>
 
54
<a class="anchor" name="a6" doxytag="IpeString::operator[]" ></a><p>
 
55
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
56
  <tr>
 
57
    <td class="mdRow">
 
58
      <table cellpadding="0" cellspacing="0" border="0">
 
59
        <tr>
 
60
          <td class="md" nowrap valign="top"> char IpeString::operator[] </td>
 
61
          <td class="md" valign="top">(&nbsp;</td>
 
62
          <td class="md" nowrap valign="top">int&nbsp;</td>
 
63
          <td class="mdname1" valign="top" nowrap> <em>i</em>          </td>
 
64
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
 
65
          <td class="md" nowrap> const<code> [inline]</code></td>
 
66
        </tr>
 
67
 
 
68
      </table>
 
69
    </td>
 
70
  </tr>
 
71
</table>
 
72
<table cellspacing=5 cellpadding=0 border=0>
 
73
  <tr>
 
74
    <td>
 
75
      &nbsp;
 
76
    </td>
 
77
    <td>
 
78
 
 
79
<p>
 
80
Return character at index i. 
 
81
<p>
 
82
    </td>
 
83
  </tr>
 
84
</table>
 
85
<a class="anchor" name="a7" doxytag="IpeString::empty" ></a><p>
 
86
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
87
  <tr>
 
88
    <td class="mdRow">
 
89
      <table cellpadding="0" cellspacing="0" border="0">
 
90
        <tr>
 
91
          <td class="md" nowrap valign="top"> bool IpeString::empty </td>
 
92
          <td class="md" valign="top">(&nbsp;</td>
 
93
          <td class="mdname1" valign="top" nowrap>          </td>
 
94
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
 
95
          <td class="md" nowrap> const<code> [inline]</code></td>
 
96
        </tr>
 
97
 
 
98
      </table>
 
99
    </td>
 
100
  </tr>
 
101
</table>
 
102
<table cellspacing=5 cellpadding=0 border=0>
 
103
  <tr>
 
104
    <td>
 
105
      &nbsp;
 
106
    </td>
 
107
    <td>
 
108
 
 
109
<p>
 
110
Is the string empty? 
 
111
<p>
 
112
    </td>
 
113
  </tr>
 
114
</table>
 
115
<a class="anchor" name="a8" doxytag="IpeString::data" ></a><p>
 
116
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
117
  <tr>
 
118
    <td class="mdRow">
 
119
      <table cellpadding="0" cellspacing="0" border="0">
 
120
        <tr>
 
121
          <td class="md" nowrap valign="top"> const char* IpeString::data </td>
 
122
          <td class="md" valign="top">(&nbsp;</td>
 
123
          <td class="mdname1" valign="top" nowrap>          </td>
 
124
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
 
125
          <td class="md" nowrap> const<code> [inline]</code></td>
 
126
        </tr>
 
127
 
 
128
      </table>
 
129
    </td>
 
130
  </tr>
 
131
</table>
 
132
<table cellspacing=5 cellpadding=0 border=0>
 
133
  <tr>
 
134
    <td>
 
135
      &nbsp;
 
136
    </td>
 
137
    <td>
 
138
 
 
139
<p>
 
140
Return read-only pointer to the data. 
 
141
<p>
 
142
    </td>
 
143
  </tr>
 
144
</table>
 
145
<a class="anchor" name="a9" doxytag="IpeString::size" ></a><p>
 
146
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
147
  <tr>
 
148
    <td class="mdRow">
 
149
      <table cellpadding="0" cellspacing="0" border="0">
 
150
        <tr>
 
151
          <td class="md" nowrap valign="top"> int IpeString::size </td>
 
152
          <td class="md" valign="top">(&nbsp;</td>
 
153
          <td class="mdname1" valign="top" nowrap>          </td>
 
154
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
 
155
          <td class="md" nowrap> const<code> [inline]</code></td>
 
156
        </tr>
 
157
 
 
158
      </table>
 
159
    </td>
 
160
  </tr>
 
161
</table>
 
162
<table cellspacing=5 cellpadding=0 border=0>
 
163
  <tr>
 
164
    <td>
 
165
      &nbsp;
 
166
    </td>
 
167
    <td>
 
168
 
 
169
<p>
 
170
Return number of bytes in the string. 
 
171
<p>
 
172
    </td>
 
173
  </tr>
 
174
</table>
 
175
<a class="anchor" name="a10" doxytag="IpeString::operator+=" ></a><p>
 
176
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
177
  <tr>
 
178
    <td class="mdRow">
 
179
      <table cellpadding="0" cellspacing="0" border="0">
 
180
        <tr>
 
181
          <td class="md" nowrap valign="top"> void IpeString::operator+= </td>
 
182
          <td class="md" valign="top">(&nbsp;</td>
 
183
          <td class="md" nowrap valign="top">const <a class="el" href="class_ipe_string.html">IpeString</a> &amp;&nbsp;</td>
 
184
          <td class="mdname1" valign="top" nowrap> <em>rhs</em>          </td>
 
185
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
 
186
          <td class="md" nowrap><code> [inline]</code></td>
 
187
        </tr>
 
188
 
 
189
      </table>
 
190
    </td>
 
191
  </tr>
 
192
</table>
 
193
<table cellspacing=5 cellpadding=0 border=0>
 
194
  <tr>
 
195
    <td>
 
196
      &nbsp;
 
197
    </td>
 
198
    <td>
 
199
 
 
200
<p>
 
201
Operator syntax for append. 
 
202
<p>
 
203
    </td>
 
204
  </tr>
 
205
</table>
 
206
<a class="anchor" name="a11" doxytag="IpeString::operator+=" ></a><p>
 
207
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
208
  <tr>
 
209
    <td class="mdRow">
 
210
      <table cellpadding="0" cellspacing="0" border="0">
 
211
        <tr>
 
212
          <td class="md" nowrap valign="top"> void IpeString::operator+= </td>
 
213
          <td class="md" valign="top">(&nbsp;</td>
 
214
          <td class="md" nowrap valign="top">char&nbsp;</td>
 
215
          <td class="mdname1" valign="top" nowrap> <em>ch</em>          </td>
 
216
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
 
217
          <td class="md" nowrap><code> [inline]</code></td>
 
218
        </tr>
 
219
 
 
220
      </table>
 
221
    </td>
 
222
  </tr>
 
223
</table>
 
224
<table cellspacing=5 cellpadding=0 border=0>
 
225
  <tr>
 
226
    <td>
 
227
      &nbsp;
 
228
    </td>
 
229
    <td>
 
230
 
 
231
<p>
 
232
Operator syntax for append. 
 
233
<p>
 
234
    </td>
 
235
  </tr>
 
236
</table>
 
237
<a class="anchor" name="a12" doxytag="IpeString::substr" ></a><p>
 
238
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
239
  <tr>
 
240
    <td class="mdRow">
 
241
      <table cellpadding="0" cellspacing="0" border="0">
 
242
        <tr>
 
243
          <td class="md" nowrap valign="top"> <a class="el" href="class_ipe_string.html">IpeString</a> IpeString::substr </td>
 
244
          <td class="md" valign="top">(&nbsp;</td>
 
245
          <td class="md" nowrap valign="top">int&nbsp;</td>
 
246
          <td class="mdname" nowrap> <em>i</em>, </td>
 
247
        </tr>
 
248
        <tr>
 
249
          <td></td>
 
250
          <td></td>
 
251
          <td class="md" nowrap>int&nbsp;</td>
 
252
          <td class="mdname" nowrap> <em>len</em> = -1</td>
 
253
        </tr>
 
254
        <tr>
 
255
          <td></td>
 
256
          <td class="md">)&nbsp;</td>
 
257
          <td class="md" colspan="2"> const<code> [inline]</code></td>
 
258
        </tr>
 
259
 
 
260
      </table>
 
261
    </td>
 
262
  </tr>
 
263
</table>
 
264
<table cellspacing=5 cellpadding=0 border=0>
 
265
  <tr>
 
266
    <td>
 
267
      &nbsp;
 
268
    </td>
 
269
    <td>
 
270
 
 
271
<p>
 
272
Create substring. 
 
273
<p>
 
274
    </td>
 
275
  </tr>
 
276
</table>
 
277
<a class="anchor" name="a13" doxytag="IpeString::operator!=" ></a><p>
 
278
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
 
279
  <tr>
 
280
    <td class="mdRow">
 
281
      <table cellpadding="0" cellspacing="0" border="0">
 
282
        <tr>
 
283
          <td class="md" nowrap valign="top"> bool IpeString::operator!= </td>
 
284
          <td class="md" valign="top">(&nbsp;</td>
 
285
          <td class="md" nowrap valign="top">const <a class="el" href="class_ipe_string.html">IpeString</a> &amp;&nbsp;</td>
 
286
          <td class="mdname1" valign="top" nowrap> <em>rhs</em>          </td>
 
287
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
 
288
          <td class="md" nowrap> const<code> [inline]</code></td>
 
289
        </tr>
 
290
 
 
291
      </table>
 
292
    </td>
 
293
  </tr>
 
294
</table>
 
295
<table cellspacing=5 cellpadding=0 border=0>
 
296
  <tr>
 
297
    <td>
 
298
      &nbsp;
 
299
    </td>
 
300
    <td>
 
301
 
 
302
<p>
 
303
Operator !=. 
 
304
<p>
 
305
    </td>
 
306
  </tr>
 
307
</table>
 
308
<hr>The documentation for this class was generated from the following files:<ul>
 
309
<li>ipebase.h<li>ipebase.cpp</ul>
 
310
<hr>
 
311
</body></html>