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 void
addDefine(String name, String value)
String
findFile(String filename)
List<ConstantDefinition>
getConstantDefinitions()
Returns a list ofConstantDefinition
, i.e.static void
main(String[] args)
OutputStream
out()
void
run(Reader reader, String filename)
void
setOut(OutputStream out)
-
-
-
Method Detail
-
run
public void run(Reader reader, String filename) throws GlueGenException
- Specified by:
run
in interfaceGenericCPP
- Throws:
GlueGenException
-
getConstantDefinitions
public List<ConstantDefinition> getConstantDefinitions() throws GlueGenException
Description copied from interface:GenericCPP
Returns 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
ConstantDefinition
s.- Specified by:
getConstantDefinitions
in interfaceGenericCPP
- Throws:
GlueGenException
-
findFile
public String findFile(String filename)
- Specified by:
findFile
in interfaceGenericCPP
-
out
public OutputStream out()
- Specified by:
out
in interfaceGenericCPP
-
setOut
public void setOut(OutputStream out)
- Specified by:
setOut
in interfaceGenericCPP
-
addDefine
public void addDefine(String name, String value)
- Specified by:
addDefine
in interfaceGenericCPP
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-