It is currently Thu Feb 09, 2012 12:00 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.





 Page 1 of 1 [ 5 posts ] 
Author Message
 Post subject: Associations and qualifiers
PostPosted: Sat Jun 27, 2009 1:38 am 

Joined: Wed Dec 10, 2008 10:51 pm
Posts: 138
Does anybody have any examples of using qualifiers with associations? The Rhapsody documentation that I can find at least mentions the word qualifiers, and even briefly states what it could be used for. I can't find any detailed instructions of how to use it, or examples.

I'm trying to:

1. Create an object
2. Add the object to an association with a key
3. Do stuff
...
...
...
Eventually. Remove the object from the assocation with a key and delete the object.

It looks like qualifiers might assist in this, but I can't find any documentation on it.


Offline
 Profile  
 
 Post subject:
PostPosted: Sun Jun 28, 2009 5:40 pm 

Joined: Wed Oct 31, 2007 3:09 pm
Posts: 58
Location: Milkyway, classic 9-planet solar system
Which implementation language do you plan to use? C/C++/Java/Ada?
An example requires using a concrete implementation language...



_________________
May the force be with you ...
Offline
 Profile  
 
 Post subject:
PostPosted: Sun Jun 28, 2009 6:24 pm 

Joined: Wed Dec 10, 2008 10:51 pm
Posts: 138
C++


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Jun 29, 2009 9:20 pm 

Joined: Wed Dec 10, 2008 10:51 pm
Posts: 138
I know (or think) that I add associations with:

unsigned int key = VALUE;
ClassA *objectA = (ClassA*)(new Class());
addItsOrderedAssociation(key, objectA);


I thought I could access the element by key with:

itsOrderedAssociation[key]->functionCall();

but that doesn't seem to work. I'm resorting to stepping through source code to reverse engineer how to access the element by key.


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Jun 29, 2009 11:32 pm 

Joined: Wed Dec 10, 2008 10:51 pm
Posts: 138
I found my problem. I read up on OMMap and learned that its implemented as a balanced binary tree. I didn't know that the first (root) node is permanent and cannot be returned. So, I added a dummy node to serve as the root node, and everything works fine.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 5 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:

cron

suspicion-preferred