BitVector32.cs 962 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // System.Collections.Specialized.BitVector32.cs
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. //
  7. // (C) Ximian, Inc. http://www.ximian.com
  8. //
  9. namespace System.Collections.Specialized {
  10. public struct BitVector32 {
  11. int value;
  12. public struct Section {
  13. public short maxval;
  14. }
  15. public static Section CreateSection (short maxval)
  16. {
  17. Section s = new Section();
  18. // FIXME: Imeplemtn me
  19. return s;
  20. }
  21. public static int CreateMask ()
  22. {
  23. return 1;
  24. }
  25. public static int CreateMask (int prev)
  26. {
  27. return prev << 1;
  28. }
  29. public BitVector32 (BitVector32 source)
  30. {
  31. value = source.value;
  32. }
  33. public BitVector32 (int init)
  34. {
  35. value = init;
  36. }
  37. public override bool Equals (object o)
  38. {
  39. if (!(o is BitVector32))
  40. return false;
  41. return value == ((BitVector32) o).value;
  42. }
  43. public override int GetHashCode ()
  44. {
  45. return 0;
  46. }
  47. public int Data {
  48. get {
  49. return value;
  50. }
  51. }
  52. }
  53. }