home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / UProgressCache.h < prev    next >
Encoding:
Text File  |  1994-03-06  |  719 b   |  33 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UProgressCache.h
  3.  
  4. #define __UPROGRESSCACHE__
  5.  
  6. #ifndef __UOBJECTCACHE__
  7. #include "UObjectCache.h"
  8. #endif
  9.  
  10. class TProgress;
  11.  
  12. class TProgressCache : public TObjectCache
  13. {
  14.     public:
  15.         TProgress *GetProgress();
  16.         void ReturnProgress(TProgress *progress); // cannot fail
  17.         void DiscardProgress(TProgress *progress); // cannot fail
  18.         // it's allowed to return/discard nil objects
  19.  
  20.         TProgressCache();
  21.         pascal void Initialize();
  22.         void IProgressCache();
  23.         pascal void Free();
  24.     protected:
  25.         TObject *CreateNewObject();
  26.         const char *GetObjectName();
  27. };
  28.  
  29. void InitUProgressCache();
  30. void CloseDownUProgressCache();
  31. extern TProgressCache *gProgressCache;
  32.  
  33.