home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_objc.idb / usr / freeware / include / objpak / intarray.h.z / intarray.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1.4 KB  |  65 lines

  1.  
  2. /*
  3.  * Portable Object Compiler (c) 1998.  All Rights Reserved.
  4.  * $Id: intarray.h,v 1.11 1999/06/23 19:22:13 stes Exp $
  5.  */
  6.  
  7. /*
  8.  * This library is free software; you can redistribute it and/or modify it
  9.  * under the terms of the GNU Library General Public License as published 
  10.  * by the Free Software Foundation; either version 2 of the License, or
  11.  * (at your option) any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public License
  19.  * along with this program; if not, write to the Free Software
  20.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23. #ifndef __INTARRAY_H__
  24. #define __INTARRAY_H__
  25.  
  26. #include "array.h"
  27.  
  28. typedef struct intary {
  29.     int        capacity;
  30.     int*    ptr;
  31. } *intary_t;
  32.  
  33. @interface IntArray : Array
  34. {
  35.     struct intary    value;
  36. }
  37.  
  38. + new;
  39. + new:(unsigned)n;
  40. + with:(int)nArgs,...;
  41. - copy;
  42. - deepCopy;
  43. - free;
  44.  
  45. - (unsigned) size;
  46. - (int) intAt:(unsigned)anOffset;
  47. - (int) intAt:(unsigned)anOffset put:(int)anInt;
  48.  
  49. - (unsigned) capacity;
  50. - capacity:(unsigned)nSlots;
  51. - packContents;
  52.  
  53. - printOn:(IOD)aFile;
  54.  
  55. #ifdef __PORTABLE_OBJC__
  56. - fileOutOn:aFiler;
  57. - fileInFrom:aFiler;
  58. #endif /* __PORTABLE_OBJC__ */
  59.  
  60. @end
  61.  
  62. #endif /* __INTARRAY_H__ */
  63.  
  64.  
  65.