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