blob: 49fe20580270e504532464cb9e1ad7f4db9e7dfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>oscl_string.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center>
<hr><h1>oscl_string.h</h1><a href="oscl__string_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span>
00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00003
00004 <span class="comment">// O S C L_ S T R I N G C L A S S</span>
00005
00006 <span class="comment">// This file contains a standardized set of string containers that</span>
00007 <span class="comment">// can be used in place of character arrays.</span>
00008
00009 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00010
00025 <span class="preprocessor">#ifndef OSCL_STRING_H_INCLUDED</span>
00026 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_STRING_H_INCLUDED</span>
00027 <span class="preprocessor"></span>
00028
00029 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span>
00030 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html">oscl_base.h</a>"</span>
00031 <span class="preprocessor">#endif</span>
00032 <span class="preprocessor"></span>
00033 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span>
00034 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mem_8h.html">oscl_mem.h</a>"</span>
00035 <span class="preprocessor">#endif</span>
00036 <span class="preprocessor"></span>
<a name="l00041"></a><a class="code" href="classOSCL__String.html">00041</a> <span class="keyword">class </span><a class="code" href="classOSCL__String.html">OSCL_String</a> : <span class="keyword">public</span> <a class="code" href="classHeapBase.html">HeapBase</a>
00042
00043 {
00044 <span class="keyword">public</span>:
<a name="l00045"></a><a class="code" href="classOSCL__String.html#s0">00045</a> <span class="keyword">typedef</span> <span class="keywordtype">char</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>;
00046
00051 <span class="keyword">virtual</span> uint32 <a class="code" href="classOSCL__String.html#a0">get_size</a>() <span class="keyword">const</span> = 0;
00052
00058 <span class="keyword">virtual</span> uint32 <a class="code" href="classOSCL__String.html#a1">get_maxsize</a>() <span class="keyword">const</span> = 0;
00059
00063 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* <a class="code" href="classOSCL__String.html#a2">get_cstr</a>() <span class="keyword">const</span> = 0;
00064
00068 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a3">is_writable</a>() <span class="keyword">const</span>;
00069
00074 <span class="keyword">virtual</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* <a class="code" href="classOSCL__String.html#a4">get_str</a>() <span class="keyword">const</span> = 0;
00075
00078 OSCL_IMPORT_REF <a class="code" href="classOSCL__String.html">OSCL_String</a>& <a class="code" href="classOSCL__String.html#a5">operator=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src);
00079
00083 OSCL_IMPORT_REF <a class="code" href="classOSCL__String.html">OSCL_String</a>& <a class="code" href="classOSCL__String.html#a5">operator=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* cstr);
00084
00089 OSCL_IMPORT_REF <a class="code" href="classOSCL__String.html">OSCL_String</a>& <a class="code" href="classOSCL__String.html#a7">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src);
00090
00096 OSCL_IMPORT_REF <a class="code" href="classOSCL__String.html">OSCL_String</a>& <a class="code" href="classOSCL__String.html#a7">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* cstr);
00097
00102 OSCL_IMPORT_REF <a class="code" href="classOSCL__String.html">OSCL_String</a>& <a class="code" href="classOSCL__String.html#a7">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a> c);
00103
00106 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a10">operator== </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) <span class="keyword">const</span>;
00107 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a11">operator!= </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) <span class="keyword">const</span>;
00108 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a12">operator< </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) <span class="keyword">const</span>;
00109 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a13">operator<= </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) <span class="keyword">const</span>;
00110 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a14">operator> </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) <span class="keyword">const</span>;
00111 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a15">operator>= </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) <span class="keyword">const</span>;
00112
00116 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__String.html#a10">operator== </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* cstr) <span class="keyword">const</span>;
00117
00124 OSCL_IMPORT_REF <a class="code" href="classOSCL__String.html#s0">chartype</a> <a class="code" href="classOSCL__String.html#a17">operator[]</a>(uint32 index) <span class="keyword">const</span>;
00125
00131 OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOSCL__String.html#s0">chartype</a> <a class="code" href="classOSCL__String.html#a18">read</a>(uint32 index)<span class="keyword">const</span>;
00132
00137 OSCL_IMPORT_REF <span class="keyword">virtual</span> int8 <a class="code" href="classOSCL__String.html#a19">hash</a>() <span class="keyword">const</span>;
00138
00145 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__String.html#a20">write</a>(uint32 index,<a class="code" href="classOSCL__String.html#s0">chartype</a> c);
00146
00156 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__String.html#a20">write</a>(uint32 offset, uint32 length, <span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* buf);
00157
00158 <span class="preprocessor">#ifdef T_ARM</span>
00159 <span class="preprocessor"></span><span class="comment">//ADS 1.2 compiler doesn't interpret "protected" correctly for templates.</span>
00160 <span class="comment">//so the constructor/destructor need to be public.</span>
00161 <span class="keyword">public</span>:
00162 <span class="preprocessor">#else</span>
00163 <span class="preprocessor"></span> <span class="keyword">protected</span>:
00164 <span class="preprocessor">#endif</span>
00165 <span class="preprocessor"></span> OSCL_IMPORT_REF <a class="code" href="classOSCL__String.html#b0">OSCL_String</a>();
00166 OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOSCL__String.html#b1">~OSCL_String</a>();
00167
00168 <span class="keyword">protected</span>:
00175 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__String.html#b2">set_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* cstr) = 0;
00176
00181 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__String.html#b3">append_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html#s0">chartype</a>* cstr) = 0;
00182
00185 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__String.html#b2">set_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) = 0;
00186
00190 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__String.html#b3">append_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__String.html">OSCL_String</a>& src) = 0;
00191
00195 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__String.html#b6">set_len</a>(uint32 len) = 0;
00196 };
00197
<a name="l00205"></a><a class="code" href="classOSCL__wString.html">00205</a> <span class="keyword">class </span><a class="code" href="classOSCL__wString.html">OSCL_wString</a>
00206 {
00207 <span class="keyword">public</span>:
<a name="l00208"></a><a class="code" href="classOSCL__wString.html#s0">00208</a> <span class="keyword">typedef</span> <a class="code" href="group__osclbase.html#a32">oscl_wchar</a> <a class="code" href="classOSCL__wString.html#s0">chartype</a>;
00209
00210 <span class="keyword">virtual</span> uint32 <a class="code" href="classOSCL__wString.html#a0">get_size</a>() <span class="keyword">const</span> = 0;
00211
00212 <span class="keyword">virtual</span> uint32 <a class="code" href="classOSCL__wString.html#a1">get_maxsize</a>() <span class="keyword">const</span> = 0;
00213
00214 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* <a class="code" href="classOSCL__wString.html#a2">get_cstr</a>() <span class="keyword">const</span> = 0;
00215
00216 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a3">is_writable</a>() <span class="keyword">const</span>;
00217
00218 <span class="keyword">virtual</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* <a class="code" href="classOSCL__wString.html#a4">get_str</a>() <span class="keyword">const</span> = 0;
00219
00220 OSCL_IMPORT_REF <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& <a class="code" href="classOSCL__wString.html#a5">operator=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src);
00221 OSCL_IMPORT_REF <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& <a class="code" href="classOSCL__wString.html#a5">operator=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* cstr);
00222
00223 OSCL_IMPORT_REF <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& <a class="code" href="classOSCL__wString.html#a7">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src);
00224 OSCL_IMPORT_REF <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& <a class="code" href="classOSCL__wString.html#a7">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* cstr);
00225 OSCL_IMPORT_REF <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& <a class="code" href="classOSCL__wString.html#a7">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a> c);
00226
00227 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a10">operator== </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) <span class="keyword">const</span>;
00228 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a11">operator!= </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) <span class="keyword">const</span>;
00229 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a12">operator< </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) <span class="keyword">const</span>;
00230 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a13">operator<= </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) <span class="keyword">const</span>;
00231 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a14">operator> </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) <span class="keyword">const</span>;
00232 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a15">operator>= </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) <span class="keyword">const</span>;
00233 OSCL_IMPORT_REF <span class="keywordtype">bool</span> <a class="code" href="classOSCL__wString.html#a10">operator== </a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* cstr) <span class="keyword">const</span>;
00234
00235 OSCL_IMPORT_REF <a class="code" href="classOSCL__wString.html#s0">chartype</a> <a class="code" href="classOSCL__wString.html#a17">operator[]</a>(uint32 index) <span class="keyword">const</span>;
00236
00237 OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a> <a class="code" href="classOSCL__wString.html#a18">read</a>(uint32 index)<span class="keyword">const</span>;
00238
00239 OSCL_IMPORT_REF <span class="keyword">virtual</span> int8 <a class="code" href="classOSCL__wString.html#a19">hash</a>() <span class="keyword">const</span>;
00240
00241 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__wString.html#a20">write</a>(uint32 index,<a class="code" href="classOSCL__wString.html#s0">chartype</a> c);
00242 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__wString.html#a20">write</a>(uint32 offset, uint32 length, <span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* buf);
00243
00244 <span class="preprocessor">#ifdef T_ARM</span>
00245 <span class="preprocessor"></span><span class="comment">//ADS 1.2 compiler doesn't interpret "protected" correctly for templates.</span>
00246 <span class="comment">//so the constructor/destructor need to be public.</span>
00247 <span class="keyword">public</span>:
00248 <span class="preprocessor">#else</span>
00249 <span class="preprocessor"></span> <span class="keyword">protected</span>:
00250 <span class="preprocessor">#endif</span>
00251 <span class="preprocessor"></span> OSCL_IMPORT_REF <a class="code" href="classOSCL__wString.html#b0">OSCL_wString</a>();
00252 OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOSCL__wString.html#b1">~OSCL_wString</a>();
00253
00254 <span class="keyword">protected</span>:
00255 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__wString.html#b2">set_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* cstr) = 0;
00256 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__wString.html#b3">append_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html#s0">chartype</a>* cstr) = 0;
00257
00258 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__wString.html#b2">set_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) = 0;
00259 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__wString.html#b3">append_rep</a>(<span class="keyword">const</span> <a class="code" href="classOSCL__wString.html">OSCL_wString</a>& src) = 0;
00260
00261 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOSCL__wString.html#b6">set_len</a>(uint32 len) = 0;
00262 };
00263
00264 <span class="preprocessor">#endif // OSCL_STRING_H_INCLUDED</span>
00265 <span class="preprocessor"></span>
</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>
|