home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 2.ddi / CLASSINC.ZIP / DICT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.6 KB  |  69 lines

  1. /*------------------------------------------------------------------------*/
  2. /*                                                                        */
  3. /*  DICT.H                                                                */
  4. /*                                                                        */
  5. /*  Copyright Borland International 1991, 1992                            */
  6. /*  All Rights Reserved                                                   */
  7. /*                                                                        */
  8. /*------------------------------------------------------------------------*/
  9.  
  10. #if !defined( __DICT_H )
  11. #define __DICT_H
  12.  
  13. #if !defined( __CLSTYPES_H )
  14. #include <ClsTypes.h>
  15. #endif  // __CLSTYPES_H
  16.  
  17. #if !defined( __OBJECT_H )
  18. #include <Object.h>
  19. #endif  // __OBJECT_H
  20.  
  21. #if !defined( __SET_H )
  22. #include <Set.h>
  23. #endif  // __SET_H
  24.  
  25. #if !defined( __STDLIB_H )
  26. #include <stdlib.h>
  27. #endif
  28.  
  29. #pragma option -Vo-
  30. #if defined( __BCOPT__ ) && !defined( _ALLOW_po )
  31. #pragma option -po-
  32. #endif
  33.  
  34. _CLASSDEF(Association)
  35. _CLASSDEF(Dictionary)
  36.  
  37. class _CLASSTYPE Dictionary : public Set
  38. {
  39.  
  40. public:
  41.  
  42.     Dictionary( unsigned sz = DEFAULT_HASH_TABLE_SIZE ) :
  43.         Set(sz)
  44.         {
  45.         }
  46.  
  47.     virtual void add( Object _FAR & );
  48.     Association _FAR & lookup( const Object _FAR & ) const;
  49.  
  50.     virtual classType isA() const
  51.         {
  52.         return dictionaryClass;
  53.         }
  54.  
  55.     virtual char _FAR *nameOf() const
  56.         {
  57.         return "Dictionary";
  58.         }
  59.  
  60. };
  61.  
  62. #if defined( __BCOPT__ ) && !defined( _ALLOW_po )
  63. #pragma option -po.
  64. #endif
  65. #pragma option -Vo.
  66.  
  67. #endif  // __DICT_H
  68.  
  69.