Class BaseToken
Base Implementation of IToken used by all derived tokens for ease of implementation.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Parsing.Tokens
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseToken : IToken
Constructors
| Edit this page View SourceBaseToken(int, string, int, int, int, int)
Creates a Token and fills in its Values.
Declaration
protected BaseToken(int tokenType, string value, int startLine, int endLine, int startPos, int endPos)
Parameters
Type | Name | Description |
---|---|---|
int | tokenType | Integer denoting the Tokens Type. |
string | value | String value that the Token represents (if any). |
int | startLine | Line at which the Token starts. |
int | endLine | Line at which the Token ends. |
int | startPos | Column at which the Token starts. |
int | endPos | Column at which the Token ends. |
Remarks
All the derived classes use this Constructor to fill in the basic values of a Token.
Fields
| Edit this page View Source_endline
Variables for representing the Type and Position of the Token.
Declaration
protected int _endline
Field Value
Type | Description |
---|---|
int |
_endpos
Variables for representing the Type and Position of the Token.
Declaration
protected int _endpos
Field Value
Type | Description |
---|---|
int |
_startline
Variables for representing the Type and Position of the Token.
Declaration
protected int _startline
Field Value
Type | Description |
---|---|
int |
_startpos
Variables for representing the Type and Position of the Token.
Declaration
protected int _startpos
Field Value
Type | Description |
---|---|
int |
_tokentype
Variables for representing the Type and Position of the Token.
Declaration
protected int _tokentype
Field Value
Type | Description |
---|---|
int |
_value
Variable containg the value of the Token.
Declaration
protected string _value
Field Value
Type | Description |
---|---|
string |
Properties
| Edit this page View SourceEndLine
Gets the Line at which this Token Ends.
Declaration
public int EndLine { get; }
Property Value
Type | Description |
---|---|
int |
EndPosition
Gets the Column at which this Token Ends.
Declaration
public int EndPosition { get; }
Property Value
Type | Description |
---|---|
int |
Length
Gets the Length of the Tokens Value.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
int |
StartLine
Gets the Line at which this Token Starts.
Declaration
public int StartLine { get; }
Property Value
Type | Description |
---|---|
int |
StartPosition
Gets the Column at which this Token Starts.
Declaration
public int StartPosition { get; }
Property Value
Type | Description |
---|---|
int |
TokenType
Gets an arbitrary integer which indicates the Type of the Token.
Declaration
public int TokenType { get; }
Property Value
Type | Description |
---|---|
int |
Value
Gets the String Value which this Token represents (if any).
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetHashCode()
Gets a Hash Code for a Token.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceToString()
Gets a String representation of the Token Type and Value.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |