Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
470 B

  1. /*++
  2. Copyright (c) 2001, Microsoft Corporation
  3. Module Name:
  4. toggle.h
  5. Abstract:
  6. This file defines the CToggle Interface Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _TOGGLE_H_
  12. #define _TOGGLE_H_
  13. class CToggle
  14. {
  15. public:
  16. CToggle() { m_flag = FALSE; }
  17. BOOL Toggle() { return m_flag = ! m_flag; }
  18. BOOL IsOn() { return m_flag; }
  19. private:
  20. BOOL m_flag : 1;
  21. };
  22. #endif // _TOGGLE_H_