Configurations
A configuration specifies how the component is to be produced.
For example, the configuration determines whether to compile a debug or non-debug version of the subsystem, whether it is to be in the environment of the host or the target (for example, Windows versus VxWorks), and so on. Configurations manifest themselves as files. The ability to map logical elements to files enables you to better specify implementations for code generation, and to capture existing implementations during reverse engineering. Just as it might be desirable to map several classes into a single package, so might it be desirable to map one or more packages into a single subsystem. You control where to generate the source files for the classes (or packages) in a given subsystem, either into a single directory or separate directories.
- Which logical elements, or classes, to map into which files
- The order of the classes in the file
- Verbatim code chunks, such as macros and
#define
statements, to be included in generated source files - Whether to map each class to its own specification and implementation files, or to map multiple classes to the same files
- Whether specification and implementation files generated for a class, or set of classes, have the same name or different names
- Dependencies between classes
- File scope definitions for user-defined code
If a component is a physical subsystem, as in a communications subsystem, a configuration (module) specifies how the component is to be produced. For example, the configuration determines whether to compile a debug or non-debug version of the subsystem, whether to put it in the environment of the host or the target (for example, Windows versus VxWorks), and so on.
A component can consist of several configurations. For example, if you want to build a VxWorks version and a Windows version of the same component, you would create two configurations under the component, one for each operating system. The decision whether to have two separate components or two configurations within the same component depends on whether you want to compile them differently, or whether there is some logical variation between them. Creating two separate components would require maintaining two separate implementation views, whereas using separate configurations would not.