home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 308_01 / virtlist.hpp < prev   
C/C++ Source or Header  |  1990-09-22  |  1KB  |  53 lines

  1.  
  2. /*
  3.     TITLE:          C++ virtual doubly-linked list object header;
  4.     DESCRIPTION:    "Header for virtual doubly-linked list object";
  5.     VERSION:        1.01;
  6.     DATE:           9/22/90;
  7.     COMPILERS:      Borland Turbo C++ V.1.0;
  8.     KEYWORDS:       virtual list object header;
  9.     FILENAME:       VirtList.hpp;
  10.     SEE-ALSO:       VirtList.cpp;
  11.  
  12.     AUTHOR:         Michael Kelly
  13.             254 Gold St. Boston, Ma. 02127
  14.             Copyright 1990;
  15.  
  16. */
  17.  
  18.  
  19. #if !defined(VIRT_LIST_HPP)
  20. #define VIRT_LIST_HPP
  21.  
  22. #include <dos.h>
  23. #include <alloc.h>
  24.  
  25. #if !defined(DISKLIST_HPP)
  26. #include "disklist.hpp"
  27. #endif
  28.  
  29.  
  30. #define SIZE_MAX 32000
  31. const unsigned long dynamic_min = SIZE_MAX  + _stklen;
  32.  
  33. class VirtualList  :  public DiskList  {
  34.   protected:
  35.     static size_t buff_references;
  36.     static void *buff1, *buff2;
  37.     int compare(void *item1, void *item2);
  38.  
  39.   public:
  40.  
  41.     VirtualList(void);
  42.     ~VirtualList(void);
  43.  
  44.     Boolean
  45.     add_item(void *item, size_t itemsize, Place place = LastPlace);
  46.     Boolean get_item(void *itembuf);
  47.  
  48.     size_t get_size(void);
  49.     int compare_item(void *item1);
  50. };
  51.  
  52. #endif
  53.