Original http://blog.csdn.net/ztz0223/article/details/7592349
FollowedArticleContinue:
Ibm rsa (Rational Software Architect) V8 learning 2 new project
In a simple start, select the project file "example_uml", find the property page in the view below, and select "Profile", as shown below:
Click "add profile" to bring up the following types of C ++:
The last added profile is like this:
OK, start to create the C ++ class model, place the mouse on the screen, and a box pops up naturally, which contains some basic C ++ syntax, it's actually something in the right panel:
We insert a struct into the operation area and directly insert a class instead of a struct, so additional operations are required:
On the Panel, select "constructed class", click Create in the work area, and change the struct name to my_struct:
Add struct attributes and struct operations (member functions ).
Add the attribute m_dbl first, select the variable, and then select the regular tag in the attribute:
Click Select type. In the pop-up window, enter double and select double corresponding to C ++ type:
OK. The property is created successfully.
Create a member function:
In the figure above, the qualifier is static, abstracted as an abstract function, and the query adds the const attribute after the function.
Select the "constructor" label, select "application constructor", and select CPP operation:
Then, modify the class chart as follows:
Add the return type of the function. On the property page, select "parameter ":
You can set both the return type and parameters here, specify the return type as int *, and add the long arg_in parameter, as shown below:
The return type is int *. Therefore, you must specify * for multiple values. The arg_in parameter can be set to 1 directly.
Save the project.
Next, let's talk about C ++ inheritance, and then generate C ++ in UML.Code.