Module declaration

## Contents

- Your rights

- Introduction

- Component model

- Component description file

  - Preprocessing

  - Elements of a description file

  - Data type and constant definitions

  - Module declaration

  - Component declaration

  - Interface declaration

  - IDS declaration

  - Port declaration

  - Task declaration

  - Service declaration

  - Codel declaration

  - Identifiers and reserved keywords

  - Pragmas

  - Grammar reference

- GenoM IDL mappings

- Running GenoM

- Tutorials

- Templates

## Module declaration

A module definition satisfies the following syntax:

(50) `module ::=` | `"module"` `module-name` `"{"` `module-body` `"}"` `";"`
(51) `module-name ::=` | `identifier`
(52) `module-body ::=` | `[` `idl-statements` `]`
(3) `idl-statements ::=` | `{` `idl-statement` `}` `idl-statement`

The only effect of a module is to scope IDL identifiers. It is similar to a C++ or Java namespace; it is considered good practice to enclose your type definitions inside a module definition to prevent name clashes between components.