C# 클래스 ZiadSpace.Util.BitHelper

파일 보기 프로젝트 열기: emist/Eryan

공개 메소드들

메소드 설명
BitHelper ( ) : System

Private constructor

ChangeBit ( byte pInput, int pPosition ) : byte

Changes the value of the bit at the specified positon

ChangeBit ( int pInput, int pPosition ) : int

Changes the value of the bit at the specified positon

ChangeBit ( long pInput, int pPosition ) : long

Changes the value of the bit at the specified positon

ChangeBit ( short pInput, int pPosition ) : short

Changes the value of the bit at the specified positon

ChangeSign ( int pInputValue ) : int

Changes the value from positive to negative and vis versa

ChangeSign ( long pInputValue ) : long

Changes the value from positive to negative and vis versa

ChangeSign ( short pInputValue ) : short

Changes the value from positive to negative and vis versa

GetBits ( byte pInput, int pStartIndex ) : byte

Gets the bits from a number as a number.

GetBits ( byte pInput, int pStartIndex, bool pShift ) : byte

Gets the bits.

GetBits ( byte pInput, int pStartIndex, int pLength ) : byte

Gets the bits.

GetBits ( byte pInput, int pStartIndex, int pLength, bool pShift ) : byte

Gets a number in the specified range of bits

GetBits ( int pInput, int pStartIndex ) : int

Gets the bits from a number as a number.

GetBits ( int pInput, int pStartIndex, bool pShift ) : int

Gets the bits.

GetBits ( int pInput, int pStartIndex, int pLength ) : int

Gets the bits.

GetBits ( int pInput, int pStartIndex, int pLength, bool pShift ) : int

Gets a number in the specified range of bits

GetBits ( long pInput, int pStartIndex ) : long

Gets the bits from a number as a number.

GetBits ( long pInput, int pStartIndex, bool pShift ) : long

Gets the bits.

GetBits ( long pInput, int pStartIndex, int pLength ) : long

Gets the bits.

GetBits ( long pInput, int pStartIndex, int pLength, bool pShift ) : long

Gets a number in the specified range of bits

GetBits ( short pInput, int pStartIndex ) : short

Gets the bits from a number as a number.

GetBits ( short pInput, int pStartIndex, bool pShift ) : short

Gets the bits.

GetBits ( short pInput, int pStartIndex, int pLength ) : short

Gets the bits.

GetBits ( short pInput, int pStartIndex, int pLength, bool pShift ) : short

Gets a number in the specified range of bits

HiByte ( short pWord ) : byte

The return value is the high-order byte of the specified value.

HiDword ( long pDWord ) : int

The return value is the high-order double word of the specified value.

HiWord ( int pDWord ) : short

The return value is the high-order word of the specified value.

IsBitSet ( byte pInput, int pPosition ) : bool

Determines whether [is bit set] [the specified p input].

IsBitSet ( int pInput, int pPosition ) : bool

Determines whether [is bit set] [the specified p input].

IsBitSet ( long pInput, int pPosition ) : bool

Determines whether [is bit set] [the specified p input].

IsBitSet ( short pInput, int pPosition ) : bool

Determines whether [is bit set] [the specified p input].

IsNegative ( int pInputValue ) : bool

Checks to see if number is less than 0.

IsNegative ( long pInputValue ) : bool

Checks to see if number is less than 0.

IsNegative ( short pInputValue ) : bool

Checks to see if number is less than 0.

LoByte ( short pWord ) : byte

The return value is the low-order byte of the specified value.

LoDword ( long pDWord ) : int

The return value is the low-order word of the specified value.

LoWord ( int pDWord ) : short

The return value is the low-order word of the specified value.

MakeDword ( short pValueLow, short pValueHigh ) : int

Makes a 32 bit integer from two 16 bit shorts

MakeLong ( int pValueLow, int pValueHigh ) : long

Makes a 64 bit long from two 32 bit integers

MakeWord ( byte pValueLow, byte pValueHigh ) : short

Makes a 16 bit short from two bytes

SetBit ( byte pInput, int pPosition, bool pOn ) : byte

Sets the value of a bit

SetBit ( int pInput, int pPosition, bool pOn ) : int

Sets the value of a bit

SetBit ( long pInput, int pPosition, bool pOn ) : long

Sets the value of a bit

SetBit ( short pInput, int pPosition, bool pOn ) : short

Sets the value of a bit

SetBits ( byte pDest, byte pSource, int pSourceIndex ) : byte

Sets the bits.

SetBits ( byte pDest, byte pSource, int pSourceIndex, int pLength ) : byte

Sets the bits.

SetBits ( byte pDest, byte pSource, int pSourceIndex, int pDestIndex, int pLength ) : byte

Sets the bits.

SetBits ( int pDest, int pSource, int pSourceIndex ) : int

Sets the bits.

SetBits ( int pDest, int pSource, int pSourceIndex, int pLength ) : int

Sets the bits.

SetBits ( int pDest, int pSource, int pSourceIndex, int pDestIndex, int pLength ) : int

Sets the bits.

SetBits ( short pDest, short pSource, int pSourceIndex, int pLength ) : int

Sets the bits.

SetBits ( long pDest, long pSource, int pSourceIndex ) : long

Sets the bits.

SetBits ( long pDest, long pSource, int pSourceIndex, int pLength ) : long

Sets the bits.

SetBits ( long pDest, long pSource, int pSourceIndex, int pDestIndex, int pLength ) : long

Sets the bits.

SetBits ( short pDest, short pSource, int pSourceIndex ) : short

Sets the bits.

SetBits ( short pDest, short pSource, int pSourceIndex, int pDestIndex, int pLength ) : short

Sets the bits.

SizeOf ( byte pInput ) : int

Gets the size of the input value in bits

SizeOf ( int pInput ) : int

Gets the size of the input value in bits

SizeOf ( long pInput ) : int

Gets the size of the input value in bits

SizeOf ( short pInput ) : int

Gets the size of the input value in bits

메소드 상세

BitHelper() 공개 메소드

Private constructor
public BitHelper ( ) : System
리턴 System

ChangeBit() 공개 정적인 메소드

Changes the value of the bit at the specified positon
public static ChangeBit ( byte pInput, int pPosition ) : byte
pInput byte
pPosition int
리턴 byte

ChangeBit() 공개 정적인 메소드

Changes the value of the bit at the specified positon
public static ChangeBit ( int pInput, int pPosition ) : int
pInput int
pPosition int
리턴 int

ChangeBit() 공개 정적인 메소드

Changes the value of the bit at the specified positon
public static ChangeBit ( long pInput, int pPosition ) : long
pInput long
pPosition int
리턴 long

ChangeBit() 공개 정적인 메소드

Changes the value of the bit at the specified positon
public static ChangeBit ( short pInput, int pPosition ) : short
pInput short
pPosition int
리턴 short

ChangeSign() 공개 메소드

Changes the value from positive to negative and vis versa
public ChangeSign ( int pInputValue ) : int
pInputValue int The value
리턴 int

ChangeSign() 공개 메소드

Changes the value from positive to negative and vis versa
public ChangeSign ( long pInputValue ) : long
pInputValue long The value
리턴 long

ChangeSign() 공개 메소드

Changes the value from positive to negative and vis versa
public ChangeSign ( short pInputValue ) : short
pInputValue short The value
리턴 short

GetBits() 공개 정적인 메소드

Gets the bits from a number as a number.
public static GetBits ( byte pInput, int pStartIndex ) : byte
pInput byte The input value.
pStartIndex int
리턴 byte

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( byte pInput, int pStartIndex, bool pShift ) : byte
pInput byte The p input.
pStartIndex int Start index of the p.
pShift bool if set to true [p shift].
리턴 byte

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( byte pInput, int pStartIndex, int pLength ) : byte
pInput byte The p input.
pStartIndex int Start index of the p.
pLength int Length of the p.
리턴 byte

GetBits() 공개 정적인 메소드

Gets a number in the specified range of bits
public static GetBits ( byte pInput, int pStartIndex, int pLength, bool pShift ) : byte
pInput byte
pStartIndex int
pLength int
pShift bool
리턴 byte

GetBits() 공개 정적인 메소드

Gets the bits from a number as a number.
public static GetBits ( int pInput, int pStartIndex ) : int
pInput int The input value.
pStartIndex int
리턴 int

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( int pInput, int pStartIndex, bool pShift ) : int
pInput int The p input.
pStartIndex int Start index of the p.
pShift bool if set to true [p shift].
리턴 int

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( int pInput, int pStartIndex, int pLength ) : int
pInput int The p input.
pStartIndex int Start index of the p.
pLength int Length of the p.
리턴 int

GetBits() 공개 정적인 메소드

Gets a number in the specified range of bits
public static GetBits ( int pInput, int pStartIndex, int pLength, bool pShift ) : int
pInput int
pStartIndex int
pLength int
pShift bool
리턴 int

GetBits() 공개 정적인 메소드

Gets the bits from a number as a number.
public static GetBits ( long pInput, int pStartIndex ) : long
pInput long The input value.
pStartIndex int
리턴 long

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( long pInput, int pStartIndex, bool pShift ) : long
pInput long The p input.
pStartIndex int Start index of the p.
pShift bool if set to true [p shift].
리턴 long

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( long pInput, int pStartIndex, int pLength ) : long
pInput long The p input.
pStartIndex int Start index of the p.
pLength int Length of the p.
리턴 long

GetBits() 공개 정적인 메소드

Gets a number in the specified range of bits
public static GetBits ( long pInput, int pStartIndex, int pLength, bool pShift ) : long
pInput long
pStartIndex int
pLength int
pShift bool
리턴 long

GetBits() 공개 정적인 메소드

Gets the bits from a number as a number.
public static GetBits ( short pInput, int pStartIndex ) : short
pInput short The input value.
pStartIndex int
리턴 short

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( short pInput, int pStartIndex, bool pShift ) : short
pInput short The p input.
pStartIndex int Start index of the p.
pShift bool if set to true [p shift].
리턴 short

GetBits() 공개 정적인 메소드

Gets the bits.
public static GetBits ( short pInput, int pStartIndex, int pLength ) : short
pInput short The p input.
pStartIndex int Start index of the p.
pLength int Length of the p.
리턴 short

GetBits() 공개 정적인 메소드

Gets a number in the specified range of bits
public static GetBits ( short pInput, int pStartIndex, int pLength, bool pShift ) : short
pInput short
pStartIndex int
pLength int
pShift bool
리턴 short

HiByte() 공개 정적인 메소드

The return value is the high-order byte of the specified value.
public static HiByte ( short pWord ) : byte
pWord short The value
리턴 byte

HiDword() 공개 정적인 메소드

The return value is the high-order double word of the specified value.
public static HiDword ( long pDWord ) : int
pDWord long
리턴 int

HiWord() 공개 정적인 메소드

The return value is the high-order word of the specified value.
public static HiWord ( int pDWord ) : short
pDWord int
리턴 short

IsBitSet() 공개 정적인 메소드

Determines whether [is bit set] [the specified p input].
public static IsBitSet ( byte pInput, int pPosition ) : bool
pInput byte The p input.
pPosition int The p position.
리턴 bool

IsBitSet() 공개 정적인 메소드

Determines whether [is bit set] [the specified p input].
public static IsBitSet ( int pInput, int pPosition ) : bool
pInput int The p input.
pPosition int The p position.
리턴 bool

IsBitSet() 공개 정적인 메소드

Determines whether [is bit set] [the specified p input].
public static IsBitSet ( long pInput, int pPosition ) : bool
pInput long The p input.
pPosition int The p position.
리턴 bool

IsBitSet() 공개 정적인 메소드

Determines whether [is bit set] [the specified p input].
public static IsBitSet ( short pInput, int pPosition ) : bool
pInput short The p input.
pPosition int The p position.
리턴 bool

IsNegative() 공개 정적인 메소드

Checks to see if number is less than 0.
public static IsNegative ( int pInputValue ) : bool
pInputValue int
리턴 bool

IsNegative() 공개 정적인 메소드

Checks to see if number is less than 0.
public static IsNegative ( long pInputValue ) : bool
pInputValue long
리턴 bool

IsNegative() 공개 정적인 메소드

Checks to see if number is less than 0.
public static IsNegative ( short pInputValue ) : bool
pInputValue short
리턴 bool

LoByte() 공개 정적인 메소드

The return value is the low-order byte of the specified value.
public static LoByte ( short pWord ) : byte
pWord short The value
리턴 byte

LoDword() 공개 정적인 메소드

The return value is the low-order word of the specified value.
public static LoDword ( long pDWord ) : int
pDWord long The value
리턴 int

LoWord() 공개 정적인 메소드

The return value is the low-order word of the specified value.
public static LoWord ( int pDWord ) : short
pDWord int The value
리턴 short

MakeDword() 공개 정적인 메소드

Makes a 32 bit integer from two 16 bit shorts
public static MakeDword ( short pValueLow, short pValueHigh ) : int
pValueLow short The low order value.
pValueHigh short The high order value.
리턴 int

MakeLong() 공개 정적인 메소드

Makes a 64 bit long from two 32 bit integers
public static MakeLong ( int pValueLow, int pValueHigh ) : long
pValueLow int The low order value.
pValueHigh int The high order value.
리턴 long

MakeWord() 공개 정적인 메소드

Makes a 16 bit short from two bytes
public static MakeWord ( byte pValueLow, byte pValueHigh ) : short
pValueLow byte The low order value.
pValueHigh byte The high order value.
리턴 short

SetBit() 공개 정적인 메소드

Sets the value of a bit
public static SetBit ( byte pInput, int pPosition, bool pOn ) : byte
pInput byte The p input.
pPosition int The p position.
pOn bool if set to true [p on].
리턴 byte

SetBit() 공개 정적인 메소드

Sets the value of a bit
public static SetBit ( int pInput, int pPosition, bool pOn ) : int
pInput int The p input.
pPosition int The p position.
pOn bool if set to true [p on].
리턴 int

SetBit() 공개 정적인 메소드

Sets the value of a bit
public static SetBit ( long pInput, int pPosition, bool pOn ) : long
pInput long The p input.
pPosition int The p position.
pOn bool if set to true [p on].
리턴 long

SetBit() 공개 정적인 메소드

Sets the value of a bit
public static SetBit ( short pInput, int pPosition, bool pOn ) : short
pInput short The p input.
pPosition int The p position.
pOn bool if set to true [p on].
리턴 short

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( byte pDest, byte pSource, int pSourceIndex ) : byte
pDest byte The p dest.
pSource byte The p source.
pSourceIndex int Index of the p source.
리턴 byte

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( byte pDest, byte pSource, int pSourceIndex, int pLength ) : byte
pDest byte The p dest.
pSource byte The p source.
pSourceIndex int Index of the p source.
pLength int Length of the p.
리턴 byte

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( byte pDest, byte pSource, int pSourceIndex, int pDestIndex, int pLength ) : byte
pDest byte The dest.
pSource byte The source.
pSourceIndex int Index of the source.
pDestIndex int Index of the dest.
pLength int Length to read.
리턴 byte

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( int pDest, int pSource, int pSourceIndex ) : int
pDest int The p dest.
pSource int The p source.
pSourceIndex int Index of the p source.
리턴 int

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( int pDest, int pSource, int pSourceIndex, int pLength ) : int
pDest int The p dest.
pSource int The p source.
pSourceIndex int Index of the p source.
pLength int Length of the p.
리턴 int

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( int pDest, int pSource, int pSourceIndex, int pDestIndex, int pLength ) : int
pDest int The dest.
pSource int The source.
pSourceIndex int Index of the source.
pDestIndex int Index of the dest.
pLength int Length to read.
리턴 int

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( short pDest, short pSource, int pSourceIndex, int pLength ) : int
pDest short The p dest.
pSource short The p source.
pSourceIndex int Index of the p source.
pLength int Length of the p.
리턴 int

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( long pDest, long pSource, int pSourceIndex ) : long
pDest long The p dest.
pSource long The p source.
pSourceIndex int Index of the p source.
리턴 long

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( long pDest, long pSource, int pSourceIndex, int pLength ) : long
pDest long The p dest.
pSource long The p source.
pSourceIndex int Index of the p source.
pLength int Length of the p.
리턴 long

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( long pDest, long pSource, int pSourceIndex, int pDestIndex, int pLength ) : long
pDest long The dest.
pSource long The source.
pSourceIndex int Index of the source.
pDestIndex int Index of the dest.
pLength int Length to read.
리턴 long

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( short pDest, short pSource, int pSourceIndex ) : short
pDest short The p dest.
pSource short The p source.
pSourceIndex int Index of the p source.
리턴 short

SetBits() 공개 정적인 메소드

Sets the bits.
public static SetBits ( short pDest, short pSource, int pSourceIndex, int pDestIndex, int pLength ) : short
pDest short The dest.
pSource short The source.
pSourceIndex int Index of the source.
pDestIndex int Index of the dest.
pLength int Length to read.
리턴 short

SizeOf() 공개 정적인 메소드

Gets the size of the input value in bits
public static SizeOf ( byte pInput ) : int
pInput byte The input value
리턴 int

SizeOf() 공개 정적인 메소드

Gets the size of the input value in bits
public static SizeOf ( int pInput ) : int
pInput int The input value
리턴 int

SizeOf() 공개 정적인 메소드

Gets the size of the input value in bits
public static SizeOf ( long pInput ) : int
pInput long The input value
리턴 int

SizeOf() 공개 정적인 메소드

Gets the size of the input value in bits
public static SizeOf ( short pInput ) : int
pInput short The input value
리턴 int