COM.hugin.HAPI
Interface ClassParseListener

All Superinterfaces:
NetParseListener, ParseListener
All Known Implementing Classes:
DefaultClassParseListener

public interface ClassParseListener
extends NetParseListener

An implementation of the ClassParseListener interface must used when one wants to call the parseClasses method of the ClassCollection class. That is, you must implement your own parseError and insertClass methods.

As an alternative to implementing the ClassParseListener yourself, you may wish to use the DefaultClassParseListener class.


Method Summary
 void insertClass(java.lang.String className, ClassCollection cc)
          Inserts an undefined class in a ClassCollection that is encountered during parsing of a Hugin NET file.
 void parseError(int line, java.lang.String msg)
          Handles parse errors occuring during parsing of a Hugin NET file.
 

Method Detail

parseError

public void parseError(int line,
                       java.lang.String msg)
Handles parse errors occuring during parsing of a Hugin NET file. Parse errors that occur during the parsing of a Hugin NET file (using the parseClasses method of the ClassCollection class) are handled by the parseError method.

Specified by:
parseError in interface NetParseListener
Parameters:
line - the line number at which the parse error occurred.
msg - the parse error message generated by Hugin.

insertClass

public void insertClass(java.lang.String className,
                        ClassCollection cc)
Inserts an undefined class in a ClassCollection that is encountered during parsing of a Hugin NET file. Whenever the Hugin net parser encounters a class not defined in the NET file, the parser calls the insertClass method of the ClassParseListener object provided as an argument to the parseClasses method.

Please note that only implementations of insertClass() based on calling the parseClasses method is currently guaranteed to work with the Hugin Java API.

Parameters:
className - the name of the undefined Class.
cc - the ClassCollection into which the undefined Class should be inserted.