Coda Distributed File System
vmindex.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifndef _VMINDEX_H
20#define _VMINDEX_H 1
21/* vmindex.h
22 * declaration of index class
23 * This allows user to keep an array of int sized objects.
24 * This array can grow dynamically as more elements are added.
25 * index_iterator class is used to return the list of elements one at a time.
26 */
27
28#define DEFAULTINDEXSIZE 32
29class vmindex {
30 friend class vmindex_iterator;
31 unsigned long *indices;
32 int size;
33 int count;
34
35public:
36 vmindex(int sz = DEFAULTINDEXSIZE);
37 ~vmindex();
38 void add(unsigned long);
39};
40
42 vmindex *ind;
43 int current_ind;
44
45public:
48 long operator()(); /* return next index */
49};
50#endif /* _VMINDEX_H */
Definition: vmindex.h:41
vmindex_iterator(vmindex *)
Definition: vmindex.cc:77
~vmindex_iterator()
Definition: vmindex.cc:83
long operator()()
Definition: vmindex.cc:88
Definition: vmindex.h:29
void add(unsigned long)
Definition: vmindex.cc:55
~vmindex()
Definition: vmindex.cc:46
vmindex(int sz=DEFAULTINDEXSIZE)
Definition: vmindex.cc:32
#define DEFAULTINDEXSIZE
Definition: vmindex.h:28