C# Класс CNCGUI.ScanFormatted

Class that provides functionality of the standard C library sscanf() function.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Results List

Защищенные свойства (Protected)

Свойство Тип Описание
_typeParsers TypeParser[]

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Parse() публичный Метод

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
Результат int

ParseFormatSpecifier() защищенный Метод

Attempts to parse a field format specifier from the format string.
protected ParseFormatSpecifier ( TextParser format, FormatSpecifier spec ) : bool
format TextParser
spec FormatSpecifier
Результат bool

ParseHexadecimal() защищенный Метод

Parse hexadecimal field
protected ParseHexadecimal ( TextParser input, FormatSpecifier spec ) : bool
input TextParser
spec FormatSpecifier
Результат bool

ParseScanSet() защищенный Метод

Parse a scan-set field
protected ParseScanSet ( TextParser input, FormatSpecifier spec ) : bool
input TextParser
spec FormatSpecifier
Результат bool

ScanFormatted() публичный Метод

public ScanFormatted ( ) : System
Результат System

Описание свойств

Results публичное свойство

public List Results
Результат List

_typeParsers защищенное свойство

protected TypeParser[] _typeParsers
Результат TypeParser[]