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.

56 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_TResourceCollection ) && !defined( __TResourceCollection )
  12. #define __TResourceCollection
  13. class TResourceCollection: public TStringCollection
  14. {
  15. public:
  16. TResourceCollection( ccIndex aLimit, ccIndex aDelta );
  17. virtual void *keyOf( void *item );
  18. private:
  19. virtual void freeItem( void *item );
  20. #if !defined( NO_STREAM )
  21. virtual const char *streamableName() const
  22. { return name; }
  23. virtual void *readItem( ipstream& );
  24. virtual void writeItem( void *, opstream& );
  25. public:
  26. static const char * const name;
  27. static TStreamable *build();
  28. TResourceCollection( StreamableInit) : TStringCollection( streamableInit ) {};
  29. #endif // NO_STREAM
  30. };
  31. #if !defined( NO_STREAM )
  32. inline ipstream& operator >> ( ipstream& is, TResourceCollection& cl )
  33. { return is >> (TStreamable&)cl; }
  34. inline ipstream& operator >> ( ipstream& is, TResourceCollection*& cl )
  35. { return is >> (void *&)cl; }
  36. inline opstream& operator << ( opstream& os, TResourceCollection& cl )
  37. { return os << (TStreamable&)cl; }
  38. inline opstream& operator << ( opstream& os, TResourceCollection* cl )
  39. { return os << (TStreamable *)cl; }
  40. #endif // NO_STREAM
  41. #endif // Uses_TResourceCollection