C# Class Danmaku_no_Kyojin.BulletEngine.Equationator.Equation

This is the main class of teh Equationator. It contains one entire equation. Usage is to create one of these, add all the delegate methods, parse the equation string, and then call teh Solve function whenever need a result from it. A good idea would be to subclass this and have the child class set up all the delegate methods in it's constructor.
Afficher le fichier Open project: Noxalus/Danmaku-no-Kyojin Class Usage Examples

Private Properties

Свойство Type Description
Tokenize List

Méthodes publiques

Méthode Description
AddFunction ( string functionText, FunctionDelegate callbackMethod ) : void

Adds a function to the grammar dictionaary so that it can be used in equations.

Equation ( ) : System

Initializes a new instance of the Equationator.Equation class.

Parse ( string equationText ) : void

Parse the specified equationText.

Solve ( ParamDelegate paramCallback ) : float

Get a result from the equation

Private Methods

Méthode Description
Tokenize ( string equationText ) : List

Tokenize the specified equationText.

Method Details

AddFunction() public méthode

Adds a function to the grammar dictionaary so that it can be used in equations.
thrown when the fucntionText is incorrect format
public AddFunction ( string functionText, FunctionDelegate callbackMethod ) : void
functionText string
callbackMethod FunctionDelegate Callback method that will be called when $XXXX is encountered in an equation
Résultat void

Equation() public méthode

Initializes a new instance of the Equationator.Equation class.
public Equation ( ) : System
Résultat System

Parse() public méthode

Parse the specified equationText.
public Parse ( string equationText ) : void
equationText string Equation text.
Résultat void

Solve() public méthode

Get a result from the equation
public Solve ( ParamDelegate paramCallback ) : float
paramCallback ParamDelegate This is a callback function to get the value of params to pass to this equation
Résultat float