Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Composition & Multiplicity
Topic Summary: And C++ Code Generation
Created On: 1-Feb-2008 19:19
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 1-Feb-2008 19:19
User is offline View Users Profile Print this message


Garrett Wampole

Posts: 7
Joined: 30-Jan-2008

If I create a composition relationship with "*" multiplicity; I get C++ APIs in the generated code like "XXX* newXXX()" and "void deleteXXX()".

If I create a composition relationship with "0,1" multiplicity; shouldn't I get APIs like that as well? Instead, the generated code contains only "XXX* getXXX()"; how is that any different from "1" multiplicity?

Thanks,
-Garrett
Report this to a Moderator Report this to a Moderator
 1-Feb-2008 21:17
User is offline View Users Profile Print this message


mike t

Posts: 14
Joined: 7-Dec-2007

If i understand this right than you don't need to allocate any memory if you have only 0,1 multiplicity. The memory is already allocated for that matter. And you only need a getter and setter methods to alter this value.

But if you have * multiplicity than the program does not know the amount of objects you would like to create in the future so it will provide you a method to allocate memory dynamically during runtime.

hope this could help
regards mike
Report this to a Moderator Report this to a Moderator
 1-Feb-2008 21:32
User is offline View Users Profile Print this message


Garrett Wampole

Posts: 7
Joined: 30-Jan-2008

Hi Mike,

What I'd like to be able to do is fulfill the "0" side of the "0,1" multiplicity by deleting the composed object from the parent.

I can't do this with only a getter API.

-Garrett
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.