aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/oscl__string__rep_8h_source.html
blob: 5d19961ba3f8b1a0ae520e7a9c5f5a920c01d6bb (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oscl: oscl_string_rep.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>oscl_string_rep.h</h1><a href="oscl__string__rep_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- c++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 <span class="comment">//               O S C L_ S T R I N G _ R E P</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">//    This file contains a standardized set of string containers that</span>
<a name="l00007"></a>00007 <span class="comment">//    can be used in place of character arrays.</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00010"></a>00010 
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef OSCL_STRING_REP_H_INCLUDED</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_STRING_REP_H_INCLUDED</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__defalloc_8h.html" title="The file defines simple default memory allocator classes. These allocators are used...">oscl_defalloc.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#endif</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 
<a name="l00036"></a><a class="code" href="classCHeapRep.html">00036</a> <span class="keyword">class </span><a class="code" href="classCHeapRep.html">CHeapRep</a>
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038     <span class="keyword">public</span>:
<a name="l00039"></a><a class="code" href="classCHeapRep.html#a7352c6d37cf0a2245cb846b20b7c0ad0">00039</a>         <a class="code" href="classCHeapRep.html#a7352c6d37cf0a2245cb846b20b7c0ad0">CHeapRep</a>()
<a name="l00040"></a>00040                 : <a class="code" href="classCHeapRep.html#a9085afe585ab9efbfcb85a0989291fd1">refcount</a>(0)
<a name="l00041"></a>00041                 , <a class="code" href="classCHeapRep.html#a39780f0ff96376fa5bf9de34688edfaf">buffer</a>(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>)
<a name="l00042"></a>00042                 , <a class="code" href="classCHeapRep.html#ac59cef0e80ba1c8c54f4e3403d2339e4">maxsize</a>(0)
<a name="l00043"></a>00043                 , <a class="code" href="classCHeapRep.html#a8b65c97610412045497f8484681d4b46">size</a>(0)
<a name="l00044"></a>00044         {}
<a name="l00045"></a>00045 
<a name="l00046"></a>00046         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classCHeapRep.html#a60f11f6e43bd13a9ea26be30d40907ed">set_rep</a>(<a class="code" href="classCHeapRep.html">CHeapRep</a>*&amp;, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>&amp;, <span class="keyword">const</span> <span class="keywordtype">char</span>*, uint32);
<a name="l00047"></a>00047         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classCHeapRep.html#a60f11f6e43bd13a9ea26be30d40907ed">set_rep</a>(<a class="code" href="classCHeapRep.html">CHeapRep</a>*&amp;, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>&amp;, <span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>*, uint32);
<a name="l00048"></a>00048         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classCHeapRep.html#a2e0e6990fed467831c0cc60e56eb7ef1">append_rep</a>(<a class="code" href="classCHeapRep.html">CHeapRep</a>*&amp;, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>&amp;, <span class="keyword">const</span> <span class="keywordtype">char</span>*, uint32);
<a name="l00049"></a>00049         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classCHeapRep.html#a2e0e6990fed467831c0cc60e56eb7ef1">append_rep</a>(<a class="code" href="classCHeapRep.html">CHeapRep</a>*&amp;, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>&amp;, <span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>*, uint32);
<a name="l00050"></a>00050 
<a name="l00051"></a><a class="code" href="classCHeapRep.html#a9085afe585ab9efbfcb85a0989291fd1">00051</a>         uint32 <a class="code" href="classCHeapRep.html#a9085afe585ab9efbfcb85a0989291fd1">refcount</a>;
<a name="l00052"></a><a class="code" href="classCHeapRep.html#a39780f0ff96376fa5bf9de34688edfaf">00052</a>         <a class="code" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89" title="The OsclAny is meant to be used the context of a generic pointer (i.e., no specific...">OsclAny</a>* <a class="code" href="classCHeapRep.html#a39780f0ff96376fa5bf9de34688edfaf">buffer</a>;
<a name="l00053"></a><a class="code" href="classCHeapRep.html#ac59cef0e80ba1c8c54f4e3403d2339e4">00053</a>         uint32 <a class="code" href="classCHeapRep.html#ac59cef0e80ba1c8c54f4e3403d2339e4">maxsize</a>;
<a name="l00054"></a><a class="code" href="classCHeapRep.html#a8b65c97610412045497f8484681d4b46">00054</a>         uint32 <a class="code" href="classCHeapRep.html#a8b65c97610412045497f8484681d4b46">size</a>;
<a name="l00055"></a>00055         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">bool</span> <span class="keyword">set</span>(uint32, <span class="keyword">const</span> <span class="keywordtype">char</span>*, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;);
<a name="l00056"></a>00056         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">bool</span> <span class="keyword">set</span>(uint32, <span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>*, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;);
<a name="l00057"></a>00057         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">bool</span> <a class="code" href="classCHeapRep.html#a630dfb348cfd65eeb0d3dfc66806d9f1">append</a>(uint32, <span class="keyword">const</span> <span class="keywordtype">char</span>*, uint32, <span class="keyword">const</span> <span class="keywordtype">char</span>*, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;);
<a name="l00058"></a>00058         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">bool</span> <a class="code" href="classCHeapRep.html#a630dfb348cfd65eeb0d3dfc66806d9f1">append</a>(uint32, <span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>*, uint32, <span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>*, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;);
<a name="l00059"></a>00059         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCHeapRep.html#a9f2e90284b641cc6cda294a34b3d50f5">add_ref</a>();
<a name="l00060"></a>00060         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCHeapRep.html#accd1af664be4f5ed388fe7bc881b53bd">remove_ref</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;);
<a name="l00061"></a>00061 
<a name="l00062"></a>00062         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classCHeapRep.html#ad7263eadf551c4b4229d8cbd53ab1a85">assign</a>(<a class="code" href="classCHeapRep.html">CHeapRep</a>*&amp;, <a class="code" href="classCHeapRep.html">CHeapRep</a>*, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;);
<a name="l00063"></a>00063     <span class="keyword">private</span>:
<a name="l00064"></a>00064         <span class="keyword">static</span> <a class="code" href="classCHeapRep.html">CHeapRep</a> *New(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;);
<a name="l00065"></a>00065 };
<a name="l00066"></a>00066 
<a name="l00069"></a><a class="code" href="classCStackRep.html">00069</a> <span class="keyword">class </span><a class="code" href="classCStackRep.html">CStackRep</a>
<a name="l00070"></a>00070 {
<a name="l00071"></a>00071     <span class="keyword">public</span>:
<a name="l00072"></a><a class="code" href="classCStackRep.html#a18aec5117a0444f9ebfb02ec76a2486d">00072</a>         <a class="code" href="classCStackRep.html#a18aec5117a0444f9ebfb02ec76a2486d">CStackRep</a>()
<a name="l00073"></a>00073                 : <a class="code" href="classCStackRep.html#afd6c27c8d289da8ee8315926fc3559c9">maxsize</a>(0)
<a name="l00074"></a>00074                 , <a class="code" href="classCStackRep.html#a43a4aec379103ab68d71ed5c3a621eea">size</a>(0)
<a name="l00075"></a>00075                 , <a class="code" href="classCStackRep.html#a29bf53966771d02750112294cc1185d5">buffer</a>(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>)
<a name="l00076"></a>00076         {}
<a name="l00077"></a><a class="code" href="classCStackRep.html#afd6c27c8d289da8ee8315926fc3559c9">00077</a>         uint32 <a class="code" href="classCStackRep.html#afd6c27c8d289da8ee8315926fc3559c9">maxsize</a>;
<a name="l00078"></a><a class="code" href="classCStackRep.html#a43a4aec379103ab68d71ed5c3a621eea">00078</a>         uint32 <a class="code" href="classCStackRep.html#a43a4aec379103ab68d71ed5c3a621eea">size</a>;
<a name="l00079"></a><a class="code" href="classCStackRep.html#a29bf53966771d02750112294cc1185d5">00079</a>         <a class="code" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89" title="The OsclAny is meant to be used the context of a generic pointer (i.e., no specific...">OsclAny</a>* <a class="code" href="classCStackRep.html#a29bf53966771d02750112294cc1185d5">buffer</a>;
<a name="l00080"></a>00080         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keyword">const</span> <span class="keywordtype">char</span>* cp, uint32 len);
<a name="l00081"></a>00081         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>* cp, uint32 len);
<a name="l00082"></a>00082         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCStackRep.html#a1f0ca122ac232685af7691034e2ee582">append</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* cp, uint32 len);
<a name="l00083"></a>00083         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCStackRep.html#a1f0ca122ac232685af7691034e2ee582">append</a>(<span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>* cp, uint32 len);
<a name="l00084"></a>00084 };
<a name="l00085"></a>00085 
<a name="l00086"></a>00086 
<a name="l00089"></a><a class="code" href="classCFastRep.html">00089</a> <span class="keyword">class </span><a class="code" href="classCFastRep.html">CFastRep</a>
<a name="l00090"></a>00090 {
<a name="l00091"></a>00091     <span class="keyword">public</span>:
<a name="l00092"></a><a class="code" href="classCFastRep.html#aaa6ecba1fdb5aae2f44a24d981d24443">00092</a>         <a class="code" href="classCFastRep.html#aaa6ecba1fdb5aae2f44a24d981d24443">CFastRep</a>()
<a name="l00093"></a>00093                 : <a class="code" href="classCFastRep.html#a96989a724a00a49fd01d1dd348017fcc">maxsize</a>(0)
<a name="l00094"></a>00094                 , <a class="code" href="classCFastRep.html#a00f29f00b35bde85cca81f4751bea426">size</a>(0)
<a name="l00095"></a>00095                 , <a class="code" href="classCFastRep.html#ab41cb4b78eb2d97ee3922ac786d67630">buffer</a>(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>)
<a name="l00096"></a>00096                 , <a class="code" href="classCFastRep.html#acf80124b3bb654149d6f464acd417fc1">writable</a>(false)
<a name="l00097"></a>00097                 , <a class="code" href="classCFastRep.html#a6c53a75b35ecbc58bf81643000c67908">overwrite</a>(false)
<a name="l00098"></a>00098         {}
<a name="l00099"></a><a class="code" href="classCFastRep.html#a96989a724a00a49fd01d1dd348017fcc">00099</a>         uint32 <a class="code" href="classCFastRep.html#a96989a724a00a49fd01d1dd348017fcc">maxsize</a>;
<a name="l00100"></a><a class="code" href="classCFastRep.html#a00f29f00b35bde85cca81f4751bea426">00100</a>         uint32 <a class="code" href="classCFastRep.html#a00f29f00b35bde85cca81f4751bea426">size</a>;
<a name="l00101"></a><a class="code" href="classCFastRep.html#ab41cb4b78eb2d97ee3922ac786d67630">00101</a>         <a class="code" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89" title="The OsclAny is meant to be used the context of a generic pointer (i.e., no specific...">OsclAny</a>* <a class="code" href="classCFastRep.html#ab41cb4b78eb2d97ee3922ac786d67630">buffer</a>;
<a name="l00102"></a><a class="code" href="classCFastRep.html#acf80124b3bb654149d6f464acd417fc1">00102</a>         <span class="keywordtype">bool</span> <a class="code" href="classCFastRep.html#acf80124b3bb654149d6f464acd417fc1">writable</a>;
<a name="l00103"></a><a class="code" href="classCFastRep.html#a6c53a75b35ecbc58bf81643000c67908">00103</a>         <span class="keywordtype">bool</span> <a class="code" href="classCFastRep.html#a6c53a75b35ecbc58bf81643000c67908">overwrite</a>;
<a name="l00104"></a>00104         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCFastRep.html#af4017e4a49401693a18340f590ba0ea6">set_w</a>(<span class="keywordtype">char</span>* cp, uint32 len, uint32 maxlen);
<a name="l00105"></a>00105         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCFastRep.html#af4017e4a49401693a18340f590ba0ea6">set_w</a>(<a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>* cp, uint32 len, uint32 maxlen);
<a name="l00106"></a>00106         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCFastRep.html#af08b42ea8d424ecfe97e778f800b3a1e">set_r</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* cp, uint32 len);
<a name="l00107"></a>00107         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCFastRep.html#af08b42ea8d424ecfe97e778f800b3a1e">set_r</a>(<span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>* cp, uint32 len);
<a name="l00108"></a>00108         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCFastRep.html#a0c7515f78263d01d5e8de562d367c2aa">append</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* cp, uint32 len);
<a name="l00109"></a>00109         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classCFastRep.html#a0c7515f78263d01d5e8de562d367c2aa">append</a>(<span class="keyword">const</span> <a class="code" href="group__osclbase.html#gad3f9ec9db55ebd4760c877b17eb596ec">oscl_wchar</a>* cp, uint32 len);
<a name="l00110"></a>00110 };
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 
<a name="l00113"></a>00113 <span class="preprocessor">#endif   // OSCL_STRING_REP_H_INCLUDED</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.002.1.1 </small>
</small></address>
</body>
</html>