C# Класс RTools.Util.StreamTokenizerSettings

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CharTypeToString ( byte ctype ) : string

Return a string representation of a character type setting. Since the type setting is bitwise encoded, a character can have more than one type.

CommentChar ( int c ) : void

Specify that a particular character is a comment-starting character. Character table type manipulation method.

Copy ( StreamTokenizerSettings other ) : void

Sets this object to be the same as the specified object. Note that some settings which are entirely embodied by the character type table.

Display ( ) : void

Display the state of this object.

Display ( string prefix ) : void

Display the state of this object, with a per-line prefix.

IsCharType ( byte ctype, CharTypeBits type ) : bool

Check whether the specified char type byte has a particular type flag set.

IsCharType ( char c, CharTypeBits type ) : bool

Check whether the specified char has a particular type flag set.

IsCharType ( int c, CharTypeBits type ) : bool

Check whether the specified char has a particular type flag set.

OrdinaryChar ( int c ) : void

Remove other type settings from a character. Character table type manipulation method.

OrdinaryChars ( int startChar, int endChar ) : void

Remove other type settings from a range of characters. Character table type manipulation method.

QuoteChar ( int c ) : void

Specify that a particular character is a quote character. Character table type manipulation method.

ResetCharTypeTable ( ) : void

Clear the character type settings. This leaves them unset, as opposed to the default. Use SetDefaults() for default settings.

SetDefaults ( ) : bool

Setup default parse behavior. This resets to same behavior as on construction.

SetupForCodeParse ( ) : bool

Apply settings which are commonly used for code parsing C-style code, including C++, C#, and Java.

StreamTokenizerSettings ( ) : System

Default constructor.

StreamTokenizerSettings ( StreamTokenizerSettings other ) : System

Copy constructor.

WhitespaceChar ( int c ) : void

Specify that a character is a whitespace character. Character table type manipulation method. This type is exclusive with other types.

WhitespaceChars ( int startChar, int endChar ) : void

Specify that a range of characters are whitespace characters. Character table type manipulation method. This adds the characteristic to the char(s), rather than overwriting other characteristics.

WordChar ( int c ) : void

Specify that a particular character is a word character. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.

WordChars ( int startChar, int endChar ) : void

Specify that a range of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.

WordChars ( string s ) : void

Specify that a string of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.

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

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

Return a string representation of a character type setting. Since the type setting is bitwise encoded, a character can have more than one type.
public CharTypeToString ( byte ctype ) : string
ctype byte The character type byte.
Результат string

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

Specify that a particular character is a comment-starting character. Character table type manipulation method.
public CommentChar ( int c ) : void
c int
Результат void

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

Sets this object to be the same as the specified object. Note that some settings which are entirely embodied by the character type table.
public Copy ( StreamTokenizerSettings other ) : void
other StreamTokenizerSettings
Результат void

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

Display the state of this object.
public Display ( ) : void
Результат void

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

Display the state of this object, with a per-line prefix.
public Display ( string prefix ) : void
prefix string The pre-line prefix.
Результат void

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

Check whether the specified char type byte has a particular type flag set.
public IsCharType ( byte ctype, CharTypeBits type ) : bool
ctype byte The char type byte.
type CharTypeBits The CharTypeBits entry to compare to.
Результат bool

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

Check whether the specified char has a particular type flag set.
public IsCharType ( char c, CharTypeBits type ) : bool
c char The character.
type CharTypeBits The CharTypeBits entry to compare to.
Результат bool

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

Check whether the specified char has a particular type flag set.
public IsCharType ( int c, CharTypeBits type ) : bool
c int The character.
type CharTypeBits The CharTypeBits entry to compare to.
Результат bool

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

Remove other type settings from a character. Character table type manipulation method.
public OrdinaryChar ( int c ) : void
c int
Результат void

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

Remove other type settings from a range of characters. Character table type manipulation method.
public OrdinaryChars ( int startChar, int endChar ) : void
startChar int
endChar int
Результат void

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

Specify that a particular character is a quote character. Character table type manipulation method.
public QuoteChar ( int c ) : void
c int
Результат void

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

Clear the character type settings. This leaves them unset, as opposed to the default. Use SetDefaults() for default settings.
public ResetCharTypeTable ( ) : void
Результат void

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

Setup default parse behavior. This resets to same behavior as on construction.
public SetDefaults ( ) : bool
Результат bool

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

Apply settings which are commonly used for code parsing C-style code, including C++, C#, and Java.
public SetupForCodeParse ( ) : bool
Результат bool

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

Default constructor.
public StreamTokenizerSettings ( ) : System
Результат System

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

Copy constructor.
public StreamTokenizerSettings ( StreamTokenizerSettings other ) : System
other StreamTokenizerSettings
Результат System

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

Specify that a character is a whitespace character. Character table type manipulation method. This type is exclusive with other types.
public WhitespaceChar ( int c ) : void
c int The character.
Результат void

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

Specify that a range of characters are whitespace characters. Character table type manipulation method. This adds the characteristic to the char(s), rather than overwriting other characteristics.
public WhitespaceChars ( int startChar, int endChar ) : void
startChar int First character.
endChar int Last character.
Результат void

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

Specify that a particular character is a word character. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.
public WordChar ( int c ) : void
c int The character.
Результат void

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

Specify that a range of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.
public WordChars ( int startChar, int endChar ) : void
startChar int First character.
endChar int Last character.
Результат void

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

Specify that a string of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.
public WordChars ( string s ) : void
s string
Результат void