Package org.sunflow.core.parser

# Class SCAbstractParser

java.lang.Object
org.sunflow.core.parser.SCAbstractParser

All Implemented Interfaces:
  `SceneParser`

Direct Known Subclasses:
  `SCAsciiParser`, `SCBinaryParser`

public abstract class SCAbstractParser extends Object implements SceneParser

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`SCAbstractParser.Keyword`

## Constructor Summary

Constructors
Constructor
Description
`SCAbstractParser()`

## Method Summary

Modifier and Type
Method
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()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SCAbstractParser

public SCAbstractParser()

## Method Details

### parse

public boolean parse(String filename, SunflowAPIInterface api)
Description copied from interface: `SceneParser`
Parse the specified file to create a scene description into the provided `SunflowAPI` object.

Specified by:
  `parse` in interface `SceneParser`
Parameters:
  `filename` - filename to parse
  `api` - scene to parse the file into
Returns:
  `true` upon sucess, or `false` if errors have occured.

### parseFloatArray

protected float[] parseFloatArray(int size) throws IOException

Throws:
  `IOException`

### parseInterpolationType

protected abstract ParameterList.InterpolationType parseInterpolationType() throws IOException

Throws:
  `IOException`

### openParser

protected abstract void openParser(String filename) throws IOException

Throws:
  `IOException`

### closeParser

protected abstract void closeParser() throws IOException

Throws:
  `IOException`

### parseKeyword

protected abstract SCAbstractParser.Keyword parseKeyword() throws IOException

Throws:
  `IOException`

### parseBoolean

protected abstract boolean parseBoolean() throws IOException

Throws:
  `IOException`

### parseInt

protected abstract int parseInt() throws IOException

Throws:
  `IOException`

### parseFloat

protected abstract float parseFloat() throws IOException

Throws:
  `IOException`

### parseString

protected abstract String parseString() throws IOException

Throws:
  `IOException`

### parseVerbatimString

protected abstract String parseVerbatimString() throws IOException

Throws:
  `IOException`

### parseMatrix

protected abstract Matrix4 parseMatrix() throws IOException

Throws:
  `IOException`