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