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: Using OMContainer & OMIterator?
Topic Summary:
Created On: 12-Sep-2007 11:15
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.
 12-Sep-2007 11:15
User is offline View Users Profile Print this message


Matti Antila

Posts: 5
Joined: 4-Jun-2007

Hi,

I attached a simple model to this post which concerns about using OMContainer and OMIterator. In the model there is one Father-class and two child classes (Child1 and Child2) which are related to their father by (one to many) aggregation. Father-class has a structured diagram where I have created two instances of Child1-class. After the program starts the father should iterate the container and call print()-method for every member in the container like this:
[CODE]
OMIterator<Child1*> iChild1(getItsChild1());
iChild1.reset(); // point to first
while ( *iChild1 != NULL ) {
(*iChild1)->print(); // print
++iChild1; // point to next
}
OMIterator<Child2*> iChild2(getItsChild2());
iChild2.reset(); // point to first
while ( *iChild2 != NULL ) {
(*iChild2)->print(); // print
++iChild2; // point to next
}[/CODE]

Problem is that the container seems to be empty and I can't find a solution how to add parts dynamically to the OMContainer. I would higly appreciate any advice to this problem!

Have I understood right that all the created classes that have a relation to (in this case) the father-class should be added to the OMContainer automatically?


Thanks in advance!
Matti
Report this to a Moderator Report this to a Moderator
 14-Sep-2007 07:10
User is offline View Users Profile Print this message


Matti Antila

Posts: 5
Joined: 4-Jun-2007

Problem solved...
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.