コード例 #1
0
        internal static int BitDecodeResourceModelIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kResourceModelBitMask);

            Contract.Assert(IsValidResourceModelIndex(index));
            return(index);
        }
コード例 #2
0
        internal static int BitDecodeLanguageIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kLanguageIndexBitMask);

            Contract.Assert(IsValidLanguageIndex(index));
            return(index);
        }
コード例 #3
0
        internal static int BitDecodeIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kIndexBitMask);

            Contract.Assert(index.IsNoneOrPositive());
            return(index);
        }
コード例 #4
0
        internal static int BitDecodeIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kIndexBitMask);

            Contract.Assert(index.IsNoneOrPositive() && index < EngineRegistry.Engines.Count);
            return(index);
        }
コード例 #5
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="traits"></param>
        public void DecodeNoneable64(out long value, Bitwise.BitFieldTraits traits)
        {
            Contract.Requires <ArgumentException>(!traits.IsEmpty);

            value = (long)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, traits.Bitmask64);
        }
コード例 #6
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="bitMask">Masking value for <paramref name="value"/></param>
        public void DecodeNoneable64(out long value, ulong bitMask)
        {
            Contract.Requires <ArgumentException>(bitMask != 0);

            value = (long)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, bitMask);
        }
コード例 #7
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="traits"></param>
        public void DecodeNoneable32(out int value, Bitwise.BitFieldTraits traits)
        {
            Contract.Requires <ArgumentException>(!traits.IsEmpty);

            value = (int)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, traits.Bitmask32);
        }
コード例 #8
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="bitMask">Masking value for <paramref name="value"/></param>
        public void DecodeNoneable32(out int value, uint bitMask)
        {
            Contract.Requires <ArgumentException>(bitMask != 0);

            value = (int)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, bitMask);
        }