|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmp.Macroprocessor.Component
pmp.InputQueue
public final class InputQueue
Internal structure of macroprocessor which provides input source for parser.
Title: PMP: Macroprocessor
Description: Java macroprocessor
Copyright: Copyright (c) 2005
Constructor Summary | |
---|---|
InputQueue(Macroprocessor mp)
|
Method Summary | |
---|---|
(package private) void |
commit()
Throws away all characters processed by getChar() . |
(package private) void |
commit(int length)
Throws away first length characters processed by
getChar() . |
(package private) int |
getCommittedBytes()
|
int |
getChar()
Reads single character from input. |
boolean |
isEmpty()
Returns true when input queue is empty. |
InputSource |
pushBack(java.lang.CharSequence data)
|
InputSource |
pushBack(InputSource data)
|
InputSource |
pushFront(java.lang.CharSequence data)
Adds new source in front of queue. |
InputSource |
pushFront(InputSource data)
Adds new source in front of queue. |
void |
reset()
Clears input queue and closes InputSource objects and all input buffers |
Methods inherited from class pmp.Macroprocessor.Component |
---|
error, getMP, getMPAnalyzer, getMPIO, getMPIQ, getMPMacros, notice, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InputQueue(Macroprocessor mp)
Method Detail |
---|
public InputSource pushFront(InputSource data)
Note: Prefetch queue must be empty.
data
- source objectpublic InputSource pushFront(java.lang.CharSequence data)
CharSequence
is
encapsulated by StringInputSource class and
pushFront(InputSource)
is called.
Note: Prefetch must be empty.
data
- source object
public InputSource pushBack(InputSource data)
public InputSource pushBack(java.lang.CharSequence data)
public int getChar()
void commit()
getChar()
.
void commit(int length)
length
characters processed by
getChar()
. Remaining characters are returned to InputQueue.
length
- number of characters to be committedint getCommittedBytes()
public boolean isEmpty()
true
if there is not any character availablepublic void reset()
InputSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |