Menu
Logged-In As
ACCOUNTNot Logged In
Class diagram for Coreinterface #2BRL-CAD
Status: ClosedTime to complete:
96 hrs
Mentors: Popescu Andrei, Daniel_R
Coreinterface is BRL-CAD's object-oriented interface, that is offering application developers means to interact with BRL-CAD libraries, which are procedurally written(in C) in an OOP fashion.
You will need to draw an UML diagram of the primitive classes hierarchy in Coreinterface. When done, we will place it here http://brlcad.org/wiki/BRL-CAD%27s_core_C%2B%2B_interface
This is the Coreinterface repo : https://svn.code.sf.net/p/brlcad/code/rt^3/trunk/
In case you use tortoise SVN, you might need the link below: https://svn.code.sf.net/p/brlcad/code/rt%5E3/trunk/
References:- http://en.wikipedia.org/wiki/Class_diagram
- https://svn.code.sf.net/p/brlcad/code/rt%5E3/trunk/
- https://www.draw.io/
Uploaded Work
File name/URL | File size | Date submitted | |
---|---|---|---|
classdiagram.png | 129.2 KB | January 03 2015 12:12 UTC | |
diagramfixed.png | 14.0 KB | January 03 2015 18:40 UTC | |
corediagram.png | 38.8 KB | January 04 2015 00:04 UTC | |
XMLFormat.xml | 8.4 KB | January 04 2015 13:10 UTC |
I would like to work on this task.
This task has been assigned to Marc Tannous. You have 96 hours to complete this task, good luck!
The other class diagram task was a bit more specific, asking for "database classes", here you're asking for "primitive classes". Does that mean classes defined on Cubes/Cones/Cylinders/Spheres/Tori/Tubes or basic classes?
My second question is : Should I look for them in /include/ or in /src/? I am grepping for keywords but if I grep the whole folder from root it returns thousands of calls.
Regards,
Marc
In this task's description there is a link to a brlcad.org wiki page. There you will find a draft description of the class hiratchy. The header files of the C++ classes can be found in rt^3/include/brlcad.
The deadline of the task has been extended with 2 days and 0 hours.
Initially, I started by writing down every method of each primitive, and the diagram got huge quickly, and this took lots of hours of work.
I asked d_rossberg over IRC whether what I am doing is alright and he said that I should not show methods of each primitives, just the "IS-A" relationship, not the "HAS-A" relationships, therefore getting this easy-to-read diagram that does not show the methods of each primitive ( because there are loads of them ). To get an idea of what the diagram started to look after the first few hours of work, I uploaded it to http://i.imgur.com/DnOIUzM.png , and this was surely not the expected result, a fact I realized a bit too late.
Regards,
Marc
The work on this task is ready to be reviewed.
but you should
And, maybe, you could post the source from what you created the image too.
Some notes about "is-a" and "has-a": These are relationship types for classes. Similar to Mazda 626 IS-A car and Mazda 626 HAS 4 wheels (which is a 1-to-4 HAS-A relation). In case of the core C++ interface we have these relations for example as "Halfspace IS-AN Object" or "BagOfTriangles HAS (0 ... n) Faces". This can be understood in the usual way: Halfspace has all properties of an Object. In programming usually worded as "Halfspace inherits all properties from Object". BagOfTrinangles is a container which contains other classes, the triangles (with class name Face). In particular this is a 1-to-n relation here: 1 BagOfTrinangles can have n Faces. When you write down this relation as a diagram this numbers arise on the corresponding arrow.
All this can be displayed in diagrams without mentioning any variable or method. Only boxes with names representing the classes and arrows between the classes.
However, your focus is on the classes derived from Object and you should stay with it. Fix the 3-4 points from the beginning of my comment and this task can be closed
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
Having not worked with class diagrams before and this being my probably 3rd or 4th time ever working on something OOP-related ( the other times was when I did unit tests for CoreInterface ), I really needed the clarifications.
I fixed your requests, hope this is okay.
Regards,
Marc
Data was collected from a local repo of rt^3, the diagram was created with the online program suggested in the reference of this task, draw.io . Easy, sleek and intuitive, it is so far the best option I've used for creating diagrams/flowcharts.
Regards,
Marc
The work on this task is ready to be reviewed.
Can the draw.io stuff be exported in a general file format?
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
Yes, the draw.io can be exported in loads of formats, usually xml.
- Used the arrows as shown on wikipedia.
- Resized it to fit nicely on a screen, the width is 1000px and it is still readable. Tried going the stairs-like approach but it seemed counter-intuitive, as if the primitives were not all childs of the same parent class, some of them being "higher".
Regards,
Marc
The work on this task is ready to be reviewed.
However, you should append one of the XML formats here too. Take one which can be used to change/extend the diagram via draw.io.
Regarding your last point, all derived classes in your diagram are children of Object, non of them is higher than the other one in this sense. Non of the primitives' classes is child or parent of another primitive's class.
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
The deadline of the task has been extended with 1 days and 0 hours.
The work on this task is ready to be reviewed.
XML file format submitted, however not with the "IS-A" arrows as draw.io does not have those, they were manually added in Photoshop. It has normal arrows.
and it was very easy to change the arrows to the right ones and to rearrange the boxes such that they are more compact.
Nevertheless I'll close this task.
Congratulations, this task has been completed successfully.