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