Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 854 Bytes

cxx-generated-code-guide.rst

File metadata and controls

27 lines (20 loc) · 854 Bytes

C++ Generated Code Guide

Usage

usage: generate_cxx_backend.py [-h] [--input INPUT] [--output OUTPUT] [--namespace NAMESPACE] [--include-header INCLUDE_HEADER] [--using-namespace USING_NAMESPACE]

options:
  -h, --help            show this help message and exit
  --input INPUT         Input PDL-JSON source
  --output OUTPUT       Output C++ file
  --namespace NAMESPACE
                        Generated module namespace
  --include-header INCLUDE_HEADER
                        Added include directives
  --using-namespace USING_NAMESPACE
                        Added using namespace statements

Example invocation:

cargo run my-protocol.pdl --output-format json | \
    ./scripts/generate_cxx_backend.py > my-protocol.h