GitHub    Download    Forum
Overview
Tutorial
C++ API
C# API
DTDL
DADL
Comments, Preprocessor
Definitions
BitFlagSets
Linking objects
Setup

Comments, Preprocessor

Comments

You can write comments in the files in the C++ format.
// Comment Type 1

/* Command Type 2 */

Preprocessor

The language uses two types of preprocessor command: #import and #include. They both load an external file. The #include command copies the contents of a specified file at the point where the directive appears. The #import command is used to import BDTD data (compiled DTDL definitions).
The difference between the <path> and "path" format is how the file is searched. While "path" takes the current file as the starting point, <path> takes the input directories passed to the compiler as the starting point for the search.
#include <file.dtdl>
#include "..\directory\file.dtdl"
To use types defined in DTDL, the compiled BDTD needs to be imported.
Definitions can be imported into a namespace. This can be used to group definitions. It also allows collisions (when imported definitions have the same name) to be solved.
#import <types.bdtd>
#import "..\directory\othertypes.dtdl" namespace productA
© 2022 Mobiland AG