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_Named_Elements; 45with AMF.UML.Classifiers.Collections; 46with AMF.UML.Dependencies.Collections; 47with AMF.UML.Extension_Points; 48with AMF.UML.Named_Elements; 49with AMF.UML.Namespaces; 50with AMF.UML.Packages.Collections; 51with AMF.UML.Redefinable_Elements.Collections; 52with AMF.UML.String_Expressions; 53with AMF.UML.Use_Cases; 54with AMF.Visitors; 55 56package AMF.Internals.UML_Extension_Points is 57 58 type UML_Extension_Point_Proxy is 59 limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy 60 and AMF.UML.Extension_Points.UML_Extension_Point with null record; 61 62 overriding function Get_Use_Case 63 (Self : not null access constant UML_Extension_Point_Proxy) 64 return AMF.UML.Use_Cases.UML_Use_Case_Access; 65 -- Getter of ExtensionPoint::useCase. 66 -- 67 -- References the use case that owns this extension point. 68 69 overriding procedure Set_Use_Case 70 (Self : not null access UML_Extension_Point_Proxy; 71 To : AMF.UML.Use_Cases.UML_Use_Case_Access); 72 -- Setter of ExtensionPoint::useCase. 73 -- 74 -- References the use case that owns this extension point. 75 76 overriding function Get_Is_Leaf 77 (Self : not null access constant UML_Extension_Point_Proxy) 78 return Boolean; 79 -- Getter of RedefinableElement::isLeaf. 80 -- 81 -- Indicates whether it is possible to further redefine a 82 -- RedefinableElement. If the value is true, then it is not possible to 83 -- further redefine the RedefinableElement. Note that this property is 84 -- preserved through package merge operations; that is, the capability to 85 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 86 -- the resulting RedefinableElement of a package merge operation where a 87 -- RedefinableElement with isLeaf=false is merged with a matching 88 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 89 -- will have isLeaf=false. Default value is false. 90 91 overriding procedure Set_Is_Leaf 92 (Self : not null access UML_Extension_Point_Proxy; 93 To : Boolean); 94 -- Setter of RedefinableElement::isLeaf. 95 -- 96 -- Indicates whether it is possible to further redefine a 97 -- RedefinableElement. If the value is true, then it is not possible to 98 -- further redefine the RedefinableElement. Note that this property is 99 -- preserved through package merge operations; that is, the capability to 100 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 101 -- the resulting RedefinableElement of a package merge operation where a 102 -- RedefinableElement with isLeaf=false is merged with a matching 103 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 104 -- will have isLeaf=false. Default value is false. 105 106 overriding function Get_Redefined_Element 107 (Self : not null access constant UML_Extension_Point_Proxy) 108 return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element; 109 -- Getter of RedefinableElement::redefinedElement. 110 -- 111 -- The redefinable element that is being redefined by this element. 112 113 overriding function Get_Redefinition_Context 114 (Self : not null access constant UML_Extension_Point_Proxy) 115 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; 116 -- Getter of RedefinableElement::redefinitionContext. 117 -- 118 -- References the contexts that this element may be redefined from. 119 120 overriding function Get_Client_Dependency 121 (Self : not null access constant UML_Extension_Point_Proxy) 122 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 123 -- Getter of NamedElement::clientDependency. 124 -- 125 -- Indicates the dependencies that reference the client. 126 127 overriding function Get_Name_Expression 128 (Self : not null access constant UML_Extension_Point_Proxy) 129 return AMF.UML.String_Expressions.UML_String_Expression_Access; 130 -- Getter of NamedElement::nameExpression. 131 -- 132 -- The string expression used to define the name of this named element. 133 134 overriding procedure Set_Name_Expression 135 (Self : not null access UML_Extension_Point_Proxy; 136 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 137 -- Setter of NamedElement::nameExpression. 138 -- 139 -- The string expression used to define the name of this named element. 140 141 overriding function Get_Namespace 142 (Self : not null access constant UML_Extension_Point_Proxy) 143 return AMF.UML.Namespaces.UML_Namespace_Access; 144 -- Getter of NamedElement::namespace. 145 -- 146 -- Specifies the namespace that owns the NamedElement. 147 148 overriding function Get_Qualified_Name 149 (Self : not null access constant UML_Extension_Point_Proxy) 150 return AMF.Optional_String; 151 -- Getter of NamedElement::qualifiedName. 152 -- 153 -- A name which allows the NamedElement to be identified within a 154 -- hierarchy of nested Namespaces. It is constructed from the names of the 155 -- containing namespaces starting at the root of the hierarchy and ending 156 -- with the name of the NamedElement itself. 157 158 overriding function Is_Consistent_With 159 (Self : not null access constant UML_Extension_Point_Proxy; 160 Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 161 return Boolean; 162 -- Operation RedefinableElement::isConsistentWith. 163 -- 164 -- The query isConsistentWith() specifies, for any two RedefinableElements 165 -- in a context in which redefinition is possible, whether redefinition 166 -- would be logically consistent. By default, this is false; this 167 -- operation must be overridden for subclasses of RedefinableElement to 168 -- define the consistency conditions. 169 170 overriding function Is_Redefinition_Context_Valid 171 (Self : not null access constant UML_Extension_Point_Proxy; 172 Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 173 return Boolean; 174 -- Operation RedefinableElement::isRedefinitionContextValid. 175 -- 176 -- The query isRedefinitionContextValid() specifies whether the 177 -- redefinition contexts of this RedefinableElement are properly related 178 -- to the redefinition contexts of the specified RedefinableElement to 179 -- allow this element to redefine the other. By default at least one of 180 -- the redefinition contexts of this element must be a specialization of 181 -- at least one of the redefinition contexts of the specified element. 182 183 overriding function All_Owning_Packages 184 (Self : not null access constant UML_Extension_Point_Proxy) 185 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 186 -- Operation NamedElement::allOwningPackages. 187 -- 188 -- The query allOwningPackages() returns all the directly or indirectly 189 -- owning packages. 190 191 overriding function Is_Distinguishable_From 192 (Self : not null access constant UML_Extension_Point_Proxy; 193 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 194 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 195 return Boolean; 196 -- Operation NamedElement::isDistinguishableFrom. 197 -- 198 -- The query isDistinguishableFrom() determines whether two NamedElements 199 -- may logically co-exist within a Namespace. By default, two named 200 -- elements are distinguishable if (a) they have unrelated types or (b) 201 -- they have related types but different names. 202 203 overriding function Namespace 204 (Self : not null access constant UML_Extension_Point_Proxy) 205 return AMF.UML.Namespaces.UML_Namespace_Access; 206 -- Operation NamedElement::namespace. 207 -- 208 -- Missing derivation for NamedElement::/namespace : Namespace 209 210 overriding procedure Enter_Element 211 (Self : not null access constant UML_Extension_Point_Proxy; 212 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 213 Control : in out AMF.Visitors.Traverse_Control); 214 -- Dispatch call to corresponding subprogram of visitor interface. 215 216 overriding procedure Leave_Element 217 (Self : not null access constant UML_Extension_Point_Proxy; 218 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 219 Control : in out AMF.Visitors.Traverse_Control); 220 -- Dispatch call to corresponding subprogram of visitor interface. 221 222 overriding procedure Visit_Element 223 (Self : not null access constant UML_Extension_Point_Proxy; 224 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 225 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 226 Control : in out AMF.Visitors.Traverse_Control); 227 -- Dispatch call to corresponding subprogram of iterator interface. 228 229end AMF.Internals.UML_Extension_Points; 230