Class TokenQueue
Basic Token Queue which provides no Buffering except in the sense that it queues all possible Tokens when the InitialiseBuffer method is called.
Implements
Inherited Members
Namespace: VDS.RDF.Parsing.Tokens
Assembly: dotNetRdf.dll
Syntax
public class TokenQueue : BaseTokenQueue, ITokenQueue
Constructors
| Improve this Doc View SourceTokenQueue()
Creates a new Token Queue.
Declaration
public TokenQueue()
TokenQueue(ITokeniser)
Creates a new Token Queue with the given Tokeniser.
Declaration
public TokenQueue(ITokeniser tokeniser)
Parameters
Type | Name | Description |
---|---|---|
ITokeniser | tokeniser | Tokeniser. |
Fields
| Improve this Doc View Source_tokens
Internal Queue object which this class is a wrapper around.
Declaration
protected Queue<IToken> _tokens
Field Value
Type | Description |
---|---|
System.Collections.Generic.Queue<T><IToken> |
Properties
| Improve this Doc View SourceCount
Gets the number of Tokens in the Queue.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
| Improve this Doc View SourceTokens
Gets the underlying Queue of Tokens.
Declaration
public override Queue<IToken> Tokens { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Queue<T><IToken> |
Overrides
Methods
| Improve this Doc View SourceClear()
Empties the Token Queue.
Declaration
public override void Clear()
Overrides
| Improve this Doc View SourceDequeue()
Removes and returns the first Token from the Queue.
Declaration
public override IToken Dequeue()
Returns
Type | Description |
---|---|
IToken | First Token in the Queue. |
Overrides
| Improve this Doc View SourceEnqueue(IToken)
Adds a Token to the end of the Queue.
Declaration
public override void Enqueue(IToken t)
Parameters
Type | Name | Description |
---|---|---|
IToken | t | Token to add. |
Overrides
| Improve this Doc View SourceInitialiseBuffer()
Initialises the Token Queue Buffer.
Declaration
public override void InitialiseBuffer()
Overrides
| Improve this Doc View SourceInitialiseBuffer(int)
Initialises the Token Queue Buffer to the set Buffer Amount.
Declaration
public override void InitialiseBuffer(int amount)
Parameters
Type | Name | Description |
---|---|---|
int | amount | Amount of Tokens to Buffer. |
Overrides
| Improve this Doc View SourcePeek()
Gets the first Token from the Queue without removing it.
Declaration
public override IToken Peek()
Returns
Type | Description |
---|---|
IToken | First Token in the Queue. |
Overrides
| Improve this Doc View SourcePrintTrace(IToken)
Internal Helper Method for Tokeniser Tracing.
Declaration
protected void PrintTrace(IToken t)
Parameters
Type | Name | Description |
---|---|---|
IToken | t |