home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / OTL-MC7.DMS / in.adf / classes.lha / Classes / DataStructures / stringarray.h < prev   
Encoding:
C/C++ Source or Header  |  1995-01-31  |  934 b   |  42 lines

  1. #ifndef CPP_DATASTRUCTURES_STRINGARRAY_H
  2. #define CPP_DATASTRUCTURES_STRINGARRAY_H
  3.  
  4. // Eine Arrayliste für Stringpointer
  5. //
  6. // Autor: Jochen Becher
  7. //
  8. // Historie:
  9. // Version 1.0 am 25. Juni 94
  10.  
  11. #ifndef EXEC_TYPES_H
  12. #include <exec/types.h>
  13. #endif
  14.  
  15. #ifndef CPP_DATASTRUCTURES_GENARRAYLIST_H
  16. #include <classes/datastructures/genarraylist.h>
  17. #endif
  18.  
  19. class stringarray {
  20. friend class stringarraycursor;
  21. public:
  22.     stringarray(STRPTR string1, ...) throw (MemoryX);
  23.     stringarray(STRPTR *strings = NULL) throw (MemoryX);
  24.     ULONG length() const;
  25.     STRPTR *strings();
  26.     STRPTR &operator[] (ULONG index) throw (MemoryX);
  27.     VOID addTail(STRPTR str) throw (MemoryX);
  28.     VOID insert(STRPTR str, ULONG index) throw (MemoryX);
  29.     VOID remTail();
  30.     VOID remove(ULONG index) throw (MemoryX);
  31. private:
  32.     gen_arraylist strs;
  33. };
  34.  
  35. class stringarraycursor : public gen_arraycursor {
  36. public:
  37.     stringarraycursor(stringarray &);
  38.     STRPTR item() throw (MemoryX);
  39. };
  40.  
  41. #endif
  42.