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: 2937 $ $Date: 2012-05-01 21:07:27 +0400 (Tue, 01 May 2012) $
43------------------------------------------------------------------------------
44with AMF.Internals.UML_Associations;
45with AMF.String_Collections;
46with AMF.UML.Classes;
47with AMF.UML.Classifier_Template_Parameters;
48with AMF.UML.Classifiers.Collections;
49with AMF.UML.Collaboration_Uses.Collections;
50with AMF.UML.Constraints.Collections;
51with AMF.UML.Dependencies.Collections;
52with AMF.UML.Element_Imports.Collections;
53with AMF.UML.Elements.Collections;
54with AMF.UML.Extension_Ends;
55with AMF.UML.Extensions;
56with AMF.UML.Features.Collections;
57with AMF.UML.Generalization_Sets.Collections;
58with AMF.UML.Generalizations.Collections;
59with AMF.UML.Named_Elements.Collections;
60with AMF.UML.Namespaces;
61with AMF.UML.Package_Imports.Collections;
62with AMF.UML.Packageable_Elements.Collections;
63with AMF.UML.Packages.Collections;
64with AMF.UML.Parameterable_Elements.Collections;
65with AMF.UML.Properties.Collections;
66with AMF.UML.Redefinable_Elements.Collections;
67with AMF.UML.Redefinable_Template_Signatures;
68with AMF.UML.String_Expressions;
69with AMF.UML.Substitutions.Collections;
70with AMF.UML.Template_Bindings.Collections;
71with AMF.UML.Template_Parameters;
72with AMF.UML.Template_Signatures;
73with AMF.UML.Types.Collections;
74with AMF.UML.Use_Cases.Collections;
75with AMF.Visitors;
76
77package AMF.Internals.UML_Extensions is
78
79   type UML_Extension_Proxy is
80     limited new AMF.Internals.UML_Associations.UML_Association_Proxy
81       and AMF.UML.Extensions.UML_Extension with null record;
82
83   overriding function Get_Is_Required
84    (Self : not null access constant UML_Extension_Proxy)
85       return Boolean;
86   --  Getter of Extension::isRequired.
87   --
88   --  Indicates whether an instance of the extending stereotype must be
89   --  created when an instance of the extended class is created. The
90   --  attribute value is derived from the value of the lower property of the
91   --  ExtensionEnd referenced by Extension::ownedEnd; a lower value of 1
92   --  means that isRequired is true, but otherwise it is false. Since the
93   --  default value of ExtensionEnd::lower is 0, the default value of
94   --  isRequired is false.
95
96   overriding function Get_Metaclass
97    (Self : not null access constant UML_Extension_Proxy)
98       return AMF.UML.Classes.UML_Class_Access;
99   --  Getter of Extension::metaclass.
100   --
101   --  References the Class that is extended through an Extension. The
102   --  property is derived from the type of the memberEnd that is not the
103   --  ownedEnd.
104
105   overriding function Get_Owned_End
106    (Self : not null access constant UML_Extension_Proxy)
107       return AMF.UML.Extension_Ends.UML_Extension_End_Access;
108   --  Getter of Extension::ownedEnd.
109   --
110   --  References the end of the extension that is typed by a Stereotype.
111
112   overriding procedure Set_Owned_End
113    (Self : not null access UML_Extension_Proxy;
114     To   : AMF.UML.Extension_Ends.UML_Extension_End_Access);
115   --  Setter of Extension::ownedEnd.
116   --
117   --  References the end of the extension that is typed by a Stereotype.
118
119   overriding function Get_End_Type
120    (Self : not null access constant UML_Extension_Proxy)
121       return AMF.UML.Types.Collections.Ordered_Set_Of_UML_Type;
122   --  Getter of Association::endType.
123   --
124   --  References the classifiers that are used as types of the ends of the
125   --  association.
126
127   overriding function Get_Is_Derived
128    (Self : not null access constant UML_Extension_Proxy)
129       return Boolean;
130   --  Getter of Association::isDerived.
131   --
132   --  Specifies whether the association is derived from other model elements
133   --  such as other associations or constraints.
134
135   overriding procedure Set_Is_Derived
136    (Self : not null access UML_Extension_Proxy;
137     To   : Boolean);
138   --  Setter of Association::isDerived.
139   --
140   --  Specifies whether the association is derived from other model elements
141   --  such as other associations or constraints.
142
143   overriding function Get_Member_End
144    (Self : not null access constant UML_Extension_Proxy)
145       return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property;
146   --  Getter of Association::memberEnd.
147   --
148   --  Each end represents participation of instances of the classifier
149   --  connected to the end in links of the association.
150
151   overriding function Get_Navigable_Owned_End
152    (Self : not null access constant UML_Extension_Proxy)
153       return AMF.UML.Properties.Collections.Set_Of_UML_Property;
154   --  Getter of Association::navigableOwnedEnd.
155   --
156   --  The navigable ends that are owned by the association itself.
157
158   overriding function Get_Owned_End
159    (Self : not null access constant UML_Extension_Proxy)
160       return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property;
161   --  Getter of Association::ownedEnd.
162   --
163   --  The ends that are owned by the association itself.
164
165   overriding function Get_Related_Element
166    (Self : not null access constant UML_Extension_Proxy)
167       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
168   --  Getter of Relationship::relatedElement.
169   --
170   --  Specifies the elements related by the Relationship.
171
172   overriding function Get_Attribute
173    (Self : not null access constant UML_Extension_Proxy)
174       return AMF.UML.Properties.Collections.Set_Of_UML_Property;
175   --  Getter of Classifier::attribute.
176   --
177   --  Refers to all of the Properties that are direct (i.e. not inherited or
178   --  imported) attributes of the classifier.
179
180   overriding function Get_Collaboration_Use
181    (Self : not null access constant UML_Extension_Proxy)
182       return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use;
183   --  Getter of Classifier::collaborationUse.
184   --
185   --  References the collaboration uses owned by the classifier.
186
187   overriding function Get_Feature
188    (Self : not null access constant UML_Extension_Proxy)
189       return AMF.UML.Features.Collections.Set_Of_UML_Feature;
190   --  Getter of Classifier::feature.
191   --
192   --  Specifies each feature defined in the classifier.
193   --  Note that there may be members of the Classifier that are of the type
194   --  Feature but are not included in this association, e.g. inherited
195   --  features.
196
197   overriding function Get_General
198    (Self : not null access constant UML_Extension_Proxy)
199       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
200   --  Getter of Classifier::general.
201   --
202   --  Specifies the general Classifiers for this Classifier.
203   --  References the general classifier in the Generalization relationship.
204
205   overriding function Get_Generalization
206    (Self : not null access constant UML_Extension_Proxy)
207       return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization;
208   --  Getter of Classifier::generalization.
209   --
210   --  Specifies the Generalization relationships for this Classifier. These
211   --  Generalizations navigaten to more general classifiers in the
212   --  generalization hierarchy.
213
214   overriding function Get_Inherited_Member
215    (Self : not null access constant UML_Extension_Proxy)
216       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
217   --  Getter of Classifier::inheritedMember.
218   --
219   --  Specifies all elements inherited by this classifier from the general
220   --  classifiers.
221
222   overriding function Get_Is_Abstract
223    (Self : not null access constant UML_Extension_Proxy)
224       return Boolean;
225   --  Getter of Classifier::isAbstract.
226   --
227   --  If true, the Classifier does not provide a complete declaration and can
228   --  typically not be instantiated. An abstract classifier is intended to be
229   --  used by other classifiers e.g. as the target of general
230   --  metarelationships or generalization relationships.
231
232   overriding function Get_Is_Final_Specialization
233    (Self : not null access constant UML_Extension_Proxy)
234       return Boolean;
235   --  Getter of Classifier::isFinalSpecialization.
236   --
237   --  If true, the Classifier cannot be specialized by generalization. Note
238   --  that this property is preserved through package merge operations; that
239   --  is, the capability to specialize a Classifier (i.e.,
240   --  isFinalSpecialization =false) must be preserved in the resulting
241   --  Classifier of a package merge operation where a Classifier with
242   --  isFinalSpecialization =false is merged with a matching Classifier with
243   --  isFinalSpecialization =true: the resulting Classifier will have
244   --  isFinalSpecialization =false.
245
246   overriding procedure Set_Is_Final_Specialization
247    (Self : not null access UML_Extension_Proxy;
248     To   : Boolean);
249   --  Setter of Classifier::isFinalSpecialization.
250   --
251   --  If true, the Classifier cannot be specialized by generalization. Note
252   --  that this property is preserved through package merge operations; that
253   --  is, the capability to specialize a Classifier (i.e.,
254   --  isFinalSpecialization =false) must be preserved in the resulting
255   --  Classifier of a package merge operation where a Classifier with
256   --  isFinalSpecialization =false is merged with a matching Classifier with
257   --  isFinalSpecialization =true: the resulting Classifier will have
258   --  isFinalSpecialization =false.
259
260   overriding function Get_Owned_Template_Signature
261    (Self : not null access constant UML_Extension_Proxy)
262       return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access;
263   --  Getter of Classifier::ownedTemplateSignature.
264   --
265   --  The optional template signature specifying the formal template
266   --  parameters.
267
268   overriding procedure Set_Owned_Template_Signature
269    (Self : not null access UML_Extension_Proxy;
270     To   : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access);
271   --  Setter of Classifier::ownedTemplateSignature.
272   --
273   --  The optional template signature specifying the formal template
274   --  parameters.
275
276   overriding function Get_Owned_Use_Case
277    (Self : not null access constant UML_Extension_Proxy)
278       return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
279   --  Getter of Classifier::ownedUseCase.
280   --
281   --  References the use cases owned by this classifier.
282
283   overriding function Get_Powertype_Extent
284    (Self : not null access constant UML_Extension_Proxy)
285       return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set;
286   --  Getter of Classifier::powertypeExtent.
287   --
288   --  Designates the GeneralizationSet of which the associated Classifier is
289   --  a power type.
290
291   overriding function Get_Redefined_Classifier
292    (Self : not null access constant UML_Extension_Proxy)
293       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
294   --  Getter of Classifier::redefinedClassifier.
295   --
296   --  References the Classifiers that are redefined by this Classifier.
297
298   overriding function Get_Representation
299    (Self : not null access constant UML_Extension_Proxy)
300       return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access;
301   --  Getter of Classifier::representation.
302   --
303   --  References a collaboration use which indicates the collaboration that
304   --  represents this classifier.
305
306   overriding procedure Set_Representation
307    (Self : not null access UML_Extension_Proxy;
308     To   : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access);
309   --  Setter of Classifier::representation.
310   --
311   --  References a collaboration use which indicates the collaboration that
312   --  represents this classifier.
313
314   overriding function Get_Substitution
315    (Self : not null access constant UML_Extension_Proxy)
316       return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution;
317   --  Getter of Classifier::substitution.
318   --
319   --  References the substitutions that are owned by this Classifier.
320
321   overriding function Get_Template_Parameter
322    (Self : not null access constant UML_Extension_Proxy)
323       return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access;
324   --  Getter of Classifier::templateParameter.
325   --
326   --  The template parameter that exposes this element as a formal parameter.
327
328   overriding procedure Set_Template_Parameter
329    (Self : not null access UML_Extension_Proxy;
330     To   : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access);
331   --  Setter of Classifier::templateParameter.
332   --
333   --  The template parameter that exposes this element as a formal parameter.
334
335   overriding function Get_Use_Case
336    (Self : not null access constant UML_Extension_Proxy)
337       return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
338   --  Getter of Classifier::useCase.
339   --
340   --  The set of use cases for which this Classifier is the subject.
341
342   overriding function Get_Element_Import
343    (Self : not null access constant UML_Extension_Proxy)
344       return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import;
345   --  Getter of Namespace::elementImport.
346   --
347   --  References the ElementImports owned by the Namespace.
348
349   overriding function Get_Imported_Member
350    (Self : not null access constant UML_Extension_Proxy)
351       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
352   --  Getter of Namespace::importedMember.
353   --
354   --  References the PackageableElements that are members of this Namespace
355   --  as a result of either PackageImports or ElementImports.
356
357   overriding function Get_Member
358    (Self : not null access constant UML_Extension_Proxy)
359       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
360   --  Getter of Namespace::member.
361   --
362   --  A collection of NamedElements identifiable within the Namespace, either
363   --  by being owned or by being introduced by importing or inheritance.
364
365   overriding function Get_Owned_Member
366    (Self : not null access constant UML_Extension_Proxy)
367       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
368   --  Getter of Namespace::ownedMember.
369   --
370   --  A collection of NamedElements owned by the Namespace.
371
372   overriding function Get_Owned_Rule
373    (Self : not null access constant UML_Extension_Proxy)
374       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
375   --  Getter of Namespace::ownedRule.
376   --
377   --  Specifies a set of Constraints owned by this Namespace.
378
379   overriding function Get_Package_Import
380    (Self : not null access constant UML_Extension_Proxy)
381       return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import;
382   --  Getter of Namespace::packageImport.
383   --
384   --  References the PackageImports owned by the Namespace.
385
386   overriding function Get_Client_Dependency
387    (Self : not null access constant UML_Extension_Proxy)
388       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
389   --  Getter of NamedElement::clientDependency.
390   --
391   --  Indicates the dependencies that reference the client.
392
393   overriding function Get_Name_Expression
394    (Self : not null access constant UML_Extension_Proxy)
395       return AMF.UML.String_Expressions.UML_String_Expression_Access;
396   --  Getter of NamedElement::nameExpression.
397   --
398   --  The string expression used to define the name of this named element.
399
400   overriding procedure Set_Name_Expression
401    (Self : not null access UML_Extension_Proxy;
402     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
403   --  Setter of NamedElement::nameExpression.
404   --
405   --  The string expression used to define the name of this named element.
406
407   overriding function Get_Namespace
408    (Self : not null access constant UML_Extension_Proxy)
409       return AMF.UML.Namespaces.UML_Namespace_Access;
410   --  Getter of NamedElement::namespace.
411   --
412   --  Specifies the namespace that owns the NamedElement.
413
414   overriding function Get_Qualified_Name
415    (Self : not null access constant UML_Extension_Proxy)
416       return AMF.Optional_String;
417   --  Getter of NamedElement::qualifiedName.
418   --
419   --  A name which allows the NamedElement to be identified within a
420   --  hierarchy of nested Namespaces. It is constructed from the names of the
421   --  containing namespaces starting at the root of the hierarchy and ending
422   --  with the name of the NamedElement itself.
423
424   overriding function Get_Package
425    (Self : not null access constant UML_Extension_Proxy)
426       return AMF.UML.Packages.UML_Package_Access;
427   --  Getter of Type::package.
428   --
429   --  Specifies the owning package of this classifier, if any.
430
431   overriding procedure Set_Package
432    (Self : not null access UML_Extension_Proxy;
433     To   : AMF.UML.Packages.UML_Package_Access);
434   --  Setter of Type::package.
435   --
436   --  Specifies the owning package of this classifier, if any.
437
438   overriding function Get_Owning_Template_Parameter
439    (Self : not null access constant UML_Extension_Proxy)
440       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
441   --  Getter of ParameterableElement::owningTemplateParameter.
442   --
443   --  The formal template parameter that owns this element.
444
445   overriding procedure Set_Owning_Template_Parameter
446    (Self : not null access UML_Extension_Proxy;
447     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
448   --  Setter of ParameterableElement::owningTemplateParameter.
449   --
450   --  The formal template parameter that owns this element.
451
452   overriding function Get_Template_Parameter
453    (Self : not null access constant UML_Extension_Proxy)
454       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
455   --  Getter of ParameterableElement::templateParameter.
456   --
457   --  The template parameter that exposes this element as a formal parameter.
458
459   overriding procedure Set_Template_Parameter
460    (Self : not null access UML_Extension_Proxy;
461     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
462   --  Setter of ParameterableElement::templateParameter.
463   --
464   --  The template parameter that exposes this element as a formal parameter.
465
466   overriding function Get_Owned_Template_Signature
467    (Self : not null access constant UML_Extension_Proxy)
468       return AMF.UML.Template_Signatures.UML_Template_Signature_Access;
469   --  Getter of TemplateableElement::ownedTemplateSignature.
470   --
471   --  The optional template signature specifying the formal template
472   --  parameters.
473
474   overriding procedure Set_Owned_Template_Signature
475    (Self : not null access UML_Extension_Proxy;
476     To   : AMF.UML.Template_Signatures.UML_Template_Signature_Access);
477   --  Setter of TemplateableElement::ownedTemplateSignature.
478   --
479   --  The optional template signature specifying the formal template
480   --  parameters.
481
482   overriding function Get_Template_Binding
483    (Self : not null access constant UML_Extension_Proxy)
484       return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding;
485   --  Getter of TemplateableElement::templateBinding.
486   --
487   --  The optional bindings from this element to templates.
488
489   overriding function Get_Is_Leaf
490    (Self : not null access constant UML_Extension_Proxy)
491       return Boolean;
492   --  Getter of RedefinableElement::isLeaf.
493   --
494   --  Indicates whether it is possible to further redefine a
495   --  RedefinableElement. If the value is true, then it is not possible to
496   --  further redefine the RedefinableElement. Note that this property is
497   --  preserved through package merge operations; that is, the capability to
498   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
499   --  the resulting RedefinableElement of a package merge operation where a
500   --  RedefinableElement with isLeaf=false is merged with a matching
501   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
502   --  will have isLeaf=false. Default value is false.
503
504   overriding procedure Set_Is_Leaf
505    (Self : not null access UML_Extension_Proxy;
506     To   : Boolean);
507   --  Setter of RedefinableElement::isLeaf.
508   --
509   --  Indicates whether it is possible to further redefine a
510   --  RedefinableElement. If the value is true, then it is not possible to
511   --  further redefine the RedefinableElement. Note that this property is
512   --  preserved through package merge operations; that is, the capability to
513   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
514   --  the resulting RedefinableElement of a package merge operation where a
515   --  RedefinableElement with isLeaf=false is merged with a matching
516   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
517   --  will have isLeaf=false. Default value is false.
518
519   overriding function Get_Redefined_Element
520    (Self : not null access constant UML_Extension_Proxy)
521       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
522   --  Getter of RedefinableElement::redefinedElement.
523   --
524   --  The redefinable element that is being redefined by this element.
525
526   overriding function Get_Redefinition_Context
527    (Self : not null access constant UML_Extension_Proxy)
528       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
529   --  Getter of RedefinableElement::redefinitionContext.
530   --
531   --  References the contexts that this element may be redefined from.
532
533   overriding function Is_Required
534    (Self : not null access constant UML_Extension_Proxy)
535       return Boolean;
536   --  Operation Extension::isRequired.
537   --
538   --  The query isRequired() is true if the owned end has a multiplicity with
539   --  the lower bound of 1.
540
541   overriding function Metaclass
542    (Self : not null access constant UML_Extension_Proxy)
543       return AMF.UML.Classes.UML_Class_Access;
544   --  Operation Extension::metaclass.
545   --
546   --  The query metaclass() returns the metaclass that is being extended (as
547   --  opposed to the extending stereotype).
548
549   overriding function Metaclass_End
550    (Self : not null access constant UML_Extension_Proxy)
551       return AMF.UML.Properties.UML_Property_Access;
552   --  Operation Extension::metaclassEnd.
553   --
554   --  The query metaclassEnd() returns the Property that is typed by a
555   --  metaclass (as opposed to a stereotype).
556
557   overriding function End_Type
558    (Self : not null access constant UML_Extension_Proxy)
559       return AMF.UML.Types.Collections.Ordered_Set_Of_UML_Type;
560   --  Operation Association::endType.
561   --
562   --  endType is derived from the types of the member ends.
563
564   overriding function All_Features
565    (Self : not null access constant UML_Extension_Proxy)
566       return AMF.UML.Features.Collections.Set_Of_UML_Feature;
567   --  Operation Classifier::allFeatures.
568   --
569   --  The query allFeatures() gives all of the features in the namespace of
570   --  the classifier. In general, through mechanisms such as inheritance,
571   --  this will be a larger set than feature.
572
573   overriding function Conforms_To
574    (Self : not null access constant UML_Extension_Proxy;
575     Other : AMF.UML.Classifiers.UML_Classifier_Access)
576       return Boolean;
577   --  Operation Classifier::conformsTo.
578   --
579   --  The query conformsTo() gives true for a classifier that defines a type
580   --  that conforms to another. This is used, for example, in the
581   --  specification of signature conformance for operations.
582
583   overriding function General
584    (Self : not null access constant UML_Extension_Proxy)
585       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
586   --  Operation Classifier::general.
587   --
588   --  The general classifiers are the classifiers referenced by the
589   --  generalization relationships.
590
591   overriding function Has_Visibility_Of
592    (Self : not null access constant UML_Extension_Proxy;
593     N : AMF.UML.Named_Elements.UML_Named_Element_Access)
594       return Boolean;
595   --  Operation Classifier::hasVisibilityOf.
596   --
597   --  The query hasVisibilityOf() determines whether a named element is
598   --  visible in the classifier. By default all are visible. It is only
599   --  called when the argument is something owned by a parent.
600
601   overriding function Inherit
602    (Self : not null access constant UML_Extension_Proxy;
603     Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element)
604       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
605   --  Operation Classifier::inherit.
606   --
607   --  The query inherit() defines how to inherit a set of elements. Here the
608   --  operation is defined to inherit them all. It is intended to be
609   --  redefined in circumstances where inheritance is affected by
610   --  redefinition.
611   --  The inherit operation is overridden to exclude redefined properties.
612
613   overriding function Inheritable_Members
614    (Self : not null access constant UML_Extension_Proxy;
615     C : AMF.UML.Classifiers.UML_Classifier_Access)
616       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
617   --  Operation Classifier::inheritableMembers.
618   --
619   --  The query inheritableMembers() gives all of the members of a classifier
620   --  that may be inherited in one of its descendants, subject to whatever
621   --  visibility restrictions apply.
622
623   overriding function Inherited_Member
624    (Self : not null access constant UML_Extension_Proxy)
625       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
626   --  Operation Classifier::inheritedMember.
627   --
628   --  The inheritedMember association is derived by inheriting the
629   --  inheritable members of the parents.
630   --  The inheritedMember association is derived by inheriting the
631   --  inheritable members of the parents.
632
633   overriding function Is_Template
634    (Self : not null access constant UML_Extension_Proxy)
635       return Boolean;
636   --  Operation Classifier::isTemplate.
637   --
638   --  The query isTemplate() returns whether this templateable element is
639   --  actually a template.
640
641   overriding function May_Specialize_Type
642    (Self : not null access constant UML_Extension_Proxy;
643     C : AMF.UML.Classifiers.UML_Classifier_Access)
644       return Boolean;
645   --  Operation Classifier::maySpecializeType.
646   --
647   --  The query maySpecializeType() determines whether this classifier may
648   --  have a generalization relationship to classifiers of the specified
649   --  type. By default a classifier may specialize classifiers of the same or
650   --  a more general type. It is intended to be redefined by classifiers that
651   --  have different specialization constraints.
652
653   overriding function Exclude_Collisions
654    (Self : not null access constant UML_Extension_Proxy;
655     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
656       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
657   --  Operation Namespace::excludeCollisions.
658   --
659   --  The query excludeCollisions() excludes from a set of
660   --  PackageableElements any that would not be distinguishable from each
661   --  other in this namespace.
662
663   overriding function Get_Names_Of_Member
664    (Self : not null access constant UML_Extension_Proxy;
665     Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
666       return AMF.String_Collections.Set_Of_String;
667   --  Operation Namespace::getNamesOfMember.
668   --
669   --  The query getNamesOfMember() takes importing into account. It gives
670   --  back the set of names that an element would have in an importing
671   --  namespace, either because it is owned, or if not owned then imported
672   --  individually, or if not individually then from a package.
673   --  The query getNamesOfMember() gives a set of all of the names that a
674   --  member would have in a Namespace. In general a member can have multiple
675   --  names in a Namespace if it is imported more than once with different
676   --  aliases. The query takes account of importing. It gives back the set of
677   --  names that an element would have in an importing namespace, either
678   --  because it is owned, or if not owned then imported individually, or if
679   --  not individually then from a package.
680
681   overriding function Import_Members
682    (Self : not null access constant UML_Extension_Proxy;
683     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
684       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
685   --  Operation Namespace::importMembers.
686   --
687   --  The query importMembers() defines which of a set of PackageableElements
688   --  are actually imported into the namespace. This excludes hidden ones,
689   --  i.e., those which have names that conflict with names of owned members,
690   --  and also excludes elements which would have the same name when imported.
691
692   overriding function Imported_Member
693    (Self : not null access constant UML_Extension_Proxy)
694       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
695   --  Operation Namespace::importedMember.
696   --
697   --  The importedMember property is derived from the ElementImports and the
698   --  PackageImports. References the PackageableElements that are members of
699   --  this Namespace as a result of either PackageImports or ElementImports.
700
701   overriding function Members_Are_Distinguishable
702    (Self : not null access constant UML_Extension_Proxy)
703       return Boolean;
704   --  Operation Namespace::membersAreDistinguishable.
705   --
706   --  The Boolean query membersAreDistinguishable() determines whether all of
707   --  the namespace's members are distinguishable within it.
708
709   overriding function Owned_Member
710    (Self : not null access constant UML_Extension_Proxy)
711       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
712   --  Operation Namespace::ownedMember.
713   --
714   --  Missing derivation for Namespace::/ownedMember : NamedElement
715
716   overriding function All_Owning_Packages
717    (Self : not null access constant UML_Extension_Proxy)
718       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
719   --  Operation NamedElement::allOwningPackages.
720   --
721   --  The query allOwningPackages() returns all the directly or indirectly
722   --  owning packages.
723
724   overriding function Is_Distinguishable_From
725    (Self : not null access constant UML_Extension_Proxy;
726     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
727     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
728       return Boolean;
729   --  Operation NamedElement::isDistinguishableFrom.
730   --
731   --  The query isDistinguishableFrom() determines whether two NamedElements
732   --  may logically co-exist within a Namespace. By default, two named
733   --  elements are distinguishable if (a) they have unrelated types or (b)
734   --  they have related types but different names.
735
736   overriding function Namespace
737    (Self : not null access constant UML_Extension_Proxy)
738       return AMF.UML.Namespaces.UML_Namespace_Access;
739   --  Operation NamedElement::namespace.
740   --
741   --  Missing derivation for NamedElement::/namespace : Namespace
742
743   overriding function Conforms_To
744    (Self : not null access constant UML_Extension_Proxy;
745     Other : AMF.UML.Types.UML_Type_Access)
746       return Boolean;
747   --  Operation Type::conformsTo.
748   --
749   --  The query conformsTo() gives true for a type that conforms to another.
750   --  By default, two types do not conform to each other. This query is
751   --  intended to be redefined for specific conformance situations.
752
753   overriding function Is_Compatible_With
754    (Self : not null access constant UML_Extension_Proxy;
755     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
756       return Boolean;
757   --  Operation ParameterableElement::isCompatibleWith.
758   --
759   --  The query isCompatibleWith() determines if this parameterable element
760   --  is compatible with the specified parameterable element. By default
761   --  parameterable element P is compatible with parameterable element Q if
762   --  the kind of P is the same or a subtype as the kind of Q. Subclasses
763   --  should override this operation to specify different compatibility
764   --  constraints.
765
766   overriding function Is_Template_Parameter
767    (Self : not null access constant UML_Extension_Proxy)
768       return Boolean;
769   --  Operation ParameterableElement::isTemplateParameter.
770   --
771   --  The query isTemplateParameter() determines if this parameterable
772   --  element is exposed as a formal template parameter.
773
774   overriding function Parameterable_Elements
775    (Self : not null access constant UML_Extension_Proxy)
776       return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element;
777   --  Operation TemplateableElement::parameterableElements.
778   --
779   --  The query parameterableElements() returns the set of elements that may
780   --  be used as the parametered elements for a template parameter of this
781   --  templateable element. By default, this set includes all the owned
782   --  elements. Subclasses may override this operation if they choose to
783   --  restrict the set of parameterable elements.
784
785   overriding function Is_Consistent_With
786    (Self : not null access constant UML_Extension_Proxy;
787     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
788       return Boolean;
789   --  Operation RedefinableElement::isConsistentWith.
790   --
791   --  The query isConsistentWith() specifies, for any two RedefinableElements
792   --  in a context in which redefinition is possible, whether redefinition
793   --  would be logically consistent. By default, this is false; this
794   --  operation must be overridden for subclasses of RedefinableElement to
795   --  define the consistency conditions.
796
797   overriding function Is_Redefinition_Context_Valid
798    (Self : not null access constant UML_Extension_Proxy;
799     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
800       return Boolean;
801   --  Operation RedefinableElement::isRedefinitionContextValid.
802   --
803   --  The query isRedefinitionContextValid() specifies whether the
804   --  redefinition contexts of this RedefinableElement are properly related
805   --  to the redefinition contexts of the specified RedefinableElement to
806   --  allow this element to redefine the other. By default at least one of
807   --  the redefinition contexts of this element must be a specialization of
808   --  at least one of the redefinition contexts of the specified element.
809
810   overriding procedure Enter_Element
811    (Self    : not null access constant UML_Extension_Proxy;
812     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
813     Control : in out AMF.Visitors.Traverse_Control);
814   --  Dispatch call to corresponding subprogram of visitor interface.
815
816   overriding procedure Leave_Element
817    (Self    : not null access constant UML_Extension_Proxy;
818     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
819     Control : in out AMF.Visitors.Traverse_Control);
820   --  Dispatch call to corresponding subprogram of visitor interface.
821
822   overriding procedure Visit_Element
823    (Self     : not null access constant UML_Extension_Proxy;
824     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
825     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
826     Control  : in out AMF.Visitors.Traverse_Control);
827   --  Dispatch call to corresponding subprogram of iterator interface.
828
829end AMF.Internals.UML_Extensions;
830