home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWNotifn / FWNotifi.cpp < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.9 KB  |  92 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWNotifn.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWFound.hpp"
  11.  
  12. #ifndef FWNOTIFN_H
  13. #include "FWNotifn.h"
  14. #endif
  15.  
  16. #ifndef FWPRIDEB_H
  17. #include "FWPriDeb.h"
  18. #endif
  19.  
  20. //========================================================================================
  21. // CLASS FW_CNotification
  22. //========================================================================================
  23.  
  24. FW_DEFINE_CLASS_M0(FW_CNotification)
  25.  
  26. //----------------------------------------------------------------------------------------
  27. // FW_CNotification::FW_CNotification
  28. //----------------------------------------------------------------------------------------
  29.  
  30. FW_CNotification::FW_CNotification() :
  31.     fInterest()
  32. {
  33. }
  34.  
  35. //----------------------------------------------------------------------------------------
  36. // FW_CNotification::FW_CNotification
  37. //----------------------------------------------------------------------------------------
  38.  
  39. FW_CNotification::FW_CNotification(const FW_CInterest& interest) :
  40.     fInterest(interest)
  41. {
  42. }
  43.  
  44. //----------------------------------------------------------------------------------------
  45. // FW_CNotification::FW_CNotification
  46. //----------------------------------------------------------------------------------------
  47.  
  48. FW_CNotification::FW_CNotification(const FW_CNotification& other) :
  49.     fInterest(other.fInterest)
  50. {
  51. }
  52.  
  53. //----------------------------------------------------------------------------------------
  54. // FW_CNotification::~FW_CNotification
  55. //----------------------------------------------------------------------------------------
  56.  
  57. FW_CNotification::~FW_CNotification()
  58. {
  59. }
  60.  
  61. //----------------------------------------------------------------------------------------
  62. // FW_CNotification::SetInterest
  63. //----------------------------------------------------------------------------------------
  64.  
  65. void FW_CNotification::SetInterest(const FW_CInterest& interest) 
  66. {
  67.     FW_ASSERT(fInterest.GetMessage() == 0 && fInterest.GetNotifier() == NULL);
  68.     
  69.     fInterest = interest;
  70. }
  71.  
  72. //----------------------------------------------------------------------------------------
  73. // FW_CNotification::operator==
  74. //----------------------------------------------------------------------------------------
  75.  
  76. FW_Boolean FW_CNotification::operator==(const FW_CNotification& other) const
  77. {
  78.     return fInterest == other.fInterest;
  79. }
  80.  
  81. //----------------------------------------------------------------------------------------
  82. // FW_CNotification::operator=
  83. //----------------------------------------------------------------------------------------
  84.  
  85. FW_CNotification& FW_CNotification::operator=(const FW_CNotification& other)
  86. {
  87.     if (this != &other)
  88.         fInterest = other.fInterest;
  89.     
  90.     return *this;
  91. }
  92.