Class CppGenerator

java.lang.Object
uk.co.real_logic.sbe.generation.cpp.CppGenerator
All Implemented Interfaces:
CodeGenerator

public class CppGenerator extends Object implements CodeGenerator
Codec generator for the C++11 programming language with conditional compilation for additional C++14 and C++17 features.
  • Constructor Details

    • CppGenerator

      public CppGenerator(Ir ir, boolean shouldDecodeUnknownEnumValues, OutputManager outputManager)
      Create a new Cpp language CodeGenerator.
      Parameters:
      ir - for the messages and types.
      shouldDecodeUnknownEnumValues - generate support for unknown enum values when decoding.
      outputManager - for generating the codecs to.
    • CppGenerator

      public CppGenerator(Ir ir, boolean shouldDecodeUnknownEnumValues, PrecedenceChecks precedenceChecks, OutputManager outputManager)
      Create a new Go language CodeGenerator.
      Parameters:
      ir - for the messages and types.
      shouldDecodeUnknownEnumValues - generate support for unknown enum values when decoding.
      precedenceChecks - whether and how to generate field precedence checks.
      outputManager - for generating the codecs to.
  • Method Details

    • 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.