[EMAIL PROTECTED] wrote:
> Now I am trying to migrate some C++ classes to ANSI C++ classes. Even the ANSI C++
>offers a good
> solution for the rounding trip I see the following drawbacks:
>
> 1. A component has to be defined for every class.
A component can have many classes assigned to it and many source files
associated with it. Having one component per class is strongly
discouraged.
> 2. Some setting have to be done from the file, for example to set a method as
>virtual or constant, etc.
Many things that were properties in classic C++ are now stereotypes in
ANSI C++. To make an operation virtual, set its stereotype to
<<virtual>>. To make it const, set its stereotype to <<const>>.
The stereotypes that ANSI C++ recognizes and treats specially are: (This
is from memory, so I may be missing one or two)
Classes: struct, union, enum, typedef
Attributes: mutable
Operations: virtual, abstract, const, static, friend, explicit
> 3. When you delete an attribute the get and set are not deleted, automatically.
True. Classic C++ used properties to cause the generation of certain
member functions in the code. ANSI C++ does not have such properties.
Instead, those member functions are explicitly modeled as operations in
the model. One side effect of that is that the link between an
attribute and its get and set operations is lost. Ways of maintaining
that link are being considered, but no solution is currently available.
> 4. I don't see the way to configure the class diagram to don't see obvious
>information, such as:
> get and set of the attributes, default constructors, etc. The design if for showing
>relevant information
> of the class!!!. If the default behavior show all this information then you will get
>a design with a lot of irrelevant
> information. (it will be not readable!)
You can choose exactly which attributes and operations you want to be
listed on a class diagram. Right click on the class on the diagram, and
under the Options submenu, make sure "Show All Attributes" and "Show All
Operations" are unselected, then select "Select Compartment Items...".
Unfortunately, this can only be done from the GUI one class at a time.
There is no way to tell Rose that a certain operation should not be
shown by default in any class diagram.
> 5. The namespace declaration is missing.
Your problem description isn't very clear. I assume you mean that
namespaces are not showing up when you generate code.
If you want a package in the model to correspond to a C++ namespace in
the code, then the IsNamespace property on the ANSI C++ tab of the
package specification must be set to True. If it is False (which is the
default), then the package is used only for organizational purposes in
the model and does not affect the generated code.
When reverse engineering, namespaces in the code are always translated
into packages in the model with the IsNamespace property set to True.
> Please can some one tell me how could be fixed some of the problems I have mentioned,
--
David Olsen
Rational Software Corp.
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************