|
It is currently Thu Feb 09, 2012 12:00 am
|
View unanswered posts | View active topics
| 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. |
 |
|
 |
|
| Author |
Message |
|
bitblit
|
Post subject: Associations and qualifiers Posted: 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.
|
|
|
|
 |
|
Skywalker
|
Post subject: Posted: 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 ...
|
|
|
|
 |
|
bitblit
|
Post subject: Posted: Sun Jun 28, 2009 6:24 pm |
Joined: Wed Dec 10, 2008 10:51 pm Posts: 138
|
|
|
|
 |
|
bitblit
|
Post subject: Posted: 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.
|
|
|
|
 |
|
bitblit
|
Post subject: Posted: 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.
|
|
|
|
 |
|
|
 |
|
 |
|
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
|
|