C# Class BF2Statistics.MedalData.MedalDataParser

Afficher le fichier Open project: BF2Statistics/ControlCenter Class Usage Examples

Méthodes publiques

Méthode Description
BuildAwardCache ( MatchCollection MedalsMatches, MatchCollection RanksMatches ) : void

This method builds the award cache with the given data from the medal data file. This method WILL CLEAR the award cache from any existing medals

LoadMedalDataFile ( string FilePath ) : void

This method loads a Medal data python file, and parses it. The medal data is stored in the AwardCache object

ParseMedalData ( string Data, MatchCollection &MedalsMatches, MatchCollection &RanksMatches ) : void

This method takes a medal data string, and parses it. The parsed match collections are passed back out from referenced variables

ParseNodeConditions ( TreeNode Node ) : Condition

Takes a node tree and converts it to a Condition

ReadPythonFile ( string file ) : string

Simple easy way to get the contents of a file, excluding empty lines.

Private Methods

Méthode Description
MedalDataParser ( ) : System

Loads the default medal data into the Award Cache

ParseCondition ( List parts, int &i ) : Condition

Parses a string condition into condition objects

ParseCondition ( string ConditionString ) : Condition

Parses a string condition into condition objects

ParseFunctions ( List &parts ) : bool

Takes each literal token, and determines if its a StatFunction, or ConditionFunction

Tokenize ( TokenType tokenKind, string pattern, int>.KeyValuePair &untokenizedParts ) : IEnumerable

Performs tokenization of a collection of non-tokenized data parts with a specific pattern

Tokenize ( string source ) : IEnumerable

Breaks an input string into recognizable tokens

Method Details

BuildAwardCache() public static méthode

This method builds the award cache with the given data from the medal data file. This method WILL CLEAR the award cache from any existing medals
public static BuildAwardCache ( MatchCollection MedalsMatches, MatchCollection RanksMatches ) : void
MedalsMatches System.Text.RegularExpressions.MatchCollection
RanksMatches System.Text.RegularExpressions.MatchCollection
Résultat void

LoadMedalDataFile() public static méthode

This method loads a Medal data python file, and parses it. The medal data is stored in the AwardCache object
public static LoadMedalDataFile ( string FilePath ) : void
FilePath string The full file path to the python file
Résultat void

ParseMedalData() public static méthode

This method takes a medal data string, and parses it. The parsed match collections are passed back out from referenced variables
public static ParseMedalData ( string Data, MatchCollection &MedalsMatches, MatchCollection &RanksMatches ) : void
Data string The contents of the medal data file
MedalsMatches System.Text.RegularExpressions.MatchCollection
RanksMatches System.Text.RegularExpressions.MatchCollection
Résultat void

ParseNodeConditions() public static méthode

Takes a node tree and converts it to a Condition
public static ParseNodeConditions ( TreeNode Node ) : Condition
Node System.Windows.Forms.TreeNode
Résultat Condition

ReadPythonFile() public static méthode

Simple easy way to get the contents of a file, excluding empty lines.
public static ReadPythonFile ( string file ) : string
file string
Résultat string