blob: ae2c6b5b68d707e764445f6f08fc27ef1f309196 [file] [log] [blame]
<!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_FastString class Reference</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> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>OSCL_FastString Class Reference<br>
<small>
[<a class="el" href="group__osclutil.html">OSCL Util</a>]</small>
</h1><code>#include &lt;<a class="el" href="oscl__string__containers_8h-source.html">oscl_string_containers.h</a>&gt;</code>
<p>
<p>Inheritance diagram for OSCL_FastString:
<p><center><img src="classOSCL__FastString.png" usemap="#OSCL_FastString_map" border="0" alt=""></center>
<map name="OSCL_FastString_map">
<area href="classOSCL__String.html" alt="OSCL_String" shape="rect" coords="0,112,110,136">
<area href="classHeapBase.html" alt="HeapBase" shape="rect" coords="0,56,110,80">
<area href="class__OsclHeapBase.html" alt="_OsclHeapBase" shape="rect" coords="0,0,110,24">
</map>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef OSCL_String::chartype&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#s0">chartype</a></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a0">OSCL_FastString</a> ()</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a1">OSCL_FastString</a> (const OSCL_FastString &amp;src)</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a2">OSCL_FastString</a> (const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *cstr)</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a3">OSCL_FastString</a> (<a class="el" href="classOSCL__FastString.html#s0">chartype</a> *buf, uint32 maxlen)</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a4">~OSCL_FastString</a> ()</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint32&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a5">get_size</a> () const</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint32&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a6">get_maxsize</a> () const</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a7">get_cstr</a> () const</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a8">get_str</a> () const</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF OSCL_FastString &amp;&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a9">operator=</a> (const OSCL_FastString &amp;src)</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF OSCL_FastString &amp;&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a10">operator=</a> (const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *cstr)</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a11">set</a> (<a class="el" href="classOSCL__FastString.html#s0">chartype</a> *cstr, uint32 maxlen)</td></tr>
<tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#a12">set_length</a> ()</td></tr>
<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td nowrap align=right valign=top>class&nbsp;</td><td valign=bottom><a class="el" href="classOSCL__FastString.html#l0">OSCL_String</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
OSCL_FastString is a simple string class, compatible with regular character array strings.
<p>
This class does not allocate internal memory for the string but acts as a container for a user-defined buffer. This means no copying of the string is done and provides a faster way of manipulating strings. Depending on initialization, this container provides either read-only or read-write access to the string.
<p>
Implementation assumes the input string is null-terminated.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>C:</em>&nbsp;</td><td>
type of character. </td></tr>
</table>
</dl>
<p>
<hr><h2>Member Typedef Documentation</h2>
<a name="s0" doxytag="OSCL_FastString::chartype"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef OSCL_String::chartype OSCL_FastString::chartype
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Reimplemented from <a class="el" href="classOSCL__String.html#s0">OSCL_String</a>. </td>
</tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="OSCL_FastString::OSCL_FastString"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Default constructor. </td>
</tr>
</table>
<a name="a1" doxytag="OSCL_FastString::OSCL_FastString"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const OSCL_FastString &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>src</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Creates a fast string that contains a copy of the input string. The string inherits the writable-ness of the source string. <dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>src:</em>&nbsp;</td><td>
input string. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a2" doxytag="OSCL_FastString::OSCL_FastString"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>cstr</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Create the string and initialize it to contain the input string. The string is not writable. <dl compact><dt><b>am: null-terminated string.</b></dt><dd>
</dl> </td>
</tr>
</table>
<a name="a3" doxytag="OSCL_FastString::OSCL_FastString"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::OSCL_FastString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classOSCL__FastString.html#s0">chartype</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>uint32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>maxlen</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Create the string and initialize it to contain the input string. The string is writable. <dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>cp:</em>&nbsp;</td><td>
null-terminated string. </td></tr>
<tr><td valign=top><em>maxlen:</em>&nbsp;</td><td>
maximum size of storage at cp, not incl null terminator. If input string is not null-terminated, the function leaves. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a4" doxytag="OSCL_FastString::~OSCL_FastString"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString::~OSCL_FastString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a7" doxytag="OSCL_FastString::get_cstr"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF const <a class="el" href="classOSCL__FastString.html#s0">chartype</a>* OSCL_FastString::get_cstr </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function returns the C-style string for read access.
<p>
Implements <a class="el" href="classOSCL__String.html#a2">OSCL_String</a>. </td>
</tr>
</table>
<a name="a6" doxytag="OSCL_FastString::get_maxsize"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint32 OSCL_FastString::get_maxsize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function returns the maximum available storage size, not including null terminator. The maximum size may be larger than the current string size.
<p>
Implements <a class="el" href="classOSCL__String.html#a1">OSCL_String</a>. </td>
</tr>
</table>
<a name="a5" doxytag="OSCL_FastString::get_size"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint32 OSCL_FastString::get_size </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Pure virtuals from <a class="el" href="classOSCL__String.html">OSCL_String</a>
<p>
Implements <a class="el" href="classOSCL__String.html#a0">OSCL_String</a>. </td>
</tr>
</table>
<a name="a8" doxytag="OSCL_FastString::get_str"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="classOSCL__FastString.html#s0">chartype</a>* OSCL_FastString::get_str </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function returns the C-style string for write access. If the string is not writable it returns NULL.
<p>
Implements <a class="el" href="classOSCL__String.html#a4">OSCL_String</a>. </td>
</tr>
</table>
<a name="a10" doxytag="OSCL_FastString::operator="></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString&amp; OSCL_FastString::operator= </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classOSCL__FastString.html#s0">chartype</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>cstr</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Assignment operator <dl compact><dt><b>am: null-terminated string</b></dt><dd>
</dl>
<p>
Reimplemented from <a class="el" href="classOSCL__String.html#a6">OSCL_String</a>. </td>
</tr>
</table>
<a name="a9" doxytag="OSCL_FastString::operator="></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF OSCL_FastString&amp; OSCL_FastString::operator= </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const OSCL_FastString &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>src</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Assignment operators </td>
</tr>
</table>
<a name="a11" doxytag="OSCL_FastString::set"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OSCL_FastString::set </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classOSCL__FastString.html#s0">chartype</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>cstr</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>uint32&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>maxlen</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function can be used to reassign the string to a new writable string. If input string is not null-terminated, the function leaves. </td>
</tr>
</table>
<a name="a12" doxytag="OSCL_FastString::set_length"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OSCL_FastString::set_length </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function can be used to refresh the string size in case the contents of the string buffer have been modified since the container was created. </td>
</tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a name="l0" doxytag="OSCL_FastString::OSCL_String"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> friend class OSCL_String<code> [friend]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="oscl__string__containers_8h-source.html">oscl_string_containers.h</a></ul>
<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>