Ibm rsa (IBM Rational Software Architect) V8 3 C ++ class diagram

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.