1------------------------------------------------------------------------------
2--                                                                          --
3--                            Matreshka Project                             --
4--                                                                          --
5--                          Ada Modeling Framework                          --
6--                                                                          --
7--                        Runtime Library Component                         --
8--                                                                          --
9------------------------------------------------------------------------------
10--                                                                          --
11-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com>                --
12-- All rights reserved.                                                     --
13--                                                                          --
14-- Redistribution and use in source and binary forms, with or without       --
15-- modification, are permitted provided that the following conditions       --
16-- are met:                                                                 --
17--                                                                          --
18--  * Redistributions of source code must retain the above copyright        --
19--    notice, this list of conditions and the following disclaimer.         --
20--                                                                          --
21--  * Redistributions in binary form must reproduce the above copyright     --
22--    notice, this list of conditions and the following disclaimer in the   --
23--    documentation and/or other materials provided with the distribution.  --
24--                                                                          --
25--  * Neither the name of the Vadim Godunko, IE nor the names of its        --
26--    contributors may be used to endorse or promote products derived from  --
27--    this software without specific prior written permission.              --
28--                                                                          --
29-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      --
30-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        --
31-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR    --
32-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT     --
33-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   --
34-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
35-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR   --
36-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF   --
37-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING     --
38-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS       --
39-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.             --
40--                                                                          --
41------------------------------------------------------------------------------
42--  $Revision: 2864 $ $Date: 2012-04-13 14:08:07 +0400 (Fri, 13 Apr 2012) $
43------------------------------------------------------------------------------
44with AMF.Internals.UML_Elements;
45with AMF.UML.Classifiers;
46with AMF.UML.Elements.Collections;
47with AMF.UML.Generalization_Sets.Collections;
48with AMF.UML.Generalizations;
49with AMF.Visitors;
50
51package AMF.Internals.UML_Generalizations is
52
53   type UML_Generalization_Proxy is
54     limited new AMF.Internals.UML_Elements.UML_Element_Proxy
55       and AMF.UML.Generalizations.UML_Generalization with null record;
56
57   overriding function Get_General
58    (Self : not null access constant UML_Generalization_Proxy)
59       return AMF.UML.Classifiers.UML_Classifier_Access;
60   --  Getter of Generalization::general.
61   --
62   --  References the general classifier in the Generalization relationship.
63
64   overriding procedure Set_General
65    (Self : not null access UML_Generalization_Proxy;
66     To   : AMF.UML.Classifiers.UML_Classifier_Access);
67   --  Setter of Generalization::general.
68   --
69   --  References the general classifier in the Generalization relationship.
70
71   overriding function Get_Generalization_Set
72    (Self : not null access constant UML_Generalization_Proxy)
73       return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set;
74   --  Getter of Generalization::generalizationSet.
75   --
76   --  Designates a set in which instances of Generalization is considered
77   --  members.
78
79   overriding function Get_Is_Substitutable
80    (Self : not null access constant UML_Generalization_Proxy)
81       return AMF.Optional_Boolean;
82   --  Getter of Generalization::isSubstitutable.
83   --
84   --  Indicates whether the specific classifier can be used wherever the
85   --  general classifier can be used. If true, the execution traces of the
86   --  specific classifier will be a superset of the execution traces of the
87   --  general classifier.
88
89   overriding procedure Set_Is_Substitutable
90    (Self : not null access UML_Generalization_Proxy;
91     To   : AMF.Optional_Boolean);
92   --  Setter of Generalization::isSubstitutable.
93   --
94   --  Indicates whether the specific classifier can be used wherever the
95   --  general classifier can be used. If true, the execution traces of the
96   --  specific classifier will be a superset of the execution traces of the
97   --  general classifier.
98
99   overriding function Get_Specific
100    (Self : not null access constant UML_Generalization_Proxy)
101       return AMF.UML.Classifiers.UML_Classifier_Access;
102   --  Getter of Generalization::specific.
103   --
104   --  References the specializing classifier in the Generalization
105   --  relationship.
106
107   overriding procedure Set_Specific
108    (Self : not null access UML_Generalization_Proxy;
109     To   : AMF.UML.Classifiers.UML_Classifier_Access);
110   --  Setter of Generalization::specific.
111   --
112   --  References the specializing classifier in the Generalization
113   --  relationship.
114
115   overriding function Get_Source
116    (Self : not null access constant UML_Generalization_Proxy)
117       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
118   --  Getter of DirectedRelationship::source.
119   --
120   --  Specifies the sources of the DirectedRelationship.
121
122   overriding function Get_Target
123    (Self : not null access constant UML_Generalization_Proxy)
124       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
125   --  Getter of DirectedRelationship::target.
126   --
127   --  Specifies the targets of the DirectedRelationship.
128
129   overriding function Get_Related_Element
130    (Self : not null access constant UML_Generalization_Proxy)
131       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
132   --  Getter of Relationship::relatedElement.
133   --
134   --  Specifies the elements related by the Relationship.
135
136   overriding procedure Enter_Element
137    (Self    : not null access constant UML_Generalization_Proxy;
138     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
139     Control : in out AMF.Visitors.Traverse_Control);
140   --  Dispatch call to corresponding subprogram of visitor interface.
141
142   overriding procedure Leave_Element
143    (Self    : not null access constant UML_Generalization_Proxy;
144     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
145     Control : in out AMF.Visitors.Traverse_Control);
146   --  Dispatch call to corresponding subprogram of visitor interface.
147
148   overriding procedure Visit_Element
149    (Self     : not null access constant UML_Generalization_Proxy;
150     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
151     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
152     Control  : in out AMF.Visitors.Traverse_Control);
153   --  Dispatch call to corresponding subprogram of iterator interface.
154
155end AMF.Internals.UML_Generalizations;
156