RemoteSerializationCodeGenerator

object RemoteSerializationCodeGenerator


Generates RemoteCompose wire-protocol serialization bindings for target languages.

Summary

Constants

const Int

Generates C++17 bindings (WireBuffer.h, WireBuffer.cpp, RemoteComposeOps.h, and RemoteComposeOps.cpp).

const Int

Generates Python 3 bindings (remote_compose.py).

const Int

Generates Rust bindings (remote_compose_operations.rs and op_codes.rs).

const Int

Generates Swift bindings (RemoteComposeOperations.swift).

const Int

Generates TypeScript bindings (remoteComposeOperations.ts).

Public functions

Unit
generate(language: Int, outputDirectory: Path)

Generates RemoteCompose operation bindings for language into outputDirectory.

Constants

LANGUAGE_CPP

Added in 1.0.0-alpha25
const val LANGUAGE_CPP = 1: Int

Generates C++17 bindings (WireBuffer.h, WireBuffer.cpp, RemoteComposeOps.h, and RemoteComposeOps.cpp).

LANGUAGE_PYTHON

Added in 1.0.0-alpha25
const val LANGUAGE_PYTHON = 3: Int

Generates Python 3 bindings (remote_compose.py).

LANGUAGE_RUST

Added in 1.0.0-alpha25
const val LANGUAGE_RUST = 2: Int

Generates Rust bindings (remote_compose_operations.rs and op_codes.rs).

LANGUAGE_SWIFT

Added in 1.0.0-alpha25
const val LANGUAGE_SWIFT = 4: Int

Generates Swift bindings (RemoteComposeOperations.swift).

LANGUAGE_TYPESCRIPT

Added in 1.0.0-alpha25
const val LANGUAGE_TYPESCRIPT = 5: Int

Generates TypeScript bindings (remoteComposeOperations.ts).

Public functions

generate

Added in 1.0.0-alpha25
fun generate(language: Int, outputDirectory: Path): Unit

Generates RemoteCompose operation bindings for language into outputDirectory.

Creates outputDirectory if it does not exist and overwrites target files in place.

Parameters
language: Int

target language constant (LANGUAGE_CPP, LANGUAGE_RUST, LANGUAGE_PYTHON, LANGUAGE_SWIFT, or LANGUAGE_TYPESCRIPT)

Value is one of the following:

  • 1
  • 2
  • 3
  • 4
  • 5

outputDirectory: Path

directory where generated source files are written

Throws
IllegalArgumentException

if language is not a supported LANGUAGE_* constant

IOException

if writing to outputDirectory fails