C# Class CNCGUI.ScanFormatted

Class that provides functionality of the standard C library sscanf() function.
Afficher le fichier Open project: x893/CNCGUI Class Usage Examples

Méthodes publiques

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

Protected Properties

Свойство Type Description
_typeParsers TypeParser[]

Méthodes publiques

Méthode Description
Parse ( string input, string format ) : int

Parses the input string according to the rules in the format string. Similar to the standard C library's sscanf() function. Parsed fields are placed in the class' Results member.

ScanFormatted ( ) : System

Méthodes protégées

Méthode Description
ParseFormatSpecifier ( TextParser format, FormatSpecifier spec ) : bool

Attempts to parse a field format specifier from the format string.

ParseHexadecimal ( TextParser input, FormatSpecifier spec ) : bool

Parse hexadecimal field

ParseScanSet ( TextParser input, FormatSpecifier spec ) : bool

Parse a scan-set field

Private Methods

Méthode Description
AddSigned ( string token, Modifiers mod, int radix ) : void
AddUnsigned ( string token, Modifiers mod, int radix ) : void
IsValidDigit ( char c, int radix ) : bool
ParseCharacter ( TextParser input, FormatSpecifier spec ) : bool

Parse a character field

ParseDecimal ( TextParser input, FormatSpecifier spec ) : bool

Parse integer field

ParseFloat ( TextParser input, FormatSpecifier spec ) : bool

Parse a floating-point field

ParseOctal ( TextParser input, FormatSpecifier spec ) : bool

Parse an octal field

ParseString ( TextParser input, FormatSpecifier spec ) : bool

Parse a string field

Method Details

Parse() public méthode

Parses the input string according to the rules in the format string. Similar to the standard C library's sscanf() function. Parsed fields are placed in the class' Results member.
public Parse ( string input, string format ) : int
input string String to parse
format string Specifies rules for parsing input
Résultat int

ParseFormatSpecifier() protected méthode

Attempts to parse a field format specifier from the format string.
protected ParseFormatSpecifier ( TextParser format, FormatSpecifier spec ) : bool
format TextParser
spec FormatSpecifier
Résultat bool

ParseHexadecimal() protected méthode

Parse hexadecimal field
protected ParseHexadecimal ( TextParser input, FormatSpecifier spec ) : bool
input TextParser
spec FormatSpecifier
Résultat bool

ParseScanSet() protected méthode

Parse a scan-set field
protected ParseScanSet ( TextParser input, FormatSpecifier spec ) : bool
input TextParser
spec FormatSpecifier
Résultat bool

ScanFormatted() public méthode

public ScanFormatted ( ) : System
Résultat System

Property Details

Results public_oe property

public List Results
Résultat List

_typeParsers protected_oe property

protected TypeParser[] _typeParsers
Résultat TypeParser[]