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_Value_Specifications; 45with AMF.UML.Dependencies.Collections; 46with AMF.UML.Literal_Reals; 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.Visitors; 55 56package AMF.Internals.UML_Literal_Reals is 57 58 type UML_Literal_Real_Proxy is 59 limited new AMF.Internals.UML_Value_Specifications.UML_Value_Specification_Proxy 60 and AMF.UML.Literal_Reals.UML_Literal_Real with null record; 61 62 overriding function Get_Value 63 (Self : not null access constant UML_Literal_Real_Proxy) 64 return AMF.Real; 65 -- Getter of LiteralReal::value. 66 -- 67 68 overriding procedure Set_Value 69 (Self : not null access UML_Literal_Real_Proxy; 70 To : AMF.Real); 71 -- Setter of LiteralReal::value. 72 -- 73 74 overriding function Get_Type 75 (Self : not null access constant UML_Literal_Real_Proxy) 76 return AMF.UML.Types.UML_Type_Access; 77 -- Getter of TypedElement::type. 78 -- 79 -- The type of the TypedElement. 80 -- This information is derived from the return result for this Operation. 81 82 overriding procedure Set_Type 83 (Self : not null access UML_Literal_Real_Proxy; 84 To : AMF.UML.Types.UML_Type_Access); 85 -- Setter of TypedElement::type. 86 -- 87 -- The type of the TypedElement. 88 -- This information is derived from the return result for this Operation. 89 90 overriding function Get_Client_Dependency 91 (Self : not null access constant UML_Literal_Real_Proxy) 92 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 93 -- Getter of NamedElement::clientDependency. 94 -- 95 -- Indicates the dependencies that reference the client. 96 97 overriding function Get_Name_Expression 98 (Self : not null access constant UML_Literal_Real_Proxy) 99 return AMF.UML.String_Expressions.UML_String_Expression_Access; 100 -- Getter of NamedElement::nameExpression. 101 -- 102 -- The string expression used to define the name of this named element. 103 104 overriding procedure Set_Name_Expression 105 (Self : not null access UML_Literal_Real_Proxy; 106 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 107 -- Setter of NamedElement::nameExpression. 108 -- 109 -- The string expression used to define the name of this named element. 110 111 overriding function Get_Namespace 112 (Self : not null access constant UML_Literal_Real_Proxy) 113 return AMF.UML.Namespaces.UML_Namespace_Access; 114 -- Getter of NamedElement::namespace. 115 -- 116 -- Specifies the namespace that owns the NamedElement. 117 118 overriding function Get_Qualified_Name 119 (Self : not null access constant UML_Literal_Real_Proxy) 120 return AMF.Optional_String; 121 -- Getter of NamedElement::qualifiedName. 122 -- 123 -- A name which allows the NamedElement to be identified within a 124 -- hierarchy of nested Namespaces. It is constructed from the names of the 125 -- containing namespaces starting at the root of the hierarchy and ending 126 -- with the name of the NamedElement itself. 127 128 overriding function Get_Owning_Template_Parameter 129 (Self : not null access constant UML_Literal_Real_Proxy) 130 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 131 -- Getter of ParameterableElement::owningTemplateParameter. 132 -- 133 -- The formal template parameter that owns this element. 134 135 overriding procedure Set_Owning_Template_Parameter 136 (Self : not null access UML_Literal_Real_Proxy; 137 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 138 -- Setter of ParameterableElement::owningTemplateParameter. 139 -- 140 -- The formal template parameter that owns this element. 141 142 overriding function Get_Template_Parameter 143 (Self : not null access constant UML_Literal_Real_Proxy) 144 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 145 -- Getter of ParameterableElement::templateParameter. 146 -- 147 -- The template parameter that exposes this element as a formal parameter. 148 149 overriding procedure Set_Template_Parameter 150 (Self : not null access UML_Literal_Real_Proxy; 151 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 152 -- Setter of ParameterableElement::templateParameter. 153 -- 154 -- The template parameter that exposes this element as a formal parameter. 155 156 overriding function Is_Computable 157 (Self : not null access constant UML_Literal_Real_Proxy) 158 return Boolean; 159 -- Operation LiteralReal::isComputable. 160 -- 161 -- The query isComputable() is redefined to be true. 162 163 overriding function Real_Value 164 (Self : not null access constant UML_Literal_Real_Proxy) 165 return AMF.Real; 166 -- Operation LiteralReal::realValue. 167 -- 168 -- The query realValue() gives the value. 169 170 overriding function Is_Compatible_With 171 (Self : not null access constant UML_Literal_Real_Proxy; 172 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 173 return Boolean; 174 -- Operation ValueSpecification::isCompatibleWith. 175 -- 176 -- The query isCompatibleWith() determines if this parameterable element 177 -- is compatible with the specified parameterable element. By default 178 -- parameterable element P is compatible with parameterable element Q if 179 -- the kind of P is the same or a subtype as the kind of Q. In addition, 180 -- for ValueSpecification, the type must be conformant with the type of 181 -- the specified parameterable element. 182 183 overriding function Real_Value 184 (Self : not null access constant UML_Literal_Real_Proxy) 185 return AMF.Optional_Real; 186 -- Operation ValueSpecification::realValue. 187 -- 188 -- The query realValue() gives a single Real value when one can be 189 -- computed. 190 191 overriding function All_Owning_Packages 192 (Self : not null access constant UML_Literal_Real_Proxy) 193 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 194 -- Operation NamedElement::allOwningPackages. 195 -- 196 -- The query allOwningPackages() returns all the directly or indirectly 197 -- owning packages. 198 199 overriding function Is_Distinguishable_From 200 (Self : not null access constant UML_Literal_Real_Proxy; 201 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 202 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 203 return Boolean; 204 -- Operation NamedElement::isDistinguishableFrom. 205 -- 206 -- The query isDistinguishableFrom() determines whether two NamedElements 207 -- may logically co-exist within a Namespace. By default, two named 208 -- elements are distinguishable if (a) they have unrelated types or (b) 209 -- they have related types but different names. 210 211 overriding function Namespace 212 (Self : not null access constant UML_Literal_Real_Proxy) 213 return AMF.UML.Namespaces.UML_Namespace_Access; 214 -- Operation NamedElement::namespace. 215 -- 216 -- Missing derivation for NamedElement::/namespace : Namespace 217 218 overriding function Is_Template_Parameter 219 (Self : not null access constant UML_Literal_Real_Proxy) 220 return Boolean; 221 -- Operation ParameterableElement::isTemplateParameter. 222 -- 223 -- The query isTemplateParameter() determines if this parameterable 224 -- element is exposed as a formal template parameter. 225 226 overriding procedure Enter_Element 227 (Self : not null access constant UML_Literal_Real_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 Leave_Element 233 (Self : not null access constant UML_Literal_Real_Proxy; 234 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 235 Control : in out AMF.Visitors.Traverse_Control); 236 -- Dispatch call to corresponding subprogram of visitor interface. 237 238 overriding procedure Visit_Element 239 (Self : not null access constant UML_Literal_Real_Proxy; 240 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 241 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 242 Control : in out AMF.Visitors.Traverse_Control); 243 -- Dispatch call to corresponding subprogram of iterator interface. 244 245end AMF.Internals.UML_Literal_Reals; 246