Struct Token
Abstraction of a configuration token.
Namespace: ABB.Robotics.Controllers.Configuration
Assembly: ABB.Robotics.Controllers.PC.dll
Syntax
public struct Token
Constructors
Token(Char, TokenType)
Initializes a new token object.
Declaration
public Token(char c, TokenType type)
Parameters
Type | Name | Description |
---|---|---|
Char | c | The charachter. |
TokenType | type | The token type. |
Token(String, TokenType)
Initializes a new token object.
Declaration
public Token(string text, TokenType type)
Parameters
Type | Name | Description |
---|---|---|
String | text | The token text. |
TokenType | type | The token type. |
Properties
Char
Gets the char if not a string.
Declaration
public readonly char Char { get; }
Property Value
Type | Description |
---|---|
Char |
Column
Gets/sets the column.
Declaration
public int Column { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
IsContinue
Indicates that the current token is a continue line char.
Declaration
public readonly bool IsContinue { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsEndOfStream
Inidicates that the current token is a end of stream token.
Declaration
public readonly bool IsEndOfStream { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsLineFeed
Indicates that the current token is a LineFeed.
Declaration
public readonly bool IsLineFeed { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsSeparator
Indicates that the current token is a separator.
Declaration
public readonly bool IsSeparator { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsText
Indicates that the current token is a text token.
Declaration
public readonly bool IsText { get; }
Property Value
Type | Description |
---|---|
Boolean |
Row
Gets/Sets the row of the token.
Declaration
public int Row { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Text
Gets the token text.
Declaration
public readonly string Text { get; }
Property Value
Type | Description |
---|---|
String |
Type
Gets the token type.
Declaration
public readonly TokenType Type { get; }
Property Value
Type | Description |
---|---|
TokenType |
Methods
Equals(Token)
Checks if two tokens are equal.
Declaration
public bool Equals(Token obj)
Parameters
Type | Name | Description |
---|---|---|
Token | obj | The token. |
Returns
Type | Description |
---|---|
Boolean | True if the tokens are equal, otherwise false. |
Equals(Object)
Checks if two tokens are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object. |
Returns
Type | Description |
---|---|
Boolean | True if the objects are equal, otherwise false. |
Overrides
GetHashCode()
Gets the hash code for this object. This is based on the text property.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | The hash code. |
Overrides
ToString()
Gets a string representation of the current token.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | The text. |