4 * $TOG: DtVirtArray.hh /main/5 1997/12/23 09:08:16 bill $
6 * RESTRICTED CONFIDENTIAL INFORMATION:
8 * The information in this document is subject to special
9 * restrictions in a confidential disclosure agreement between
10 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
11 * document outside HP, IBM, Sun, USL, SCO, or Univel without
12 * Sun's specific written approval. This document and all copies
13 * and derivative works thereof must be returned or destroyed at
16 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
24 #include <DtMail/DtLanguages.hh>
26 class DtVirtArrayImpl : public DtCPlusPlusAllocator {
28 DtVirtArrayImpl(const int size);
29 ~DtVirtArrayImpl(void);
32 void * operator[](const int at);
34 int indexof(void * handle);
35 int append(void * handle);
36 void insert(void * handle, const int at);
37 void remove(const int at);
38 void remove(void * handle);
41 void make_slot(const int at);
51 template <class Element>
52 class DtVirtArray : public DtCPlusPlusAllocator {
54 DtVirtArray(const int size)
59 int length(void) { return(my_array.length()); }
61 Element operator[](const int at) { return((Element)my_array[at]); }
62 int indexof(Element handle) { return(my_array.indexof((void *)handle)); }
63 int append(Element handle) { return(my_array.append((void *)handle)); }
64 void insert(Element handle, const int at) { my_array.insert((void *)handle, at); }
65 void remove(const int at) { my_array.remove(at); }
66 void remove(Element handle) { my_array.remove((void *)handle); }
69 DtVirtArrayImpl my_array;