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
| Edit this page 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
| Edit this page View Source_tokens
Internal Queue object which this class is a wrapper around.
Declaration
protected Queue<IToken> _tokens
Field Value
Type | Description |
---|---|
Queue<IToken> |
Properties
| Edit this page View SourceCount
Gets the number of Tokens in the Queue.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceTokens
Gets the underlying Queue of Tokens.
Declaration
public override Queue<IToken> Tokens { get; }
Property Value
Type | Description |
---|---|
Queue<IToken> |
Overrides
Methods
| Edit this page View SourceClear()
Empties the Token Queue.
Declaration
public override void Clear()
Overrides
| Edit this page 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
| Edit this page 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
| Edit this page View SourceInitialiseBuffer()
Initialises the Token Queue Buffer.
Declaration
public override void InitialiseBuffer()
Overrides
| Edit this page 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
| Edit this page 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
| Edit this page View SourcePrintTrace(IToken)
Internal Helper Method for Tokeniser Tracing.
Declaration
protected void PrintTrace(IToken t)
Parameters
Type | Name | Description |
---|---|---|
IToken | t |