RHAPSODY4YOU

--Independent Rational Rhapsody Forum--
It is currently Thu Sep 09, 2010 11:25 am

All times are UTC



Welcome
Welcome to RHAPSODY4YOU

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today.




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: smart pointers in UML
PostPosted: Sat Sep 12, 2009 6:19 pm 
Offline

Joined: Sat Sep 12, 2009 6:11 pm
Posts: 1
Is there a good way to include C++ smart pointers in UML class diagrams? For example, if class A has a member that is a smart pointer that points to class B, I would like the diagram to show B as a member of A, not simply show the smart pointer as a member of A. Alternatively, I would like to show that A has a smart pointer as a member and that the smart pointer is instantiated by B. More generally, when a template is instantiated, how can I show the dependence on the template and on the class (or classes) used to instantiate the template?

Thanks,

Stephan


Top
 Profile  
 
 
 Post subject: Re: smart pointers in UML
PostPosted: Tue Sep 29, 2009 7:50 am 
Offline

Joined: Tue Jul 14, 2009 9:21 am
Posts: 22
Location: Germany
Hi Stephan,

regarding your smart-pointer issue: It seems as you were trying to show implementation details in your UML. The penetration of implementation and design is the biggest problem when using Rhapsody because Rhapsody enforces it. Rhapsody only knows one variant to implement a composition, association, ... which usually doesn't fit my idea of implementation. So you start fiddling with your UML and properties until you achieve the desired implementation. With Rhapsody your whole spectrum of expressiveness in the implementation language is cut down to a pathetic subset.

I also were in the situation where I wanted to use a smart pointer. I ended up with simply adding an attribute to class A with "non-existing type" smart_pointer<B>. Then of course you don't see the dependency from A to B in you UML as you already mentioned.

I know that this won't be of much help.

Kind regards,
Christian


Top
 Profile  
 
 Post subject: Re: smart pointers in UML
PostPosted: Thu Oct 01, 2009 8:49 pm 
Offline
User avatar

Joined: Thu Sep 13, 2007 7:34 pm
Posts: 275
Location: London
Smart pointers often lead to not so smart architectures. If you find that Rhapsody's 'pathetic subset' is insufficient then perhaps you are making things more complicated than they need to be.

You can achieve portable component-based design very easily in Rhapsody without resorting to clever coding tricks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: