home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v5.zip / TOOLKT21 / CPLUS / SAMPLES / WPCAR / BRAKE.H < prev    next >
C/C++ Source or Header  |  1993-04-30  |  2KB  |  44 lines

  1. /******************************************************************************
  2. *
  3. *  Module Name: BRAKE.H
  4. *
  5. *  OS/2 Work Place Shell Sample Program
  6. *
  7. *  Copyright (C) 1992 IBM Corporation
  8. *
  9. *      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  10. *      sample code created by IBM Corporation. This sample code is not
  11. *      part of any standard or IBM product and is provided to you solely
  12. *      for  the purpose of assisting you in the development of your
  13. *      applications.  The code is provided "AS IS", without
  14. *      warranty of any kind.  IBM shall not be liable for any damages
  15. *      arising out of your use of the sample code, even if they have been
  16. *      advised of the possibility of such damages.                                                    *
  17. *
  18. *  Description:
  19. *
  20. *      This file contains the declaration of class Brake.  Brake is a C++ class
  21. *       whose client is Carpp which is a SOM class.  This is one example of
  22. *       the use of C++ constructs in the implementation of a SOM class.
  23. *
  24. *      Brake is the abstraction of a real car's brake.  The brake can be in
  25. *       one of two states.  It can either be depressed or not depressed.
  26. *       There are public member functions to set the brake, release the
  27. *       brake, and determine whether or not the brake is currently depressed.
  28. ******************************************************************************/
  29. #include "carpp.xih"
  30.  
  31. class Brake
  32. {
  33.   BOOL depressed;
  34.  
  35. public:
  36.   Brake(VOID);
  37.   VOID Set(VOID);
  38.   VOID Release(VOID);
  39.   BOOL IsSet(VOID);
  40.   VOID SetToDefault(VOID);
  41.   VOID SaveState(Carpp *clientObject, PSZ CarClassTitle);
  42.   VOID RestoreState(Carpp *clientObject, PSZ CarClassTitle);
  43. };
  44.