[Uml-user] UML question
Luis De la Parra Blum
lparrab at gmx.net
Wed Dec 18 17:21:08 UTC 2002
Hi Mark,
On Wednesday 18 December 2002 15:03, mark verlinden wrote:
> When I use aggregations or compositions and I generate code from it I get
> classes containing objects, where I wanted pointers?
>
> class CClassA{
> private:
> CClassB classB; -> I need CClassB* classB;
> public:
> };
>
> Is this possible in umbrello?
Aggregations get written (in C++) as pointers, while Compositions are Objects.
(this is to reflect the fact that the composition relationship is really
strong, and the "parts" cannot live wihtout the "whole")
Maybe it would be a good idea to add this as an option (as other people have
said) but since this is only for C++ we would have to think of a clean way to
do this (global options Vs. language specifics)
but for now I think the current behavior is ok. (pointers for aggregations and
objects for compositions)
> How about constraints?
there's no support for constraints.
if you know about java and C++ (and how to mix them) you could help us there
(there is a project for OCL, but it's written in Java). Otherwise we will
have to implement it all ourselves, but I don't know when we'll get to it.
regards
luis
More information about the umbrello
mailing list