There are at least 3 ways to implement the relation you want:
1) use the CB relations ((unique) value tree or AVL tree). This gives you all the benefits that CB has to offer.
2) use the STL library. You can download the STD.CBD library from the website where the STL templates have been defined as External Classes.
3) write your own if you think that none of the above is appropriate
Hope this helps.
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-11-18
[Note that I did not create this thread.]
Will all those ways work for creating a class diagram that shows the relation?
More specifically, if I use STL.cbd to create a member with type "std::map<keyType,keyValue>" where the key and/or value is a class, then will the class diagram show the relation automaticaly (assuming the relevant classes are selected for the diagram)?
I will try doing that; I did not understand ClassBuilder well enough when I first tried doing something like that. If someone can verify that it is possible, then I will figure it out.
I personally don't use graphics such as class diagrams as much as most people, but I am working on some objects (of my own design) that are related in ways I am having difficulty keeping in my head, so I am hoping ClassBuilder will help. Initially, it appeared to me that I had to have duplicate relations, one for ClassBuilder (that does not get represented in code) and another that does represent code and that is generated when code is generated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The only things that CB can show in the class diagrams are:
- classes including member functions and variables
- notes
- inheritance relations
- ClassBuilder-defined relations
- dependencies
- diagram-only relations
The last option may be your way out. The diagram-only relation draws like any other relation, but no code is being generated. It is just a reminder that a relation exists that CB knows nothing about.
I hope this helps.
Regards,
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just started to use ClassBuilder and it seems very powerfull.
I would like to do a relation with a key. And this relation shoud be implemented by a std::map<keyType,keyValue>. How can i do this ?
I think that i must write it in the source and make a "diagram only relation".
Any one has allready done this ?
There are at least 3 ways to implement the relation you want:
1) use the CB relations ((unique) value tree or AVL tree). This gives you all the benefits that CB has to offer.
2) use the STL library. You can download the STD.CBD library from the website where the STL templates have been defined as External Classes.
3) write your own if you think that none of the above is appropriate
Hope this helps.
John
[Note that I did not create this thread.]
Will all those ways work for creating a class diagram that shows the relation?
More specifically, if I use STL.cbd to create a member with type "std::map<keyType,keyValue>" where the key and/or value is a class, then will the class diagram show the relation automaticaly (assuming the relevant classes are selected for the diagram)?
I will try doing that; I did not understand ClassBuilder well enough when I first tried doing something like that. If someone can verify that it is possible, then I will figure it out.
I personally don't use graphics such as class diagrams as much as most people, but I am working on some objects (of my own design) that are related in ways I am having difficulty keeping in my head, so I am hoping ClassBuilder will help. Initially, it appeared to me that I had to have duplicate relations, one for ClassBuilder (that does not get represented in code) and another that does represent code and that is generated when code is generated.
The only things that CB can show in the class diagrams are:
- classes including member functions and variables
- notes
- inheritance relations
- ClassBuilder-defined relations
- dependencies
- diagram-only relations
The last option may be your way out. The diagram-only relation draws like any other relation, but no code is being generated. It is just a reminder that a relation exists that CB knows nothing about.
I hope this helps.
Regards,
John