Class BaseToken
Base Implementation of IToken used by all derived tokens for ease of implementation.
Inheritance
System.Object
BaseToken
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Parsing.Tokens
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseToken : IToken
Constructors
| Improve this Doc View SourceBaseToken(Int32, String, Int32, Int32, Int32, Int32)
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 |
---|---|---|
System.Int32 | tokenType | Integer denoting the Tokens Type. |
System.String | value | String value that the Token represents (if any). |
System.Int32 | startLine | Line at which the Token starts. |
System.Int32 | endLine | Line at which the Token ends. |
System.Int32 | startPos | Column at which the Token starts. |
System.Int32 | 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
| Improve this Doc View Source_endline
Variables for representing the Type and Position of the Token.
Declaration
protected int _endline
Field Value
Type | Description |
---|---|
System.Int32 |
_endpos
Variables for representing the Type and Position of the Token.
Declaration
protected int _endpos
Field Value
Type | Description |
---|---|
System.Int32 |
_startline
Variables for representing the Type and Position of the Token.
Declaration
protected int _startline
Field Value
Type | Description |
---|---|
System.Int32 |
_startpos
Variables for representing the Type and Position of the Token.
Declaration
protected int _startpos
Field Value
Type | Description |
---|---|
System.Int32 |
_tokentype
Variables for representing the Type and Position of the Token.
Declaration
protected int _tokentype
Field Value
Type | Description |
---|---|
System.Int32 |
_value
Variable containg the value of the Token.
Declaration
protected string _value
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceEndLine
Gets the Line at which this Token Ends.
Declaration
public int EndLine { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
EndPosition
Gets the Column at which this Token Ends.
Declaration
public int EndPosition { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Length
Gets the Length of the Tokens Value.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
StartLine
Gets the Line at which this Token Starts.
Declaration
public int StartLine { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
StartPosition
Gets the Column at which this Token Starts.
Declaration
public int StartPosition { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TokenType
Gets an arbitrary integer which indicates the Type of the Token.
Declaration
public int TokenType { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Value
Gets the String Value which this Token represents (if any).
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceGetHashCode()
Gets a Hash Code for a Token.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
ToString()
Gets a String representation of the Token Type and Value.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()