home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / VISBUILD / CALCULAT / CPPOV13 / IKEYPAD.CPP < prev    next >
Text File  |  1995-04-14  |  2KB  |  63 lines

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