Component diagrams Files Files owned by a component are compiled together to build the component. You can specify which model elements are generated in each file, the file names, and the directory paths. You can also create a file in the browser and drag-and-drop it into a component diagram. A file must be nested within a component or a folder. Note However, a file cannot contain another element. Creating a file To create a file: 1. Right-click a Component in the browser and select Add New > File . The File window opens. 2. Begin to define this new file by typing the Name you want to replace the system generated name. Click Apply to save the name and keep the window open.
The new file name displays in the diagram and in the browser, under the component with which it is associated. Note: A file must be an element of a component or a folder. If the component diagram is under the project node, it is not yet associated with a component. First create a component, then nest the file by drawing it inside the component. If the diagram is already nested under an existing component, you can draw the file in the “free space” of the diagram editor. 3. Change the remaining fields to define the file as you want. Љ Path specifies where a file should be generated in relation to the configuration directory.
If this field is blank, the file is generated in the configuration directory. Љ File Type specifies the type of file that should be generated. A specification file contains the specifications of all elements; an implementation file contains their implementations. They are specified by their suffixes, as follows: Choose one of the following values: Logical creates both implementation and specification files. 852 User Guide File Type C++ C Java Implementation .cpp .c .java Specification .h .h N/A