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.Images; 46with AMF.Visitors; 47 48package AMF.Internals.UML_Images is 49 50 type UML_Image_Proxy is 51 limited new AMF.Internals.UML_Elements.UML_Element_Proxy 52 and AMF.UML.Images.UML_Image with null record; 53 54 overriding function Get_Content 55 (Self : not null access constant UML_Image_Proxy) 56 return AMF.Optional_String; 57 -- Getter of Image::content. 58 -- 59 -- This contains the serialization of the image according to the format. 60 -- The value could represent a bitmap, image such as a GIF file, or 61 -- drawing 'instructions' using a standard such as Scalable Vector Graphic 62 -- (SVG) (which is XML based). 63 64 overriding procedure Set_Content 65 (Self : not null access UML_Image_Proxy; 66 To : AMF.Optional_String); 67 -- Setter of Image::content. 68 -- 69 -- This contains the serialization of the image according to the format. 70 -- The value could represent a bitmap, image such as a GIF file, or 71 -- drawing 'instructions' using a standard such as Scalable Vector Graphic 72 -- (SVG) (which is XML based). 73 74 overriding function Get_Format 75 (Self : not null access constant UML_Image_Proxy) 76 return AMF.Optional_String; 77 -- Getter of Image::format. 78 -- 79 -- This indicates the format of the content - which is how the string 80 -- content should be interpreted. The following values are reserved: SVG, 81 -- GIF, PNG, JPG, WMF, EMF, BMP. In addition the prefix 'MIME: ' is also 82 -- reserved. This option can be used as an alternative to express the 83 -- reserved values above, for example 'SVG' could instead be expressed as 84 -- 'MIME: image/svg+xml'. 85 86 overriding procedure Set_Format 87 (Self : not null access UML_Image_Proxy; 88 To : AMF.Optional_String); 89 -- Setter of Image::format. 90 -- 91 -- This indicates the format of the content - which is how the string 92 -- content should be interpreted. The following values are reserved: SVG, 93 -- GIF, PNG, JPG, WMF, EMF, BMP. In addition the prefix 'MIME: ' is also 94 -- reserved. This option can be used as an alternative to express the 95 -- reserved values above, for example 'SVG' could instead be expressed as 96 -- 'MIME: image/svg+xml'. 97 98 overriding function Get_Location 99 (Self : not null access constant UML_Image_Proxy) 100 return AMF.Optional_String; 101 -- Getter of Image::location. 102 -- 103 -- This contains a location that can be used by a tool to locate the image 104 -- as an alternative to embedding it in the stereotype. 105 106 overriding procedure Set_Location 107 (Self : not null access UML_Image_Proxy; 108 To : AMF.Optional_String); 109 -- Setter of Image::location. 110 -- 111 -- This contains a location that can be used by a tool to locate the image 112 -- as an alternative to embedding it in the stereotype. 113 114 overriding procedure Enter_Element 115 (Self : not null access constant UML_Image_Proxy; 116 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 117 Control : in out AMF.Visitors.Traverse_Control); 118 -- Dispatch call to corresponding subprogram of visitor interface. 119 120 overriding procedure Leave_Element 121 (Self : not null access constant UML_Image_Proxy; 122 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 123 Control : in out AMF.Visitors.Traverse_Control); 124 -- Dispatch call to corresponding subprogram of visitor interface. 125 126 overriding procedure Visit_Element 127 (Self : not null access constant UML_Image_Proxy; 128 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 129 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 130 Control : in out AMF.Visitors.Traverse_Control); 131 -- Dispatch call to corresponding subprogram of iterator interface. 132 133end AMF.Internals.UML_Images; 134