some more warnings
[suif.git] / html / suif1_94.html
blob6b261a579bad47c6ec8815276341eaf86977c9c3
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.54
4 from suif1.texi on 28 April 1999 -->
6 <TITLE>The SUIF Version 1 Library - Association Lists</TITLE>
7 <link href="suif1_95.html" rel=Next>
8 <link href="suif1_93.html" rel=Previous>
9 <link href="suif1_toc.html" rel=ToC>
11 </HEAD>
12 <BODY>
13 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_93.html">previous</A>, <A HREF="suif1_95.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
14 <P><HR><P>
17 <H2><A NAME="SEC94" HREF="suif1_toc.html#TOC94">Association Lists</A></H2>
18 <P>
19 <A NAME="IDX666"></A>
20 <A NAME="IDX667"></A>
22 </P>
23 <P>
24 <A NAME="IDX668"></A>
25 <A NAME="IDX669"></A>
26 An association list element contains both a key and a data pointer. The
27 data associated with a particular key can be retrieved with a simple
28 lookup method. The key and data fields are both <CODE>void*</CODE> pointers.
29 Association lists are implemented by the <CODE>alist</CODE> and <CODE>alist_e</CODE>
30 classes in the files <TT>`alist.h'</TT> and <TT>`alist.cc'</TT>. These classes
31 are derived from the generic list classes (see section <A HREF="suif1_92.html#SEC92">Generic Lists</A>) and
32 behave similarly.
34 </P>
35 <P>
36 <A NAME="IDX670"></A>
37 The <CODE>amtflist</CODE> class has the same interface as the <CODE>alist</CODE>
38 class and provides the same functionality. The only difference is that
39 it is based on the move-to-front list class. See section <A HREF="suif1_93.html#SEC93">Move-to-front Lists</A>. You may want to use this if you expect your application to
40 access list elements with a high degree of locality.
42 </P>
43 <P>
44 <A NAME="IDX671"></A>
45 Like all of the other SUIF lists, the association lists have iterators
46 to make it easy for you to traverse them. The <CODE>alist_iter</CODE> class
47 uses the same interface as the generic list iterator and works for both
48 <CODE>alist</CODE> and <CODE>amtflist</CODE> objects.
50 </P>
52 <P><HR><P>
53 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_93.html">previous</A>, <A HREF="suif1_95.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
54 </BODY>
55 </HTML>