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.

60 lines
1.3 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_TCollection ) && !defined( __TCollection )
  12. #define __TCollection
  13. class TCollection : public virtual TNSCollection
  14. #if !defined( NO_STREAM )
  15. , public TStreamable
  16. #endif // NO_STREAM
  17. {
  18. public:
  19. TCollection( ccIndex aLimit, ccIndex aDelta )
  20. { delta = aDelta; setLimit( aLimit ); }
  21. #if !defined( NO_STREAM )
  22. private:
  23. virtual const char *streamableName() const
  24. { return name; }
  25. virtual void *readItem( ipstream& ) = 0;
  26. virtual void writeItem( void *, opstream& ) = 0;
  27. protected:
  28. TCollection( StreamableInit );
  29. virtual void *read( ipstream& );
  30. virtual void write( opstream& );
  31. public:
  32. static const char * const name;
  33. #endif // NO_STREAM
  34. };
  35. inline ipstream& operator >> ( ipstream& is, TCollection& cl )
  36. { return is >> (TStreamable&)cl; }
  37. inline ipstream& operator >> ( ipstream& is, TCollection*& cl )
  38. { return is >> (void *&)cl; }
  39. inline opstream& operator << ( opstream& os, TCollection& cl )
  40. { return os << (TStreamable&)cl; }
  41. inline opstream& operator << ( opstream& os, TCollection* cl )
  42. { return os << (TStreamable *)cl; }
  43. #endif // Uses_TCollection