using System;
using Microsoft.SPOT;

namespace Logger
{
    public class BitArray
    {
        private long _bits;

        public BitArray()
        {
            ClearAll();
        }

        public void ClearAll()
        {
            _bits = 0;
        }

        public void Set(int bit)
        {
            _bits |= 1L << bit;
        }

        void Clear(int bit)
        {
            long mask = 1L << bit;
            mask = ~mask;
            _bits &= mask;
        }

        public bool IsSet(int bit)
        {
            long mask = 1L << bit;
            return (_bits & mask) != 0;
        }
    }
}
