| java.lang.Object com.sun.j3d.loaders.lw3d.TextfileParser
All known Subclasses: com.sun.j3d.loaders.lw3d.LwsBackground, com.sun.j3d.loaders.lw3d.LwsEnvelope, com.sun.j3d.loaders.lw3d.LwsLight, com.sun.j3d.loaders.lw3d.Lw3dLoader, com.sun.j3d.loaders.lw3d.EnvelopeHandler, com.sun.j3d.loaders.lw3d.LwsFrame, com.sun.j3d.loaders.lw3d.LwsEnvelopeFrame, com.sun.j3d.loaders.lw3d.LwsCamera, com.sun.j3d.loaders.lw3d.LwsMotion, com.sun.j3d.loaders.lw3d.LwsFog, com.sun.j3d.loaders.lw3d.LwsObject,
TextfileParser | class TextfileParser (Code) | | This class is a superclass for most of the Lws* Scene-file parsing
classes. It provides some debugging utilities, as well as utilities for
reading the types of data common to this loader.
|
Method Summary | |
void | checkString(StreamTokenizer st, String theString) | void | checkType(StreamTokenizer st, int theType) | protected void | debugOutput(int outputType, String theOutput) | protected void | debugOutputLn(int outputType, String theOutput) | void | getAndCheckString(StreamTokenizer st, String expectedValue) | String | getName(StreamTokenizer st) Returns a "name" from the stream. | double | getNumber(StreamTokenizer st) Returns number from the tokenizer. | String | getString(StreamTokenizer st) | boolean | isCurrentToken(StreamTokenizer st, String tokenString) | void | skip(StreamTokenizer st, String tokenString, int skipVals) Utility routine - gets next token, checks it against our expectation,
then skips a given number of tokens. | void | skipUntilString(StreamTokenizer st, String theString) Utility method to advance the tokenizer until we see the given
string. |
MISCLINE_TRACE | final static int MISCLINE_TRACE(Code) | | |
NONEEXCEPTION | final static int NONEEXCEPTION(Code) | | |
TIME | final static int TIME(Code) | | |
TRACEVALUES | final static int TRACEVALUES(Code) | | |
currentLevel | int currentLevel(Code) | | |
lineSeparatorChar | char lineSeparatorChar(Code) | | |
TextfileParser | TextfileParser()(Code) | | |
debugOutput | protected void debugOutput(int outputType, String theOutput)(Code) | | |
debugOutputLn | protected void debugOutputLn(int outputType, String theOutput)(Code) | | |
getName | String getName(StreamTokenizer st) throws ParsingErrorException(Code) | | Returns a "name" from the stream. This is different from simply a
String because the name could contain whitespace characters
(such as "object 1" or "objectname (sequence)") that would confuse
the string parser. So we just grab all characters until EOL and
concatenate them together to form the name
|
isCurrentToken | boolean isCurrentToken(StreamTokenizer st, String tokenString)(Code) | | Utility method- used to check whether the current token is equal
to the given string
|
skip | void skip(StreamTokenizer st, String tokenString, int skipVals) throws ParsingErrorException(Code) | | Utility routine - gets next token, checks it against our expectation,
then skips a given number of tokens. This can be used to parse
through (and ignore) certain parameter/value sets in the files
|
skipUntilString | void skipUntilString(StreamTokenizer st, String theString) throws ParsingErrorException(Code) | | Utility method to advance the tokenizer until we see the given
string. This is used to skip by various parameters that we
currently ignore in the loader.
|
|
|