Example Analysis of Life cycle in UML sequence Diagram drawn by EA
This article mainly shows you the "EA drawing UML sequence chart example analysis of the life cycle", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "EA draw UML sequence chart in the life cycle example analysis" this article.
In real programs, processes that control the life cycle of objects such as creating and deleting objects can be said to be everywhere.
Create object
The following is an example of creating a new object by double-clicking the mouse in the graphics editing software.
Processing flow:
The user double clicks the mouse.
Framework generates QMouseEvent and sends it to DrawerView
DrawerView gets the mouse position from the MouseEvent
Call the clone method of the current shape
Create a new drawing in the clone method.
Set the mouse position to the location of the new drawin
Log in the new drawing to DrawerData
Drawing method
Open the properties dialog box of the message for creating a new drawing in the clone method, and select [Leftcycle] as [New]. Although it is not necessary, in order to clearly express the designer's purpose, you can also set the [Sterotype] option to [create].
Delete object
Next, take the user pressing the Delete key in the graphics editing software to delete the current object as an example.
Processing flow
User presses Delte key
Framework will generate QKeyEvent and send it to DrawView
DrawView removes m_currentShape from DrawerData
Delete m_currentShape object
Set m_currentShape to a null pointer
Drawing method
Open the properties dialog box for deleting graphic messages and select [Leftcycle] as [Delete]. Although it is not necessary, in order to clearly express the designer's purpose, you can also set the [Sterotype] option to [destroy].
Current situation of QtDrawer
Because the class diagram and the sequence diagram are linked, when we complete the above sequence diagram, the class diagram looks like the following.
The above is all the content of the article "sample Analysis of Life cycle in EA drawing UML sequence Chart". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!