C# Class System.Xml.BitStack

Manages a stack of bits. Exposes push, pop, and peek operations.
Afficher le fichier Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Méthodes publiques

Méthode Description
BitStack ( ) : System

Initialize stack.

PeekBit ( ) : bool

Return the top bit on the stack without pushing or popping.

PopBit ( ) : bool

Pop the top bit from the stack and return it.

PushBit ( bool bit ) : void

Push a 0 or 1 bit onto the stack.

Private Methods

Méthode Description
PopCurr ( ) : void

If all bits have been popped from this.curr, then pop the previous uint value from the stack in order to provide another 31 bits.

PushCurr ( ) : void

this.curr has enough space for 31 bits (minus 1 for sentinel bit). Once this space is exhausted, a uint stack is created to handle the overflow.

Method Details

BitStack() public méthode

Initialize stack.
public BitStack ( ) : System
Résultat System

PeekBit() public méthode

Return the top bit on the stack without pushing or popping.
public PeekBit ( ) : bool
Résultat bool

PopBit() public méthode

Pop the top bit from the stack and return it.
public PopBit ( ) : bool
Résultat bool

PushBit() public méthode

Push a 0 or 1 bit onto the stack.
public PushBit ( bool bit ) : void
bit bool
Résultat void