C# Class Monobjc.Tools.Generator.Parsers.Sgml.HWStack

This stack maintains a high water mark for allocated objects so the client can reuse the objects in the stack to reduce memory allocations, this is used to maintain current state of the parser for element stack, and attributes in each element.
Show file Open project: Monobjc/monobjc-tools

Private Properties

Property Type Description
RemoveAt void

Public Methods

Method Description
HWStack ( int growth ) : System

Initialises a new instance of the HWStack class.

Pop ( ) : object

Removes and returns the item at the top of the stack

Push ( ) : object

Pushes a new slot at the top of the stack.

This method tries to reuse a slot, if it returns null then the user has to call the other Push method.

this ( int i ) : object

Returns the item at the requested index or null if index is out of bounds

Private Methods

Method Description
RemoveAt ( int i ) : void

Method Details

HWStack() public method

Initialises a new instance of the HWStack class.
public HWStack ( int growth ) : System
growth int The amount to grow the stack space by, if more space is needed on the stack.
return System

Pop() public method

Removes and returns the item at the top of the stack
public Pop ( ) : object
return object

Push() public method

Pushes a new slot at the top of the stack.
This method tries to reuse a slot, if it returns null then the user has to call the other Push method.
public Push ( ) : object
return object

this() public method

Returns the item at the requested index or null if index is out of bounds
public this ( int i ) : object
i int The index of the item to retrieve.
return object