Should I use namespace to name data types in a UML class diagram?



  • Greetings.

    I am creating several UML class diagrams. In some of them, there are member functions (and member variables) whose parameters are of data types defined in a third party library,
    namely cv::Mat, cv::Point, among others, of the OpenCV library.

    My specific question is:

    should I use the namespace to name these data types? For example, What is better to put in the diagram, cv::Mat or just Mat?

    Thanks in advance for any help and/or suggestion.


  • Lifetime Qt Champion

    Hi,

    That's rather highly unrelated to Qt but anyway, since you are describing your application, it will likely be a good idea to be explicit about the types you are using. Mat alone doesn't make it clear where it comes from.



  • I apologize. Because the subtitle of this part of the forum (Home / General talk / The Lounge), I thought it was allowed to ask questions not directly related to Qt.

    However, I have to say that my application also uses Qt classes (in fact, the whole GUI is Qt). Although with the Qt classes I did not have the doubt that I published (obviously).


  • Lifetime Qt Champion

    I would have rather opted for Brainstorming ;)

    Do you mean you are using namespaces for your Qt classes ?



  • I'm not using namespaces for Qt classes. What I meant was that Qt classes are clearer/easier to identify (since their name always starts with the letter Q).

    By other hand, thanks for the suggestion. I will opt for the Brainstorm section next time.


Log in to reply