C# Class Mapsui.Geometries.WellKnownText.StreamTokenizer

The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time. The parsing process is controlled by a table and a number of flags that can be set to various states. The stream tokenizer can recognize identifiers, numbers, quoted strings, and various comment style
This is a crude c# implementation of Java's StreamTokenizer class.
Mostrar archivo Open project: pauldendulk/Mapsui

Public Methods

Method Description
GetNumericValue ( ) : double

If the current token is a number, this field contains the value of that number.

If the current token is a number, this field contains the value of that number. The current token is a number when the value of the ttype field is TT_NUMBER.

GetStringValue ( ) : string

If the current token is a word token, this field contains a string giving the characters of the word token.

GetTokenType ( ) : TokenType

Gets the token type of the current token.

NextToken ( ) : TokenType

Returns the next token.

NextToken ( bool ignoreWhitespaceAsToken ) : TokenType

Returns the next token.

StreamTokenizer ( TextReader reader, bool ignoreWhitespace ) : System

Initializes a new instance of the StreamTokenizer class.

Private Methods

Method Description
GetType ( char character ) : TokenType

Determines a characters type (e.g. number, symbols, character).

NextNonWhitespaceToken ( ) : TokenType

Returns next token that is not whitespace.

NextTokenAny ( ) : TokenType

Method Details

GetNumericValue() public method

If the current token is a number, this field contains the value of that number.
If the current token is a number, this field contains the value of that number. The current token is a number when the value of the ttype field is TT_NUMBER.
Current token is not a number in a valid format.
public GetNumericValue ( ) : double
return double

GetStringValue() public method

If the current token is a word token, this field contains a string giving the characters of the word token.
public GetStringValue ( ) : string
return string

GetTokenType() public method

Gets the token type of the current token.
public GetTokenType ( ) : TokenType
return TokenType

NextToken() public method

Returns the next token.
public NextToken ( ) : TokenType
return TokenType

NextToken() public method

Returns the next token.
public NextToken ( bool ignoreWhitespaceAsToken ) : TokenType
ignoreWhitespaceAsToken bool Determines is whitespace is ignored. True if whitespace is to be ignored.
return TokenType

StreamTokenizer() public method

Initializes a new instance of the StreamTokenizer class.
public StreamTokenizer ( TextReader reader, bool ignoreWhitespace ) : System
reader System.IO.TextReader A TextReader with some text to read.
ignoreWhitespace bool Flag indicating whether whitespace should be ignored.
return System