C# Class FlatRedBall.Graphics.Model.Animation.Content.XFileTokenizer

Tokenizes a .X file and provides methods to parse those tokens.
Show file Open project: vchelaru/FlatRedBall Class Usage Examples

Private Properties

Property Type Description
AddChar void
ResetString void
Throw void
TokensFromString List

Public Methods

Method Description
NextFloat ( ) : float

Parses a float from a .X file

NextInt ( ) : int

Parses an integer from a .X file

NextMatrix ( ) : Matrix

Reads the next Matrix in the stream.

NextString ( ) : string

Parses a string from a .X file

NextToken ( ) : string

Reads a generic token from a .X file

NextVector2 ( ) : Vector2

Reads the next Vector2 in the stream.

NextVector3 ( ) : Vector3

Reads the next Vector3 in the stream.

NextVector4 ( ) : Vector4

Reads the next Vector4 in the stream.

ReadName ( ) : string

Reads a nodes name and its opening curly bracket.

Reset ( ) : void

Resets the tokenizer to the beginning of the stream.

SkipName ( ) : XFileTokenizer

Skips a nodes name and its opening curly bracket.

SkipNode ( ) : void

Skips a node in a .X file and all child nodes; should be called after the opening brace, "{", has been read.

SkipToken ( ) : XFileTokenizer

Skips a token in the stream.

SkipTokens ( int numToSkip ) : void

Skips tokens in the stream.

XFileTokenizer ( string fileName ) : System

Creates a new instance of XFileTokenizer.

Private Methods

Method Description
AddChar ( int c ) : void
ResetString ( ) : void
Throw ( Type type, Exception innerException, String inputString ) : void
TokensFromString ( string ms ) : List

Method Details

NextFloat() public method

Parses a float from a .X file
public NextFloat ( ) : float
return float

NextInt() public method

Parses an integer from a .X file
public NextInt ( ) : int
return int

NextMatrix() public method

Reads the next Matrix in the stream.
public NextMatrix ( ) : Matrix
return Matrix

NextString() public method

Parses a string from a .X file
public NextString ( ) : string
return string

NextToken() public method

Reads a generic token from a .X file
public NextToken ( ) : string
return string

NextVector2() public method

Reads the next Vector2 in the stream.
public NextVector2 ( ) : Vector2
return Vector2

NextVector3() public method

Reads the next Vector3 in the stream.
public NextVector3 ( ) : Vector3
return Vector3

NextVector4() public method

Reads the next Vector4 in the stream.
public NextVector4 ( ) : Vector4
return Vector4

ReadName() public method

Reads a nodes name and its opening curly bracket.
public ReadName ( ) : string
return string

Reset() public method

Resets the tokenizer to the beginning of the stream.
public Reset ( ) : void
return void

SkipName() public method

Skips a nodes name and its opening curly bracket.
public SkipName ( ) : XFileTokenizer
return XFileTokenizer

SkipNode() public method

Skips a node in a .X file and all child nodes; should be called after the opening brace, "{", has been read.
public SkipNode ( ) : void
return void

SkipToken() public method

Skips a token in the stream.
public SkipToken ( ) : XFileTokenizer
return XFileTokenizer

SkipTokens() public method

Skips tokens in the stream.
public SkipTokens ( int numToSkip ) : void
numToSkip int
return void

XFileTokenizer() public method

Creates a new instance of XFileTokenizer.
public XFileTokenizer ( string fileName ) : System
fileName string The .X file to tokenize.
return System