Package com.jogamp.gluegen.jcpp
Class DefaultPreprocessorListener
java.lang.Object
com.jogamp.gluegen.jcpp.DefaultPreprocessorListener
- All Implemented Interfaces:
PreprocessorListener
A handler for preprocessor events, primarily errors and warnings.
If no PreprocessorListener is installed in a Preprocessor, all
error and warning events will throw an exception. Installing a
listener allows more intelligent handling of these events.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jogamp.gluegen.jcpp.PreprocessorListener
PreprocessorListener.SourceChangeEvent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intintvoidhandleError(Source source, int line, int column, String msg) Handles an error.voidhandleSourceChange(Source source, PreprocessorListener.SourceChangeEvent event) voidhandleWarning(Source source, int line, int column, String msg) Handles a warning.protected void
-
Constructor Details
-
DefaultPreprocessorListener
public DefaultPreprocessorListener()
-
-
Method Details
-
clear
public void clear() -
getErrors
public int getErrors() -
getWarnings
public int getWarnings() -
print
-
handleWarning
Handles a warning. The behaviour of this method is defined by the implementation. It may simply record the error message, or it may throw an exception.- Specified by:
handleWarningin interfacePreprocessorListener- Throws:
LexerException
-
handleError
Handles an error. The behaviour of this method is defined by the implementation. It may simply record the error message, or it may throw an exception.- Specified by:
handleErrorin interfacePreprocessorListener- Throws:
LexerException
-
handleSourceChange
- Specified by:
handleSourceChangein interfacePreprocessorListener
-