Package com.jogamp.gluegen.jcpp
Class CppReader
- java.lang.Object
-
- java.io.Reader
-
- com.jogamp.gluegen.jcpp.CppReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public class CppReader extends Reader implements Closeable
A Reader wrapper around the Preprocessor. This is a utility class to provide a transparentReaderwhich preprocesses the input text.- See Also:
Preprocessor,Reader
-
-
Constructor Summary
Constructors Constructor Description CppReader(Preprocessor p)CppReader(Reader r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMacro(String name)Defines the given name as a macro.voidaddMacro(String name, String value)Defines the given name as a macro.voidclose()PreprocessorgetPreprocessor()Returns the Preprocessor used by this CppReader.intread()intread(char[] cbuf, int off, int len)-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
CppReader
public CppReader(@Nonnull Reader r)
-
CppReader
public CppReader(@Nonnull Preprocessor p)
-
-
Method Detail
-
getPreprocessor
@Nonnull public Preprocessor getPreprocessor()
Returns the Preprocessor used by this CppReader.
-
addMacro
public void addMacro(@Nonnull String name) throws LexerExceptionDefines the given name as a macro. This is a convnience method.- Throws:
LexerException
-
addMacro
public void addMacro(@Nonnull String name, @Nonnull String value) throws LexerExceptionDefines the given name as a macro. This is a convnience method.- Throws:
LexerException
-
read
public int read() throws IOException- Overrides:
readin classReader- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
-