Package com.jogamp.gluegen.pcpp
Class PCPP
- java.lang.Object
-
- com.jogamp.gluegen.pcpp.PCPP
-
- All Implemented Interfaces:
GenericCPP
public class PCPP extends Object implements GenericCPP
A minimal pseudo-C-preprocessor designed in particular to preserve #define statements defining constants so they can be observed by a glue code generator.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDefine(String name, String value)StringfindFile(String filename)List<ConstantDefinition>getConstantDefinitions()Returns a list ofConstantDefinition, i.e.static voidmain(String[] args)OutputStreamout()voidrun(Reader reader, String filename)voidsetOut(OutputStream out)
-
-
-
Method Detail
-
run
public void run(Reader reader, String filename) throws GlueGenException
- Specified by:
runin interfaceGenericCPP- Throws:
GlueGenException
-
getConstantDefinitions
public List<ConstantDefinition> getConstantDefinitions() throws GlueGenException
Description copied from interface:GenericCPPReturns a list ofConstantDefinition, i.e. non-function-like and non-empty macros w/ constant-value, as derived during parsing.May return an empty list, in case this preprocessor does not store
ConstantDefinitions.- Specified by:
getConstantDefinitionsin interfaceGenericCPP- Throws:
GlueGenException
-
findFile
public String findFile(String filename)
- Specified by:
findFilein interfaceGenericCPP
-
out
public OutputStream out()
- Specified by:
outin interfaceGenericCPP
-
setOut
public void setOut(OutputStream out)
- Specified by:
setOutin interfaceGenericCPP
-
addDefine
public void addDefine(String name, String value)
- Specified by:
addDefinein interfaceGenericCPP
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-