(c) Copyright 2000, Author: Kurt De Marco

COOL Code Generator Script

Download it HERE

This readme assumes that you are familiar with Rational Rose(tm) and how to run a Rose Script. If not please refer to the Rational Rose documentation. The script was written and tested with Rational Rose 98i. The script generates COOL class definitions for all classes in a selected package. In this version it copies the generated code to the clipboard from where you can paste it in your source. It is helpful to have every package in its own source file and to separate the generated class definitions from the implementation code like handlers, rules, etc. To use the script you have to do the following steps:

  1. Create a new Rose model (You also can extend an existing one).
  2. Create a new package where you will define your COOL class hierarchy.
  3. Model your classes Refer to the test model on how to define attributes/slots, associations and Operations/message-handlers.
  4. Load the script
  5. Select the package containing your COOL classes
  6. Run the script
  7. Paste the generated code to your source file.

Supported features/generated code:

Classes:

Please note that the precedence of the class definitions in the generated code corresponds to the precedence you defined them in the model. If you define a base class at later stage you have to rearrange the classes in your package, which is a little tricky.

Attributes/Slots:

Supported properties are:

Associations:

Operations/Messagehandlers: