com.jogamp.gluegen.opengl
Class BuildComposablePipeline.PipelineEmitter

java.lang.Object
  extended by com.jogamp.gluegen.opengl.BuildComposablePipeline.PipelineEmitter
Direct Known Subclasses:
BuildComposablePipeline.CustomPipeline, BuildComposablePipeline.DebugPipeline, BuildComposablePipeline.TracePipeline
Enclosing class:
BuildComposablePipeline

protected abstract class BuildComposablePipeline.PipelineEmitter
extends Object

Emits a Java source file that represents one element of the composable pipeline.


Field Summary
protected  Class<?> baseInterfaceClass
           
protected  String baseName
           
protected  String basePackage
           
protected  Class<?> downstreamClass
           
protected  String downstreamName
           
protected  String downstreamPackage
           
protected  String outputDir
           
protected  String outputPackage
           
protected  Class<?> prologClassOpt
           
protected  String prologNameOpt
           
protected  String prologPackageOpt
           
 
Method Summary
protected abstract  void constructorHook(PrintWriter output)
          Emits the constructor for the pipeline; called after the preMethodEmissionHook.
 void emit(Iterator<BuildComposablePipeline.PlainMethod> methodsToWrap)
           
protected  void emitBody(PrintWriter output, Method m, boolean runHooks)
           
protected abstract  void emitClassDocComment(PrintWriter output)
          Emit a Javadoc comment for this pipeline class.
protected  void emitGLGetMethod(PrintWriter output, String type)
          Emits one of the getGL* methods.
protected  void emitGLGetMethods(PrintWriter output)
          Emits all of the getGL* methods.
protected  void emitGLIsMethod(PrintWriter output, String type)
          Emits one of the isGL* methods.
protected  void emitGLIsMethods(PrintWriter output)
          Emits all of the isGL* methods.
protected  void emitMethodDocComment(PrintWriter output, Method m)
           
protected  void emitSignature(PrintWriter output, Method m)
           
protected abstract  boolean emptyDownstreamAllowed()
           
protected abstract  boolean emptyMethodAllowed()
           
protected  String getArgListAsString(Method m, boolean includeArgTypes, boolean includeArgNames)
           
protected  String getBaseInterfaceName()
          The name of the class around which this pipeline is being composed.
protected  String getDownstreamObjectName()
          Get the name of the object through which API calls should be routed.
protected abstract  int getMode()
           
protected abstract  String getOutputName()
          Get the output name for this pipeline class.
protected  String getPrologObjectNameOpt()
          Get the name of the object which shall be called as a prolog.
protected abstract  boolean hasPostDownstreamCallHook(Method m)
           
protected abstract  boolean hasPreDownstreamCallHook(Method m)
           
protected abstract  void postDownstreamCallHook(PrintWriter output, Method m)
          Called after the pipeline has routed the call to the downstream object, but before the calling function exits or returns a value.
protected  void postMethodEmissionHook(PrintWriter output)
          Called after the method wrappers have been generated, but before the closing parenthesis of the class is emitted.
protected abstract  void preDownstreamCallHook(PrintWriter output, Method m)
          Called before the pipeline routes the call to the downstream object.
protected  void preMethodEmissionHook(PrintWriter output)
          Called after the class headers have been generated, but before any method wrappers have been generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

basePackage

protected String basePackage

baseName

protected String baseName

downstreamPackage

protected String downstreamPackage

downstreamName

protected String downstreamName

prologPackageOpt

protected String prologPackageOpt

prologNameOpt

protected String prologNameOpt

outputDir

protected String outputDir

outputPackage

protected String outputPackage

baseInterfaceClass

protected Class<?> baseInterfaceClass

prologClassOpt

protected Class<?> prologClassOpt

downstreamClass

protected Class<?> downstreamClass
Method Detail

emit

public void emit(Iterator<BuildComposablePipeline.PlainMethod> methodsToWrap)
          throws IOException
Throws:
IOException

getDownstreamObjectName

protected String getDownstreamObjectName()
Get the name of the object through which API calls should be routed.


getPrologObjectNameOpt

protected String getPrologObjectNameOpt()
Get the name of the object which shall be called as a prolog.


emitMethodDocComment

protected void emitMethodDocComment(PrintWriter output,
                                    Method m)

emitSignature

protected void emitSignature(PrintWriter output,
                             Method m)

emitBody

protected void emitBody(PrintWriter output,
                        Method m,
                        boolean runHooks)

getArgListAsString

protected String getArgListAsString(Method m,
                                    boolean includeArgTypes,
                                    boolean includeArgNames)

getBaseInterfaceName

protected String getBaseInterfaceName()
The name of the class around which this pipeline is being composed. E.g., if this pipeline was constructed with "java.util.Set" as the baseInterfaceClassName, then this method will return "Set".


getOutputName

protected abstract String getOutputName()
Get the output name for this pipeline class.


preMethodEmissionHook

protected void preMethodEmissionHook(PrintWriter output)
Called after the class headers have been generated, but before any method wrappers have been generated.


constructorHook

protected abstract void constructorHook(PrintWriter output)
Emits the constructor for the pipeline; called after the preMethodEmissionHook.


postMethodEmissionHook

protected void postMethodEmissionHook(PrintWriter output)
Called after the method wrappers have been generated, but before the closing parenthesis of the class is emitted.


preDownstreamCallHook

protected abstract void preDownstreamCallHook(PrintWriter output,
                                              Method m)
Called before the pipeline routes the call to the downstream object.


hasPreDownstreamCallHook

protected abstract boolean hasPreDownstreamCallHook(Method m)

postDownstreamCallHook

protected abstract void postDownstreamCallHook(PrintWriter output,
                                               Method m)
Called after the pipeline has routed the call to the downstream object, but before the calling function exits or returns a value.


hasPostDownstreamCallHook

protected abstract boolean hasPostDownstreamCallHook(Method m)

getMode

protected abstract int getMode()

emptyMethodAllowed

protected abstract boolean emptyMethodAllowed()

emptyDownstreamAllowed

protected abstract boolean emptyDownstreamAllowed()

emitClassDocComment

protected abstract void emitClassDocComment(PrintWriter output)
Emit a Javadoc comment for this pipeline class.


emitGLIsMethod

protected void emitGLIsMethod(PrintWriter output,
                              String type)
Emits one of the isGL* methods.


emitGLIsMethods

protected void emitGLIsMethods(PrintWriter output)
Emits all of the isGL* methods.


emitGLGetMethod

protected void emitGLGetMethod(PrintWriter output,
                               String type)
Emits one of the getGL* methods.


emitGLGetMethods

protected void emitGLGetMethods(PrintWriter output)
Emits all of the getGL* methods.



Copyright 2010 JogAmp Community.