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: 2967 $ $Date: 2012-05-12 10:21:56 +0400 (Sat, 12 May 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Internals.UML_Elements; 45with AMF.UML.Multiplicity_Elements; 46with AMF.UML.Value_Specifications; 47 48generic 49 type Element_Proxy is 50 abstract new AMF.Internals.UML_Elements.UML_Element_Proxy with private; 51 52package AMF.Internals.UML_Multiplicity_Elements is 53 54 type UML_Multiplicity_Element_Proxy is 55 abstract limited new Element_Proxy 56 and AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element 57 with null record; 58 59 overriding function Get_Is_Ordered 60 (Self : not null access constant UML_Multiplicity_Element_Proxy) 61 return Boolean; 62 -- Getter of MultiplicityElement::isOrdered. 63 -- 64 -- For a multivalued multiplicity, this attribute specifies whether the 65 -- values in an instantiation of this element are sequentially ordered. 66 67 overriding function Get_Is_Unique 68 (Self : not null access constant UML_Multiplicity_Element_Proxy) 69 return Boolean; 70 -- Getter of MultiplicityElement::isUnique. 71 -- 72 -- For a multivalued multiplicity, this attributes specifies whether the 73 -- values in an instantiation of this element are unique. 74 75 overriding function Get_Lower 76 (Self : not null access constant UML_Multiplicity_Element_Proxy) 77 return AMF.Optional_Integer; 78 -- Getter of MultiplicityElement::lower. 79 -- 80 -- Specifies the lower bound of the multiplicity interval. 81 82 overriding function Get_Lower_Value 83 (Self : not null access constant UML_Multiplicity_Element_Proxy) 84 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 85 -- Getter of MultiplicityElement::lowerValue. 86 -- 87 -- The specification of the lower bound for this multiplicity. 88 89 overriding function Get_Upper 90 (Self : not null access constant UML_Multiplicity_Element_Proxy) 91 return AMF.Optional_Unlimited_Natural; 92 -- Getter of MultiplicityElement::upper. 93 -- 94 -- Specifies the upper bound of the multiplicity interval. 95 96 overriding function Get_Upper_Value 97 (Self : not null access constant UML_Multiplicity_Element_Proxy) 98 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 99 -- Getter of MultiplicityElement::upperValue. 100 -- 101 -- The specification of the upper bound for this multiplicity. 102 103 overriding function Is_Multivalued 104 (Self : not null access constant UML_Multiplicity_Element_Proxy) 105 return Boolean; 106 -- Operation MultiplicityElement::isMultivalued. 107 -- 108 -- The query isMultivalued() checks whether this multiplicity has an upper 109 -- bound greater than one. 110 111 overriding function Lower 112 (Self : not null access constant UML_Multiplicity_Element_Proxy) 113 return AMF.Optional_Integer renames Get_Lower; 114 -- Operation MultiplicityElement::lower. 115 -- 116 -- The derived lower attribute must equal the lowerBound. 117 118 overriding function Lower_Bound 119 (Self : not null access constant UML_Multiplicity_Element_Proxy) 120 return AMF.Optional_Integer; 121 -- Operation MultiplicityElement::lowerBound. 122 -- 123 -- The query lowerBound() returns the lower bound of the multiplicity as 124 -- an integer. 125 126 overriding procedure Set_Is_Ordered 127 (Self : not null access UML_Multiplicity_Element_Proxy; 128 To : Boolean); 129 -- Setter of MultiplicityElement::isOrdered. 130 -- 131 -- For a multivalued multiplicity, this attribute specifies whether the 132 -- values in an instantiation of this element are sequentially ordered. 133 134 overriding procedure Set_Is_Unique 135 (Self : not null access UML_Multiplicity_Element_Proxy; 136 To : Boolean); 137 -- Setter of MultiplicityElement::isUnique. 138 -- 139 -- For a multivalued multiplicity, this attributes specifies whether the 140 -- values in an instantiation of this element are unique. 141 142 overriding procedure Set_Lower 143 (Self : not null access UML_Multiplicity_Element_Proxy; 144 To : AMF.Optional_Integer); 145 -- Setter of MultiplicityElement::lower. 146 -- 147 -- Specifies the lower bound of the multiplicity interval. 148 149 overriding procedure Set_Lower_Value 150 (Self : not null access UML_Multiplicity_Element_Proxy; 151 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 152 -- Setter of MultiplicityElement::lowerValue. 153 -- 154 -- The specification of the lower bound for this multiplicity. 155 156 overriding procedure Set_Upper 157 (Self : not null access UML_Multiplicity_Element_Proxy; 158 To : AMF.Optional_Unlimited_Natural); 159 -- Setter of MultiplicityElement::upper. 160 -- 161 -- Specifies the upper bound of the multiplicity interval. 162 163 overriding procedure Set_Upper_Value 164 (Self : not null access UML_Multiplicity_Element_Proxy; 165 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 166 -- Setter of MultiplicityElement::upperValue. 167 -- 168 -- The specification of the upper bound for this multiplicity. 169 170 overriding function Upper 171 (Self : not null access constant UML_Multiplicity_Element_Proxy) 172 return AMF.Optional_Unlimited_Natural renames Get_Upper; 173 -- Operation MultiplicityElement::upper. 174 -- 175 -- The derived upper attribute must equal the upperBound. 176 177 overriding function Upper_Bound 178 (Self : not null access constant UML_Multiplicity_Element_Proxy) 179 return AMF.Optional_Unlimited_Natural; 180 -- Operation MultiplicityElement::upperBound. 181 -- 182 -- The query upperBound() returns the upper bound of the multiplicity for 183 -- a bounded multiplicity as an unlimited natural. 184 185end AMF.Internals.UML_Multiplicity_Elements; 186