You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.4 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Turbo Vision - Version 2.0
  3. *
  4. * Copyright (c) 1994 by Borland International
  5. * All Rights Reserved.
  6. *
  7. Modified by Robert H�hne to be used for RHIDE.
  8. *
  9. *
  10. */
  11. #if defined( Uses_TStringList ) && !defined( __TStringList )
  12. #define __TStringList
  13. class TStrIndexRec;
  14. const int MAXKEYS = 16;
  15. class TStringList : public TObject
  16. #if !defined( NO_STREAM )
  17. , public TStreamable
  18. #endif // NO_STREAM
  19. {
  20. public:
  21. ~TStringList();
  22. void get( char *dest, ushort key );
  23. private:
  24. ipstream *ip;
  25. long basePos;
  26. short indexSize;
  27. TStrIndexRec *index;
  28. #if !defined( NO_STREAM )
  29. virtual const char *streamableName() const
  30. { return name; }
  31. protected:
  32. TStringList( StreamableInit );
  33. virtual void write( opstream& ) {}
  34. virtual void *read( ipstream& );
  35. public:
  36. static const char * const name;
  37. static TStreamable *build();
  38. #endif // NO_STREAM
  39. };
  40. #if !defined( NO_STREAM )
  41. inline ipstream& operator >> ( ipstream& is, TStringList& cl )
  42. { return is >> (TStreamable&)cl; }
  43. inline ipstream& operator >> ( ipstream& is, TStringList*& cl )
  44. { return is >> (void *&)cl; }
  45. inline opstream& operator << ( opstream& os, TStringList& cl )
  46. { return os << (TStreamable&)cl; }
  47. inline opstream& operator << ( opstream& os, TStringList* cl )
  48. { return os << (TStreamable *)cl; }
  49. #endif // NO_STREAM
  50. #endif // Uses_TStringList