com.jogamp.gluegen

## Interface GlueEmitter

- All Known Implementing Classes:
    CStructAnnotationProcessor.AnnotationProcessorJavaStructEmitter, DebugEmitter, JavaEmitter, ProcAddressEmitter

      public interface GlueEmitter

  Specifies the interface by which GlueGen requests glue code to be generated. Can be replaced to generate glue code for other languages and foreign function interfaces.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginDefines()`
    `void` | `beginEmission(GlueEmitterControls controls)` Begin the emission of glue code.
    `void` | `beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)`
    `void` | `beginStructLayout()` Begins the process of computing field offsets and type sizes for the structs to be emitted.
    `void` | `beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)`
    `void` | `emitDefine(ConstantDefinition def, String optionalComment)`
    `Iterator<FunctionSymbol>` | `emitFunctions(List<FunctionSymbol> cFunctions)` Emit glue code for the list of FunctionSymbols.
    `void` | `emitStruct(CompoundType t, String alternateName)` Emit glue code for the given CompoundType.
    `void` | `endDefines()`
    `void` | `endEmission()` Finish the emission of glue code.
    `void` | `endFunctions()`
    `void` | `endStructLayout()` Finishes the struct layout process.
    `void` | `endStructs()`
    `void` | `layoutStruct(CompoundType t)` Lays out one struct which will be emitted later.
    `void` | `readConfigurationFile(String filename)`

- - ### Method Detail

    - #### readConfigurationFile

          void readConfigurationFile(String filename)
                                     throws Exception

      Throws:
        `Exception`

    - #### beginEmission

          void beginEmission(GlueEmitterControls controls)
                             throws Exception

      Begin the emission of glue code. This might include opening files, emitting class headers, etc.
      Throws:
        `Exception`

    - #### endEmission

          void endEmission()
                           throws Exception

      Finish the emission of glue code. This might include closing files, closing open class definitions, etc.
      Throws:
        `Exception`

    - #### beginDefines

          void beginDefines()
                            throws Exception

      Throws:
        `Exception`

    - #### emitDefine

          void emitDefine(ConstantDefinition def,
                        String optionalComment)
                          throws Exception

      Parameters:
        `optionalComment` - If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.
      Throws:
        `Exception`

    - #### endDefines

          void endDefines()
                          throws Exception

      Throws:
        `Exception`

    - #### beginFunctions

          void beginFunctions(TypeDictionary typedefDictionary,
                            TypeDictionary structDictionary,
                            Map<Type,Type> canonMap)
                              throws Exception

      Throws:
        `Exception`

    - #### emitFunctions

          Iterator<FunctionSymbol> emitFunctions(List<FunctionSymbol> cFunctions)
                                                 throws Exception

      Emit glue code for the list of FunctionSymbols.
      Throws:
        `Exception`

    - #### endFunctions

          void endFunctions()
                            throws Exception

      Throws:
        `Exception`

    - #### beginStructLayout

          void beginStructLayout()
                                 throws Exception

      Begins the process of computing field offsets and type sizes for the structs to be emitted.
      Throws:
        `Exception`

    - #### layoutStruct

          void layoutStruct(CompoundType t)
                            throws Exception

      Lays out one struct which will be emitted later.
      Throws:
        `Exception`

    - #### endStructLayout

          void endStructLayout()
                               throws Exception

      Finishes the struct layout process.
      Throws:
        `Exception`

    - #### beginStructs

          void beginStructs(TypeDictionary typedefDictionary,
                          TypeDictionary structDictionary,
                          Map<Type,Type> canonMap)
                            throws Exception

      Throws:
        `Exception`

    - #### emitStruct

          void emitStruct(CompoundType t,
                        String alternateName)
                          throws Exception

      Emit glue code for the given CompoundType. alternateName is provided when the CompoundType (e.g. "struct foo_t") has not been typedefed to anything but the type of "pointer to struct foo_t" has (e.g. "typedef struct foo_t {} *Foo"); in this case alternateName would be set to Foo.
      Throws:
        `Exception`

    - #### endStructs

          void endStructs()
                          throws Exception

      Throws:
        `Exception`