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.

46 lines
1006 B

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: fltstate.hxx
  7. //
  8. // Contents: A simple class to keep track of the state of extraction of
  9. // documents from the partition list.
  10. //
  11. // Classes: CGetFilterDocsState
  12. //
  13. // Functions:
  14. //
  15. // History: 10-27-94 srikants Created
  16. //
  17. //----------------------------------------------------------------------------
  18. #pragma once
  19. //
  20. // Class to keep track of the state during extraction of documents
  21. // for filter.
  22. //
  23. class CGetFilterDocsState
  24. {
  25. public:
  26. CGetFilterDocsState() : _cTries(2){}
  27. void Reset() { _cTries = 2; }
  28. int GetTriesLeft() const { return _cTries; }
  29. void DecrementTries()
  30. {
  31. Win4Assert( _cTries > 0 );
  32. _cTries--;
  33. }
  34. private:
  35. int _cTries; // Number of loops still remaining.
  36. };