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_Packageable_Elements; 45with AMF.UML.Dependencies.Collections; 46with AMF.UML.Elements.Collections; 47with AMF.UML.Named_Elements.Collections; 48with AMF.UML.Namespaces; 49with AMF.UML.Opaque_Expressions; 50with AMF.UML.Packages.Collections; 51with AMF.UML.Parameterable_Elements; 52with AMF.UML.Realizations; 53with AMF.UML.String_Expressions; 54with AMF.UML.Template_Parameters; 55with AMF.Visitors; 56 57package AMF.Internals.UML_Realizations is 58 59 type UML_Realization_Proxy is 60 limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy 61 and AMF.UML.Realizations.UML_Realization with null record; 62 63 overriding function Get_Mapping 64 (Self : not null access constant UML_Realization_Proxy) 65 return AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access; 66 -- Getter of Abstraction::mapping. 67 -- 68 -- An composition of an Expression that states the abstraction 69 -- relationship between the supplier and the client. In some cases, such 70 -- as Derivation, it is usually formal and unidirectional; in other cases, 71 -- such as Trace, it is usually informal and bidirectional. The mapping 72 -- expression is optional and may be omitted if the precise relationship 73 -- between the elements is not specified. 74 75 overriding procedure Set_Mapping 76 (Self : not null access UML_Realization_Proxy; 77 To : AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access); 78 -- Setter of Abstraction::mapping. 79 -- 80 -- An composition of an Expression that states the abstraction 81 -- relationship between the supplier and the client. In some cases, such 82 -- as Derivation, it is usually formal and unidirectional; in other cases, 83 -- such as Trace, it is usually informal and bidirectional. The mapping 84 -- expression is optional and may be omitted if the precise relationship 85 -- between the elements is not specified. 86 87 overriding function Get_Client 88 (Self : not null access constant UML_Realization_Proxy) 89 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element; 90 -- Getter of Dependency::client. 91 -- 92 -- The element(s) dependent on the supplier element(s). In some cases 93 -- (such as a Trace Abstraction) the assignment of direction (that is, the 94 -- designation of the client element) is at the discretion of the modeler, 95 -- and is a stipulation. 96 97 overriding function Get_Supplier 98 (Self : not null access constant UML_Realization_Proxy) 99 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element; 100 -- Getter of Dependency::supplier. 101 -- 102 -- The element(s) independent of the client element(s), in the same 103 -- respect and the same dependency relationship. In some directed 104 -- dependency relationships (such as Refinement Abstractions), a common 105 -- convention in the domain of class-based OO software is to put the more 106 -- abstract element in this role. Despite this convention, users of UML 107 -- may stipulate a sense of dependency suitable for their domain, which 108 -- makes a more abstract element dependent on that which is more specific. 109 110 overriding function Get_Source 111 (Self : not null access constant UML_Realization_Proxy) 112 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 113 -- Getter of DirectedRelationship::source. 114 -- 115 -- Specifies the sources of the DirectedRelationship. 116 117 overriding function Get_Target 118 (Self : not null access constant UML_Realization_Proxy) 119 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 120 -- Getter of DirectedRelationship::target. 121 -- 122 -- Specifies the targets of the DirectedRelationship. 123 124 overriding function Get_Related_Element 125 (Self : not null access constant UML_Realization_Proxy) 126 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 127 -- Getter of Relationship::relatedElement. 128 -- 129 -- Specifies the elements related by the Relationship. 130 131 overriding function Get_Client_Dependency 132 (Self : not null access constant UML_Realization_Proxy) 133 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 134 -- Getter of NamedElement::clientDependency. 135 -- 136 -- Indicates the dependencies that reference the client. 137 138 overriding function Get_Name_Expression 139 (Self : not null access constant UML_Realization_Proxy) 140 return AMF.UML.String_Expressions.UML_String_Expression_Access; 141 -- Getter of NamedElement::nameExpression. 142 -- 143 -- The string expression used to define the name of this named element. 144 145 overriding procedure Set_Name_Expression 146 (Self : not null access UML_Realization_Proxy; 147 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 148 -- Setter of NamedElement::nameExpression. 149 -- 150 -- The string expression used to define the name of this named element. 151 152 overriding function Get_Namespace 153 (Self : not null access constant UML_Realization_Proxy) 154 return AMF.UML.Namespaces.UML_Namespace_Access; 155 -- Getter of NamedElement::namespace. 156 -- 157 -- Specifies the namespace that owns the NamedElement. 158 159 overriding function Get_Qualified_Name 160 (Self : not null access constant UML_Realization_Proxy) 161 return AMF.Optional_String; 162 -- Getter of NamedElement::qualifiedName. 163 -- 164 -- A name which allows the NamedElement to be identified within a 165 -- hierarchy of nested Namespaces. It is constructed from the names of the 166 -- containing namespaces starting at the root of the hierarchy and ending 167 -- with the name of the NamedElement itself. 168 169 overriding function Get_Owning_Template_Parameter 170 (Self : not null access constant UML_Realization_Proxy) 171 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 172 -- Getter of ParameterableElement::owningTemplateParameter. 173 -- 174 -- The formal template parameter that owns this element. 175 176 overriding procedure Set_Owning_Template_Parameter 177 (Self : not null access UML_Realization_Proxy; 178 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 179 -- Setter of ParameterableElement::owningTemplateParameter. 180 -- 181 -- The formal template parameter that owns this element. 182 183 overriding function Get_Template_Parameter 184 (Self : not null access constant UML_Realization_Proxy) 185 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 186 -- Getter of ParameterableElement::templateParameter. 187 -- 188 -- The template parameter that exposes this element as a formal parameter. 189 190 overriding procedure Set_Template_Parameter 191 (Self : not null access UML_Realization_Proxy; 192 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 193 -- Setter of ParameterableElement::templateParameter. 194 -- 195 -- The template parameter that exposes this element as a formal parameter. 196 197 overriding function All_Owning_Packages 198 (Self : not null access constant UML_Realization_Proxy) 199 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 200 -- Operation NamedElement::allOwningPackages. 201 -- 202 -- The query allOwningPackages() returns all the directly or indirectly 203 -- owning packages. 204 205 overriding function Is_Distinguishable_From 206 (Self : not null access constant UML_Realization_Proxy; 207 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 208 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 209 return Boolean; 210 -- Operation NamedElement::isDistinguishableFrom. 211 -- 212 -- The query isDistinguishableFrom() determines whether two NamedElements 213 -- may logically co-exist within a Namespace. By default, two named 214 -- elements are distinguishable if (a) they have unrelated types or (b) 215 -- they have related types but different names. 216 217 overriding function Namespace 218 (Self : not null access constant UML_Realization_Proxy) 219 return AMF.UML.Namespaces.UML_Namespace_Access; 220 -- Operation NamedElement::namespace. 221 -- 222 -- Missing derivation for NamedElement::/namespace : Namespace 223 224 overriding function Is_Compatible_With 225 (Self : not null access constant UML_Realization_Proxy; 226 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 227 return Boolean; 228 -- Operation ParameterableElement::isCompatibleWith. 229 -- 230 -- The query isCompatibleWith() determines if this parameterable element 231 -- is compatible with the specified parameterable element. By default 232 -- parameterable element P is compatible with parameterable element Q if 233 -- the kind of P is the same or a subtype as the kind of Q. Subclasses 234 -- should override this operation to specify different compatibility 235 -- constraints. 236 237 overriding function Is_Template_Parameter 238 (Self : not null access constant UML_Realization_Proxy) 239 return Boolean; 240 -- Operation ParameterableElement::isTemplateParameter. 241 -- 242 -- The query isTemplateParameter() determines if this parameterable 243 -- element is exposed as a formal template parameter. 244 245 overriding procedure Enter_Element 246 (Self : not null access constant UML_Realization_Proxy; 247 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 248 Control : in out AMF.Visitors.Traverse_Control); 249 -- Dispatch call to corresponding subprogram of visitor interface. 250 251 overriding procedure Leave_Element 252 (Self : not null access constant UML_Realization_Proxy; 253 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 254 Control : in out AMF.Visitors.Traverse_Control); 255 -- Dispatch call to corresponding subprogram of visitor interface. 256 257 overriding procedure Visit_Element 258 (Self : not null access constant UML_Realization_Proxy; 259 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 260 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 261 Control : in out AMF.Visitors.Traverse_Control); 262 -- Dispatch call to corresponding subprogram of iterator interface. 263 264end AMF.Internals.UML_Realizations; 265