Hi,

older versions of Rose give this Warning, too. For me it is what I want
because the generated code wouldn't compile.
IMHO the aggregating class is always responsible for creation
and destruction of its aggregates. What you described is a by-reference
aggregation to me for which Rose generates C++ pointers.

Regards

Michael Seibt


Mathieu Girard wrote:
> 
> Hi all,
> 
> We are currently evaluating Rose C++ 2001, trying to recover the model from
> Rose C++ 98. Everything seems to work fine, except for the C++ code
> generation of by-value aggregations. When generating the code, we get this
> brand new message:
> 
> <<
> Warning: !!! Class "A" has a forward reference to "B"
> and it also has a by-value containment of "B."
> >>
> 
> I think there is a misunderstanding from Rational, which has qualified
> "composition" (which means life-cycle control to me) as "by-value"
> containment, since the begining of Rose. If a class A composes a class B for
> UML, it is perfectly logical (to me) to compose it with a C++ pointer,
> provided A is in charge of creation/destruction of B. I think Rational got
> mixed-up between logical and physical modelling of composition.
> 
> To me, it seems perfectly normal to have a forward declaration of class B in
> the header A.h , defining a C++ pointer to B in the definition of class A,
> include the header file B.h in the source file A.cpp, and manage the
> allocation/deletion of the instance of B in the source file A.cpp.
> Obviously, Rose 2001 objects to this, and a new warning has been added.
> 
> Does anyone of you know how to disable this warning? I have parsed the
> option tabs of Rose, and could not find anything to get rid of it...
> 
> Regards,
> 
> Mathieu
************************************************************************
* 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
*
*************************************************************************

Reply via email to