Class GolangGenerator

java.lang.Object
uk.co.real_logic.sbe.generation.golang.GolangGenerator
All Implemented Interfaces:
CodeGenerator

public class GolangGenerator extends Object implements CodeGenerator
Codec generator for the Go Lang programming language.
  • Constructor Details

    • GolangGenerator

      public GolangGenerator(Ir ir, OutputManager outputManager)
      Create a new Go language CodeGenerator.
      Parameters:
      ir - for the messages and types.
      outputManager - for generating the codecs to.
  • Method Details

    • generateFileFromTemplate

      public void generateFileFromTemplate(String fileName, String templateName) throws IOException
      Generate a file for the Ir based on a template.
      Parameters:
      fileName - to generate.
      templateName - for the file.
      Throws:
      IOException - if an error is encountered when writing the output.
    • generateTypeStubs

      public void generateTypeStubs() throws IOException
      Generate the stubs for the types used as message fields.
      Throws:
      IOException - if an error is encountered when writing the output.
    • generateMessageHeaderStub

      public void generateMessageHeaderStub() throws IOException
      Generate the composites for dealing with the message header.
      Throws:
      IOException - if an error is encountered when writing the output.
    • generate

      public void generate() throws IOException
      Generate the complete set of types and messages for a schema.
      Specified by:
      generate in interface CodeGenerator
      Throws:
      IOException - if an error is encountered when writing the output.