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.Intervals; 47with AMF.UML.Named_Elements; 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.Types; 54with AMF.UML.Value_Specifications; 55with AMF.Visitors; 56 57package AMF.Internals.UML_Intervals is 58 59 type UML_Interval_Proxy is 60 limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy 61 and AMF.UML.Intervals.UML_Interval with null record; 62 63 overriding function Get_Max 64 (Self : not null access constant UML_Interval_Proxy) 65 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 66 -- Getter of Interval::max. 67 -- 68 -- Refers to the ValueSpecification denoting the maximum value of the 69 -- range. 70 71 overriding procedure Set_Max 72 (Self : not null access UML_Interval_Proxy; 73 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 74 -- Setter of Interval::max. 75 -- 76 -- Refers to the ValueSpecification denoting the maximum value of the 77 -- range. 78 79 overriding function Get_Min 80 (Self : not null access constant UML_Interval_Proxy) 81 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 82 -- Getter of Interval::min. 83 -- 84 -- Refers to the ValueSpecification denoting the minimum value of the 85 -- range. 86 87 overriding procedure Set_Min 88 (Self : not null access UML_Interval_Proxy; 89 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 90 -- Setter of Interval::min. 91 -- 92 -- Refers to the ValueSpecification denoting the minimum value of the 93 -- range. 94 95 overriding function Get_Type 96 (Self : not null access constant UML_Interval_Proxy) 97 return AMF.UML.Types.UML_Type_Access; 98 -- Getter of TypedElement::type. 99 -- 100 -- The type of the TypedElement. 101 -- This information is derived from the return result for this Operation. 102 103 overriding procedure Set_Type 104 (Self : not null access UML_Interval_Proxy; 105 To : AMF.UML.Types.UML_Type_Access); 106 -- Setter of TypedElement::type. 107 -- 108 -- The type of the TypedElement. 109 -- This information is derived from the return result for this Operation. 110 111 overriding function Get_Client_Dependency 112 (Self : not null access constant UML_Interval_Proxy) 113 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 114 -- Getter of NamedElement::clientDependency. 115 -- 116 -- Indicates the dependencies that reference the client. 117 118 overriding function Get_Name_Expression 119 (Self : not null access constant UML_Interval_Proxy) 120 return AMF.UML.String_Expressions.UML_String_Expression_Access; 121 -- Getter of NamedElement::nameExpression. 122 -- 123 -- The string expression used to define the name of this named element. 124 125 overriding procedure Set_Name_Expression 126 (Self : not null access UML_Interval_Proxy; 127 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 128 -- Setter of NamedElement::nameExpression. 129 -- 130 -- The string expression used to define the name of this named element. 131 132 overriding function Get_Namespace 133 (Self : not null access constant UML_Interval_Proxy) 134 return AMF.UML.Namespaces.UML_Namespace_Access; 135 -- Getter of NamedElement::namespace. 136 -- 137 -- Specifies the namespace that owns the NamedElement. 138 139 overriding function Get_Qualified_Name 140 (Self : not null access constant UML_Interval_Proxy) 141 return AMF.Optional_String; 142 -- Getter of NamedElement::qualifiedName. 143 -- 144 -- A name which allows the NamedElement to be identified within a 145 -- hierarchy of nested Namespaces. It is constructed from the names of the 146 -- containing namespaces starting at the root of the hierarchy and ending 147 -- with the name of the NamedElement itself. 148 149 overriding function Get_Owning_Template_Parameter 150 (Self : not null access constant UML_Interval_Proxy) 151 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 152 -- Getter of ParameterableElement::owningTemplateParameter. 153 -- 154 -- The formal template parameter that owns this element. 155 156 overriding procedure Set_Owning_Template_Parameter 157 (Self : not null access UML_Interval_Proxy; 158 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 159 -- Setter of ParameterableElement::owningTemplateParameter. 160 -- 161 -- The formal template parameter that owns this element. 162 163 overriding function Get_Template_Parameter 164 (Self : not null access constant UML_Interval_Proxy) 165 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 166 -- Getter of ParameterableElement::templateParameter. 167 -- 168 -- The template parameter that exposes this element as a formal parameter. 169 170 overriding procedure Set_Template_Parameter 171 (Self : not null access UML_Interval_Proxy; 172 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 173 -- Setter of ParameterableElement::templateParameter. 174 -- 175 -- The template parameter that exposes this element as a formal parameter. 176 177 overriding function Boolean_Value 178 (Self : not null access constant UML_Interval_Proxy) 179 return AMF.Optional_Boolean; 180 -- Operation ValueSpecification::booleanValue. 181 -- 182 -- The query booleanValue() gives a single Boolean value when one can be 183 -- computed. 184 185 overriding function Integer_Value 186 (Self : not null access constant UML_Interval_Proxy) 187 return AMF.Optional_Integer; 188 -- Operation ValueSpecification::integerValue. 189 -- 190 -- The query integerValue() gives a single Integer value when one can be 191 -- computed. 192 193 overriding function Is_Compatible_With 194 (Self : not null access constant UML_Interval_Proxy; 195 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 196 return Boolean; 197 -- Operation ValueSpecification::isCompatibleWith. 198 -- 199 -- The query isCompatibleWith() determines if this parameterable element 200 -- is compatible with the specified parameterable element. By default 201 -- parameterable element P is compatible with parameterable element Q if 202 -- the kind of P is the same or a subtype as the kind of Q. In addition, 203 -- for ValueSpecification, the type must be conformant with the type of 204 -- the specified parameterable element. 205 206 overriding function Is_Computable 207 (Self : not null access constant UML_Interval_Proxy) 208 return Boolean; 209 -- Operation ValueSpecification::isComputable. 210 -- 211 -- The query isComputable() determines whether a value specification can 212 -- be computed in a model. This operation cannot be fully defined in OCL. 213 -- A conforming implementation is expected to deliver true for this 214 -- operation for all value specifications that it can compute, and to 215 -- compute all of those for which the operation is true. A conforming 216 -- implementation is expected to be able to compute the value of all 217 -- literals. 218 219 overriding function Is_Null 220 (Self : not null access constant UML_Interval_Proxy) 221 return Boolean; 222 -- Operation ValueSpecification::isNull. 223 -- 224 -- The query isNull() returns true when it can be computed that the value 225 -- is null. 226 227 overriding function Real_Value 228 (Self : not null access constant UML_Interval_Proxy) 229 return AMF.Optional_Real; 230 -- Operation ValueSpecification::realValue. 231 -- 232 -- The query realValue() gives a single Real value when one can be 233 -- computed. 234 235 overriding function String_Value 236 (Self : not null access constant UML_Interval_Proxy) 237 return AMF.Optional_String; 238 -- Operation ValueSpecification::stringValue. 239 -- 240 -- The query stringValue() gives a single String value when one can be 241 -- computed. 242 243 overriding function Unlimited_Value 244 (Self : not null access constant UML_Interval_Proxy) 245 return AMF.Optional_Unlimited_Natural; 246 -- Operation ValueSpecification::unlimitedValue. 247 -- 248 -- The query unlimitedValue() gives a single UnlimitedNatural value when 249 -- one can be computed. 250 251 overriding function All_Owning_Packages 252 (Self : not null access constant UML_Interval_Proxy) 253 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 254 -- Operation NamedElement::allOwningPackages. 255 -- 256 -- The query allOwningPackages() returns all the directly or indirectly 257 -- owning packages. 258 259 overriding function Is_Distinguishable_From 260 (Self : not null access constant UML_Interval_Proxy; 261 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 262 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 263 return Boolean; 264 -- Operation NamedElement::isDistinguishableFrom. 265 -- 266 -- The query isDistinguishableFrom() determines whether two NamedElements 267 -- may logically co-exist within a Namespace. By default, two named 268 -- elements are distinguishable if (a) they have unrelated types or (b) 269 -- they have related types but different names. 270 271 overriding function Namespace 272 (Self : not null access constant UML_Interval_Proxy) 273 return AMF.UML.Namespaces.UML_Namespace_Access; 274 -- Operation NamedElement::namespace. 275 -- 276 -- Missing derivation for NamedElement::/namespace : Namespace 277 278 overriding function Is_Template_Parameter 279 (Self : not null access constant UML_Interval_Proxy) 280 return Boolean; 281 -- Operation ParameterableElement::isTemplateParameter. 282 -- 283 -- The query isTemplateParameter() determines if this parameterable 284 -- element is exposed as a formal template parameter. 285 286 overriding procedure Enter_Element 287 (Self : not null access constant UML_Interval_Proxy; 288 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 289 Control : in out AMF.Visitors.Traverse_Control); 290 -- Dispatch call to corresponding subprogram of visitor interface. 291 292 overriding procedure Leave_Element 293 (Self : not null access constant UML_Interval_Proxy; 294 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 295 Control : in out AMF.Visitors.Traverse_Control); 296 -- Dispatch call to corresponding subprogram of visitor interface. 297 298 overriding procedure Visit_Element 299 (Self : not null access constant UML_Interval_Proxy; 300 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 301 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 302 Control : in out AMF.Visitors.Traverse_Control); 303 -- Dispatch call to corresponding subprogram of iterator interface. 304 305end AMF.Internals.UML_Intervals; 306