uml

How to represent “event” in a UML Class Diagram?

匆匆过客 提交于 2019-12-05 18:16:35
问题 This is my code snippet public class Notation : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private Notes _note; } How to write public event PropertyChangedEventHandler PropertyChanged; in UML Class diagram properly? First, I think it's : +PropertyChanged: PropertyChangedEventHandler But then, I realized that it doesn't represent the event part of the code. Any idea? Thanks 回答1: Here comes the UML stereotype in the game. Just stereotype this property:

Association Injection or Dependency Injection?

一曲冷凌霜 提交于 2019-12-05 18:14:47
I'm studying the dependency injection pattern. I have read many examples, among which one typical example is to use XxxService/XxxRepository as example. But from my opinion, according to the UML concept, class XxxRepository should be an association of class XxxService. Why not call this situation Association Injection , but still Dependency Injection?:) Thanks! UPDATE ON 1/26/2018 I currently think the concept of dependency injection is suitable for the situation described in this question. Because Association is just a special Dependency in UML. Please refer to this article , Martin Fowler

UML - association or aggregation (simple code snippets)

久未见 提交于 2019-12-05 16:58:47
I drives me crazy how many books contradicts themselves. Class A {} class B {void UseA(A a)} //some say this is an association, no reference is held but communication is possible Class A {} class B {A a;} //some say this is aggregration, a reference is held But many say that holding a reference is still just an association and for aggregation they use a list - IMHO this is the same, it it still a reference. I am very confused, I would like to understand the problem. E.g. here: http://aviadezra.blogspot.cz/2009/05/uml-association-aggregation-composition.html - what is the difference between

Generate Kotlin class diagram

谁说胖子不能爱 提交于 2019-12-05 15:57:40
问题 I'm looking for a tool, Intellij Idea plugin, or whatever that is able to generate UML class diagram from Kotlin source files. Intellij Idea 15's "Show diagram..." tool only works for .java files. Google doesn't help, but I still hope there is a chance to find a tool for this. 回答1: Actually it works but with limitations: you can click only on a package in the project tree and click "Show Diagram...". Also it generates diagram from the Java point of view (shows Java's signatures and facade

Drawing Call Flow with sequence Diagram leads to ambiguity

放肆的年华 提交于 2019-12-05 15:26:39
I want to draw a Sequence Diagram Where A -> B.run() B.run() -> B.m1() B.m1() -> B.m2() So far I've come up with these. http://i51.tinypic.com/eja5bl.jpg http://i52.tinypic.com/1449s3.jpg But Here I cannot mention it clearly that B.m2() is called by B.m1() Rather it looks like B.run() Calls both B.m1() and B.m2() serially. ------------- EDIT ---------------- This is What I Currently have drawn http://i55.tinypic.com/21276kk.jpg Well Is my Current Diagram Okay ?? What I want is this. (Call Flow) SpiritAdapter -> SpiritEngine::run(spirit:string, method:string, args[]) SpiritEngine::run(spirit

What do the vertical rectangles convey in a UML sequence diagram?

限于喜欢 提交于 2019-12-05 15:06:53
What do the vertical rectangles signify in a UML sequence diagram? For example I want to know the meaning of the rectangle pointed to by the green arrow. Do the height of these rectangles mean anything? 0decimal0 The vertical rectangles denote execution specification . Execution specification is a part of object's interaction which represents period of object's lifetime when it is either doing some activity or simply waiting for the reply from other object. By some activity I mean sending messages etc. Length of the rectangle however, are irrelevant. You may or may not draw these as they are

PhpStorm中绘画UML

泄露秘密 提交于 2019-12-05 14:18:06
IDE支持 在Plugins中 安装 PlantUML integration 插件 到 http://www.graphviz.org/ 网站下载 graphviz.exe 并安装(这个软件可以支持更多的UML语法)或者使用https://graphviz.gitlab.io/_pages/Download/Download_windows.html 将graphviz安装目录下的 dot.exe 路径添加到PlantUML的设置中 文档地址: http://plantuml.com/zh/ 详细讲解 1.安装插件 file->settings->plugins 2.安装graphviz.exe 下载地址  https://graphviz.gitlab.io/_pages/Download/Download_windows.html ,下载安装后记住安装的地址,第三步要用 3.将graphviz安装目录下的 dot.exe 路径添加到PlantUML的设置中 File -> Settings -> Other Settings -> PlantUML 安装成功 新建文件选择plantUML File 即可创建 效果图 注意 :   如果不安装graphviz.exe,出现一下效果    来源: https://www.cnblogs.com/houss/p/11926727

VS2015 Enterprise Reverse Engineer Code to UML

倖福魔咒の 提交于 2019-12-05 14:09:50
问题 I'm looking at the various Architecture features of Visual Studio 2015 Enterprise edition. All looks good. However, I have code that is all ready written and I would like to generate Class Diagrams from it. NOT the standard Add Class Diagram in a Project - but from the UML Class Diagrams. I have created a Modelling Project for this. I cannot see a way to do this - is it possible? Can I reverse engineer existing code into nice diagrams? Here is my solution view: Here is the Class Diagram

Class Design in Qt for inter thread communication

流过昼夜 提交于 2019-12-05 12:27:29
Problem statement : to track an object with a camera and move the camera in azimuth and elevation accordingly. Process : camera acquires images of the object....each frame of camera is processed to find the object(which is supposed to be tracked...) and the information generated in each frame is passed to the mechanical device (gimbal...) to move the camera in pan and tilt... Design : the main Gui is run in a thread and camera and gimbal in 2 other thread...info generated in camera thread is passed on to gimbal thread and the same thread(camera thread...) displays the tracked image...

Formal language for UML sequence diagrams

99封情书 提交于 2019-12-05 12:00:41
Is there a formal language which can be used to capture the information present in an UML sequence diagram in to a text format, which is easy understandable by humans? In our place, often times software requirements are specified in terms of complex sequence diagrams which are difficult to review, verify for correctness and make changes. Also IMHO, programmers would prefer to implement from an unambiguous text representation of the requirements, rather than from sprawling multi page diagrams. xmojmr (1) Yes , there is a proprietary almost formal text format language able to express information