The Modelio C++ Designer GUI can be used to conveniently enter and modify brief summary and detailed documentation notes directly from the “C++” property view and from the dedicated tab of the C++ edition dialog boxes.
To document a model element, simply select it and then enter the associated documentation text in the “Summary” and “Documentation” fields of the “C++” property view.
Modelio C++ Designer translates the contents of notes as follows:
Notes entered in the “Summary” field are translated into the “\brief” doxygen tag. Summary notes should contain only one paragraph.
Notes entered in the “Documentation” field are translated into ordinary doxygen comments. Description notes can contain any number of paragraphs and doxygen tags.
Documentation for UML operation parameters is automatically grouped with the operation doxygen comment.
The “Summary” and “Documentation” fields in the “C++” property view
The “C++” property view is very practical when entering single line notes, but less convenient for complex multi-line documentation notes.
For optimal comfort and convenience, you can enter multi-line documentation notes in the C++ edition dialog boxes.
The “Documentation” tab of a C++ edition dialog box
The “Documentation” tab is present in all C++ edition dialog boxes.
Documentation can also be entered without using the Modelio C++ Designer GUI. You can enter summary notes in “comment” notes and documentation notes in “Cxx.Doc.Doxygen” or “description” notes.
Modelio C++ Designer produces the following code for the “TaskWindow” class, where the summary and documentation notes are injected as a doxygen comment with automatically generated “brief” tag and our tags.
1//includes for used library types
2#include <cstringt.h>
3#include <afxwin.h>
4#include <afxtempl.h>
5#include <afxcoll.h>
6
7//automatic includes (friends, associated classes, etc)
8#include "MyPlanner/CWnd.h"
9#include "MyPlanner/ITaskView.h"
10#include "MyPlanner/Task.h"
11
12namespace MyPlanner
13{
14 /**
15 \brief
16 Task visualization window
17
18 The class is used to graphically represent Task data.
19 Namely, the class is used to render:
20 - task information
21 - task status
22 - subtasks
23 - resources
24 \todo
25 Implement message handlers
26 **/
27 class TaskWindow : public CWnd, public ITaskView
28 {
29 //...
30 private:
31 CString displayTitle;
32
33 public:
34 CDC dc;
35
36 //associations
37
38 public:
39 Task* task;
40 CMap<CString,CString&,CBrush,CBrush&> brushResource;
41
42 //operations
43
44 public:
45 TaskWindow();
46 TaskWindow(const TaskWindow& value);
47 TaskWindow& operator =(const TaskWindow& value);
48 ~TaskWindow();
49 void formatDisplayTitle(std::string& FormatStr);
50 CDC getDc();
51 afx_msg int OnCreate(CREATESTRUCT* lpCreateStruct);
52
53 //non-modeled members
54
55 protected:
56 DECLARE_MESSAGE_MAP()
57 };
58
59}
60