You are here: Part 2: Core Concepts > Data Types and DDS Data Samples > Creating User Data Types with IDL > Namespaces in IDL

Namespaces In IDL Files

In IDL, the module keyword is used to create namespaces for the declaration of types defined within the file.

Here is an example IDL definition:

module PackageName {
    struct Foo {
        long field;
    };
};

When RTI Code Generator generates code for the above definition, it will resolve the Bar type to be within the scope of the PackageName module and automatically generate fully qualified type names.

© 2016 RTI