]> git.lyx.org Git - lyx.git/blob - sigc++/doc/diagrams
ws change
[lyx.git] / sigc++ / doc / diagrams
1
2 Here are some UML diagrams of the relationships in Libsigc++:
3
4 Scopes, Handles, Objects:   
5 ------------------------     
6                            
7                      _________    scope_    _____________
8                     |  Scope  |*<-------<> | Object_Impl |   
9                     |         |    obj_    |             |
10                     |_________|----------> |             |
11                          A        (obj)    |             |
12                          |          +----> |             |
13                          |          |      |_____________|
14                          |          |            A 
15                      __________     |            |
16  ________    scope_ |  Limit   |<>--+            *
17 |Handle  |<*>------>|          |            _____________
18 | <Limit>|          |__________|           | Object      |
19 |        |                                 |             |
20 |        |            (obj)                |             |  
21 |        |   (<>----------------------->)  |             |
22 |________|                                 |_____________|
23
24
25 Okay here is what you are supposed to get out of this.
26 Object comes from Object_Impl with multiplicity (VI).
27 Handle<Limit> in this case forms a virtual aggregate relationship
28 with the Object it points to.  
29
30 For future diagrams I would reduce this to
31   
32    Handle<Limit> <>--------> Object
33
34 Other handle relationships are formed with different types of
35 scopes.  Reference Count for example would have the same
36 diagram (but very different behavior.)
37
38 There is also a relation when the pointed to
39 object deletes itself when the object is removed.  This is
40 a dependency that will be written as
41
42     A -----><> B
43
44   
45 BasicSignal:
46 -----------
47
48                 ____________________     incoming_
49                | BasicSignal_::InOut| <>----------->* Slot
50                |                    | 
51                |                    |    outgoing_ 
52                |____________________| <>----------->* Slot
53                             A
54                             |
55                             |
56                 ---------------------
57                | BasicSignal#        |
58                |                     |
59                |_____________________|
60
61 It is clear from here that a BasicSignal is formed from a number of different
62 objects.
63
64
65 Connections between a BasicSignal and a Object method:
66
67                          ----------                  ________
68                         | SlotData |                | Object |
69                         |__________|                |________|
70                               A                         A
71                               |                         |
72                               |                         |
73   ___________              _____________                |
74  |BasicSignal| outgoing_  | ObjectSlot# |           ----------
75  |___________|<>-------->*|             |          | MyObject | 
76                           |             |-------><>|          |
77   ___________             |             |          |__________|
78  |Connection |----------> |_____________|
79  |___________|
80