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.

70 lines
1.5 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_TStrListMaker ) && !defined( __TStrListMaker )
  12. #define __TStrListMaker
  13. class TStrListMaker : public TObject
  14. #if !defined( NO_STREAM )
  15. , public TStreamable
  16. #endif // NO_STREAM
  17. {
  18. public:
  19. TStrListMaker( ushort aStrSize, ushort aIndexSize );
  20. ~TStrListMaker();
  21. void put( ushort key, char *str );
  22. private:
  23. ushort strPos;
  24. ushort strSize;
  25. char *strings;
  26. ushort indexPos;
  27. ushort indexSize;
  28. TStrIndexRec *index;
  29. TStrIndexRec cur;
  30. void closeCurrent();
  31. #if !defined( NO_STREAM )
  32. virtual const char *streamableName() const
  33. { return TStringList::name; }
  34. protected:
  35. TStrListMaker( StreamableInit );
  36. virtual void write( opstream& );
  37. virtual void *read( ipstream& ) { return 0; }
  38. public:
  39. static TStreamable *build();
  40. #endif // NO_STREAM
  41. };
  42. #if !defined( NO_STREAM )
  43. inline ipstream& operator >> ( ipstream& is, TStrListMaker& cl )
  44. { return is >> (TStreamable&)cl; }
  45. inline ipstream& operator >> ( ipstream& is, TStrListMaker*& cl )
  46. { return is >> (void *&)cl; }
  47. inline opstream& operator << ( opstream& os, TStrListMaker& cl )
  48. { return os << (TStreamable&)cl; }
  49. inline opstream& operator << ( opstream& os, TStrListMaker* cl )
  50. { return os << (TStreamable *)cl; }
  51. #endif // NO_STREAM
  52. #endif // Uses_TStrListMaker