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.Boolean_Collections; 45with AMF.Internals.UML_Packageable_Elements; 46with AMF.UML.Dependencies.Collections; 47with AMF.UML.Duration_Constraints; 48with AMF.UML.Duration_Intervals; 49with AMF.UML.Elements.Collections; 50with AMF.UML.Intervals; 51with AMF.UML.Named_Elements; 52with AMF.UML.Namespaces; 53with AMF.UML.Packages.Collections; 54with AMF.UML.Parameterable_Elements; 55with AMF.UML.String_Expressions; 56with AMF.UML.Template_Parameters; 57with AMF.UML.Value_Specifications; 58with AMF.Visitors; 59 60package AMF.Internals.UML_Duration_Constraints is 61 62 type UML_Duration_Constraint_Proxy is 63 limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy 64 and AMF.UML.Duration_Constraints.UML_Duration_Constraint with null record; 65 66 overriding function Get_First_Event 67 (Self : not null access constant UML_Duration_Constraint_Proxy) 68 return AMF.Boolean_Collections.Set_Of_Boolean; 69 -- Getter of DurationConstraint::firstEvent. 70 -- 71 -- The value of firstEvent[i] is related to constrainedElement[i] (where i 72 -- is 1 or 2). If firstEvent[i] is true, then the corresponding 73 -- observation event is the first time instant the execution enters 74 -- constrainedElement[i]. If firstEvent[i] is false, then the 75 -- corresponding observation event is the last time instant the execution 76 -- is within constrainedElement[i]. Default value is true applied when 77 -- constrainedElement[i] refers an element that represents only one time 78 -- instant. 79 80 overriding function Get_Specification 81 (Self : not null access constant UML_Duration_Constraint_Proxy) 82 return AMF.UML.Duration_Intervals.UML_Duration_Interval_Access; 83 -- Getter of DurationConstraint::specification. 84 -- 85 -- The interval constraining the duration. 86 87 overriding procedure Set_Specification 88 (Self : not null access UML_Duration_Constraint_Proxy; 89 To : AMF.UML.Duration_Intervals.UML_Duration_Interval_Access); 90 -- Setter of DurationConstraint::specification. 91 -- 92 -- The interval constraining the duration. 93 94 overriding function Get_Specification 95 (Self : not null access constant UML_Duration_Constraint_Proxy) 96 return AMF.UML.Intervals.UML_Interval_Access; 97 -- Getter of IntervalConstraint::specification. 98 -- 99 -- A condition that must be true when evaluated in order for the 100 -- constraint to be satisfied. 101 102 overriding procedure Set_Specification 103 (Self : not null access UML_Duration_Constraint_Proxy; 104 To : AMF.UML.Intervals.UML_Interval_Access); 105 -- Setter of IntervalConstraint::specification. 106 -- 107 -- A condition that must be true when evaluated in order for the 108 -- constraint to be satisfied. 109 110 overriding function Get_Constrained_Element 111 (Self : not null access constant UML_Duration_Constraint_Proxy) 112 return AMF.UML.Elements.Collections.Ordered_Set_Of_UML_Element; 113 -- Getter of Constraint::constrainedElement. 114 -- 115 -- The ordered set of Elements referenced by this Constraint. 116 117 overriding function Get_Context 118 (Self : not null access constant UML_Duration_Constraint_Proxy) 119 return AMF.UML.Namespaces.UML_Namespace_Access; 120 -- Getter of Constraint::context. 121 -- 122 -- Specifies the namespace that owns the NamedElement. 123 124 overriding procedure Set_Context 125 (Self : not null access UML_Duration_Constraint_Proxy; 126 To : AMF.UML.Namespaces.UML_Namespace_Access); 127 -- Setter of Constraint::context. 128 -- 129 -- Specifies the namespace that owns the NamedElement. 130 131 overriding function Get_Specification 132 (Self : not null access constant UML_Duration_Constraint_Proxy) 133 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 134 -- Getter of Constraint::specification. 135 -- 136 -- A condition that must be true when evaluated in order for the 137 -- constraint to be satisfied. 138 139 overriding procedure Set_Specification 140 (Self : not null access UML_Duration_Constraint_Proxy; 141 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 142 -- Setter of Constraint::specification. 143 -- 144 -- A condition that must be true when evaluated in order for the 145 -- constraint to be satisfied. 146 147 overriding function Get_Client_Dependency 148 (Self : not null access constant UML_Duration_Constraint_Proxy) 149 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 150 -- Getter of NamedElement::clientDependency. 151 -- 152 -- Indicates the dependencies that reference the client. 153 154 overriding function Get_Name_Expression 155 (Self : not null access constant UML_Duration_Constraint_Proxy) 156 return AMF.UML.String_Expressions.UML_String_Expression_Access; 157 -- Getter of NamedElement::nameExpression. 158 -- 159 -- The string expression used to define the name of this named element. 160 161 overriding procedure Set_Name_Expression 162 (Self : not null access UML_Duration_Constraint_Proxy; 163 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 164 -- Setter of NamedElement::nameExpression. 165 -- 166 -- The string expression used to define the name of this named element. 167 168 overriding function Get_Namespace 169 (Self : not null access constant UML_Duration_Constraint_Proxy) 170 return AMF.UML.Namespaces.UML_Namespace_Access; 171 -- Getter of NamedElement::namespace. 172 -- 173 -- Specifies the namespace that owns the NamedElement. 174 175 overriding function Get_Qualified_Name 176 (Self : not null access constant UML_Duration_Constraint_Proxy) 177 return AMF.Optional_String; 178 -- Getter of NamedElement::qualifiedName. 179 -- 180 -- A name which allows the NamedElement to be identified within a 181 -- hierarchy of nested Namespaces. It is constructed from the names of the 182 -- containing namespaces starting at the root of the hierarchy and ending 183 -- with the name of the NamedElement itself. 184 185 overriding function Get_Owning_Template_Parameter 186 (Self : not null access constant UML_Duration_Constraint_Proxy) 187 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 188 -- Getter of ParameterableElement::owningTemplateParameter. 189 -- 190 -- The formal template parameter that owns this element. 191 192 overriding procedure Set_Owning_Template_Parameter 193 (Self : not null access UML_Duration_Constraint_Proxy; 194 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 195 -- Setter of ParameterableElement::owningTemplateParameter. 196 -- 197 -- The formal template parameter that owns this element. 198 199 overriding function Get_Template_Parameter 200 (Self : not null access constant UML_Duration_Constraint_Proxy) 201 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 202 -- Getter of ParameterableElement::templateParameter. 203 -- 204 -- The template parameter that exposes this element as a formal parameter. 205 206 overriding procedure Set_Template_Parameter 207 (Self : not null access UML_Duration_Constraint_Proxy; 208 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 209 -- Setter of ParameterableElement::templateParameter. 210 -- 211 -- The template parameter that exposes this element as a formal parameter. 212 213 overriding function All_Owning_Packages 214 (Self : not null access constant UML_Duration_Constraint_Proxy) 215 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 216 -- Operation NamedElement::allOwningPackages. 217 -- 218 -- The query allOwningPackages() returns all the directly or indirectly 219 -- owning packages. 220 221 overriding function Is_Distinguishable_From 222 (Self : not null access constant UML_Duration_Constraint_Proxy; 223 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 224 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 225 return Boolean; 226 -- Operation NamedElement::isDistinguishableFrom. 227 -- 228 -- The query isDistinguishableFrom() determines whether two NamedElements 229 -- may logically co-exist within a Namespace. By default, two named 230 -- elements are distinguishable if (a) they have unrelated types or (b) 231 -- they have related types but different names. 232 233 overriding function Namespace 234 (Self : not null access constant UML_Duration_Constraint_Proxy) 235 return AMF.UML.Namespaces.UML_Namespace_Access; 236 -- Operation NamedElement::namespace. 237 -- 238 -- Missing derivation for NamedElement::/namespace : Namespace 239 240 overriding function Is_Compatible_With 241 (Self : not null access constant UML_Duration_Constraint_Proxy; 242 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 243 return Boolean; 244 -- Operation ParameterableElement::isCompatibleWith. 245 -- 246 -- The query isCompatibleWith() determines if this parameterable element 247 -- is compatible with the specified parameterable element. By default 248 -- parameterable element P is compatible with parameterable element Q if 249 -- the kind of P is the same or a subtype as the kind of Q. Subclasses 250 -- should override this operation to specify different compatibility 251 -- constraints. 252 253 overriding function Is_Template_Parameter 254 (Self : not null access constant UML_Duration_Constraint_Proxy) 255 return Boolean; 256 -- Operation ParameterableElement::isTemplateParameter. 257 -- 258 -- The query isTemplateParameter() determines if this parameterable 259 -- element is exposed as a formal template parameter. 260 261 overriding procedure Enter_Element 262 (Self : not null access constant UML_Duration_Constraint_Proxy; 263 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 264 Control : in out AMF.Visitors.Traverse_Control); 265 -- Dispatch call to corresponding subprogram of visitor interface. 266 267 overriding procedure Leave_Element 268 (Self : not null access constant UML_Duration_Constraint_Proxy; 269 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 270 Control : in out AMF.Visitors.Traverse_Control); 271 -- Dispatch call to corresponding subprogram of visitor interface. 272 273 overriding procedure Visit_Element 274 (Self : not null access constant UML_Duration_Constraint_Proxy; 275 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 276 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 277 Control : in out AMF.Visitors.Traverse_Control); 278 -- Dispatch call to corresponding subprogram of iterator interface. 279 280end AMF.Internals.UML_Duration_Constraints; 281