ddl_utility  1.3.0
DDL2Header

ddl2header is a command line tool to generate header files from a data description. It can be used in two different ways depending from the use case and environment.

Call from a shell

type ddl2header with on of the options -h, –help or -? to revieve this help

Usage:
SYNOPSIS
ddl2header (<description file>|-h) [-hf <header>] [-sn <structName>] [-ns <namespaces>] [-et
<excludeTypes>] [-fd (stdtypes|ddltypes)] [-se] [-po] [-sc] [-abt] [-ngn]
OPTIONS
<description file>
The description file that the header should be generated for.
-h, --help show the usage if this tool and exit
-hf, --header
generated header file. If empty, description file is used as base name.
-sn, --structname
only for the given struct name the header is generated for
-ns, --namespaces
namespaces sperated by '::'
-et, --exclude-types
exclude the given struct type names and enum type names from generation (use
comma-separated list if more than one)
-fd, --force-datatypes
forces the usage of 'stdtypes' (bool, uint8_t, int8_t ...) or 'ddltypes' (tBool,
tUInt8, tInt8 ...) within the header file
-se, --scoped-enum
generate scoped enum classes for all enum definitions
-po, --padded-only
generate only the manually padded structure definitions
-sc, --struct-comment
add description for doxygen from struct- and structelement-comment
-abt, --auto-base-types
add base type definitions for types of tUInt8, tInt8, ..., tFloat32, tFloat64,
if found
-ngn, --no-global-namespace
switches off the usage of fully qualified typenames from global namespace '::'

When using the short form (e.g. -hf) it might be necessary to use ' or ", like '-hf file.h'.
If no header file is specified, the name of the description file with the extension .h is used.

Call from a cmake script

The other possibility is to use ddl2header in a cmake script during the build process.
For this purpose, the package ddl_utility provides the target ddl_utility::ddl2header.

add_custom_command(TARGET NAME_OF_TARGET PRE_BUILD
COMMAND ddl_utility::ddl2header
path_and_name_of_description_file
--header full_path_of_header_file)

An example is available in package ddl_utility at: test/function/ddl2header/src/CMakeLists.txt


Copyright © VW Group. All rights reserved.
Generated on Fri Sep 29 2023 by doxygen 1.9.1
GIT Commit Hash: 03823e61940ce67e7b08a8f4da7a7b12fa40bfd9