home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / PowerPlant / LProgressIndicator & Friends / Threads App Source / CVisualSharedQueue.cp < prev    next >
Encoding:
Text File  |  1996-03-27  |  1.7 KB  |  65 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //    CVisualSharedQueue.cp                ©1996 Metrowerks Inc. All rights reserved.
  3. // =================================================================================
  4.  
  5. #include "LThermometerPane.h"
  6.  
  7. #include "CVisualSharedQueue.h"
  8.  
  9.  
  10. // ---------------------------------------------------------------------------------
  11. //        • CVisualSharedQueue
  12. // ---------------------------------------------------------------------------------
  13.  
  14. CVisualSharedQueue::CVisualSharedQueue(
  15.     LThermometerPane    *inProgressPane )
  16.         : mProgressPane( inProgressPane )
  17. {
  18.     mProgressPane->SetTaskType(task_Indeterminate);
  19. }
  20.  
  21.  
  22. // ---------------------------------------------------------------------------------
  23. //        • ~CVisualSharedQueue
  24. // ---------------------------------------------------------------------------------
  25.  
  26. CVisualSharedQueue::~CVisualSharedQueue()
  27. {
  28. }
  29.  
  30.  
  31. // ---------------------------------------------------------------------------------
  32. //        • Next
  33. // ---------------------------------------------------------------------------------
  34.  
  35. LLink *
  36. CVisualSharedQueue::Next(
  37.     Int32    inMilliSeconds )
  38. {
  39.     LLink    *theLink;
  40.  
  41.     // Call inherited for default behavior.
  42.     theLink = LSharedQueue::Next( inMilliSeconds );
  43.  
  44.     // Set the new value.
  45.     mProgressPane->SetCurrentValue( GetSize() );
  46.     
  47.     return theLink;
  48. }
  49.  
  50.  
  51. // ---------------------------------------------------------------------------------
  52. //        • Next
  53. // ---------------------------------------------------------------------------------
  54.  
  55. void
  56. CVisualSharedQueue::NextPut(
  57.     LLink    *inLink )
  58. {
  59.     // Call inherited for default behavior.
  60.     LSharedQueue::NextPut( inLink );
  61.  
  62.     // Set the new value.
  63.     mProgressPane->SetCurrentValue( GetSize() );
  64. }
  65.