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.Dependencies.Collections; 47with AMF.UML.Deployments.Collections; 48with AMF.UML.Instance_Specifications; 49with AMF.UML.Named_Elements; 50with AMF.UML.Namespaces; 51with AMF.UML.Packageable_Elements.Collections; 52with AMF.UML.Packages.Collections; 53with AMF.UML.Parameterable_Elements; 54with AMF.UML.Slots.Collections; 55with AMF.UML.String_Expressions; 56with AMF.UML.Template_Parameters; 57with AMF.UML.Value_Specifications; 58with AMF.Visitors; 59 60package AMF.Internals.UML_Instance_Specifications is 61 62 type UML_Instance_Specification_Proxy is 63 limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy 64 and AMF.UML.Instance_Specifications.UML_Instance_Specification with null record; 65 66 overriding function Get_Classifier 67 (Self : not null access constant UML_Instance_Specification_Proxy) 68 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; 69 -- Getter of InstanceSpecification::classifier. 70 -- 71 -- The classifier or classifiers of the represented instance. If multiple 72 -- classifiers are specified, the instance is classified by all of them. 73 74 overriding function Get_Slot 75 (Self : not null access constant UML_Instance_Specification_Proxy) 76 return AMF.UML.Slots.Collections.Set_Of_UML_Slot; 77 -- Getter of InstanceSpecification::slot. 78 -- 79 -- A slot giving the value or values of a structural feature of the 80 -- instance. An instance specification can have one slot per structural 81 -- feature of its classifiers, including inherited features. It is not 82 -- necessary to model a slot for each structural feature, in which case 83 -- the instance specification is a partial description. 84 85 overriding function Get_Specification 86 (Self : not null access constant UML_Instance_Specification_Proxy) 87 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 88 -- Getter of InstanceSpecification::specification. 89 -- 90 -- A specification of how to compute, derive, or construct the instance. 91 92 overriding procedure Set_Specification 93 (Self : not null access UML_Instance_Specification_Proxy; 94 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 95 -- Setter of InstanceSpecification::specification. 96 -- 97 -- A specification of how to compute, derive, or construct the instance. 98 99 overriding function Get_Deployed_Element 100 (Self : not null access constant UML_Instance_Specification_Proxy) 101 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element; 102 -- Getter of DeploymentTarget::deployedElement. 103 -- 104 -- The set of elements that are manifested in an Artifact that is involved 105 -- in Deployment to a DeploymentTarget. 106 107 overriding function Get_Deployment 108 (Self : not null access constant UML_Instance_Specification_Proxy) 109 return AMF.UML.Deployments.Collections.Set_Of_UML_Deployment; 110 -- Getter of DeploymentTarget::deployment. 111 -- 112 -- The set of Deployments for a DeploymentTarget. 113 114 overriding function Get_Client_Dependency 115 (Self : not null access constant UML_Instance_Specification_Proxy) 116 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 117 -- Getter of NamedElement::clientDependency. 118 -- 119 -- Indicates the dependencies that reference the client. 120 121 overriding function Get_Name_Expression 122 (Self : not null access constant UML_Instance_Specification_Proxy) 123 return AMF.UML.String_Expressions.UML_String_Expression_Access; 124 -- Getter of NamedElement::nameExpression. 125 -- 126 -- The string expression used to define the name of this named element. 127 128 overriding procedure Set_Name_Expression 129 (Self : not null access UML_Instance_Specification_Proxy; 130 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 131 -- Setter of NamedElement::nameExpression. 132 -- 133 -- The string expression used to define the name of this named element. 134 135 overriding function Get_Namespace 136 (Self : not null access constant UML_Instance_Specification_Proxy) 137 return AMF.UML.Namespaces.UML_Namespace_Access; 138 -- Getter of NamedElement::namespace. 139 -- 140 -- Specifies the namespace that owns the NamedElement. 141 142 overriding function Get_Qualified_Name 143 (Self : not null access constant UML_Instance_Specification_Proxy) 144 return AMF.Optional_String; 145 -- Getter of NamedElement::qualifiedName. 146 -- 147 -- A name which allows the NamedElement to be identified within a 148 -- hierarchy of nested Namespaces. It is constructed from the names of the 149 -- containing namespaces starting at the root of the hierarchy and ending 150 -- with the name of the NamedElement itself. 151 152 overriding function Get_Owning_Template_Parameter 153 (Self : not null access constant UML_Instance_Specification_Proxy) 154 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 155 -- Getter of ParameterableElement::owningTemplateParameter. 156 -- 157 -- The formal template parameter that owns this element. 158 159 overriding procedure Set_Owning_Template_Parameter 160 (Self : not null access UML_Instance_Specification_Proxy; 161 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 162 -- Setter of ParameterableElement::owningTemplateParameter. 163 -- 164 -- The formal template parameter that owns this element. 165 166 overriding function Get_Template_Parameter 167 (Self : not null access constant UML_Instance_Specification_Proxy) 168 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 169 -- Getter of ParameterableElement::templateParameter. 170 -- 171 -- The template parameter that exposes this element as a formal parameter. 172 173 overriding procedure Set_Template_Parameter 174 (Self : not null access UML_Instance_Specification_Proxy; 175 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 176 -- Setter of ParameterableElement::templateParameter. 177 -- 178 -- The template parameter that exposes this element as a formal parameter. 179 180 overriding function Deployed_Element 181 (Self : not null access constant UML_Instance_Specification_Proxy) 182 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element; 183 -- Operation DeploymentTarget::deployedElement. 184 -- 185 -- Missing derivation for DeploymentTarget::/deployedElement : 186 -- PackageableElement 187 188 overriding function All_Owning_Packages 189 (Self : not null access constant UML_Instance_Specification_Proxy) 190 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 191 -- Operation NamedElement::allOwningPackages. 192 -- 193 -- The query allOwningPackages() returns all the directly or indirectly 194 -- owning packages. 195 196 overriding function Is_Distinguishable_From 197 (Self : not null access constant UML_Instance_Specification_Proxy; 198 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 199 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 200 return Boolean; 201 -- Operation NamedElement::isDistinguishableFrom. 202 -- 203 -- The query isDistinguishableFrom() determines whether two NamedElements 204 -- may logically co-exist within a Namespace. By default, two named 205 -- elements are distinguishable if (a) they have unrelated types or (b) 206 -- they have related types but different names. 207 208 overriding function Namespace 209 (Self : not null access constant UML_Instance_Specification_Proxy) 210 return AMF.UML.Namespaces.UML_Namespace_Access; 211 -- Operation NamedElement::namespace. 212 -- 213 -- Missing derivation for NamedElement::/namespace : Namespace 214 215 overriding function Is_Compatible_With 216 (Self : not null access constant UML_Instance_Specification_Proxy; 217 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 218 return Boolean; 219 -- Operation ParameterableElement::isCompatibleWith. 220 -- 221 -- The query isCompatibleWith() determines if this parameterable element 222 -- is compatible with the specified parameterable element. By default 223 -- parameterable element P is compatible with parameterable element Q if 224 -- the kind of P is the same or a subtype as the kind of Q. Subclasses 225 -- should override this operation to specify different compatibility 226 -- constraints. 227 228 overriding function Is_Template_Parameter 229 (Self : not null access constant UML_Instance_Specification_Proxy) 230 return Boolean; 231 -- Operation ParameterableElement::isTemplateParameter. 232 -- 233 -- The query isTemplateParameter() determines if this parameterable 234 -- element is exposed as a formal template parameter. 235 236 overriding procedure Enter_Element 237 (Self : not null access constant UML_Instance_Specification_Proxy; 238 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 239 Control : in out AMF.Visitors.Traverse_Control); 240 -- Dispatch call to corresponding subprogram of visitor interface. 241 242 overriding procedure Leave_Element 243 (Self : not null access constant UML_Instance_Specification_Proxy; 244 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 245 Control : in out AMF.Visitors.Traverse_Control); 246 -- Dispatch call to corresponding subprogram of visitor interface. 247 248 overriding procedure Visit_Element 249 (Self : not null access constant UML_Instance_Specification_Proxy; 250 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 251 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 252 Control : in out AMF.Visitors.Traverse_Control); 253 -- Dispatch call to corresponding subprogram of iterator interface. 254 255end AMF.Internals.UML_Instance_Specifications; 256