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.

54 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. /* ------------------------------------------------------------------------*/
  12. /* */
  13. /* class TStreamableTypes */
  14. /* */
  15. /* Maintains a database of all registered types in the application. */
  16. /* Used by opstream and ipstream to find the functions to read and */
  17. /* write objects. */
  18. /* */
  19. /* ------------------------------------------------------------------------*/
  20. #if defined( Uses_TStreamableTypes ) && !defined( __TStreamableTypes )
  21. #define __TStreamableTypes
  22. // Avoid replacing new by MSS's macro
  23. #include <tv/no_mss.h>
  24. class TStreamableTypes : private TNSSortedCollection
  25. {
  26. public:
  27. TStreamableTypes();
  28. ~TStreamableTypes();
  29. void registerType( const TStreamableClass * );
  30. const TStreamableClass *lookup( const char * );
  31. void *operator new( size_t sz ) { return ::operator new( sz ); }
  32. void *operator new( size_t, void * );
  33. private:
  34. virtual void *keyOf( void * );
  35. int compare( void *, void * );
  36. };
  37. #include <tv/yes_mss.h>
  38. #endif // Uses_TStreamableTypes