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: 2864 $ $Date: 2012-04-13 14:08:07 +0400 (Fri, 13 Apr 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Internals.UML_Elements; 45with AMF.UML.Classifier_Template_Parameters; 46with AMF.UML.Classifiers.Collections; 47with AMF.UML.Parameterable_Elements; 48with AMF.UML.Template_Signatures; 49with AMF.Visitors; 50 51package AMF.Internals.UML_Classifier_Template_Parameters is 52 53 type UML_Classifier_Template_Parameter_Proxy is 54 limited new AMF.Internals.UML_Elements.UML_Element_Proxy 55 and AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter with null record; 56 57 overriding function Get_Allow_Substitutable 58 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 59 return Boolean; 60 -- Getter of ClassifierTemplateParameter::allowSubstitutable. 61 -- 62 -- Constrains the required relationship between an actual parameter and 63 -- the parameteredElement for this formal parameter. 64 65 overriding procedure Set_Allow_Substitutable 66 (Self : not null access UML_Classifier_Template_Parameter_Proxy; 67 To : Boolean); 68 -- Setter of ClassifierTemplateParameter::allowSubstitutable. 69 -- 70 -- Constrains the required relationship between an actual parameter and 71 -- the parameteredElement for this formal parameter. 72 73 overriding function Get_Constraining_Classifier 74 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 75 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; 76 -- Getter of ClassifierTemplateParameter::constrainingClassifier. 77 -- 78 -- The classifiers that constrain the argument that can be used for the 79 -- parameter. If the allowSubstitutable attribute is true, then any 80 -- classifier that is compatible with this constraining classifier can be 81 -- substituted; otherwise, it must be either this classifier or one of its 82 -- subclasses. If this property is empty, there are no constraints on the 83 -- classifier that can be used as an argument. 84 85 overriding function Get_Parametered_Element 86 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 87 return AMF.UML.Classifiers.UML_Classifier_Access; 88 -- Getter of ClassifierTemplateParameter::parameteredElement. 89 -- 90 -- The parameterable classifier for this template parameter. 91 92 overriding procedure Set_Parametered_Element 93 (Self : not null access UML_Classifier_Template_Parameter_Proxy; 94 To : AMF.UML.Classifiers.UML_Classifier_Access); 95 -- Setter of ClassifierTemplateParameter::parameteredElement. 96 -- 97 -- The parameterable classifier for this template parameter. 98 99 overriding function Get_Default 100 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 101 return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access; 102 -- Getter of TemplateParameter::default. 103 -- 104 -- The element that is the default for this formal template parameter. 105 106 overriding procedure Set_Default 107 (Self : not null access UML_Classifier_Template_Parameter_Proxy; 108 To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access); 109 -- Setter of TemplateParameter::default. 110 -- 111 -- The element that is the default for this formal template parameter. 112 113 overriding function Get_Owned_Default 114 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 115 return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access; 116 -- Getter of TemplateParameter::ownedDefault. 117 -- 118 -- The element that is owned by this template parameter for the purpose of 119 -- providing a default. 120 121 overriding procedure Set_Owned_Default 122 (Self : not null access UML_Classifier_Template_Parameter_Proxy; 123 To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access); 124 -- Setter of TemplateParameter::ownedDefault. 125 -- 126 -- The element that is owned by this template parameter for the purpose of 127 -- providing a default. 128 129 overriding function Get_Owned_Parametered_Element 130 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 131 return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access; 132 -- Getter of TemplateParameter::ownedParameteredElement. 133 -- 134 -- The element that is owned by this template parameter. 135 136 overriding procedure Set_Owned_Parametered_Element 137 (Self : not null access UML_Classifier_Template_Parameter_Proxy; 138 To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access); 139 -- Setter of TemplateParameter::ownedParameteredElement. 140 -- 141 -- The element that is owned by this template parameter. 142 143 overriding function Get_Parametered_Element 144 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 145 return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access; 146 -- Getter of TemplateParameter::parameteredElement. 147 -- 148 -- The element exposed by this template parameter. 149 150 overriding procedure Set_Parametered_Element 151 (Self : not null access UML_Classifier_Template_Parameter_Proxy; 152 To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access); 153 -- Setter of TemplateParameter::parameteredElement. 154 -- 155 -- The element exposed by this template parameter. 156 157 overriding function Get_Signature 158 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy) 159 return AMF.UML.Template_Signatures.UML_Template_Signature_Access; 160 -- Getter of TemplateParameter::signature. 161 -- 162 -- The template signature that owns this template parameter. 163 164 overriding procedure Set_Signature 165 (Self : not null access UML_Classifier_Template_Parameter_Proxy; 166 To : AMF.UML.Template_Signatures.UML_Template_Signature_Access); 167 -- Setter of TemplateParameter::signature. 168 -- 169 -- The template signature that owns this template parameter. 170 171 overriding procedure Enter_Element 172 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy; 173 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 174 Control : in out AMF.Visitors.Traverse_Control); 175 -- Dispatch call to corresponding subprogram of visitor interface. 176 177 overriding procedure Leave_Element 178 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy; 179 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 180 Control : in out AMF.Visitors.Traverse_Control); 181 -- Dispatch call to corresponding subprogram of visitor interface. 182 183 overriding procedure Visit_Element 184 (Self : not null access constant UML_Classifier_Template_Parameter_Proxy; 185 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 186 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 187 Control : in out AMF.Visitors.Traverse_Control); 188 -- Dispatch call to corresponding subprogram of iterator interface. 189 190end AMF.Internals.UML_Classifier_Template_Parameters; 191