home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / calculat / cppwv13 / ikeypad.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-16  |  2.7 KB  |  67 lines

  1. /******************************************************************************
  2. * .FILE:        ikeypad.cpp                                                   *
  3. *                                                                             *
  4. * .DESCRIPTION: Implementation for the class, IKeypad                         *
  5. *                                                                             *
  6. * .CLASSES:     IKeypad                                                       *
  7. *                                                                             *
  8. * .COPYRIGHT:                                                                 *
  9. *    Licensed Material - Program-Property of IBM                              *
  10. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  11. *                                                                             *
  12. * .DISCLAIMER:                                                                *
  13. *   The following [enclosed] code is sample code created by IBM               *
  14. *   Corporation.  This sample code is not part of any standard IBM product    *
  15. *   and is provided to you solely for the purpose of assisting you in the     *
  16. *   development of your applications.  The code is provided 'AS IS',          *
  17. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  18. *   arising out of your use of the sample code, even if they have been        *
  19. *   advised of the possibility of such damages.                               *
  20. *                                                                             *
  21. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  22. *                                                                             *
  23. ******************************************************************************/
  24.  
  25. #include "ikeypad.hpp"                 //IKeypad class header
  26. #include <inotifev.hpp>
  27.  
  28. //
  29. // Events
  30. //
  31.  
  32. INotificationId IKeypad :: digitId = "IKeypad::digit";
  33.  
  34. /*******************************************************************
  35.  * Contructors/Destructors
  36.  *******************************************************************/
  37.  
  38. IKeypad :: IKeypad() :
  39.         dDigit("")
  40.  
  41. {
  42. }
  43.  
  44. IKeypad :: ~IKeypad()
  45. {
  46. }
  47.  
  48.  
  49. /*******************************************************************
  50.  * Access Member Functions (Part Attributes/Actions)
  51.  *******************************************************************/
  52.  
  53. IString IKeypad :: digit () const
  54. {
  55.   return dDigit;
  56. }
  57.  
  58.  
  59. IKeypad & IKeypad :: setDigit
  60.   (IString iDigit)
  61. {
  62.   dDigit = iDigit;                    
  63.   notifyObservers(INotificationEvent(digitId,*this));
  64.   return *this;
  65. }
  66.  
  67.