public abstract class SCAbstractParser extends Object implements SceneParser
Modifier and Type | Class and Description |
---|---|
static class |
SCAbstractParser.Keyword |
Constructor and Description |
---|
SCAbstractParser() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
closeParser() |
protected abstract void |
openParser(String filename) |
boolean |
parse(String filename,
SunflowAPIInterface api)
Parse the specified file to create a scene description into the provided
SunflowAPI object. |
protected abstract boolean |
parseBoolean() |
protected abstract float |
parseFloat() |
protected float[] |
parseFloatArray(int size) |
protected abstract int |
parseInt() |
protected abstract ParameterList.InterpolationType |
parseInterpolationType() |
protected abstract SCAbstractParser.Keyword |
parseKeyword() |
protected abstract Matrix4 |
parseMatrix() |
protected abstract String |
parseString() |
protected abstract String |
parseVerbatimString() |
public boolean parse(String filename, SunflowAPIInterface api)
SceneParser
SunflowAPI
object.parse
in interface SceneParser
filename
- filename to parseapi
- scene to parse the file intotrue
upon sucess, or false
if
errors have occured.protected float[] parseFloatArray(int size) throws IOException
IOException
protected abstract ParameterList.InterpolationType parseInterpolationType() throws IOException
IOException
protected abstract void openParser(String filename) throws IOException
IOException
protected abstract void closeParser() throws IOException
IOException
protected abstract SCAbstractParser.Keyword parseKeyword() throws IOException
IOException
protected abstract boolean parseBoolean() throws IOException
IOException
protected abstract int parseInt() throws IOException
IOException
protected abstract float parseFloat() throws IOException
IOException
protected abstract String parseString() throws IOException
IOException
protected abstract String parseVerbatimString() throws IOException
IOException
protected abstract Matrix4 parseMatrix() throws IOException
IOException
Copyright © 2020. All rights reserved.