FixedBitVectorEnumerator.h 885 B

12345678910111213141516171819202122232425262728293031323334
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. namespace JsUtil
  7. {
  8. class FBVEnumerator
  9. {
  10. // Data
  11. private:
  12. BVUnit *icur, *iend;
  13. BVIndex curOffset;
  14. BVUnit curUnit;
  15. // Constructor
  16. public:
  17. FBVEnumerator(BVUnit * iterStart, BVUnit * iterEnd);
  18. // Implementation
  19. protected:
  20. void MoveToValidWord();
  21. void MoveToNextBit();
  22. // Methods
  23. public:
  24. void operator++(int);
  25. BVIndex GetCurrent() const;
  26. bool End() const;
  27. };
  28. }