home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 3.ddi / OWLINC.ZIP / APPDICT.H next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.1 KB  |  48 lines

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. #if !defined(__APPDICT_H)
  4. #define __APPDICT_H
  5.  
  6. #include <windows.h>
  7. #include "applicat.h"
  8.  
  9. #pragma option -Vo-
  10. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  11. #pragma option -po-
  12. #endif
  13.  
  14. const int DEFAULT_DICTIONARY_SIZE = 10;
  15. const int DEFAULT_DICTIONARY_INCREMENT = 10;
  16.  
  17. class _CLASSTYPE TAppDictionaryEntry
  18. {
  19. public:
  20.     HANDLE hTask;
  21.     PTApplication pApplication;
  22. };
  23.  
  24. class _CLASSTYPE TAppDictionary
  25. {
  26.     int NumEntries;
  27.     TAppDictionaryEntry * Table;
  28. public:
  29.     TAppDictionary(int InitialCount = DEFAULT_DICTIONARY_SIZE);
  30.     ~TAppDictionary();
  31.  
  32.     static TAppDictionaryEntry * AllocTable(int Count);
  33.     static void FreeTable(TAppDictionaryEntry *pTable);
  34.  
  35.     TAppDictionaryEntry *GrowTable(int Increment =
  36.                                    DEFAULT_DICTIONARY_INCREMENT);
  37.     void Add(PTApplication pApplication);
  38.     void Delete();
  39.     PTApplication Lookup();
  40. };
  41.  
  42. #pragma option -Vo.
  43. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  44. #pragma option -po.
  45. #endif
  46.  
  47. #endif // __APPDICT_H
  48.