1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- Ada Modeling Framework -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 2011, 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: 2868 $ $Date: 2012-04-14 11:38:20 +0400 (Sat, 14 Apr 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Internals.UML_Packageable_Elements; 45with AMF.UML.Value_Specifications; 46 47package AMF.Internals.UML_Value_Specifications is 48 49 type UML_Value_Specification_Proxy is 50 abstract limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy 51 and AMF.UML.Value_Specifications.UML_Value_Specification with null record; 52 53 overriding function Boolean_Value 54 (Self : not null access constant UML_Value_Specification_Proxy) 55 return AMF.Optional_Boolean; 56 -- Operation ValueSpecification::booleanValue. 57 -- 58 -- The query booleanValue() gives a single Boolean value when one can be 59 -- computed. 60 61 overriding function Integer_Value 62 (Self : not null access constant UML_Value_Specification_Proxy) 63 return AMF.Optional_Integer; 64 -- Operation ValueSpecification::integerValue. 65 -- 66 -- The query integerValue() gives a single Integer value when one can be 67 -- computed. 68 69 overriding function Is_Computable 70 (Self : not null access constant UML_Value_Specification_Proxy) 71 return Boolean; 72 -- Operation ValueSpecification::isComputable. 73 -- 74 -- The query isComputable() determines whether a value specification can 75 -- be computed in a model. This operation cannot be fully defined in OCL. 76 -- A conforming implementation is expected to deliver true for this 77 -- operation for all value specifications that it can compute, and to 78 -- compute all of those for which the operation is true. A conforming 79 -- implementation is expected to be able to compute the value of all 80 -- literals. 81 82 overriding function Is_Null 83 (Self : not null access constant UML_Value_Specification_Proxy) 84 return Boolean; 85 -- Operation ValueSpecification::isNull. 86 -- 87 -- The query isNull() returns true when it can be computed that the value 88 -- is null. 89 90 overriding function Real_Value 91 (Self : not null access constant UML_Value_Specification_Proxy) 92 return AMF.Optional_Real; 93 -- Operation ValueSpecification::realValue. 94 -- 95 -- The query realValue() gives a single Real value when one can be 96 -- computed. 97 98 overriding function String_Value 99 (Self : not null access constant UML_Value_Specification_Proxy) 100 return AMF.Optional_String; 101 -- Operation ValueSpecification::stringValue. 102 -- 103 -- The query stringValue() gives a single String value when one can be 104 -- computed. 105 106 overriding function Unlimited_Value 107 (Self : not null access constant UML_Value_Specification_Proxy) 108 return AMF.Optional_Unlimited_Natural; 109 -- Operation ValueSpecification::unlimitedValue. 110 -- 111 -- The query unlimitedValue() gives a single UnlimitedNatural value when 112 -- one can be computed. 113 114end AMF.Internals.UML_Value_Specifications; 115