178 lines
25 KiB
HTML
178 lines
25 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - Classes And Methods - The Support Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
|
||
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
|
||
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheSupportKit.html" title="The Support Kit" /><link rel="prev" href="BFlattenable.html" title="BFlattenable" /><link rel="next" href="BLocker.html" title="BLocker" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BFlattenable.html" title="BFlattenable"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheSupportKit.html" title="The Support Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BLocker.html" title="BLocker"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - Classes And Methods - The Support Kit</div></div><div id="headerB">Prev: <a href="BFlattenable.html">BFlattenable</a> Up: <a href="TheSupportKit.html">The Support Kit</a> Next: <a href="BLocker.html">BLocker</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList"></a>BList</h2></div></div></div><a id="id1269770" class="indexterm"></a><div class="classheader"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td><table width="100%" border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Derived From:</td><td>–</td></tr><tr><td>Mix-in Classes:</td><td>–</td></tr><tr><td>Declared In:</td><td><code class="filename">support/List.h</code></td></tr><tr><td>Library:</td><td><code class="filename">libbe.so</code></td></tr><tr><td>Allocation:</td><td>–</td></tr></tbody></table></td><td>
|
||
<a class="link overview" href="BList_Overview.html" title="BList">Class Overview</a>
|
||
<div class="toc"><ul><li><span class="section"><a href="BList.html#BList_ConstructorDestructor">Constructor and Destructor</a></span></li><li><span class="section"><a href="BList.html#BList_MemberFunctions">Member Functions</a></span></li><li><span class="section"><a href="BList.html#BList_Operators">Operators</a></span></li></ul></div>
|
||
</td></tr></tbody></table></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_ConstructorDestructor"></a>Constructor and Destructor</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_Constructor"></a>BList()</h4></div></div></div><div class="synopsisgroup">
|
||
<code class="constructorsynopsis cpp"><span class="methodname">BList</span>(<span class="methodparam"><span class="type">int32 </span><span class="parameter">count</span><span class="initializer"> = 20</span></span>);</code>
|
||
|
||
<code class="constructorsynopsis cpp"><span class="methodname">BList</span>(<span class="methodparam"><span class="modifier">const </span><span class="type">BList& </span><span class="parameter">anotherList</span></span>);</code>
|
||
</div><p>
|
||
Initializes the <code class="classname">BList</code> by allocating enough memory to hold <code class="parameter">count</code> items. As
|
||
the list grows and shrinks, additional memory is allocated and freed in
|
||
blocks of the same size.
|
||
</p><p>
|
||
The copy constructor creates an independent list of data pointers, but it
|
||
doesn't copy the pointed-to data. For example:
|
||
</p><pre class="programlisting example cpp"><span class="type">BList*</span> <code class="varname">newList</code> = new <code class="classname">BList</code>(oldList);</pre><p>
|
||
Here, the contents of <code class="varname">oldList</code> and <code class="varname">newList</code>—the actual data
|
||
pointers—are separate and independent. Adding, removing, or
|
||
reordering items in <code class="varname">oldList</code> won't affect the number or order of items in
|
||
<code class="varname">newList</code>. But if you modify the data that an item in <code class="varname">oldList</code> points to,
|
||
the modification will be seen through the analogous item in <code class="varname">newList</code>.
|
||
</p><p>
|
||
The block size of a <code class="classname">BList</code> that's created through the copy constructor is
|
||
the same as that of the original <code class="classname">BList</code>.
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_Destructor"></a>~BList()</h4></div></div></div><code class="destructorsynopsis cpp"><span class="modifier">virtual </span><span class="methodname">~BList</span>();</code><p>
|
||
Frees the list of data pointers, but doesn't free the data that they
|
||
point to. To destroy the data, you need to free each item individually:
|
||
</p><pre class="programlisting example cpp"><span class="type">void*</span> <code class="varname">anItem</code>;
|
||
for ( <span class="type">int32</span> <code class="varname">i</code> = 0; <code class="varname">anItem</code> = <code class="varname">myList</code>-><code class="methodname">ItemAt</code>(<code class="varname">i</code>); <code class="varname">i</code>++ )
|
||
delete <code class="varname">anItem</code>;
|
||
|
||
delete <code class="varname">myList</code>;</pre><p>
|
||
See also: <a class="link" href="BList.html#BList_MakeEmpty" title="MakeEmpty()"><code class="methodname">MakeEmpty()</code></a>
|
||
</p></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_MemberFunctions"></a>Member Functions</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_AddItem"></a>AddItem()</h4></div></div></div><div class="synopsisgroup">
|
||
<code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">AddItem</span>(<span class="methodparam"><span class="type">void* </span><span class="parameter">item</span></span>);</code>
|
||
|
||
<code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">AddItem</span>(<span class="methodparam"><span class="type">void* </span><span class="parameter">item</span></span>,<br /> <span class="methodparam"><span class="type">int32 </span><span class="parameter">index</span></span>);</code>
|
||
</div><p>
|
||
Adds an item to the <code class="classname">BList</code> at
|
||
<code class="parameter">index</code>—or, if no index is supplied, at
|
||
the end of the list. If necessary, additional memory is allocated to
|
||
accommodate the new item.
|
||
</p><p>
|
||
Adding an item never removes an item already in the list. If the item is
|
||
added at an index that's already occupied, items currently in the list
|
||
are bumped down one slot to make room.
|
||
</p><p>
|
||
If <code class="parameter">index</code> is out of range (greater than the current item count, or less
|
||
than zero), the function fails and returns <code class="constant">false</code>. Otherwise it returns
|
||
<code class="constant">true</code>.
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_AddList"></a>AddList()</h4></div></div></div><div class="synopsisgroup">
|
||
<code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">AddList</span>(<span class="methodparam"><span class="type">BList* </span><span class="parameter">item</span></span>);</code>
|
||
|
||
<code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">AddList</span>(<span class="methodparam"><span class="type">BList* </span><span class="parameter">item</span></span>,<br /> <span class="methodparam"><span class="type">int32 </span><span class="parameter">index</span></span>);</code>
|
||
</div><p>
|
||
Adds the contents of another <code class="classname">BList</code> to this <code class="classname">BList</code>. The items from the
|
||
other <code class="classname">BList</code> are inserted at <code class="parameter">index</code>—or, if no index is given, they're
|
||
appended to the end of the list. If the index is out of range, the
|
||
function fails and returns <code class="constant">false</code>. If successful, it returns <code class="constant">true</code>.
|
||
</p><p>
|
||
See also:
|
||
<a class="link" href="BList.html#BList_AddItem" title="AddItem()"><code class="methodname">AddItem()</code></a>
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_CountItems"></a>CountItems()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">int32 </span><span class="methodname">CountItems</span>() <span class="modifier">const</span>;</code><p>
|
||
Returns the number of items currently in the list.
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_DoForEach"></a>DoForEach()</h4></div></div></div><div class="synopsisgroup">
|
||
<code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">DoForEach</span>(<span class="methodparam"><span class="type">bool </span>(*<span class="parameter">func</span>)(<span class="type">void * </span>)</span>);</code>
|
||
|
||
<code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">DoForEach</span>(<span class="methodparam"><span class="type">bool </span>(*<span class="parameter">func</span>)(<span class="type">void * </span>)</span>,<br /> <span class="methodparam"><span class="type">void* </span><span class="parameter">arg2</span></span>);</code>
|
||
</div><p>
|
||
Calls the <code class="parameter">func</code> function once for each item in the <code class="classname">BList</code>. Items are
|
||
visited in order, beginning with the first one in the list (index 0) and
|
||
ending with the last. If a call to <code class="parameter">func</code> returns <code class="constant">true</code>, the iteration is
|
||
stopped, even if some items have not yet been visited.
|
||
</p><p>
|
||
<code class="parameter">func</code> must be a function that takes one or two arguments. The first
|
||
argument is the currently-considered item from the list; the second
|
||
argument, if <code class="parameter">func</code> requires one, is passed to <code class="methodname">DoForEach()</code> as
|
||
<code class="parameter">arg2</code>.
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_FirstItem"></a>FirstItem()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">void* </span><span class="methodname">FirstItem</span>() <span class="modifier">const</span>;</code><p>
|
||
Returns the first item in the list, or <code class="constant">NULL</code> if the list is empty. This
|
||
function doesn't remove the item from the list.
|
||
</p><p>
|
||
See also:
|
||
<a class="link" href="BList.html#BList_LastItem" title="LastItem()"><code class="methodname">LastItem()</code></a>,
|
||
<a class="link" href="BList.html#BList_ItemAt" title="ItemAt()"><code class="methodname">ItemAt()</code></a>
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_HasItem"></a>HasItem()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">HasItem</span>(<span class="methodparam"><span class="type">void* </span><span class="parameter">item</span></span>) <span class="modifier">const</span>;</code><p>
|
||
Returns <code class="constant">true</code> if item is in the list, and <code class="constant">false</code> if not.
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_IndexOf"></a>IndexOf()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">int32 </span><span class="methodname">IndexOf</span>(<span class="methodparam"><span class="type">void* </span><span class="parameter">item</span></span>) <span class="modifier">const</span>;</code><p>
|
||
Returns the index where a particular item is located in the list, or a
|
||
negative number if the item isn't in the list. If the item is in the list
|
||
more than once, the index returned will be the position of its first
|
||
occurrence.
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_IsEmpty"></a>IsEmpty()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">IsEmpty</span>() <span class="modifier">const</span>;</code><p>
|
||
Returns <code class="constant">true</code> if the list is empty (if it contains no items), and <code class="constant">false</code>
|
||
otherwise.
|
||
</p><p>
|
||
See also: <a class="link" href="BList.html#BList_MakeEmpty" title="MakeEmpty()"><code class="methodname">MakeEmpty()</code></a>
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_ItemAt"></a>ItemAt()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">void* </span><span class="methodname">ItemAt</span>(<span class="methodparam"><span class="type">int32 </span><span class="parameter">index</span></span>) <span class="modifier">const</span>;</code><p>
|
||
Returns the item at <code class="parameter">index</code>, or <code class="constant">NULL</code> if the index is out of range. This
|
||
function doesn't remove the item from the list.
|
||
</p><p>
|
||
See also:
|
||
<a class="link" href="BList.html#BList_Items" title="Items()"><code class="methodname">Items()</code></a>,
|
||
<a class="link" href="BList.html#BList_FirstItem" title="FirstItem()"><code class="methodname">FirstItem()</code></a>,
|
||
<a class="link" href="BList.html#BList_LastItem" title="LastItem()"><code class="methodname">LastItem()</code></a>
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_Items"></a>Items()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">void* </span><span class="methodname">Items</span>() <span class="modifier">const</span>;</code><p>
|
||
Returns a pointer to the <code class="classname">BList</code>'s list. You can index directly into the
|
||
list if you're certain that the index is in range:
|
||
</p><pre class="programlisting example cpp"><span class="type">myType*</span> <code class="varname">item</code> = (<span class="type">myType*</span>) <code class="methodname">Items</code>()[<code class="varname">index</code>];</pre></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_LastItem"></a>LastItem()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">void* </span><span class="methodname">LastItem</span>() <span class="modifier">const</span>;</code><p>
|
||
Returns the last item in the list without removing it. If the list is
|
||
empty, this function returns <code class="constant">NULL</code>.
|
||
</p><p>
|
||
See also:
|
||
<a class="link" href="BList.html#BList_RemoveItem" title="RemoveItem() , RemoveItems()"><code class="methodname">RemoveItem()</code></a>,
|
||
<a class="link" href="BList.html#BList_FirstItem" title="FirstItem()"><code class="methodname">FirstItem()</code></a>
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_MakeEmpty"></a>MakeEmpty()</h4></div></div></div><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">MakeEmpty</span>();</code><p>
|
||
Empties the <code class="classname">BList</code> of all its items, without freeing the data that they
|
||
point to.
|
||
</p><p>
|
||
See also:
|
||
<a class="link" href="BList.html#BList_IsEmpty" title="IsEmpty()"><code class="methodname">IsEmpty()</code></a>,
|
||
<a class="link" href="BList.html#BList_RemoveItem" title="RemoveItem() , RemoveItems()"><code class="methodname">RemoveItem()</code></a>
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_RemoveItem"></a><a id="BList_RemoveItems"></a>
|
||
RemoveItem() , RemoveItems()</h4></div></div></div><div class="synopsisgroup">
|
||
<code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">RemoveItem</span>(<span class="methodparam"><span class="type">void* </span><span class="parameter">item</span></span>);</code>
|
||
|
||
<code class="methodsynopsis cpp"><span class="type">void* </span><span class="methodname">RemoveItem</span>(<span class="methodparam"><span class="type">int32 </span><span class="parameter">index</span></span>);</code>
|
||
</div><code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">RemoveItems</span>(<span class="methodparam"><span class="type">int32 </span><span class="parameter">index</span></span>,<br /> <span class="methodparam"><span class="type">int32 </span><span class="parameter">count</span></span>);</code><p>
|
||
<code class="methodname">RemoveItem()</code> removes an item from the list. If passed an <code class="parameter">item</code>, the
|
||
function looks for the item in the list, removes it, and returns <code class="constant">true</code>. If
|
||
it can't find the item, it returns <code class="constant">false</code>. If the item is in the list more
|
||
than once, this function removes only its first occurrence.
|
||
</p><p>
|
||
If passed an <code class="parameter">index</code>, <code class="methodname">RemoveItem()</code>
|
||
removes the item at that index and
|
||
returns it. If there's no item at the index, it returns <code class="constant">NULL</code>.
|
||
</p><p>
|
||
<code class="methodname">RemoveItems()</code> removes a group of <code class="parameter">count</code> items from the list, beginning
|
||
with the item at <code class="parameter">index</code>. If the index is out of range, it fails and
|
||
returns <code class="constant">false</code>. Otherwise, it removes the items, without checking to be
|
||
sure that the list actually holds that many items at the index, and
|
||
returns <code class="constant">true</code>.
|
||
</p><p>
|
||
The list is compacted after an item is removed. Because of this, you
|
||
mustn't try to empty a list (or a range within a list) by removing items
|
||
at monotonically increasing indices. You should either start with the
|
||
highest index and move towards the head of the list, or remove at the
|
||
same index (the lowest in the range) some number of times. As an example
|
||
of the latter, the following code removes the first five items in the
|
||
list:
|
||
</p><pre class="programlisting example cpp">for ( <span class="type">int32</span> <code class="varname">i</code> = 0; <code class="varname">i</code> < 5; <code class="varname">i</code>++ )
|
||
<code class="varname">myList</code>-><code class="methodname">RemoveItem</code>(0);</pre><p>
|
||
See also:
|
||
<a class="link" href="BList.html#BList_MakeEmpty" title="MakeEmpty()"><code class="methodname">MakeEmpty()</code></a>
|
||
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_SortItems"></a>SortItems()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">void* </span><span class="methodname">SortItems</span>(<span class="methodparam"><span class="type">int </span>(*<span class="parameter">compareFunc</span>)(<span class="type">const void * </span>, <span class="type">const void * </span>)</span>);</code><p>
|
||
Rearranges the items in the list. The items are sorted using the
|
||
<code class="parameter">compareFunc</code> comparison function passed as an argument. This function
|
||
should return a negative number if the first item is ordered before the
|
||
second, a positive number if the second is ordered before the first, and
|
||
0 if the two items are ordered equivalently.
|
||
</p><p>
|
||
The arguments passed to the comparison function are declared to be <span class="type">void*</span>;
|
||
however, they should be regarded as pointers to the items in the
|
||
list—in other words, as pointers to pointers.
|
||
</p></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_Operators"></a>Operators</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BList_operator_equals"></a>= (assignment)</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">BList& </span><span class="methodname">operator =</span>(<span class="methodparam"><span class="modifier">const </span><span class="type">BList& </span><span class="parameter">from</span></span>);</code><p>
|
||
Copies the contents of one <code class="classname">BList</code> object into another:
|
||
</p><pre class="programlisting example cpp"><code class="classname">BList</code> <code class="varname">newList</code> = <code class="varname">oldList</code>;</pre><p>
|
||
After the assignment, each object has its own independent copy of list
|
||
data; destroying one of the objects won't affect the other.
|
||
</p><p>
|
||
Only the items in the list are copied, not the data they point to.
|
||
</p></div></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BFlattenable.html">BFlattenable</a> Up: <a href="TheSupportKit.html">The Support Kit</a> Next: <a href="BLocker.html">BLocker</a> </div><div id="footerB"><div id="footerBL"><a href="BFlattenable.html" title="BFlattenable"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheSupportKit.html" title="The Support Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BLocker.html" title="BLocker"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
|
||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
|
||
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>
|