repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
AdaCore/gpr
Ada
2,664
adb
-- -- Copyright (C) 2014-2022, AdaCore -- SPDX-License-Identifier: Apache-2.0 -- package body Gpr_Parser_Support.Names.Maps is use Helper_Maps; function Create_Name (Name : Text_Type; M : Map) return Name_Type is (Create_Name (Name, M.Casing)); function Create_Key (Name : Name_Type; M : Map) return Unbounded_String is (To_Unbounded_String (Image (Format_Name (Name, M.Casing)))); --------------------- -- Create_Name_Map -- --------------------- function Create_Name_Map (Casing : Casing_Convention) return Map is begin return (Casing => Casing, Map => Empty_Map); end Create_Name_Map; ------------ -- Insert -- ------------ procedure Insert (Self : in out Map; Name : Name_Type; Element : Element_Type) is begin Self.Map.Insert (Create_Key (Name, Self), Element); end Insert; ------------- -- Include -- ------------- procedure Include (Self : in out Map; Name : Name_Type; Element : Element_Type) is begin Self.Map.Include (Create_Key (Name, Self), Element); end Include; ------------ -- Lookup -- ------------ function Lookup (Self : Map; Name : Name_Type) return Lookup_Result is Cur : constant Cursor := Self.Map.Find (Create_Key (Name, Self)); begin if Has_Element (Cur) then return (Present => True, Element => Element (Cur)); else return Absent_Lookup_Result; end if; end Lookup; --------- -- Get -- --------- function Get (Self : Map; Name : Name_Type) return Element_Type is Result : constant Lookup_Result := Lookup (Self, Name); begin return (if Result.Present then Result.Element else raise Constraint_Error with "no such name"); end Get; ------------ -- Insert -- ------------ procedure Insert (Self : in out Map; Name : Text_Type; Element : Element_Type) is begin Insert (Self, Create_Name (Name, Self), Element); end Insert; ------------- -- Include -- ------------- procedure Include (Self : in out Map; Name : Text_Type; Element : Element_Type) is begin Include (Self, Create_Name (Name, Self), Element); end Include; ------------ -- Lookup -- ------------ function Lookup (Self : Map; Name : Text_Type) return Lookup_Result is begin return Lookup (Self, Create_Name (Name, Self)); end Lookup; --------- -- Get -- --------- function Get (Self : Map; Name : Text_Type) return Element_Type is begin return Get (Self, Create_Name (Name, Self)); end Get; end Gpr_Parser_Support.Names.Maps;
reznikmm/matreshka
Ada
6,441
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.Constants; with ODF.DOM.Elements.Style.List_Level_Label_Alignment.Internals; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Elements.Style.List_Level_Label_Alignment is ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access Style_List_Level_Label_Alignment_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.ODF_Visitor'Class then ODF.DOM.Visitors.ODF_Visitor'Class (Visitor).Enter_Style_List_Level_Label_Alignment (ODF.DOM.Elements.Style.List_Level_Label_Alignment.Internals.Create (Style_List_Level_Label_Alignment_Access (Self)), Control); else Matreshka.DOM_Nodes.Elements.Abstract_Element (Self.all).Enter_Element (Visitor, Control); end if; end Enter_Element; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_List_Level_Label_Alignment_Node) return League.Strings.Universal_String is begin return ODF.Constants.List_Level_Label_Alignment_Name; end Get_Local_Name; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access Style_List_Level_Label_Alignment_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.ODF_Visitor'Class then ODF.DOM.Visitors.ODF_Visitor'Class (Visitor).Leave_Style_List_Level_Label_Alignment (ODF.DOM.Elements.Style.List_Level_Label_Alignment.Internals.Create (Style_List_Level_Label_Alignment_Access (Self)), Control); else Matreshka.DOM_Nodes.Elements.Abstract_Element (Self.all).Leave_Element (Visitor, Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access Style_List_Level_Label_Alignment_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.ODF_Iterator'Class then ODF.DOM.Iterators.ODF_Iterator'Class (Iterator).Visit_Style_List_Level_Label_Alignment (Visitor, ODF.DOM.Elements.Style.List_Level_Label_Alignment.Internals.Create (Style_List_Level_Label_Alignment_Access (Self)), Control); else Matreshka.DOM_Nodes.Elements.Abstract_Element (Self.all).Visit_Element (Iterator, Visitor, Control); end if; end Visit_Element; end Matreshka.ODF_Elements.Style.List_Level_Label_Alignment;
AdaCore/libadalang
Ada
134
adb
separate (Pkg) protected body P_Body_1 is procedure Proc_4 is separate; --% node.p_syntactic_fully_qualified_name end P_Body_1;
reznikmm/matreshka
Ada
3,724
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Dr3d_Shadow_Slant_Attributes is pragma Preelaborate; type ODF_Dr3d_Shadow_Slant_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Dr3d_Shadow_Slant_Attribute_Access is access all ODF_Dr3d_Shadow_Slant_Attribute'Class with Storage_Size => 0; end ODF.DOM.Dr3d_Shadow_Slant_Attributes;
io7m/coreland-spatial_hash
Ada
479
adb
package body Getline is procedure Get (File : in Ada.Text_IO.File_Type; Item : out Ada.Strings.Unbounded.Unbounded_String) is Line : String (1 .. 128); Last : Natural; begin loop Ada.Text_IO.Get_Line (File => File, Item => Line, Last => Last); Ada.Strings.Unbounded.Append (Source => Item, New_Item => Line (1 .. Last)); exit when Last < Line'Last; end loop; end Get; end Getline;
mitchelhaan/ncurses
Ada
5,556
ads
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Aux -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer <[email protected]> 1996 -- Version Control: -- $Revision: 1.8 $ -- Binding Version 00.93 ------------------------------------------------------------------------------ with System; with Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Unchecked_Conversion; package Terminal_Interface.Curses.Aux is pragma Preelaborate (Aux); use type Interfaces.C.Int; subtype C_Int is Interfaces.C.Int; subtype C_Short is Interfaces.C.Short; subtype C_Long_Int is Interfaces.C.Long; subtype C_Size_T is Interfaces.C.Size_T; subtype C_Char_Ptr is Interfaces.C.Strings.Chars_Ptr; type C_Void_Ptr is new System.Address; -- This is how those constants are defined in ncurses. I see them also -- exactly like this in all ETI implementations I ever tested. So it -- could be that this is quite general, but please check with your curses. -- This is critical, because curses sometime mixes boolean returns with -- returning an error status. Curses_Ok : constant C_Int := 0; Curses_Err : constant C_Int := -1; Curses_True : constant C_Int := 1; Curses_False : constant C_Int := 0; subtype Eti_Error is C_Int range -14 .. 0; -- Type for error codes returned by the menu and forms subsystem E_Ok : constant Eti_Error := 0; E_System_Error : constant Eti_Error := -1; E_Bad_Argument : constant Eti_Error := -2; E_Posted : constant Eti_Error := -3; E_Connected : constant Eti_Error := -4; E_Bad_State : constant Eti_Error := -5; E_No_Room : constant Eti_Error := -6; E_Not_Posted : constant Eti_Error := -7; E_Unknown_Command : constant Eti_Error := -8; E_No_Match : constant Eti_Error := -9; E_Not_Selectable : constant Eti_Error := -10; E_Not_Connected : constant Eti_Error := -11; E_Request_Denied : constant Eti_Error := -12; E_Invalid_Field : constant Eti_Error := -13; E_Current : constant Eti_Error := -14; procedure Eti_Exception (Code : Eti_Error); -- Dispatch the error code and raise the appropriate exception -- -- -- Some helpers function CInt_To_Chtype is new Unchecked_Conversion (Source => C_Int, Target => Attributed_Character); function Chtype_To_CInt is new Unchecked_Conversion (Source => Attributed_Character, Target => C_Int); procedure Fill_String (Cp : in chars_ptr; Str : out String); -- Fill the Str parameter with the string denoted by the chars_ptr -- C-Style string. function Fill_String (Cp : chars_ptr) return String; -- Same but as function. end Terminal_Interface.Curses.Aux;
reznikmm/matreshka
Ada
3,749
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Table_Rfc_Language_Tag_Attributes is pragma Preelaborate; type ODF_Table_Rfc_Language_Tag_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Table_Rfc_Language_Tag_Attribute_Access is access all ODF_Table_Rfc_Language_Tag_Attribute'Class with Storage_Size => 0; end ODF.DOM.Table_Rfc_Language_Tag_Attributes;
Fabien-Chouteau/tiled-code-gen
Ada
10,436
adb
------------------------------------------------------------------------------ -- -- -- tiled-code-gen -- -- -- -- Copyright (C) 2018 Fabien Chouteau -- -- -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Ada.Text_IO; use Ada.Text_IO; with Ada.Containers.Hashed_Maps; with Ada.Containers.Vectors; use Ada.Containers; with Interfaces; use Interfaces; package body TCG.Palette is function ID_Hashed (C : ARGB_Color) return Hash_Type; package Color_Hashmap is new Ada.Containers.Hashed_Maps (Key_Type => ARGB_Color, Element_Type => Color_Id, Hash => ID_Hashed, Equivalent_Keys => "="); use Color_Hashmap; package Color_Id_Vector is new Ada.Containers.Vectors (Index_Type => Color_Id, Element_Type => ARGB_Color); use Color_Id_Vector; Convert_Vect : Color_Id_Vector.Vector; Hashmap : Color_Hashmap.Map; Transparent_Color : ARGB_Color; Transparent_Color_Id : Color_Id; Transparent_Has_Definition : Boolean := False; type String_Access is access all String; Format_Strings : constant array (Output_Color_Format) of String_Access := (ARGB => new String'("ARGB"), RGB565 => new String'("RGB565"), RGB565_Swap => new String'("RGB565_Swap"), RGB555 => new String'("RGB555"), RGB888 => new String'("RGB888")); --------------- -- ID_Hashed -- --------------- function ID_Hashed (C : ARGB_Color) return Hash_Type is begin return Hash_Type'Val (C.A + C.R + C.G + C.B); end ID_Hashed; --------------- -- Add_Color -- --------------- function Add_Color (C : ARGB_Color) return Color_Id is Id : Color_Id; begin if In_Palette (C) then Id := Element (Hashmap.Find (C)); else Convert_Vect.Append (C); Id := Convert_Vect.Last_Index; Hashmap.Insert (C, Id); end if; return Id; end Add_Color; ------------- -- Convert -- ------------- function Convert (Id : Color_Id) return ARGB_Color is (Convert_Vect.Element (Id)); ---------------- -- In_Palette -- ---------------- function In_Palette (C : ARGB_Color) return Boolean is (Hashmap.Contains (C)); ------------------------- -- Transparent_Defined -- ------------------------- function Transparent_Defined return Boolean is (Transparent_Has_Definition); ----------------- -- Transparent -- ----------------- function Transparent return Color_Id is (Transparent_Color_Id); function Transparent return ARGB_Color is (Transparent_Color); --------------------- -- Set_Transparent -- --------------------- procedure Set_Transparent (C : ARGB_Color) is begin if Transparent_Has_Definition and then Transparent_Color /= C then raise Program_Error with "Incompatible new definition of transparent color"; end if; -- Transparent_Color_Id := Add_Color (C); Convert_Vect.Replace_Element (Transparent_Color_Id, C); Hashmap.Insert (C, Transparent_Color_Id); Transparent_Color := C; Transparent_Has_Definition := True; end Set_Transparent; ---------------------- -- Number_Of_Colors -- ---------------------- function Number_Of_Colors return Natural is (Natural (Convert_Vect.Length)); -------------- -- First_Id -- -------------- function First_Id return Color_Id is (Convert_Vect.First_Index); ------------- -- Last_Id -- ------------- function Last_Id return Color_Id is (Convert_Vect.Last_Index); ----------- -- Image -- ----------- function Image (Id : Color_Id) return String is (Id'Img); ------------- -- To_ARGB -- ------------- function To_ARGB (Str : String) return ARGB_Color is R : constant String := Str (Str'First .. Str'First + 1); G : constant String := Str (Str'First + 2 .. Str'First + 3); B : constant String := Str (Str'First + 4 .. Str'First + 5); begin return (A => 255, R => Component'Value ("16#" & R & "#"), G => Component'Value ("16#" & G & "#"), B => Component'Value ("16#" & B & "#")); end To_ARGB; --------------- -- To_RGB565 -- --------------- function To_RGB565 (C : ARGB_Color) return Unsigned_16 is R : constant Unsigned_16 := Shift_Right (Unsigned_16 (C.R), 3) and 16#1F#; G : constant Unsigned_16 := Shift_Right (Unsigned_16 (C.G), 2) and 16#3F#; B : constant Unsigned_16 := Shift_Right (Unsigned_16 (C.B), 3) and 16#1F#; begin return (Shift_Left (R, 11) or Shift_Left (G, 5) or B); end To_RGB565; -------------------- -- To_RGB565_Swap -- -------------------- function To_RGB565_Swap (C : ARGB_Color) return Unsigned_16 is RGB : constant Unsigned_16 := To_RGB565 (C); begin return Shift_Right (RGB and 16#FF00#, 8) or (Shift_Left (RGB, 8) and 16#FF00#); end To_RGB565_Swap; --------------- -- To_RGB888 -- --------------- function To_RGB888 (C : ARGB_Color) return Unsigned_32 is R : constant Unsigned_32 := Shift_Left (Unsigned_32 (C.R), 16); G : constant Unsigned_32 := Shift_Left (Unsigned_32 (C.G), 8); B : constant Unsigned_32 := Shift_Left (Unsigned_32 (C.B), 0); begin return R or G or B; end To_RGB888; --------------- -- To_RGB555 -- --------------- function To_RGB555 (C : ARGB_Color) return Unsigned_16 is R : constant Unsigned_16 := Shift_Right (Unsigned_16 (C.R), 3) and 16#1F#; G : constant Unsigned_16 := Shift_Right (Unsigned_16 (C.G), 3) and 16#1F#; B : constant Unsigned_16 := Shift_Right (Unsigned_16 (C.B), 3) and 16#1F#; begin return (Shift_Left (B, 10) or Shift_Left (G, 5) or R); end To_RGB555; ----------- -- Image -- ----------- function Image (C : ARGB_Color; Format : Output_Color_Format) return String is begin case Format is when ARGB => return Image (C); when RGB565 => return To_RGB565 (C)'Img; when RGB565_Swap => return To_RGB565_Swap (C)'Img; when RGB555 => return To_RGB555 (C)'Img; when RGB888 => return To_RGB888 (C)'Img; end case; end Image; ---------------------- -- Format_Supported -- ---------------------- function Format_Supported (Fmt : String) return Boolean is (for some Str of Format_Strings => Str.all = Fmt); ----------------------- -- Supported_Formats -- ----------------------- function Supported_Formats return String is (Format_Strings (ARGB).all & ", " & Format_Strings (RGB565).all & ", " & Format_Strings (RGB565_Swap).all); ------------- -- Convert -- ------------- function Convert (Fmt : String) return Output_Color_Format is begin for Format in Output_Color_Format loop if Fmt = Format_Strings (Format).all then return Format; end if; end loop; raise Program_Error with "Invalid output color format: " & Fmt; end Convert; --------- -- Put -- --------- procedure Put is begin Put_Line ("Palette ->"); Put_Line ("Number_Of_Colors: " & Length (Hashmap)'Img); Put_Line ("Transparent color: " & Image (Transparent_Color)); for Cur in Convert_Vect.Iterate loop Put_Line (To_Index (Cur)'Img & " => " & Image (Element (Cur))); end loop; end Put; ----------- -- Image -- ----------- function Image (C : ARGB_Color) return String is ("(" & C.A'Img & "," & C.R'Img & "," & C.G'Img & "," & C.B'Img & ")"); begin Transparent_Color_Id := Add_Color ((0, 0, 0, 0)); if Transparent_Color_Id /= 0 then raise Program_Error with "Transparent_Color_Id should be zero"; end if; end TCG.Palette;
reznikmm/matreshka
Ada
5,709
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ -- A general ordering represents a binary relation between two occurrence -- specifications, to describe that one occurrence specification must occur -- before the other in a valid trace. This mechanism provides the ability to -- define partial orders of occurrence cpecifications that may otherwise not -- have a specified order. ------------------------------------------------------------------------------ with AMF.UML.Named_Elements; limited with AMF.UML.Occurrence_Specifications; package AMF.UML.General_Orderings is pragma Preelaborate; type UML_General_Ordering is limited interface and AMF.UML.Named_Elements.UML_Named_Element; type UML_General_Ordering_Access is access all UML_General_Ordering'Class; for UML_General_Ordering_Access'Storage_Size use 0; not overriding function Get_After (Self : not null access constant UML_General_Ordering) return AMF.UML.Occurrence_Specifications.UML_Occurrence_Specification_Access is abstract; -- Getter of GeneralOrdering::after. -- -- The OccurrenceSpecification referenced comes after the -- OccurrenceSpecification referenced by before. not overriding procedure Set_After (Self : not null access UML_General_Ordering; To : AMF.UML.Occurrence_Specifications.UML_Occurrence_Specification_Access) is abstract; -- Setter of GeneralOrdering::after. -- -- The OccurrenceSpecification referenced comes after the -- OccurrenceSpecification referenced by before. not overriding function Get_Before (Self : not null access constant UML_General_Ordering) return AMF.UML.Occurrence_Specifications.UML_Occurrence_Specification_Access is abstract; -- Getter of GeneralOrdering::before. -- -- The OccurrenceSpecification referenced comes before the -- OccurrenceSpecification referenced by after. not overriding procedure Set_Before (Self : not null access UML_General_Ordering; To : AMF.UML.Occurrence_Specifications.UML_Occurrence_Specification_Access) is abstract; -- Setter of GeneralOrdering::before. -- -- The OccurrenceSpecification referenced comes before the -- OccurrenceSpecification referenced by after. end AMF.UML.General_Orderings;
reznikmm/matreshka
Ada
4,750
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Text_Note_Citation_Elements; package Matreshka.ODF_Text.Note_Citation_Elements is type Text_Note_Citation_Element_Node is new Matreshka.ODF_Text.Abstract_Text_Element_Node and ODF.DOM.Text_Note_Citation_Elements.ODF_Text_Note_Citation with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Text_Note_Citation_Element_Node; overriding function Get_Local_Name (Self : not null access constant Text_Note_Citation_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Text_Note_Citation_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Text_Note_Citation_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Text_Note_Citation_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Text.Note_Citation_Elements;
zhmu/ananas
Ada
6,257
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 1 0 1 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_101 is subtype Bit_Order is System.Bit_Order; Reverse_Bit_Order : constant Bit_Order := Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order)); subtype Ofs is System.Storage_Elements.Storage_Offset; subtype Uns is System.Unsigned_Types.Unsigned; subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7; use type System.Storage_Elements.Storage_Offset; use type System.Unsigned_Types.Unsigned; type Cluster is record E0, E1, E2, E3, E4, E5, E6, E7 : Bits_101; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; ------------ -- Get_101 -- ------------ function Get_101 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_101 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end Get_101; ------------ -- Set_101 -- ------------ procedure Set_101 (Arr : System.Address; N : Natural; E : Bits_101; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end Set_101; end System.Pack_101;
AdaCore/gpr
Ada
2,792
adb
-- -- Copyright (C) 2019-2023, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-Exception -- with GNAT.String_Split; package body GPR2.Containers is generic type Item (<>) is new String; with package List is new Ada.Containers.Indefinite_Vectors (Positive, Item); function Create_G (Value : Item; Separator : Item) return List.Vector; ------------ -- Create -- ------------ function Create_G (Value : Item; Separator : Item) return List.Vector is use GNAT.String_Split; Result : List.Vector; Slices : Slice_Set; begin Create (Slices, String (Value), String (Separator), Mode => Multiple); for K in 1 .. Slice_Count (Slices) loop declare Value : constant Item := Item (Slice (Slices, K)); begin if Value /= "" then Result.Append (Value); end if; end; end loop; return Result; end Create_G; pragma Style_Checks (Off); function Create (Value : Value_Type; Separator : Value_Not_Empty) return Containers.Value_List is function Internal is new Create_G (Value_Type, GPR2.Containers.Value_Type_List); begin return Internal (Value, Separator); end Create; function Create (Value : Name_Type; Separator : Name_Type) return Containers.Name_List is function Internal is new Create_G (Name_Type, GPR2.Containers.Name_Type_List); begin return Internal (Value, Separator); end Create; pragma Style_Checks (On); ----------- -- Image -- ----------- function Image (Values : Value_List) return String is Result : Unbounded_String; First : Boolean := True; begin Append (Result, '('); for V of Values loop if not First then Append (Result, ", "); end if; Append (Result, GPR2.Quote (V)); First := False; end loop; Append (Result, ')'); return To_String (Result); end Image; function Image (Values : Source_Value_List) return String is L : Value_List; begin for V of Values loop L.Append (V.Text); end loop; return Image (L); end Image; ---------------------- -- Value_Or_Default -- ---------------------- function Value_Or_Default (Map : Lang_Value_Map; Key : Language_Id; Default : Value_Type := No_Value) return Value_Type is C : constant Lang_Value_Maps.Cursor := Map.Find (Key); begin if Lang_Value_Maps.Has_Element (C) then return Lang_Value_Maps.Element (C); else return Default; end if; end Value_Or_Default; end GPR2.Containers;
micahwelf/FLTK-Ada
Ada
2,999
adb
with Interfaces.C, System; use type System.Address; package body FLTK.Widgets.Menus.Menu_Bars is procedure menu_bar_set_draw_hook (W, D : in System.Address); pragma Import (C, menu_bar_set_draw_hook, "menu_bar_set_draw_hook"); pragma Inline (menu_bar_set_draw_hook); procedure menu_bar_set_handle_hook (W, H : in System.Address); pragma Import (C, menu_bar_set_handle_hook, "menu_bar_set_handle_hook"); pragma Inline (menu_bar_set_handle_hook); function new_fl_menu_bar (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_menu_bar, "new_fl_menu_bar"); pragma Inline (new_fl_menu_bar); procedure free_fl_menu_bar (M : in System.Address); pragma Import (C, free_fl_menu_bar, "free_fl_menu_bar"); pragma Inline (free_fl_menu_bar); procedure fl_menu_bar_draw (W : in System.Address); pragma Import (C, fl_menu_bar_draw, "fl_menu_bar_draw"); pragma Inline (fl_menu_bar_draw); function fl_menu_bar_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_menu_bar_handle, "fl_menu_bar_handle"); pragma Inline (fl_menu_bar_handle); procedure Finalize (This : in out Menu_Bar) is begin if This.Void_Ptr /= System.Null_Address and then This in Menu_Bar'Class then free_fl_menu_bar (This.Void_Ptr); This.Void_Ptr := System.Null_Address; end if; Finalize (Menu (This)); end Finalize; package body Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Menu_Bar is begin return This : Menu_Bar do This.Void_Ptr := new_fl_menu_bar (Interfaces.C.int (X), Interfaces.C.int (Y), Interfaces.C.int (W), Interfaces.C.int (H), Interfaces.C.To_C (Text)); fl_widget_set_user_data (This.Void_Ptr, Widget_Convert.To_Address (This'Unchecked_Access)); menu_bar_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); menu_bar_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); end return; end Create; end Forge; procedure Draw (This : in out Menu_Bar) is begin fl_menu_bar_draw (This.Void_Ptr); end Draw; function Handle (This : in out Menu_Bar; Event : in Event_Kind) return Event_Outcome is begin return Event_Outcome'Val (fl_menu_bar_handle (This.Void_Ptr, Event_Kind'Pos (Event))); end Handle; end FLTK.Widgets.Menus.Menu_Bars;
zhmu/ananas
Ada
30,338
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . F A T _ G E N -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This implementation is portable to any IEEE implementation. It does not -- handle nonbinary radix, and also assumes that model numbers and machine -- numbers are basically identical, which is not true of all possible -- floating-point implementations. with Ada.Unchecked_Conversion; with System.Unsigned_Types; pragma Warnings (Off, "non-static constant in preelaborated unit"); -- Every constant is static given our instantiation model package body System.Fat_Gen is pragma Assert (T'Machine_Radix = 2); -- This version does not handle radix 16 Rad : constant T := T (T'Machine_Radix); -- Renaming for the machine radix Mantissa : constant Integer := T'Machine_Mantissa; -- Renaming for the machine mantissa Invrad : constant T := 1.0 / Rad; -- Smallest positive mantissa in the canonical form (RM A.5.3(4)) -- Small : constant T := Rad ** (T'Machine_Emin - 1); -- Smallest positive normalized number -- Tiny : constant T := Rad ** (T'Machine_Emin - Mantissa); -- Smallest positive denormalized number RM1 : constant T := Rad ** (Mantissa - 1); -- Smallest positive member of the large consecutive integers. It is equal -- to the ratio Small / Tiny, which means that multiplying by it normalizes -- any nonzero denormalized number. IEEE_Emin : constant Integer := T'Machine_Emin - 1; IEEE_Emax : constant Integer := T'Machine_Emax - 1; -- The mantissa is a fraction with first digit set in Ada whereas it is -- shifted by 1 digit to the left in the IEEE floating-point format. subtype IEEE_Erange is Integer range IEEE_Emin - 1 .. IEEE_Emax + 1; -- The IEEE floating-point format extends the machine range by 1 to the -- left for denormalized numbers and 1 to the right for infinities/NaNs. IEEE_Ebias : constant Integer := -(IEEE_Emin - 1); -- The exponent is biased such that denormalized numbers have it zero -- The implementation uses a representation type Float_Rep that allows -- direct access to exponent and mantissa of the floating point number. -- The Float_Rep type is a simple array of Float_Word elements. This -- representation is chosen to make it possible to size the type based -- on a generic parameter. Since the array size is known at compile -- time, efficient code can still be generated. The size of Float_Word -- elements should be large enough to allow accessing the exponent in -- one read, but small enough so that all floating-point object sizes -- are a multiple of Float_Word'Size. -- The following conditions must be met for all possible instantiations -- of the attribute package: -- - T'Size is an integral multiple of Float_Word'Size -- - The exponent and sign are completely contained in a single -- component of Float_Rep, named Most Significant Word (MSW). -- - The sign occupies the most significant bit of the MSW and the -- exponent is in the following bits. -- The low-level primitives Copy_Sign, Decompose, Finite_Succ, Scaling and -- Valid are implemented by accessing the bit pattern of the floating-point -- number. Only the normalization of denormalized numbers, if any, and the -- gradual underflow are left to the hardware, mainly because there is some -- leeway for the hardware implementation in this area: for example the MSB -- of the mantissa, that is 1 for normalized numbers and 0 for denormalized -- numbers, may or may not be stored by the hardware. Siz : constant := 16; type Float_Word is mod 2**Siz; -- We use the GCD of the size of all the supported floating-point formats N : constant Natural := (T'Size + Siz - 1) / Siz; NR : constant Natural := (Mantissa + 16 + Siz - 1) / Siz; Rep_Last : constant Natural := Natural'Min (N, NR) - 1; -- Determine the number of Float_Words needed for representing the -- entire floating-point value. Do not take into account excessive -- padding, as occurs on IA-64 where 80 bits floats get padded to 128 -- bits. In general, the exponent field cannot be larger than 15 bits, -- even for 128-bit floating-point types, so the final format size -- won't be larger than Mantissa + 16. type Float_Rep is array (Natural range 0 .. N - 1) of Float_Word; pragma Suppress_Initialization (Float_Rep); -- This pragma suppresses the generation of an initialization procedure -- for type Float_Rep when operating in Initialize/Normalize_Scalars mode. MSW : constant Natural := Rep_Last * Standard'Default_Bit_Order; -- Finding the location of the Exponent_Word is a bit tricky. In general -- we assume Word_Order = Bit_Order. Exp_Factor : constant Float_Word := 2**(Siz - 1) / Float_Word (IEEE_Emax - IEEE_Emin + 3); -- Factor that the extracted exponent needs to be divided by to be in -- range 0 .. IEEE_Emax - IEEE_Emin + 2 Exp_Mask : constant Float_Word := Float_Word (IEEE_Emax - IEEE_Emin + 2) * Exp_Factor; -- Value needed to mask out the exponent field. This assumes that the -- range 0 .. IEEE_Emax - IEEE_Emin + 2 contains 2**N values, for some -- N in Natural. Sign_Mask : constant Float_Word := 2**(Siz - 1); -- Value needed to mask out the sign field ----------------------- -- Local Subprograms -- ----------------------- procedure Decompose (XX : T; Frac : out T; Expo : out UI); -- Decomposes a floating-point number into fraction and exponent parts. -- Both results are signed, with Frac having the sign of XX, and UI has -- the sign of the exponent. The absolute value of Frac is in the range -- 0.0 <= Frac < 1.0. If Frac = 0.0 or -0.0, then Expo is always zero. function Finite_Succ (X : T) return T; -- Return the successor of X, a finite number not equal to T'Last -------------- -- Adjacent -- -------------- function Adjacent (X, Towards : T) return T is begin if Towards = X then return X; elsif Towards > X then return Succ (X); else return Pred (X); end if; end Adjacent; ------------- -- Ceiling -- ------------- function Ceiling (X : T) return T is XT : constant T := Truncation (X); begin if X <= 0.0 then return XT; elsif X = XT then return X; else return XT + 1.0; end if; end Ceiling; ------------- -- Compose -- ------------- function Compose (Fraction : T; Exponent : UI) return T is Arg_Frac : T; Arg_Exp : UI; begin Decompose (Fraction, Arg_Frac, Arg_Exp); return Scaling (Arg_Frac, Exponent); end Compose; --------------- -- Copy_Sign -- --------------- function Copy_Sign (Value, Sign : T) return T is S : constant T := T'Machine (Sign); Rep_S : Float_Rep; for Rep_S'Address use S'Address; -- Rep_S is a view of the Sign parameter V : T := T'Machine (Value); Rep_V : Float_Rep; for Rep_V'Address use V'Address; -- Rep_V is a view of the Value parameter begin Rep_V (MSW) := (Rep_V (MSW) and not Sign_Mask) or (Rep_S (MSW) and Sign_Mask); return V; end Copy_Sign; --------------- -- Decompose -- --------------- procedure Decompose (XX : T; Frac : out T; Expo : out UI) is X : T := T'Machine (XX); Rep : Float_Rep; for Rep'Address use X'Address; -- Rep is a view of the input floating-point parameter Exp : constant IEEE_Erange := Integer ((Rep (MSW) and Exp_Mask) / Exp_Factor) - IEEE_Ebias; -- Mask/Shift X to only get bits from the exponent. Then convert biased -- value to final value. Minus : constant Boolean := (Rep (MSW) and Sign_Mask) /= 0; -- Mask/Shift X to only get bit from the sign begin -- The normalized exponent of zero is zero, see RM A.5.3(15) if X = 0.0 then Expo := 0; Frac := X; -- Check for infinities and NaNs elsif Exp = IEEE_Emax + 1 then Expo := T'Machine_Emax + 1; Frac := (if Minus then -Invrad else Invrad); -- Check for nonzero denormalized numbers elsif Exp = IEEE_Emin - 1 then -- Normalize by multiplying by Radix ** (Mantissa - 1) Decompose (X * RM1, Frac, Expo); Expo := Expo - (Mantissa - 1); -- Case of normalized numbers else -- The Ada exponent is the IEEE exponent plus 1, see above Expo := Exp + 1; -- Set Ada exponent of X to zero, so we end up with the fraction Rep (MSW) := (Rep (MSW) and not Exp_Mask) + Float_Word (IEEE_Ebias - 1) * Exp_Factor; Frac := X; end if; end Decompose; -------------- -- Exponent -- -------------- function Exponent (X : T) return UI is X_Frac : T; X_Exp : UI; begin Decompose (X, X_Frac, X_Exp); return X_Exp; end Exponent; ----------------- -- Finite_Succ -- ----------------- function Finite_Succ (X : T) return T is XX : T := T'Machine (X); Rep : Float_Rep; for Rep'Address use XX'Address; -- Rep is a view of the input floating-point parameter begin -- If the floating-point type does not support denormalized numbers, -- there is a couple of problematic values, namely -Small and Zero, -- because the increment is equal to Small in these cases. if not T'Denorm then declare Small : constant T := Rad ** (T'Machine_Emin - 1); -- Smallest positive normalized number declared here and not at -- library level for the sake of the CCG compiler, which cannot -- currently compile the constant because the target is C90. begin if X = -Small then XX := 0.0; return -XX; elsif X = 0.0 then return Small; end if; end; end if; -- In all the other cases, the increment is equal to 1 in the binary -- integer representation of the number if X is nonnegative and equal -- to -1 if X is negative. if XX >= 0.0 then -- First clear the sign of negative Zero Rep (MSW) := Rep (MSW) and not Sign_Mask; -- Deal with big endian if MSW = 0 then for J in reverse 0 .. Rep_Last loop Rep (J) := Rep (J) + 1; -- For 80-bit IEEE Extended, the MSB of the mantissa is stored -- so, when it has been flipped, its status must be reanalyzed. if Mantissa = 64 and then J = 1 then -- If the MSB changed from denormalized to normalized, then -- keep it normalized since the exponent will be bumped. if Rep (J) = 2**(Siz - 1) then null; -- If the MSB changed from normalized, restore it since we -- cannot denormalize in this context. elsif Rep (J) = 0 then Rep (J) := 2**(Siz - 1); else exit; end if; -- In other cases, stop if there is no carry else exit when Rep (J) > 0; end if; end loop; -- Deal with little endian else for J in 0 .. Rep_Last loop Rep (J) := Rep (J) + 1; -- For 80-bit IEEE Extended, the MSB of the mantissa is stored -- so, when it has been flipped, its status must be reanalyzed. if Mantissa = 64 and then J = Rep_Last - 1 then -- If the MSB changed from denormalized to normalized, then -- keep it normalized since the exponent will be bumped. if Rep (J) = 2**(Siz - 1) then null; -- If the MSB changed from normalized, restore it since we -- cannot denormalize in this context. elsif Rep (J) = 0 then Rep (J) := 2**(Siz - 1); else exit; end if; -- In other cases, stop if there is no carry else exit when Rep (J) > 0; end if; end loop; end if; else if MSW = 0 then for J in reverse 0 .. Rep_Last loop Rep (J) := Rep (J) - 1; -- For 80-bit IEEE Extended, the MSB of the mantissa is stored -- so, when it has been flipped, its status must be reanalyzed. if Mantissa = 64 and then J = 1 then -- If the MSB changed from normalized to denormalized, then -- keep it normalized if the exponent is not 1. if Rep (J) = 2**(Siz - 1) - 1 then if Rep (0) /= 2**(Siz - 1) + 1 then Rep (J) := 2**Siz - 1; end if; else exit; end if; -- In other cases, stop if there is no borrow else exit when Rep (J) < 2**Siz - 1; end if; end loop; else for J in 0 .. Rep_Last loop Rep (J) := Rep (J) - 1; -- For 80-bit IEEE Extended, the MSB of the mantissa is stored -- so, when it has been flipped, its status must be reanalyzed. if Mantissa = 64 and then J = Rep_Last - 1 then -- If the MSB changed from normalized to denormalized, then -- keep it normalized if the exponent is not 1. if Rep (J) = 2**(Siz - 1) - 1 then if Rep (Rep_Last) /= 2**(Siz - 1) + 1 then Rep (J) := 2**Siz - 1; end if; else exit; end if; -- In other cases, stop if there is no borrow else exit when Rep (J) < 2**Siz - 1; end if; end loop; end if; end if; return XX; end Finite_Succ; ----------- -- Floor -- ----------- function Floor (X : T) return T is XT : constant T := Truncation (X); begin if X >= 0.0 then return XT; elsif XT = X then return X; else return XT - 1.0; end if; end Floor; -------------- -- Fraction -- -------------- function Fraction (X : T) return T is X_Frac : T; X_Exp : UI; begin Decompose (X, X_Frac, X_Exp); return X_Frac; end Fraction; ------------------ -- Leading_Part -- ------------------ function Leading_Part (X : T; Radix_Digits : UI) return T is L : UI; Y, Z : T; begin if Radix_Digits >= Mantissa then return X; elsif Radix_Digits <= 0 then raise Constraint_Error; else L := Exponent (X) - Radix_Digits; Y := Truncation (Scaling (X, -L)); Z := Scaling (Y, L); return Z; end if; end Leading_Part; ------------- -- Machine -- ------------- -- The trick with Machine is to force the compiler to store the result -- in memory so that we do not have extra precision used. The compiler -- is clever, so we have to outwit its possible optimizations. We do -- this by using an intermediate pragma Volatile location. function Machine (X : T) return T is Temp : T; pragma Volatile (Temp); begin Temp := X; return Temp; end Machine; ---------------------- -- Machine_Rounding -- ---------------------- -- For now, the implementation is identical to that of Rounding, which is -- a permissible behavior, but is not the most efficient possible approach. function Machine_Rounding (X : T) return T is Result : T; Tail : T; begin Result := Truncation (abs X); Tail := abs X - Result; if Tail >= 0.5 then Result := Result + 1.0; end if; if X > 0.0 then return Result; elsif X < 0.0 then return -Result; -- For zero case, make sure sign of zero is preserved else return X; end if; end Machine_Rounding; ----------- -- Model -- ----------- -- We treat Model as identical to Machine. This is true of IEEE and other -- nice floating-point systems, but not necessarily true of all systems. function Model (X : T) return T is begin return T'Machine (X); end Model; ---------- -- Pred -- ---------- function Pred (X : T) return T is begin -- Special treatment for largest negative number: raise Constraint_Error if X = T'First then raise Constraint_Error with "Pred of largest negative number"; -- For finite numbers, use the symmetry around zero of floating point elsif X > T'First and then X <= T'Last then pragma Annotate (CodePeer, Intentional, "test always true", "Check for invalid float"); pragma Annotate (CodePeer, Intentional, "condition predetermined", "Check for invalid float"); return -Finite_Succ (-X); -- For infinities and NaNs, return unchanged else return X; pragma Annotate (CodePeer, Intentional, "dead code", "Check float range."); end if; end Pred; --------------- -- Remainder -- --------------- function Remainder (X, Y : T) return T is A : T; B : T; Arg : T; P : T; P_Frac : T; Sign_X : T; IEEE_Rem : T; Arg_Exp : UI; P_Exp : UI; K : UI; P_Even : Boolean; Arg_Frac : T; begin if Y = 0.0 then raise Constraint_Error; end if; if X > 0.0 then Sign_X := 1.0; Arg := X; else Sign_X := -1.0; Arg := -X; end if; P := abs Y; if Arg < P then P_Even := True; IEEE_Rem := Arg; P_Exp := Exponent (P); else Decompose (Arg, Arg_Frac, Arg_Exp); Decompose (P, P_Frac, P_Exp); P := Compose (P_Frac, Arg_Exp); K := Arg_Exp - P_Exp; P_Even := True; IEEE_Rem := Arg; for Cnt in reverse 0 .. K loop if IEEE_Rem >= P then P_Even := False; IEEE_Rem := IEEE_Rem - P; else P_Even := True; end if; P := P * 0.5; end loop; end if; -- That completes the calculation of modulus remainder. The final -- step is get the IEEE remainder. Here we need to compare Rem with -- (abs Y) / 2. We must be careful of unrepresentable Y/2 value -- caused by subnormal numbers if P_Exp >= 0 then A := IEEE_Rem; B := abs Y * 0.5; else A := IEEE_Rem * 2.0; B := abs Y; end if; if A > B or else (A = B and then not P_Even) then IEEE_Rem := IEEE_Rem - abs Y; end if; return Sign_X * IEEE_Rem; end Remainder; -------------- -- Rounding -- -------------- function Rounding (X : T) return T is Result : T; Tail : T; begin Result := Truncation (abs X); Tail := abs X - Result; if Tail >= 0.5 then Result := Result + 1.0; end if; if X > 0.0 then return Result; elsif X < 0.0 then return -Result; -- For zero case, make sure sign of zero is preserved else return X; end if; end Rounding; ------------- -- Scaling -- ------------- function Scaling (X : T; Adjustment : UI) return T is pragma Assert (Mantissa <= 64); -- This implementation handles only 80-bit IEEE Extended or smaller package UST renames System.Unsigned_Types; use type UST.Long_Long_Unsigned; XX : T := T'Machine (X); Rep : Float_Rep; for Rep'Address use XX'Address; -- Rep is a view of the input floating-point parameter Exp : constant IEEE_Erange := Integer ((Rep (MSW) and Exp_Mask) / Exp_Factor) - IEEE_Ebias; -- Mask/Shift X to only get bits from the exponent. Then convert biased -- value to final value. Minus : constant Boolean := (Rep (MSW) and Sign_Mask) /= 0; -- Mask/Shift X to only get bit from the sign Expi, Expf : IEEE_Erange; begin -- Check for zero, infinities, NaNs as well as no adjustment if X = 0.0 or else Exp = IEEE_Emax + 1 or else Adjustment = 0 then return X; -- Check for nonzero denormalized numbers elsif Exp = IEEE_Emin - 1 then -- Check for zero result to protect the subtraction below if Adjustment < -(Mantissa - 1) then XX := 0.0; return (if Minus then -XX else XX); -- Normalize by multiplying by Radix ** (Mantissa - 1) else return Scaling (XX * RM1, Adjustment - (Mantissa - 1)); end if; -- Case of normalized numbers else -- Check for overflow if Adjustment > IEEE_Emax - Exp then -- Optionally raise Constraint_Error as per RM A.5.3(29) if T'Machine_Overflows then raise Constraint_Error with "Too large exponent"; else XX := 0.0; return (if Minus then -1.0 / XX else 1.0 / XX); pragma Annotate (CodePeer, Intentional, "overflow check", "Infinity produced"); pragma Annotate (CodePeer, Intentional, "divide by zero", "Infinity produced"); end if; -- Check for underflow elsif Adjustment < IEEE_Emin - Exp then -- Check for possibly gradual underflow (up to the hardware) if Adjustment >= IEEE_Emin - Mantissa - Exp then Expf := IEEE_Emin; Expi := Exp + Adjustment - Expf; -- Case of zero result else XX := 0.0; return (if Minus then -XX else XX); end if; -- Case of normalized results else Expf := Exp + Adjustment; Expi := 0; end if; Rep (MSW) := (Rep (MSW) and not Exp_Mask) + Float_Word (IEEE_Ebias + Expf) * Exp_Factor; if Expi < 0 then -- Given that Expi >= -Mantissa, only -64 is problematic if Expi = -64 then pragma Annotate (CodePeer, Intentional, "test always false", "test always false in some instantiations"); XX := XX / 2.0; Expi := -63; end if; XX := XX / T (UST.Long_Long_Unsigned (2) ** (-Expi)); end if; return XX; end if; end Scaling; ---------- -- Succ -- ---------- function Succ (X : T) return T is begin -- Special treatment for largest positive number: raise Constraint_Error if X = T'Last then raise Constraint_Error with "Succ of largest positive number"; -- For finite numbers, call the specific routine elsif X >= T'First and then X < T'Last then pragma Annotate (CodePeer, Intentional, "test always true", "Check for invalid float"); pragma Annotate (CodePeer, Intentional, "condition predetermined", "Check for invalid float"); return Finite_Succ (X); -- For infinities and NaNs, return unchanged else return X; pragma Annotate (CodePeer, Intentional, "dead code", "Check float range."); end if; end Succ; ---------------- -- Truncation -- ---------------- -- The basic approach is to compute -- T'Machine (RM1 + N) - RM1 -- where N >= 0.0 and RM1 = Radix ** (Mantissa - 1) -- This works provided that the intermediate result (RM1 + N) does not -- have extra precision (which is why we call Machine). When we compute -- RM1 + N, the exponent of N will be normalized and the mantissa shifted -- appropriately so the lower order bits, which cannot contribute to the -- integer part of N, fall off on the right. When we subtract RM1 again, -- the significant bits of N are shifted to the left, and what we have is -- an integer, because only the first e bits are different from zero -- (assuming binary radix here). function Truncation (X : T) return T is Result : T; begin Result := abs X; if Result >= RM1 then return T'Machine (X); else Result := T'Machine (RM1 + Result) - RM1; if Result > abs X then Result := Result - 1.0; end if; if X > 0.0 then return Result; elsif X < 0.0 then return -Result; -- For zero case, make sure sign of zero is preserved else return X; end if; end if; end Truncation; ----------------------- -- Unbiased_Rounding -- ----------------------- function Unbiased_Rounding (X : T) return T is Abs_X : constant T := abs X; Result : T; Tail : T; begin Result := Truncation (Abs_X); Tail := Abs_X - Result; if Tail > 0.5 then Result := Result + 1.0; elsif Tail = 0.5 then Result := 2.0 * Truncation ((Result / 2.0) + 0.5); end if; if X > 0.0 then return Result; elsif X < 0.0 then return -Result; -- For zero case, make sure sign of zero is preserved else return X; end if; end Unbiased_Rounding; ----------- -- Valid -- ----------- function Valid (X : not null access T) return Boolean is type Access_T is access all T; function To_Address is new Ada.Unchecked_Conversion (Access_T, System.Address); Rep : Float_Rep; for Rep'Address use To_Address (Access_T (X)); -- Rep is a view of the input floating-point parameter. Note that we -- must avoid reading the actual bits of this parameter in float form -- since it may be a signalling NaN. Exp : constant IEEE_Erange := Integer ((Rep (MSW) and Exp_Mask) / Exp_Factor) - IEEE_Ebias; -- Mask/Shift X to only get bits from the exponent. Then convert biased -- value to final value. begin if Exp = IEEE_Emax + 1 then -- This is an infinity or a NaN, i.e. always invalid return False; elsif Exp in IEEE_Emin .. IEEE_Emax then -- This is a normalized number, i.e. always valid return True; else pragma Assert (Exp = IEEE_Emin - 1); -- This is a denormalized number, valid if T'Denorm is True or 0.0 if T'Denorm then return True; -- Note that we cannot do a direct comparison with 0.0 because the -- hardware may evaluate it to True for all denormalized numbers. else -- First clear the sign bit (the exponent is already zero) Rep (MSW) := Rep (MSW) and not Sign_Mask; return (for all J in 0 .. Rep_Last => Rep (J) = 0); end if; end if; end Valid; end System.Fat_Gen;
jklmnn/ash
Ada
680
ads
package Listeners is type Listener is record Port_Number : Integer range 0 .. 16#ffff#; Shutdown : Boolean := False; WS_Root_Path : String (1 .. 256) := (others => Character'Val (0)); Host_Name : String (1 .. 256) := (others => Character'Val (0)); end record; task type Launch_Listener is entry Construct (The_Listener : in Listeners.Listener); entry Start; entry Stop; end Launch_Listener; function Make_Listener (Port : Integer; Root : String; Host : String) return Listeners.Listener; procedure Print_Info (L : Listener); procedure Listen (L : Listener); end Listeners;
flyx/OpenGLAda
Ada
1,119
ads
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" package Glfw.Errors is type Kind is (Not_Initialized, No_Current_Context, Invalid_Enum, Invalid_Value, Out_Of_Memory, API_Unavailable, Version_Unavailable, Platform_Error, Format_Unavailable); for Kind use (Not_Initialized => 16#00010001#, No_Current_Context => 16#00010002#, Invalid_Enum => 16#00010003#, Invalid_Value => 16#00010004#, Out_Of_Memory => 16#00010005#, API_Unavailable => 16#00010006#, Version_Unavailable => 16#00010007#, Platform_Error => 16#00010008#, Format_Unavailable => 16#00010009#); for Kind'Size use Interfaces.C.int'Size; type Callback is access procedure (Error : Kind; Description : String); procedure Set_Callback (Handler : Callback); end Glfw.Errors;
stcarrez/ada-wiki
Ada
18,056
adb
----------------------------------------------------------------------- -- wiki-nodes -- Wiki Document Internal representation -- Copyright (C) 2016, 2019, 2020, 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Wide_Wide_Characters.Handling; package body Wiki.Documents is use Wiki.Nodes; use Wiki.Nodes.Lists; -- ------------------------------ -- Append a HTML tag start node to the document. -- ------------------------------ procedure Start_Block (Into : in out Document; Kind : in Wiki.Nodes.Node_Kind; Level : in Natural) is Node : Node_Type_Access; begin case Kind is when N_HEADER => Node := new Node_Type '(Kind => N_HEADER, Len => 0, Level => Level, Content => null, Parent => Into.Current); when others => return; end case; Append (Into, Node); Into.Current := Node; end Start_Block; procedure End_Block (From : in out Document; Kind : in Wiki.Nodes.Node_Kind) is pragma Unreferenced (Kind); begin if From.Current /= null then From.Current := From.Current.Parent; end if; end End_Block; -- ------------------------------ -- Append a HTML tag start node to the document. -- ------------------------------ procedure Push_Node (Into : in out Document; Tag : in Html_Tag; Attributes : in Wiki.Attributes.Attribute_List) is Node : constant Node_Type_Access := new Node_Type '(Kind => N_TAG_START, Len => 0, Tag_Start => Tag, Attributes => Attributes, Children => null, Parent => Into.Current); begin Append (Into, Node); Into.Current := Node; end Push_Node; -- ------------------------------ -- Pop the HTML tag. -- ------------------------------ procedure Pop_Node (From : in out Document; Tag : in Html_Tag) is pragma Unreferenced (Tag); begin if From.Current /= null then From.Current := From.Current.Parent; end if; end Pop_Node; -- ------------------------------ -- Returns True if the current node is the root document node. -- ------------------------------ function Is_Root_Node (Doc : in Document) return Boolean is begin return Doc.Current = null; end Is_Root_Node; -- ------------------------------ -- Append a node to the document. -- ------------------------------ procedure Append (Into : in out Document; Node : in Wiki.Nodes.Node_Type_Access) is begin if Into.Current = null then Append (Into.Nodes, Node); else Append (Into.Current, Node); end if; end Append; -- ------------------------------ -- Append a simple node such as N_LINE_BREAK, N_HORIZONTAL_RULE or N_PARAGRAPH. -- ------------------------------ procedure Append (Into : in out Document; Kind : in Simple_Node_Kind) is begin case Kind is when N_LINE_BREAK => Append (Into, new Node_Type '(Kind => N_LINE_BREAK, Len => 0, Parent => Into.Current)); when N_HORIZONTAL_RULE => Append (Into, new Node_Type '(Kind => N_HORIZONTAL_RULE, Len => 0, Parent => Into.Current)); when N_PARAGRAPH => Append (Into, new Node_Type '(Kind => N_PARAGRAPH, Len => 0, Parent => Into.Current)); when N_LIST_ITEM => Append (Into, new Node_Type '(Kind => N_LIST_ITEM, Len => 0, Parent => Into.Current)); when N_LIST_END => Append (Into, new Node_Type '(Kind => N_LIST_END, Len => 0, Parent => Into.Current)); when N_NUM_LIST_END => Append (Into, new Node_Type '(Kind => N_NUM_LIST_END, Len => 0, Parent => Into.Current)); when N_LIST_ITEM_END => Append (Into, new Node_Type '(Kind => N_LIST_ITEM_END, Len => 0, Parent => Into.Current)); when N_NEWLINE => Append (Into, new Node_Type '(Kind => N_NEWLINE, Len => 0, Parent => Into.Current)); when N_END_DEFINITION => Append (Into, new Node_Type '(Kind => N_END_DEFINITION, Len => 0, Parent => Into.Current)); when N_TOC_DISPLAY => Append (Into, new Node_Type '(Kind => N_TOC_DISPLAY, Len => 0, Parent => Into.Current)); Into.Using_TOC := True; when N_NONE => null; end case; end Append; -- ------------------------------ -- Append the text with the given format at end of the document. -- ------------------------------ procedure Append (Into : in out Document; Text : in Wiki.Strings.WString; Format : in Format_Map) is begin Append (Into, new Node_Type '(Kind => N_TEXT, Len => Text'Length, Parent => Into.Current, Text => Text, Format => Format)); end Append; -- ------------------------------ -- Add a definition item at end of the document. -- ------------------------------ procedure Add_Definition (Into : in out Document; Definition : in Wiki.Strings.WString) is begin -- Append (Into, new Node_Type '(Kind => N_DEFINITION, -- Len => Definition'Length, -- Parent => Into.Current, -- Header => Definition, -- Level => 0)); null; end Add_Definition; -- ------------------------------ -- Add a link. -- ------------------------------ procedure Add_Link (Into : in out Document; Name : in Wiki.Strings.WString; Attributes : in out Wiki.Attributes.Attribute_List) is begin Append (Into, new Node_Type '(Kind => N_LINK, Len => Name'Length, Parent => Into.Current, Title => Name, Link_Attr => Attributes)); end Add_Link; -- ------------------------------ -- Add a link reference with the given label. -- ------------------------------ procedure Add_Link_Ref (Into : in out Document; Label : in Wiki.Strings.WString) is begin Append (Into, new Node_Type '(Kind => N_LINK_REF, Len => Label'Length, Parent => Into.Current, Title => Label, others => <>)); end Add_Link_Ref; -- ------------------------------ -- Add an image. -- ------------------------------ procedure Add_Image (Into : in out Document; Name : in Wiki.Strings.WString; Attributes : in out Wiki.Attributes.Attribute_List) is begin Append (Into, new Node_Type '(Kind => N_IMAGE, Len => Name'Length, Parent => Into.Current, Title => Name, Link_Attr => Attributes)); end Add_Image; -- ------------------------------ -- Add a quote. -- ------------------------------ procedure Add_Quote (Into : in out Document; Name : in Wiki.Strings.WString; Attributes : in out Wiki.Attributes.Attribute_List) is begin Append (Into, new Node_Type '(Kind => N_QUOTE, Len => Name'Length, Parent => Into.Current, Title => Name, Link_Attr => Attributes)); end Add_Quote; -- ------------------------------ -- Add a list (<ul> or <ol>) starting at the given number. -- ------------------------------ procedure Add_List (Into : in out Document; Level : in Natural; Ordered : in Boolean) is begin if Ordered then Append (Into, new Node_Type '(Kind => N_NUM_LIST_START, Len => 0, Parent => Into.Current, Level => Level, others => <>)); else Append (Into, new Node_Type '(Kind => N_LIST_START, Len => 0, Parent => Into.Current, Level => Level, others => <>)); end if; end Add_List; -- ------------------------------ -- Add a blockquote (<blockquote>). The level indicates the blockquote nested level. -- The blockquote must be closed at the next header. -- ------------------------------ procedure Add_Blockquote (Into : in out Document; Level : in Natural) is begin Append (Into, new Node_Type '(Kind => N_BLOCKQUOTE, Len => 0, Parent => Into.Current, Level => Level, others => <>)); end Add_Blockquote; -- ------------------------------ -- Add a text block that is pre-formatted. -- ------------------------------ procedure Add_Preformatted (Into : in out Document; Text : in Wiki.Strings.WString; Format : in Wiki.Strings.WString) is begin Append (Into, new Node_Type '(Kind => N_PREFORMAT, Len => Text'Length, Parent => Into.Current, Preformatted => Text, Language => Strings.To_UString (Format))); end Add_Preformatted; -- ------------------------------ -- Add a new row to the current table. -- ------------------------------ procedure Add_Row (Into : in out Document) is Table : Node_Type_Access; Row : Node_Type_Access; begin -- Identify the current table. Table := Into.Current; while Table /= null and then Table.Kind /= N_TABLE loop Table := Table.Parent; end loop; -- Create the current table. if Table = null then Table := new Node_Type '(Kind => N_TABLE, Len => 0, Tag_Start => TABLE_TAG, Children => null, Parent => Into.Current, others => <>); Append (Into, Table); end if; -- Add the row. Row := new Node_Type '(Kind => N_ROW, Len => 0, Tag_Start => TR_TAG, Children => null, Parent => Table, others => <>); Append (Table, Row); Into.Current := Row; end Add_Row; -- ------------------------------ -- Add a column to the current table row. The column is configured with the -- given attributes. The column content is provided through calls to Append. -- ------------------------------ procedure Add_Column (Into : in out Document; Attributes : in out Wiki.Attributes.Attribute_List) is Row : Node_Type_Access; Col : Node_Type_Access; begin -- Identify the current row. Row := Into.Current; while Row /= null and then Row.Kind /= N_ROW loop Row := Row.Parent; end loop; -- Add the new column. Col := new Node_Type '(Kind => N_COLUMN, Len => 0, Tag_Start => TD_TAG, Children => null, Parent => Row, Attributes => Attributes); Append (Row, Col); Into.Current := Col; end Add_Column; -- ------------------------------ -- Finish the creation of the table. -- ------------------------------ procedure Finish_Table (Into : in out Document) is Table : Node_Type_Access; begin -- Identify the current table. Table := Into.Current; while Table /= null and then Table.Kind /= N_TABLE loop Table := Table.Parent; end loop; if Table /= null then Into.Current := Table.Parent; else Into.Current := null; end if; end Finish_Table; -- ------------------------------ -- Iterate over the nodes of the list and call the <tt>Process</tt> procedure with -- each node instance. -- ------------------------------ procedure Iterate (Doc : in Document; Process : not null access procedure (Node : in Node_Type)) is begin Iterate (Doc.Nodes, Process); end Iterate; -- ------------------------------ -- Returns True if the document is empty. -- ------------------------------ function Is_Empty (Doc : in Document) return Boolean is begin return Wiki.Nodes.Lists.Is_Empty (Doc.Nodes); end Is_Empty; -- ------------------------------ -- Returns True if the document displays the table of contents by itself. -- ------------------------------ function Is_Using_TOC (Doc : in Document) return Boolean is begin return Doc.Using_TOC; end Is_Using_TOC; -- ------------------------------ -- Returns True if the table of contents is visible and must be rendered. -- ------------------------------ function Is_Visible_TOC (Doc : in Document) return Boolean is begin return Doc.Visible_TOC; end Is_Visible_TOC; -- ------------------------------ -- Hide the table of contents. -- ------------------------------ procedure Hide_TOC (Doc : in out Document) is begin Doc.Visible_TOC := False; end Hide_TOC; -- ------------------------------ -- Get the table of content node associated with the document. -- ------------------------------ procedure Get_TOC (Doc : in out Document; TOC : out Wiki.Nodes.Lists.Node_List_Ref) is begin if Wiki.Nodes.Lists.Is_Empty (Doc.TOC) then Append (Doc.TOC, new Node_Type '(Kind => N_TOC, Len => 0, others => <>)); end if; TOC := Doc.TOC; end Get_TOC; -- ------------------------------ -- Get the table of content node associated with the document. -- ------------------------------ function Get_TOC (Doc : in Document) return Wiki.Nodes.Lists.Node_List_Ref is begin return Doc.TOC; end Get_TOC; -- ------------------------------ -- Set a link definition. -- ------------------------------ procedure Set_Link (Doc : in out Document; Name : in Wiki.Strings.WString; Link : in Wiki.Strings.WString; Title : in Wiki.Strings.WString) is Upper : constant Wiki.Strings.WString := Ada.Wide_Wide_Characters.Handling.To_Upper (Name); begin if not Doc.Links.Contains (Upper) then Doc.Links.Include (Upper, Link); if Title'Length > 0 then Doc.Titles.Include (Upper, Title); end if; end if; end Set_Link; -- ------------------------------ -- Get a link definition. -- ------------------------------ function Get_Link (Doc : in Document; Label : in Wiki.Strings.WString) return Wiki.Strings.WString is Upper : constant Wiki.Strings.WString := Ada.Wide_Wide_Characters.Handling.To_Upper (Label); Pos : constant Wiki.Strings.Maps.Cursor := Doc.Links.Find (Upper); begin if Wiki.Strings.Maps.Has_Element (Pos) then return Wiki.Strings.Maps.Element (Pos); else return ""; end if; end Get_Link; -- ------------------------------ -- Get a link definition. -- ------------------------------ function Get_Link_Title (Doc : in Document; Label : in Wiki.Strings.WString) return Wiki.Strings.WString is Upper : constant Wiki.Strings.WString := Ada.Wide_Wide_Characters.Handling.To_Upper (Label); Pos : constant Wiki.Strings.Maps.Cursor := Doc.Titles.Find (Upper); begin if Wiki.Strings.Maps.Has_Element (Pos) then return Wiki.Strings.Maps.Element (Pos); else return ""; end if; end Get_Link_Title; end Wiki.Documents;
reznikmm/matreshka
Ada
4,818
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Table_Covered_Table_Cell_Elements; package Matreshka.ODF_Table.Covered_Table_Cell_Elements is type Table_Covered_Table_Cell_Element_Node is new Matreshka.ODF_Table.Abstract_Table_Element_Node and ODF.DOM.Table_Covered_Table_Cell_Elements.ODF_Table_Covered_Table_Cell with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Table_Covered_Table_Cell_Element_Node; overriding function Get_Local_Name (Self : not null access constant Table_Covered_Table_Cell_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Table_Covered_Table_Cell_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Table_Covered_Table_Cell_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Table_Covered_Table_Cell_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Table.Covered_Table_Cell_Elements;
charlie5/cBound
Ada
1,536
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_get_keyboard_control_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; pad0 : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_get_keyboard_control_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_get_keyboard_control_request_t.Item, Element_Array => xcb.xcb_get_keyboard_control_request_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_get_keyboard_control_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_get_keyboard_control_request_t.Pointer, Element_Array => xcb.xcb_get_keyboard_control_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_get_keyboard_control_request_t;
zhmu/ananas
Ada
9,212
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . C G I . D E B U G -- -- -- -- B o d y -- -- -- -- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Strings.Unbounded; package body GNAT.CGI.Debug is use Ada.Strings.Unbounded; -- Define the abstract type which act as a template for all debug IO modes. -- To create a new IO mode you must: -- 1. create a new package spec -- 2. create a new type derived from IO.Format -- 3. implement all the abstract routines in IO package IO is type Format is abstract tagged null record; function Output (Mode : Format'Class) return String; function Variable (Mode : Format; Name : String; Value : String) return String is abstract; -- Returns variable Name and its associated value function New_Line (Mode : Format) return String is abstract; -- Returns a new line such as this concatenated between two strings -- will display the strings on two lines. function Title (Mode : Format; Str : String) return String is abstract; -- Returns Str as a Title. A title must be alone and centered on a -- line. Next output will be on the following line. function Header (Mode : Format; Str : String) return String is abstract; -- Returns Str as an Header. An header must be alone on its line. Next -- output will be on the following line. end IO; ---------------------- -- IO for HTML Mode -- ---------------------- package HTML_IO is -- See IO for comments about these routines type Format is new IO.Format with null record; function Variable (IO : Format; Name : String; Value : String) return String; function New_Line (IO : Format) return String; function Title (IO : Format; Str : String) return String; function Header (IO : Format; Str : String) return String; end HTML_IO; ---------------------------- -- IO for Plain Text Mode -- ---------------------------- package Text_IO is -- See IO for comments about these routines type Format is new IO.Format with null record; function Variable (IO : Format; Name : String; Value : String) return String; function New_Line (IO : Format) return String; function Title (IO : Format; Str : String) return String; function Header (IO : Format; Str : String) return String; end Text_IO; -------------- -- Debug_IO -- -------------- package body IO is ------------ -- Output -- ------------ function Output (Mode : Format'Class) return String is Result : Unbounded_String; begin Result := To_Unbounded_String (Title (Mode, "CGI complete runtime environment") & Header (Mode, "CGI parameters:") & New_Line (Mode)); for K in 1 .. Argument_Count loop Result := Result & Variable (Mode, Key (K), Value (K)) & New_Line (Mode); end loop; Result := Result & New_Line (Mode) & Header (Mode, "CGI environment variables (Metavariables):") & New_Line (Mode); for P in Metavariable_Name'Range loop if Metavariable_Exists (P) then Result := Result & Variable (Mode, Metavariable_Name'Image (P), Metavariable (P)) & New_Line (Mode); end if; end loop; return To_String (Result); end Output; end IO; ------------- -- HTML_IO -- ------------- package body HTML_IO is NL : constant String := [ASCII.LF]; function Bold (S : String) return String; -- Returns S as an HTML bold string function Italic (S : String) return String; -- Returns S as an HTML italic string ---------- -- Bold -- ---------- function Bold (S : String) return String is begin return "<b>" & S & "</b>"; end Bold; ------------ -- Header -- ------------ function Header (IO : Format; Str : String) return String is pragma Unreferenced (IO); begin return "<h2>" & Str & "</h2>" & NL; end Header; ------------ -- Italic -- ------------ function Italic (S : String) return String is begin return "<i>" & S & "</i>"; end Italic; -------------- -- New_Line -- -------------- function New_Line (IO : Format) return String is pragma Unreferenced (IO); begin return "<br>" & NL; end New_Line; ----------- -- Title -- ----------- function Title (IO : Format; Str : String) return String is pragma Unreferenced (IO); begin return "<p align=center><font size=+2>" & Str & "</font></p>" & NL; end Title; -------------- -- Variable -- -------------- function Variable (IO : Format; Name : String; Value : String) return String is pragma Unreferenced (IO); begin return Bold (Name) & " = " & Italic (Value); end Variable; end HTML_IO; ------------- -- Text_IO -- ------------- package body Text_IO is ------------ -- Header -- ------------ function Header (IO : Format; Str : String) return String is begin return "*** " & Str & New_Line (IO); end Header; -------------- -- New_Line -- -------------- function New_Line (IO : Format) return String is pragma Unreferenced (IO); begin return String'(1 => ASCII.LF); end New_Line; ----------- -- Title -- ----------- function Title (IO : Format; Str : String) return String is Spaces : constant Natural := (80 - Str'Length) / 2; Indent : constant String (1 .. Spaces) := [others => ' ']; begin return Indent & Str & New_Line (IO); end Title; -------------- -- Variable -- -------------- function Variable (IO : Format; Name : String; Value : String) return String is pragma Unreferenced (IO); begin return " " & Name & " = " & Value; end Variable; end Text_IO; ----------------- -- HTML_Output -- ----------------- function HTML_Output return String is HTML : HTML_IO.Format; begin return IO.Output (Mode => HTML); end HTML_Output; ----------------- -- Text_Output -- ----------------- function Text_Output return String is Text : Text_IO.Format; begin return IO.Output (Mode => Text); end Text_Output; end GNAT.CGI.Debug;
reznikmm/matreshka
Ada
4,019
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.DOM.Table_Object_Name_Attributes; package Matreshka.ODF_Table.Object_Name_Attributes is type Table_Object_Name_Attribute_Node is new Matreshka.ODF_Table.Abstract_Table_Attribute_Node and ODF.DOM.Table_Object_Name_Attributes.ODF_Table_Object_Name_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Table_Object_Name_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Table_Object_Name_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Table.Object_Name_Attributes;
reznikmm/matreshka
Ada
5,287
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ -- An enumeration literal is a user-defined data value for an enumeration. ------------------------------------------------------------------------------ limited with AMF.UML.Enumerations; with AMF.UML.Instance_Specifications; package AMF.UML.Enumeration_Literals is pragma Preelaborate; type UML_Enumeration_Literal is limited interface and AMF.UML.Instance_Specifications.UML_Instance_Specification; type UML_Enumeration_Literal_Access is access all UML_Enumeration_Literal'Class; for UML_Enumeration_Literal_Access'Storage_Size use 0; not overriding function Get_Classifier (Self : not null access constant UML_Enumeration_Literal) return AMF.UML.Enumerations.UML_Enumeration_Access is abstract; -- Getter of EnumerationLiteral::classifier. -- -- The classifier of this EnumerationLiteral derived to be equal to its -- enumeration. not overriding function Get_Enumeration (Self : not null access constant UML_Enumeration_Literal) return AMF.UML.Enumerations.UML_Enumeration_Access is abstract; -- Getter of EnumerationLiteral::enumeration. -- -- The Enumeration that this EnumerationLiteral is a member of. not overriding procedure Set_Enumeration (Self : not null access UML_Enumeration_Literal; To : AMF.UML.Enumerations.UML_Enumeration_Access) is abstract; -- Setter of EnumerationLiteral::enumeration. -- -- The Enumeration that this EnumerationLiteral is a member of. not overriding function Classifier (Self : not null access constant UML_Enumeration_Literal) return AMF.UML.Enumerations.UML_Enumeration_Access is abstract; -- Operation EnumerationLiteral::classifier. -- -- Missing derivation for EnumerationLiteral::/classifier : Enumeration end AMF.UML.Enumeration_Literals;
AdaCore/libadalang
Ada
75
ads
package Pkg is type T is tagged null record; procedure Foo; end Pkg;
reznikmm/matreshka
Ada
3,699
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Elements; package ODF.DOM.Table_Source_Service_Elements is pragma Preelaborate; type ODF_Table_Source_Service is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Table_Source_Service_Access is access all ODF_Table_Source_Service'Class with Storage_Size => 0; end ODF.DOM.Table_Source_Service_Elements;
dshadrin/AProxy
Ada
1,775
ads
------------------------------------------------------------------------------ -- -- -- File: -- -- formatted_output-enumeration_output.ads -- -- -- -- Description: -- -- Formatted_Output.Enumeration_Output generic package specification, -- -- contains prototypes of functions that supports formatted output of -- -- enumeration types -- -- -- -- Author: -- -- Eugene Nonko, [email protected] -- -- -- -- Revision history: -- -- 28/01/99 - original -- -- -- ------------------------------------------------------------------------------ generic type Item_Type is (<>); package Formatted_Output.Enumeration_Output is function "&" (Fmt : Format_Type; Value : Item_Type) return Format_Type; -- Replaces leftmost formatting sequence in Fmt with formatted -- Value image, then returns Fmt. Raises exception Format_Error -- when invalid formatting sequence is found or no formatting -- sequence found at all end Formatted_Output.Enumeration_Output;
zhmu/ananas
Ada
29,086
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . T E X T _ I O -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Preconditions in this unit are meant for analysis only, not for run-time -- checking, so that the expected exceptions are raised. This is enforced by -- setting the corresponding assertion policy to Ignore. These preconditions -- are partial. They protect fully against Status_Error and Mode_Error, -- partially against Layout_Error (see SPARK User's Guide for details), and -- not against other types of errors. pragma Assertion_Policy (Pre => Ignore); -- Note: the generic subpackages of Text_IO (Integer_IO, Float_IO, Fixed_IO, -- Modular_IO, Decimal_IO and Enumeration_IO) appear as private children in -- GNAT. These children are with'ed automatically if they are referenced, so -- this rearrangement is invisible to user programs, but has the advantage -- that only the needed parts of Text_IO are processed and loaded. with Ada.IO_Exceptions; with Ada.Streams; with System; with System.File_Control_Block; with System.WCh_Con; package Ada.Text_IO with SPARK_Mode, Abstract_State => File_System, Initializes => File_System, Initial_Condition => Line_Length = 0 and Page_Length = 0 is pragma Elaborate_Body; type File_Type is limited private with Default_Initial_Condition => (not Is_Open (File_Type)); type File_Mode is (In_File, Out_File, Append_File); -- The following representation clause allows the use of unchecked -- conversion for rapid translation between the File_Mode type -- used in this package and System.File_IO. for File_Mode use (In_File => 0, -- System.File_IO.File_Mode'Pos (In_File) Out_File => 2, -- System.File_IO.File_Mode'Pos (Out_File) Append_File => 3); -- System.File_IO.File_Mode'Pos (Append_File) type Count is range 0 .. Natural'Last; -- The value of Count'Last must be large enough so that the assumption that -- the Line, Column and Page counts can never exceed this value is valid. subtype Positive_Count is Count range 1 .. Count'Last; Unbounded : constant Count := 0; -- Line and page length subtype Field is Integer range 0 .. 255; subtype Number_Base is Integer range 2 .. 16; type Type_Set is (Lower_Case, Upper_Case); --------------------- -- File Management -- --------------------- procedure Create (File : in out File_Type; Mode : File_Mode := Out_File; Name : String := ""; Form : String := "") with Pre => not Is_Open (File), Post => Is_Open (File) and then Ada.Text_IO.Mode (File) = Mode and then (if Mode /= In_File then (Line_Length (File) = 0 and then Page_Length (File) = 0)), Global => (In_Out => File_System); procedure Open (File : in out File_Type; Mode : File_Mode; Name : String; Form : String := "") with Pre => not Is_Open (File), Post => Is_Open (File) and then Ada.Text_IO.Mode (File) = Mode and then (if Mode /= In_File then (Line_Length (File) = 0 and then Page_Length (File) = 0)), Global => (In_Out => File_System); procedure Close (File : in out File_Type) with Pre => Is_Open (File), Post => not Is_Open (File), Global => (In_Out => File_System); procedure Delete (File : in out File_Type) with Pre => Is_Open (File), Post => not Is_Open (File), Global => (In_Out => File_System); procedure Reset (File : in out File_Type; Mode : File_Mode) with Pre => Is_Open (File), Post => Is_Open (File) and then Ada.Text_IO.Mode (File) = Mode and then (if Mode /= In_File then (Line_Length (File) = 0 and then Page_Length (File) = 0)), Global => (In_Out => File_System); procedure Reset (File : in out File_Type) with Pre => Is_Open (File), Post => Is_Open (File) and Mode (File)'Old = Mode (File) and (if Mode (File) /= In_File then (Line_Length (File) = 0 and then Page_Length (File) = 0)), Global => (In_Out => File_System); function Mode (File : File_Type) return File_Mode with Pre => Is_Open (File), Global => null; function Name (File : File_Type) return String with Pre => Is_Open (File), Global => null; function Form (File : File_Type) return String with Pre => Is_Open (File), Global => null; function Is_Open (File : File_Type) return Boolean with Global => null; ------------------------------------------------------ -- Control of default input, output and error files -- ------------------------------------------------------ procedure Set_Input (File : File_Type) with SPARK_Mode => Off; procedure Set_Output (File : File_Type) with SPARK_Mode => Off; procedure Set_Error (File : File_Type) with SPARK_Mode => Off; function Standard_Input return File_Type with SPARK_Mode => Off; function Standard_Output return File_Type with SPARK_Mode => Off; function Standard_Error return File_Type with SPARK_Mode => Off; function Current_Input return File_Type with SPARK_Mode => Off; function Current_Output return File_Type with SPARK_Mode => Off; function Current_Error return File_Type with SPARK_Mode => Off; type File_Access is access constant File_Type; function Standard_Input return File_Access with SPARK_Mode => Off; function Standard_Output return File_Access with SPARK_Mode => Off; function Standard_Error return File_Access with SPARK_Mode => Off; function Current_Input return File_Access with SPARK_Mode => Off; function Current_Output return File_Access with SPARK_Mode => Off; function Current_Error return File_Access with SPARK_Mode => Off; -------------------- -- Buffer control -- -------------------- -- Note: The parameter file is IN OUT in the RM, but this is clearly -- an oversight, and was intended to be IN, see AI95-00057. procedure Flush (File : File_Type) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), Global => (In_Out => File_System); procedure Flush with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); -------------------------------------------- -- Specification of line and page lengths -- -------------------------------------------- procedure Set_Line_Length (File : File_Type; To : Count) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Line_Length (File) = To and Page_Length (File)'Old = Page_Length (File), Global => (In_Out => File_System); procedure Set_Line_Length (To : Count) with Post => Line_Length = To and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Set_Page_Length (File : File_Type; To : Count) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Page_Length (File) = To and Line_Length (File)'Old = Line_Length (File), Global => (In_Out => File_System); procedure Set_Page_Length (To : Count) with Post => Page_Length = To and Line_Length'Old = Line_Length, Global => (In_Out => File_System); function Line_Length (File : File_Type) return Count with Pre => Is_Open (File) and then Mode (File) /= In_File, Global => (Input => File_System); function Line_Length return Count with Global => (Input => File_System); function Page_Length (File : File_Type) return Count with Pre => Is_Open (File) and then Mode (File) /= In_File, Global => (Input => File_System); function Page_Length return Count with Global => (Input => File_System); ------------------------------------ -- Column, Line, and Page Control -- ------------------------------------ procedure New_Line (File : File_Type; Spacing : Positive_Count := 1) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), Global => (In_Out => File_System); procedure New_Line (Spacing : Positive_Count := 1) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Skip_Line (File : File_Type; Spacing : Positive_Count := 1) with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (In_Out => File_System); procedure Skip_Line (Spacing : Positive_Count := 1) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); function End_Of_Line (File : File_Type) return Boolean with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (Input => File_System); function End_Of_Line return Boolean with Global => (Input => File_System); procedure New_Page (File : File_Type) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), Global => (In_Out => File_System); procedure New_Page with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Skip_Page (File : File_Type) with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (In_Out => File_System); procedure Skip_Page with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); function End_Of_Page (File : File_Type) return Boolean with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (Input => File_System); function End_Of_Page return Boolean with Global => (Input => File_System); function End_Of_File (File : File_Type) return Boolean with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (Input => File_System); function End_Of_File return Boolean with Global => (Input => File_System); procedure Set_Col (File : File_Type; To : Positive_Count) with Pre => Is_Open (File) and then (if Mode (File) /= In_File then (Line_Length (File) = 0 or else To <= Line_Length (File))), Contract_Cases => (Mode (File) /= In_File => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), others => True), Global => (In_Out => File_System); procedure Set_Col (To : Positive_Count) with Pre => Line_Length = 0 or To <= Line_Length, Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Set_Line (File : File_Type; To : Positive_Count) with Pre => Is_Open (File) and then (if Mode (File) /= In_File then (Page_Length (File) = 0 or else To <= Page_Length (File))), Contract_Cases => (Mode (File) /= In_File => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), others => True), Global => (In_Out => File_System); procedure Set_Line (To : Positive_Count) with Pre => Page_Length = 0 or To <= Page_Length, Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); function Col (File : File_Type) return Positive_Count with Pre => Is_Open (File), Global => (Input => File_System); function Col return Positive_Count with Global => (Input => File_System); function Line (File : File_Type) return Positive_Count with Pre => Is_Open (File), Global => (Input => File_System); function Line return Positive_Count with Global => (Input => File_System); function Page (File : File_Type) return Positive_Count with Pre => Is_Open (File), Global => (Input => File_System); function Page return Positive_Count with Global => (Input => File_System); ---------------------------- -- Character Input-Output -- ---------------------------- procedure Get (File : File_Type; Item : out Character) with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (In_Out => File_System); procedure Get (Item : out Character) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Put (File : File_Type; Item : Character) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), Global => (In_Out => File_System); procedure Put (Item : Character) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Look_Ahead (File : File_Type; Item : out Character; End_Of_Line : out Boolean) with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (Input => File_System); procedure Look_Ahead (Item : out Character; End_Of_Line : out Boolean) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (Input => File_System); procedure Get_Immediate (File : File_Type; Item : out Character) with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (In_Out => File_System); procedure Get_Immediate (Item : out Character) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Get_Immediate (File : File_Type; Item : out Character; Available : out Boolean) with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (In_Out => File_System); procedure Get_Immediate (Item : out Character; Available : out Boolean) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); ------------------------- -- String Input-Output -- ------------------------- procedure Get (File : File_Type; Item : out String) with Pre => Is_Open (File) and then Mode (File) = In_File, Global => (In_Out => File_System); procedure Get (Item : out String) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Put (File : File_Type; Item : String) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), Global => (In_Out => File_System); procedure Put (Item : String) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); procedure Get_Line (File : File_Type; Item : out String; Last : out Natural) with Pre => Is_Open (File) and then Mode (File) = In_File, Post => (if Item'Length > 0 then Last in Item'First - 1 .. Item'Last else Last = Item'First - 1), Global => (In_Out => File_System); procedure Get_Line (Item : out String; Last : out Natural) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length and (if Item'Length > 0 then Last in Item'First - 1 .. Item'Last else Last = Item'First - 1), Global => (In_Out => File_System); function Get_Line (File : File_Type) return String with SPARK_Mode => Off; pragma Ada_05 (Get_Line); function Get_Line return String with SPARK_Mode => Off; pragma Ada_05 (Get_Line); procedure Put_Line (File : File_Type; Item : String) with Pre => Is_Open (File) and then Mode (File) /= In_File, Post => Line_Length (File)'Old = Line_Length (File) and Page_Length (File)'Old = Page_Length (File), Global => (In_Out => File_System); procedure Put_Line (Item : String) with Post => Line_Length'Old = Line_Length and Page_Length'Old = Page_Length, Global => (In_Out => File_System); --------------------------------------- -- Generic packages for Input-Output -- --------------------------------------- -- The generic packages: -- Ada.Text_IO.Integer_IO -- Ada.Text_IO.Modular_IO -- Ada.Text_IO.Float_IO -- Ada.Text_IO.Fixed_IO -- Ada.Text_IO.Decimal_IO -- Ada.Text_IO.Enumeration_IO -- are implemented as separate child packages in GNAT, so the -- spec and body of these packages are to be found in separate -- child units. This implementation detail is hidden from the -- Ada programmer by special circuitry in the compiler that -- treats these child packages as though they were nested in -- Text_IO. The advantage of this special processing is that -- the subsidiary routines needed if these generics are used -- are not loaded when they are not used. ---------------- -- Exceptions -- ---------------- Status_Error : exception renames IO_Exceptions.Status_Error; Mode_Error : exception renames IO_Exceptions.Mode_Error; Name_Error : exception renames IO_Exceptions.Name_Error; Use_Error : exception renames IO_Exceptions.Use_Error; Device_Error : exception renames IO_Exceptions.Device_Error; End_Error : exception renames IO_Exceptions.End_Error; Data_Error : exception renames IO_Exceptions.Data_Error; Layout_Error : exception renames IO_Exceptions.Layout_Error; private pragma SPARK_Mode (Off); -- The following procedures have a File_Type formal of mode IN OUT because -- they may close the original file. The Close operation may raise an -- exception, but in that case we want any assignment to the formal to -- be effective anyway, so it must be passed by reference (or the caller -- will be left with a dangling pointer). pragma Export_Procedure (Internal => Close, External => "", Mechanism => Reference); pragma Export_Procedure (Internal => Delete, External => "", Mechanism => Reference); pragma Export_Procedure (Internal => Reset, External => "", Parameter_Types => (File_Type), Mechanism => Reference); pragma Export_Procedure (Internal => Reset, External => "", Parameter_Types => (File_Type, File_Mode), Mechanism => (File => Reference)); ----------------------------------- -- Handling of Format Characters -- ----------------------------------- -- Line marks are represented by the single character ASCII.LF (16#0A#). -- In DOS and similar systems, underlying file translation takes care -- of translating this to and from the standard CR/LF sequences used in -- these operating systems to mark the end of a line. On output there is -- always a line mark at the end of the last line, but on input, this -- line mark can be omitted, and is implied by the end of file. -- Page marks are represented by the single character ASCII.FF (16#0C#), -- The page mark at the end of the file may be omitted, and is normally -- omitted on output unless an explicit New_Page call is made before -- closing the file. No page mark is added when a file is appended to, -- so, in accordance with the permission in (RM A.10.2(4)), there may -- or may not be a page mark separating preexisting text in the file -- from the new text to be written. -- A file mark is marked by the physical end of file. In DOS translation -- mode on input, an EOF character (SUB = 16#1A#) gets translated to the -- physical end of file, so in effect this character is recognized as -- marking the end of file in DOS and similar systems. LM : constant := Character'Pos (ASCII.LF); -- Used as line mark PM : constant := Character'Pos (ASCII.FF); -- Used as page mark, except at end of file where it is implied -------------------------------- -- Text_IO File Control Block -- -------------------------------- Default_WCEM : System.WCh_Con.WC_Encoding_Method := System.WCh_Con.WCEM_UTF8; -- This gets modified during initialization (see body) using -- the default value established in the call to Set_Globals. package FCB renames System.File_Control_Block; type Text_AFCB; type File_Type is access all Text_AFCB; type Text_AFCB is new FCB.AFCB with record Page : Count := 1; Line : Count := 1; Col : Count := 1; Line_Length : Count := 0; Page_Length : Count := 0; Self : aliased File_Type; -- Set to point to the containing Text_AFCB block. This is used to -- implement the Current_{Error,Input,Output} functions which return -- a File_Access, the file access value returned is a pointer to -- the Self field of the corresponding file. Before_LM : Boolean := False; -- This flag is used to deal with the anomalies introduced by the -- peculiar definition of End_Of_File and End_Of_Page in Ada. These -- functions require looking ahead more than one character. Since -- there is no convenient way of backing up more than one character, -- what we do is to leave ourselves positioned past the LM, but set -- this flag, so that we know that from an Ada point of view we are -- in front of the LM, not after it. A little odd, but it works. Before_LM_PM : Boolean := False; -- This flag similarly handles the case of being physically positioned -- after a LM-PM sequence when logically we are before the LM-PM. This -- flag can only be set if Before_LM is also set. WC_Method : System.WCh_Con.WC_Encoding_Method := Default_WCEM; -- Encoding method to be used for this file. Text_IO does not deal with -- wide characters, but it does deal with upper half characters in the -- range 16#80#-16#FF# which may need encoding, e.g. in UTF-8 mode. Before_Upper_Half_Character : Boolean := False; -- This flag is set to indicate that an encoded upper half character has -- been read by Text_IO.Look_Ahead. If it is set to True, then it means -- that the stream is logically positioned before the character but is -- physically positioned after it. The character involved must be in -- the range 16#80#-16#FF#, i.e. if the flag is set, then we know the -- next character has a code greater than 16#7F#, and the value of this -- character is saved in Saved_Upper_Half_Character. Saved_Upper_Half_Character : Character; -- This field is valid only if Before_Upper_Half_Character is set. It -- contains an upper-half character read by Look_Ahead. If Look_Ahead -- reads a character in the range 16#00# to 16#7F#, then it can use -- ungetc to put it back, but ungetc cannot be called more than once, -- so for characters above this range, we don't try to back up the -- file. Instead we save the character in this field and set the flag -- Before_Upper_Half_Character to True to indicate that we are logically -- positioned before this character even though the stream is physically -- positioned after it. end record; function AFCB_Allocate (Control_Block : Text_AFCB) return FCB.AFCB_Ptr; procedure AFCB_Close (File : not null access Text_AFCB); procedure AFCB_Free (File : not null access Text_AFCB); procedure Read (File : in out Text_AFCB; Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset); -- Read operation used when Text_IO file is treated directly as Stream procedure Write (File : in out Text_AFCB; Item : Ada.Streams.Stream_Element_Array); -- Write operation used when Text_IO file is treated directly as Stream ------------------------ -- The Standard Files -- ------------------------ Standard_In_AFCB : aliased Text_AFCB; Standard_Out_AFCB : aliased Text_AFCB; Standard_Err_AFCB : aliased Text_AFCB; Standard_In : aliased File_Type := Standard_In_AFCB'Access with Part_Of => File_System; Standard_Out : aliased File_Type := Standard_Out_AFCB'Access with Part_Of => File_System; Standard_Err : aliased File_Type := Standard_Err_AFCB'Access with Part_Of => File_System; -- Standard files Current_In : aliased File_Type := Standard_In with Part_Of => File_System; Current_Out : aliased File_Type := Standard_Out with Part_Of => File_System; Current_Err : aliased File_Type := Standard_Err with Part_Of => File_System; -- Current files function EOF_Char return Integer; -- Returns the system-specific character indicating the end of a text file. -- This is exported for use by child packages such as Enumeration_Aux to -- eliminate their needing to depend directly on Interfaces.C_Streams, -- which might not be available in certain target environments. procedure Initialize_Standard_Files; -- Initializes the file control blocks for the standard files. Called from -- the elaboration routine for this package, and from Reset_Standard_Files -- in package Ada.Text_IO.Reset_Standard_Files. end Ada.Text_IO;
onox/orka
Ada
3,154
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. package Orka.SIMD.AVX.Doubles.Arithmetic is pragma Pure; function "*" (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_mulpd256"; function "*" (Left, Right : m256d_Array) return m256d_Array with Inline_Always; -- Multiplies the left matrix with the right matrix. Matrix multiplication -- is associative, but not commutative. function "*" (Left : m256d_Array; Right : m256d) return m256d with Inline_Always; -- Multiplies the left matrix with the right vector. Matrix multiplication -- is associative, but not commutative. function "/" (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_divpd256"; function Divide_Or_Zero (Left, Right : m256d) return m256d with Inline_Always; function "+" (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_addpd256"; function "-" (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_subpd256"; function "-" (Elements : m256d) return m256d is ((0.0, 0.0, 0.0, 0.0) - Elements) with Inline; function "abs" (Elements : m256d) return m256d with Inline_Always; function Sum (Elements : m256d) return Float_64 with Inline_Always; function Add_Subtract (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_addsubpd256"; -- Subtract and add 64-bit doubles from Left and Right function Horizontal_Add (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_haddpd256"; -- Compute the sums of adjacent 64-bit doubles in Left and Right. -- The two sums (four elements gives two pairs) of elements -- from Left are stored in the two doubles in the first and third -- position, sums from Right in the second and fourth. function Horizontal_Subtract (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_hsubpd256"; -- Compute the differences of adjacent 64-bit doubles in Left and Right. -- The two differences (four elements gives two pairs) of elements -- from Left are stored in the two doubles in the first and third -- position, differences from Right in the second and fourth. end Orka.SIMD.AVX.Doubles.Arithmetic;
elisbyberi/CertifAda
Ada
13,846
adb
pragma Style_Checks(Off); -- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by John Self of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and this paragraph are -- duplicated in all such forms and that any documentation, -- advertising materials, and other materials related to such -- distribution and use acknowledge that the software was developed -- by the University of California, Irvine. The name of the -- University may not be used to endorse or promote products derived -- from this software without specific prior written permission. -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- TITLE skeleton manager -- AUTHOR: John Self (UCI) -- DESCRIPTION outputs skeleton sections when called by gen. -- NOTES allows use of internal or external skeleton -- $Header: /Users/stt/_parasail/_aflex_ayacc/_adamagic/aflex/RCS/skeleton_manager.adb,v 1.1 2011/03/02 22:14:39 stt Exp stt $ with MISC_DEFS, TEXT_IO, FILE_STRING; package body SKELETON_MANAGER is use FILE_STRING; -- to save having to type FILE_STRING 177 times USE_EXTERNAL_SKELETON : BOOLEAN := FALSE; -- are we using an external skelfile? CURRENT_LINE : INTEGER := 1; type FILE_ARRAY is array(POSITIVE range <>) of FILE_STRING.VSTRING; SKEL_TEMPLATE : constant FILE_ARRAY := ( -- START OF SKELETON -- START OF S1 VSTR("-- A lexical scanner generated by aflex"), VSTR("with text_io; use text_io;"), VSTR("%% user's code up to the double pound goes right here"), -- BEGIN S2 VSTR("function YYLex return Token is"), VSTR("subtype short is integer range -32768..32767;"), VSTR(" yy_act : integer;"), VSTR(" yy_c : short;"), VSTR(""), VSTR("-- returned upon end-of-file"), VSTR("YY_END_TOK : constant integer := 0;"), VSTR("%% tables get generated here."), -- BEGIN S3 VSTR(""), VSTR("-- copy whatever the last rule matched to the standard output"), VSTR(""), VSTR("procedure ECHO is"), VSTR("begin"), VSTR(" if (text_io.is_open(user_output_file)) then"), VSTR(" text_io.put( user_output_file, yytext );"), VSTR(" else"), VSTR(" text_io.put( yytext );"), VSTR(" end if;"), VSTR("end ECHO;"), VSTR(""), VSTR("-- enter a start condition."), VSTR("-- Using procedure requires a () after the ENTER, but makes everything"), VSTR("-- much neater."), VSTR(""), VSTR("procedure ENTER( state : integer ) is"), VSTR("begin"), VSTR(" yy_start := 1 + 2 * state;"), VSTR("end ENTER;"), VSTR(""), VSTR("-- action number for EOF rule of a given start state"), VSTR("function YY_STATE_EOF(state : integer) return integer is"), VSTR("begin"), VSTR(" return YY_END_OF_BUFFER + state + 1;"), VSTR("end YY_STATE_EOF;"), VSTR(""), VSTR("-- return all but the first 'n' matched characters back to the input stream"), VSTR("procedure yyless(n : integer) is"), VSTR("begin"), VSTR(" yy_ch_buf(yy_cp) := yy_hold_char; -- undo effects of setting up yytext"), VSTR(" yy_cp := yy_bp + n;"), VSTR(" yy_c_buf_p := yy_cp;"), VSTR(" YY_DO_BEFORE_ACTION; -- set up yytext again"), VSTR("end yyless;"), VSTR(""), VSTR("-- redefine this if you have something you want each time."), VSTR("procedure YY_USER_ACTION is"), VSTR("begin"), VSTR(" null;"), VSTR("end;"), VSTR(""), VSTR("-- yy_get_previous_state - get the state just before the EOB char was reached"), VSTR(""), VSTR("function yy_get_previous_state return yy_state_type is"), VSTR(" yy_current_state : yy_state_type;"), VSTR(" yy_c : short;"), VSTR("%% a local declaration of yy_bp goes here if bol_needed"), VSTR("begin"), VSTR("%% code to get the start state into yy_current_state goes here"), -- BEGIN S3A VSTR(""), VSTR(" for yy_cp in yytext_ptr..yy_c_buf_p - 1 loop"), VSTR("%% code to find the next state goes here"), -- BEGIN S4 VSTR(" end loop;"), VSTR(""), VSTR(" return yy_current_state;"), VSTR("end yy_get_previous_state;"), VSTR(""), VSTR("procedure yyrestart( input_file : file_type ) is"), VSTR("begin"), VSTR(" open_input(text_io.name(input_file));"), VSTR("end yyrestart;"), VSTR(""), VSTR("begin -- of YYLex"), VSTR("<<new_file>>"), VSTR(" -- this is where we enter upon encountering an end-of-file and"), VSTR(" -- yywrap() indicating that we should continue processing"), VSTR(""), VSTR(" if ( yy_init ) then"), VSTR(" if ( yy_start = 0 ) then"), VSTR(" yy_start := 1; -- first start state"), VSTR(" end if;"), VSTR(""), VSTR(" -- we put in the '\n' and start reading from [1] so that an"), VSTR(" -- initial match-at-newline will be true."), VSTR(""), VSTR(" yy_ch_buf(0) := ASCII.LF;"), VSTR(" yy_n_chars := 1;"), VSTR(""), VSTR(" -- we always need two end-of-buffer characters. The first causes"), VSTR(" -- a transition to the end-of-buffer state. The second causes"), VSTR(" -- a jam in that state."), VSTR(""), VSTR(" yy_ch_buf(yy_n_chars) := YY_END_OF_BUFFER_CHAR;"), VSTR(" yy_ch_buf(yy_n_chars + 1) := YY_END_OF_BUFFER_CHAR;"), VSTR(""), VSTR(" yy_eof_has_been_seen := false;"), VSTR(""), VSTR(" yytext_ptr := 1;"), VSTR(" yy_c_buf_p := yytext_ptr;"), VSTR(" yy_hold_char := yy_ch_buf(yy_c_buf_p);"), VSTR(" yy_init := false;"), VSTR("-- UMASS CODES :"), VSTR("-- Initialization"), VSTR(" tok_begin_line := 1;"), VSTR(" tok_end_line := 1;"), VSTR(" tok_begin_col := 0;"), VSTR(" tok_end_col := 0;"), VSTR(" token_at_end_of_line := false;"), VSTR(" line_number_of_saved_tok_line1 := 0;"), VSTR(" line_number_of_saved_tok_line2 := 0;"), VSTR("-- END OF UMASS CODES."), VSTR(" end if; -- yy_init"), VSTR(""), VSTR(" loop -- loops until end-of-file is reached"), VSTR(""), VSTR("-- UMASS CODES :"), VSTR("-- if last matched token is end_of_line, we must"), VSTR("-- update the token_end_line and reset tok_end_col."), VSTR(" if Token_At_End_Of_Line then"), VSTR(" Tok_End_Line := Tok_End_Line + 1;"), VSTR(" Tok_End_Col := 0;"), VSTR(" Token_At_End_Of_Line := False;"), VSTR(" end if;"), VSTR("-- END OF UMASS CODES."), VSTR(""), VSTR(" yy_cp := yy_c_buf_p;"), VSTR(""), VSTR(" -- support of yytext"), VSTR(" yy_ch_buf(yy_cp) := yy_hold_char;"), VSTR(""), VSTR(" -- yy_bp points to the position in yy_ch_buf of the start of the"), VSTR(" -- current run."), VSTR("%%"), -- BEGIN S5 VSTR(""), VSTR("<<next_action>>"), VSTR("%% call to gen_find_action goes here"), -- BEGIN S6 VSTR(" YY_DO_BEFORE_ACTION;"), VSTR(" YY_USER_ACTION;"), VSTR(""), VSTR(" if aflex_debug then -- output acceptance info. for (-d) debug mode"), VSTR(" text_io.put( Standard_Error, ""--accepting rule #"" );"), VSTR(" text_io.put( Standard_Error, INTEGER'IMAGE(yy_act) );"), VSTR(" text_io.put_line( Standard_Error, ""("""""" & yytext & """""")"");"), VSTR(" end if;"), VSTR(""), VSTR("-- UMASS CODES :"), VSTR("-- Update tok_begin_line, tok_end_line, tok_begin_col and tok_end_col"), VSTR("-- after matching the token."), VSTR(" if yy_act /= YY_END_OF_BUFFER and then yy_act /= 0 then"), VSTR("-- Token are matched only when yy_act is not yy_end_of_buffer or 0."), VSTR(" Tok_Begin_Line := Tok_End_Line;"), VSTR(" Tok_Begin_Col := Tok_End_Col + 1;"), VSTR(" Tok_End_Col := Tok_Begin_Col + yy_cp - yy_bp - 1;"), VSTR(" if yy_ch_buf ( yy_bp ) = ASCII.LF then"), VSTR(" Token_At_End_Of_Line := True;"), VSTR(" end if;"), VSTR(" end if;"), VSTR("-- END OF UMASS CODES."), VSTR(""), VSTR("<<do_action>> -- this label is used only to access EOF actions"), VSTR(" case yy_act is"), VSTR("%% actions go here"), -- BEGIN S7 VSTR(" when YY_END_OF_BUFFER =>"), VSTR(" -- undo the effects of YY_DO_BEFORE_ACTION"), VSTR(" yy_ch_buf(yy_cp) := yy_hold_char;"), VSTR(""), VSTR(" yytext_ptr := yy_bp;"), VSTR(""), VSTR(" case yy_get_next_buffer is"), VSTR(" when EOB_ACT_END_OF_FILE =>"), VSTR(" begin"), VSTR(" if ( yywrap ) then"), VSTR(" -- note: because we've taken care in"), VSTR(" -- yy_get_next_buffer() to have set up yytext,"), VSTR(" -- we can now set up yy_c_buf_p so that if some"), VSTR(" -- total hoser (like aflex itself) wants"), VSTR(" -- to call the scanner after we return the"), VSTR(" -- End_Of_Input, it'll still work - another"), VSTR(" -- End_Of_Input will get returned."), VSTR(""), VSTR(" yy_c_buf_p := yytext_ptr;"), VSTR(""), VSTR(" yy_act := YY_STATE_EOF((yy_start - 1) / 2);"), VSTR(""), VSTR(" goto do_action;"), VSTR(" else"), VSTR(" -- start processing a new file"), VSTR(" yy_init := true;"), VSTR(" goto new_file;"), VSTR(" end if;"), VSTR(" end;"), VSTR(" when EOB_ACT_RESTART_SCAN =>"), VSTR(" yy_c_buf_p := yytext_ptr;"), VSTR(" yy_hold_char := yy_ch_buf(yy_c_buf_p);"), VSTR(" when EOB_ACT_LAST_MATCH =>"), VSTR(" yy_c_buf_p := yy_n_chars;"), VSTR(" yy_current_state := yy_get_previous_state;"), VSTR(""), VSTR(" yy_cp := yy_c_buf_p;"), VSTR(" yy_bp := yytext_ptr;"), VSTR(" goto next_action;"), VSTR(" when others => null;"), VSTR(" end case; -- case yy_get_next_buffer()"), VSTR(" when others =>"), VSTR(" text_io.put( ""action # "" );"), VSTR(" text_io.put( INTEGER'IMAGE(yy_act) );"), VSTR(" text_io.new_line;"), VSTR(" raise AFLEX_INTERNAL_ERROR;"), VSTR(" end case; -- case (yy_act)"), VSTR(" end loop; -- end of loop waiting for end of file"), VSTR("end YYLex;"), VSTR("%%"), VSTR("ERROR tried to output beyond end of skeleton file") -- END OF SKELETON ); -- set_external_skeleton -- -- DESCRIPTION -- sets flag so we know to use an external skelfile procedure SET_EXTERNAL_SKELETON is begin USE_EXTERNAL_SKELETON := TRUE; end SET_EXTERNAL_SKELETON; procedure GET_INTERNAL(BUFFER : in out FILE_STRING.VSTRING) is begin BUFFER := SKEL_TEMPLATE(CURRENT_LINE); CURRENT_LINE := CURRENT_LINE + 1; end GET_INTERNAL; procedure GET_EXTERNAL(BUFFER : in out FILE_STRING.VSTRING) is begin FILE_STRING.GET_LINE(MISC_DEFS.SKELFILE, BUFFER); end GET_EXTERNAL; -- end_of_skeleton -- -- DESCRIPTION -- returns true if there are no more lines left to output in the skeleton function END_OF_SKELETON return BOOLEAN is begin if (USE_EXTERNAL_SKELETON) then -- we're using an external skelfile return TEXT_IO.END_OF_FILE(MISC_DEFS.SKELFILE); else -- internal skeleton return CURRENT_LINE > SKEL_TEMPLATE'LAST; end if; end END_OF_SKELETON; procedure GET_FILE_LINE(BUFFER : in out FILE_STRING.VSTRING) is begin if (USE_EXTERNAL_SKELETON) then GET_EXTERNAL(BUFFER); else GET_INTERNAL(BUFFER); end if; end GET_FILE_LINE; -- skelout - write out one section of the skeleton file -- -- DESCRIPTION -- Either outputs internal skeleton, or from a file with "%%" dividers -- if a skeleton file is specified by the user. -- Copies from skelfile to stdout until a line beginning with "%%" or -- EOF is found. procedure SKELOUT is BUF : FILE_STRING.VSTRING; LINE_LEN : INTEGER; -- UMASS CODES : Umass_Codes : Boolean := False; -- Indicates whether or not current line of the template -- is the Umass codes. -- END OF UMASS CODES. begin while (not END_OF_SKELETON) loop GET_FILE_LINE(BUF); if ((FILE_STRING.LEN(BUF) >= 2) and then ((FILE_STRING.CHAR(BUF, 1) = '%') and (FILE_STRING.CHAR(BUF, 2) = '%'))) then exit; else -- UMASS CODES : -- In the template, the codes between "-- UMASS CODES : " and -- "-- END OF UMASS CODES." are specific to be used by Ayacc -- extension. Ayacc extension has more power in error recovery. -- So we generate those codes only when Ayacc_Extension_Flag is True. if FILE_STRING.STR(BUF) = "-- UMASS CODES :" then Umass_Codes := True; end if; if not Umass_Codes or else MISC_DEFS.Ayacc_Extension_Flag then FILE_STRING.PUT_LINE(BUF); end if; if FILE_STRING.STR(BUF) = "-- END OF UMASS CODES." then Umass_Codes := False; end if; -- END OF UMASS CODES. -- UCI CODES commented out : -- The following line is commented out because it is done in Umass codes. -- FILE_STRING.PUT_LINE(BUF); end if; end loop; end SKELOUT; end SKELETON_MANAGER;
sailfishos-mirror/pygments
Ada
1,307
ads
with System; with Interfaces.C; package Test_Ada_Aspects is type R is record V : Integer range 0 .. 255; B1 : Boolean; B2 : Boolean; end record with Pack; type Float_Int_Union (Use_Float : Boolean) is record case Use_Float is when True => F : Float; when False => I : Integer; end case; end record with Unchecked_Union; type my_struct is record A : Interfaces.C.int; B : Interfaces.C.int; end record with Convention => C_Pass_By_Copy; procedure Initialize (Size : Integer) with Import => True, Convention => C, External_Name => "registerInterface_Initialize"; type Percentage is range 0 .. 100 with Default_Value => 10; type State is (Off, State_1, State_2) with Size => Integer'Size; for State use (Off => 0, State_1 => 32, State_2 => 64); type Registers is record Reserved_0 : Integer; Reserved_1 : Integer; end record with Volatile, Size => 128; private Arr_1 : array (1 .. 2) of Long_Float with Volatile; Arr_2 : array (1 .. 2) of Integer with Atomic_Components; V : Integer with Atomic, Address => System'To_Address (16#FFFF00A0#); end Test_Ada_Aspects;
AdaCore/gpr
Ada
6,158
adb
-- -- Copyright (C) 2014-2022, AdaCore -- SPDX-License-Identifier: Apache-2.0 -- with Ada.Unchecked_Conversion; with System; package body Gpr_Parser_Support.Bump_Ptr_Vectors is function Alloc_Chunk (P : Bump_Ptr_Pool; S : Natural) return Chunk_Access; ----------------- -- Alloc_Chunk -- ----------------- function Alloc_Chunk (P : Bump_Ptr_Pool; S : Natural) return Chunk_Access is subtype C is Chunk (S); function To_Pointer is new Ada.Unchecked_Conversion (System.Address, Chunk_Access); Ret_Memory : constant System.Address := Allocate (P, C'Max_Size_In_Storage_Elements); -- Allocate a chunk of memory for the result -- discriminated record... Ret_Disc : Natural; for Ret_Disc'Address use Ret_Memory; -- And initialize its discriminant properly as the -- runtime would do with regular allocation. begin Ret_Disc := S; return To_Pointer (Ret_Memory); end Alloc_Chunk; function Create (P : Bump_Ptr_Pool) return Vector is (Vector'(Pool => P, others => <>)); ------------ -- Append -- ------------ procedure Append (Self : in out Vector; Element : Element_Type) is procedure Init_Chunk (C : in out Chunk) with Inline; ---------------- -- Init_Chunk -- ---------------- procedure Init_Chunk (C : in out Chunk) is begin C.Next_Chunk := null; C.Length := 0; end Init_Chunk; Old_Chunk : Chunk_Access; begin -- First append, create a chunk and initialize it if Self.Length = 0 then Self.First_Chunk := Alloc_Chunk (Self.Pool, 2); Init_Chunk (Self.First_Chunk.all); Self.Current_Chunk := Self.First_Chunk; end if; -- We filled the current chunk completely, create a new chunk and -- initialize it, chain it with the previous chunk. if Self.Current_Chunk.Length = Self.Current_Chunk.Capacity then Old_Chunk := Self.Current_Chunk; Self.Current_Chunk := Alloc_Chunk (Self.Pool, Old_Chunk.Capacity * 2); Init_Chunk (Self.Current_Chunk.all); Old_Chunk.Next_Chunk := Self.Current_Chunk; end if; -- At this stage we know the current chunk can contain element, insert -- it. Self.Current_Chunk.Length := Self.Current_Chunk.Length + 1; Self.Length := Self.Length + 1; Self.Current_Chunk.Elements (Self.Current_Chunk.Length) := Element; end Append; --------- -- Get -- --------- function Get (Self : Vector; C : Cursor) return Element_Type is pragma Unreferenced (Self); begin return C.Chunk.Elements (C.Index_In_Chunk); end Get; ------------------ -- Get_At_Index -- ------------------ function Get_At_Index (Self : Vector; I : Index_Type) return Element_Type is function Get_In_Chunk (Chunk : Chunk_Access; Chunk_Start_Index : Index_Type) return Element_Type is (Chunk.Elements (I - Chunk_Start_Index + 1)); -- Assuming that 1) Chunk's first element has index Chunk_Start_Index -- and that 2) the I index is inside this chunk, return the element -- corresponding to I. begin -- As the size of chunks double for each appended chunk, the element we -- are looking for should be in the current chunk more than half of the -- times (assuming equiprobable accesses). So let's just check if it's -- the case. declare Current_Chunk_Start_Index : constant Index_Type := Index_Type'First + Self.Length - Self.Current_Chunk.Length; begin if I >= Current_Chunk_Start_Index then return Get_In_Chunk (Self.Current_Chunk, Current_Chunk_Start_Index); end if; end; -- We had no luck: go through all chunks to find the one that contains -- the element at index I. declare Chunk_Start_Index : Index_Type := Index_Type'First; Current_Chunk : Chunk_Access := Self.First_Chunk; begin while Current_Chunk /= null and then I >= Chunk_Start_Index + Current_Chunk.Capacity loop Chunk_Start_Index := Chunk_Start_Index + Current_Chunk.Capacity; Current_Chunk := Current_Chunk.Next_Chunk; end loop; return Get_In_Chunk (Current_Chunk, Chunk_Start_Index); end; end Get_At_Index; ---------------- -- Get_Access -- ---------------- function Get_Access (Self : Vector; C : Cursor) return Element_Access is pragma Unreferenced (Self); begin return C.Chunk.Elements (C.Index_In_Chunk)'Unrestricted_Access; end Get_Access; ------------ -- Length -- ------------ function Length (Self : Vector) return Natural is begin return Self.Length; end Length; ----------- -- First -- ----------- function First (Self : Vector) return Cursor is begin return Cursor'(Chunk => Self.First_Chunk, Index_In_Chunk => 1); end First; ---------- -- Next -- ---------- function Next (Self : Vector; C : Cursor) return Cursor is pragma Unreferenced (Self); begin if C.Index_In_Chunk = C.Chunk.Capacity then return Cursor'(C.Chunk.Next_Chunk, 1); else return Cursor'(C.Chunk, C.Index_In_Chunk + 1); end if; end Next; ----------------- -- Has_Element -- ----------------- function Has_Element (Self : Vector; C : Cursor) return Boolean is pragma Unreferenced (Self); begin return C.Chunk /= null and then C.Index_In_Chunk <= C.Chunk.Length; end Has_Element; ----------------- -- First_Index -- ----------------- function First_Index (Self : Vector) return Index_Type is pragma Unreferenced (Self); begin return Index_Type'First; end First_Index; ---------------- -- Last_Index -- ---------------- function Last_Index (Self : Vector) return Integer is begin return Index_Type'First + Length (Self) - 1; end Last_Index; end Gpr_Parser_Support.Bump_Ptr_Vectors;
stcarrez/ada-util
Ada
4,884
ads
----------------------------------------------------------------------- -- util-processes-os -- Windows specific and low level operations -- Copyright (C) 2011, 2012, 2016, 2018, 2019, 2021, 2023 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Streams.Raw; with Util.Systems.Os; with Util.Strings.Vectors; with Interfaces.C; private package Util.Processes.Os is use Util.Systems.Os; SHELL : constant String := ""; subtype Wchar_Ptr is Util.Systems.Os.Wchar_Ptr; type System_Process is new Util.Processes.System_Process with record Process_Info : aliased Util.Systems.Os.PROCESS_INFORMATION; Command : Wchar_Ptr := null; Pos : Interfaces.C.size_t := 0; In_File : Wchar_Ptr := null; Out_File : Wchar_Ptr := null; Err_File : Wchar_Ptr := null; Dir : Wchar_Ptr := null; Env : Wchar_Ptr := null; To_Close : File_Type_Array_Access; Out_Append : Boolean := False; Err_Append : Boolean := False; Environment : Util.Strings.Vectors.Vector; end record; -- Wait for the process to exit. overriding procedure Wait (Sys : in out System_Process; Proc : in out Process'Class; Timeout : in Duration); -- Spawn a new process. overriding procedure Spawn (Sys : in out System_Process; Proc : in out Process'Class; Mode : in Pipe_Mode := NONE); -- Terminate the process by sending a signal on Unix and exiting the process on Windows. -- This operation is not portable and has a different behavior between Unix and Windows. -- Its intent is to stop the process. overriding procedure Stop (Sys : in out System_Process; Proc : in out Process'Class; Signal : in Positive := 15); -- Append the argument to the process argument list. overriding procedure Append_Argument (Sys : in out System_Process; Arg : in String); -- Clear the program arguments. overriding procedure Clear_Arguments (Sys : in out System_Process); -- Set the environment variable to be used by the process before its creation. overriding procedure Set_Environment (Sys : in out System_Process; Name : in String; Value : in String); -- Set the process input, output and error streams to redirect and use specified files. overriding procedure Set_Streams (Sys : in out System_Process; Input : in String; Output : in String; Error : in String; Append_Output : in Boolean; Append_Error : in Boolean; To_Close : in File_Type_Array_Access); -- Deletes the storage held by the system process. overriding procedure Finalize (Sys : in out System_Process); -- Build the output pipe redirection to read the process output. procedure Build_Output_Pipe (Sys : in out System_Process; Proc : in out Process'Class; Into : in out Startup_Info; Mode : in Pipe_Mode); -- Build the error pipe redirection to read the process error. procedure Build_Error_Pipe (Sys : in out System_Process; Proc : in out Process'Class; Into : in out Startup_Info; Mode : in Pipe_Mode); -- Build the input pipe redirection to write the process standard input. procedure Build_Input_Pipe (Sys : in out System_Process; Proc : in out Process'Class; Into : in out Startup_Info); private -- Create the output stream to read/write on the process input/output. -- Setup the file to be closed on exec. function Create_Stream (File : in Util.Streams.Raw.File_Type) return Util.Streams.Raw.Raw_Stream_Access; end Util.Processes.Os;
greifentor/archimedes-legacy
Ada
59,267
ads
<Diagramm> <AdditionalSQLCode> <SQLCode> <AdditionalSQLCodePostChanging></AdditionalSQLCodePostChanging> <AdditionalSQLCodePostReducing></AdditionalSQLCodePostReducing> <AdditionalSQLCodePreChanging></AdditionalSQLCodePreChanging> <AdditionalSQLCodePreExtending></AdditionalSQLCodePreExtending> </SQLCode> </AdditionalSQLCode> <Colors> <Anzahl>23</Anzahl> <Color0> <B>255</B> <G>0</G> <Name>blau</Name> <R>0</R> </Color0> <Color1> <B>221</B> <G>212</G> <Name>blaugrau</Name> <R>175</R> </Color1> <Color10> <B>192</B> <G>192</G> <Name>hellgrau</Name> <R>192</R> </Color10> <Color11> <B>255</B> <G>0</G> <Name>kamesinrot</Name> <R>255</R> </Color11> <Color12> <B>0</B> <G>200</G> <Name>orange</Name> <R>255</R> </Color12> <Color13> <B>255</B> <G>247</G> <Name>pastell-blau</Name> <R>211</R> </Color13> <Color14> <B>186</B> <G>245</G> <Name>pastell-gelb</Name> <R>255</R> </Color14> <Color15> <B>234</B> <G>255</G> <Name>pastell-gr&amp;uuml;n</Name> <R>211</R> </Color15> <Color16> <B>255</B> <G>211</G> <Name>pastell-lila</Name> <R>244</R> </Color16> <Color17> <B>191</B> <G>165</G> <Name>pastell-rot</Name> <R>244</R> </Color17> <Color18> <B>175</B> <G>175</G> <Name>pink</Name> <R>255</R> </Color18> <Color19> <B>0</B> <G>0</G> <Name>rot</Name> <R>255</R> </Color19> <Color2> <B>61</B> <G>125</G> <Name>braun</Name> <R>170</R> </Color2> <Color20> <B>0</B> <G>0</G> <Name>schwarz</Name> <R>0</R> </Color20> <Color21> <B>255</B> <G>255</G> <Name>t&amp;uuml;rkis</Name> <R>0</R> </Color21> <Color22> <B>255</B> <G>255</G> <Name>wei&amp;szlig;</Name> <R>255</R> </Color22> <Color3> <B>64</B> <G>64</G> <Name>dunkelgrau</Name> <R>64</R> </Color3> <Color4> <B>84</B> <G>132</G> <Name>dunkelgr&amp;uuml;n</Name> <R>94</R> </Color4> <Color5> <B>0</B> <G>255</G> <Name>gelb</Name> <R>255</R> </Color5> <Color6> <B>0</B> <G>225</G> <Name>goldgelb</Name> <R>255</R> </Color6> <Color7> <B>128</B> <G>128</G> <Name>grau</Name> <R>128</R> </Color7> <Color8> <B>0</B> <G>255</G> <Name>gr&amp;uuml;n</Name> <R>0</R> </Color8> <Color9> <B>255</B> <G>212</G> <Name>hellblau</Name> <R>191</R> </Color9> </Colors> <ComplexIndices> <IndexCount>0</IndexCount> </ComplexIndices> <DataSource> <Import> <DBName></DBName> <Description></Description> <Domains>false</Domains> <Driver></Driver> <Name></Name> <Referenzen>false</Referenzen> <User></User> </Import> </DataSource> <DatabaseConnections> <Count>1</Count> <DatabaseConnection0> <DBExecMode>HSQL</DBExecMode> <Driver>org.hsqldb.jdbcDriver</Driver> <Name>Productive database</Name> <Quote></Quote> <SetDomains>false</SetDomains> <SetNotNull>false</SetNotNull> <SetReferences>false</SetReferences> <URL>jdbc:hsqldb:file:./db/Test</URL> <UserName>sa</UserName> </DatabaseConnection0> </DatabaseConnections> <DefaultComment> <Anzahl>0</Anzahl> </DefaultComment> <Domains> <Anzahl>5</Anzahl> <Domain0> <Datatype>4</Datatype> <History></History> <Initialwert>0</Initialwert> <Kommentar></Kommentar> <Length>0</Length> <NKS>0</NKS> <Name>Boolean</Name> <Parameters></Parameters> </Domain0> <Domain1> <Datatype>-5</Datatype> <History></History> <Initialwert>0</Initialwert> <Kommentar></Kommentar> <Length>0</Length> <NKS>0</NKS> <Name>Ident</Name> <Parameters></Parameters> </Domain1> <Domain2> <Datatype>4</Datatype> <History></History> <Initialwert>42</Initialwert> <Kommentar></Kommentar> <Length>0</Length> <NKS>0</NKS> <Name>Integer</Name> <Parameters></Parameters> </Domain2> <Domain3> <Datatype>-5</Datatype> <History></History> <Initialwert>NULL</Initialwert> <Kommentar></Kommentar> <Length>0</Length> <NKS>0</NKS> <Name>PTimestamp</Name> <Parameters></Parameters> </Domain3> <Domain4> <Datatype>12</Datatype> <History></History> <Initialwert>NULL</Initialwert> <Kommentar></Kommentar> <Length>20</Length> <NKS>0</NKS> <Name>Token</Name> <Parameters></Parameters> </Domain4> </Domains> <Factories> <Object>archimedes.legacy.scheme.DefaultObjectFactory</Object> </Factories> <Pages> <PerColumn>5</PerColumn> <PerRow>10</PerRow> </Pages> <Parameter> <AdditionalSQLScriptListener></AdditionalSQLScriptListener> <Applicationname></Applicationname> <AufgehobeneAusblenden>false</AufgehobeneAusblenden> <Autor>E.Presley</Autor> <Basepackagename>com.moppelsoft.project</Basepackagename> <CodeFactoryClassName></CodeFactoryClassName> <Codebasispfad>.\</Codebasispfad> <DBVersionDBVersionColumn></DBVersionDBVersionColumn> <DBVersionDescriptionColumn></DBVersionDescriptionColumn> <DBVersionTablename></DBVersionTablename> <History></History> <Kommentar>&amp;lt;null&amp;gt;</Kommentar> <Name>TestDiagram (FUER DIE GENERATOR-PLUGINS)</Name> <Optionen> <Anzahl>0</Anzahl> </Optionen> <Owner>&amp;lt;null&amp;gt;</Owner> <PflichtfelderMarkieren>false</PflichtfelderMarkieren> <ReferenzierteSpaltenAnzeigen>true</ReferenzierteSpaltenAnzeigen> <RelationColorExternalTables>java.awt.Color[r=192,g=192,b=192]</RelationColorExternalTables> <RelationColorRegular>java.awt.Color[r=0,g=0,b=0]</RelationColorRegular> <SchemaName></SchemaName> <Schriftgroessen> <Tabelleninhalte>12</Tabelleninhalte> <Ueberschriften>24</Ueberschriften> <Untertitel>12</Untertitel> </Schriftgroessen> <Scripte> <AfterWrite>&amp;lt;null&amp;gt;</AfterWrite> </Scripte> <TechnischeFelderAusgrauen>true</TechnischeFelderAusgrauen> <TransienteFelderAusgrauen>false</TransienteFelderAusgrauen> <UdschebtiBaseClassName></UdschebtiBaseClassName> <Version>1</Version> <Versionsdatum>07.01.2011</Versionsdatum> <Versionskommentar>&amp;lt;null&amp;gt;</Versionskommentar> </Parameter> <Sequences> <Count>0</Count> </Sequences> <Stereotype> <Anzahl>4</Anzahl> <Stereotype0> <DoNotPrint>false</DoNotPrint> <HideTable>false</HideTable> <History></History> <Kommentar>-/-</Kommentar> <Name>A</Name> </Stereotype0> <Stereotype1> <DoNotPrint>false</DoNotPrint> <HideTable>false</HideTable> <History></History> <Kommentar>-/-</Kommentar> <Name>B</Name> </Stereotype1> <Stereotype2> <DoNotPrint>false</DoNotPrint> <HideTable>false</HideTable> <History></History> <Kommentar>-/-</Kommentar> <Name>C</Name> </Stereotype2> <Stereotype3> <DoNotPrint>false</DoNotPrint> <HideTable>false</HideTable> <History></History> <Kommentar>-/-</Kommentar> <Name>D</Name> </Stereotype3> </Stereotype> <Tabellen> <Anzahl>4</Anzahl> <Tabelle0> <Aufgehoben>false</Aufgehoben> <Codegenerator> <AuswahlMembers> <Anzahl>0</Anzahl> </AuswahlMembers> <CompareMembers> <Anzahl>0</Anzahl> </CompareMembers> <Equalsmembers> <Anzahl>0</Anzahl> </Equalsmembers> <HashCodeMembers> <Anzahl>0</Anzahl> </HashCodeMembers> <NReferenzen> <Anzahl>0</Anzahl> </NReferenzen> <OrderMembers> <Anzahl>0</Anzahl> </OrderMembers> <ToComboStringMembers> <Anzahl>0</Anzahl> </ToComboStringMembers> <ToStringMembers> <Anzahl>0</Anzahl> </ToStringMembers> </Codegenerator> <ExternalTable>false</ExternalTable> <Farben> <Hintergrund>wei&amp;szlig;</Hintergrund> <Schrift>schwarz</Schrift> </Farben> <FirstGenerationDone>false</FirstGenerationDone> <History></History> <InDevelopment>false</InDevelopment> <Kommentar></Kommentar> <NMRelation>false</NMRelation> <Name>TableClass</Name> <Options> <Count>0</Count> </Options> <Panels> <Anzahl>1</Anzahl> <Panel0> <PanelClass></PanelClass> <PanelNumber>0</PanelNumber> <TabMnemonic>1</TabMnemonic> <TabTitle>1.Daten</TabTitle> <TabToolTipText>Hier k&ouml;nnen Sie die Daten des Objekt warten</TabToolTipText> </Panel0> </Panels> <Spalten> <Anzahl>3</Anzahl> <Codegenerator> <ActiveInApplication>false</ActiveInApplication> <AdditionalCreateConstraints></AdditionalCreateConstraints> <Codegeneratoroptionen></Codegeneratoroptionen> <Codeverzeichnis>com.moppelsoft.project</Codeverzeichnis> <Codieren>true</Codieren> <DynamicCode>true</DynamicCode> <Inherited>false</Inherited> <Kontextname></Kontextname> <UniqueFormula></UniqueFormula> </Codegenerator> <Spalte0> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Ident</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>true</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Reference</Name> <NotNull>true</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <Referenz> <Direction0>RIGHT</Direction0> <Direction1>LEFT</Direction1> <Offset0>25</Offset0> <Offset1>25</Offset1> <Spalte>Id</Spalte> <Tabelle>AnotherTableClass</Tabelle> <Views> <Anzahl>1</Anzahl> <View0> <Direction0>RIGHT</Direction0> <Direction1>LEFT</Direction1> <Name>Main</Name> <Offset0>25</Offset0> <Offset1>25</Offset1> <Points> <Anzahl>0</Anzahl> </Points> </View0> </Views> </Referenz> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte0> <Spalte1> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Boolean</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Active</Name> <NotNull>true</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte1> <Spalte2> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Integer</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Counter</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte2> </Spalten> <Stereotype> <Anzahl>2</Anzahl> </Stereotype> <Stereotype0>A</Stereotype0> <Stereotype1>B</Stereotype1> <Views> <Anzahl>1</Anzahl> <View0> <Name>Main</Name> <X>125</X> <Y>125</Y> </View0> </Views> </Tabelle0> <Tabelle1> <Aufgehoben>false</Aufgehoben> <Codegenerator> <AuswahlMembers> <Anzahl>0</Anzahl> </AuswahlMembers> <CompareMembers> <Anzahl>0</Anzahl> </CompareMembers> <Equalsmembers> <Anzahl>0</Anzahl> </Equalsmembers> <HashCodeMembers> <Anzahl>0</Anzahl> </HashCodeMembers> <NReferenzen> <Anzahl>0</Anzahl> </NReferenzen> <OrderMembers> <Anzahl>0</Anzahl> </OrderMembers> <ToComboStringMembers> <Anzahl>0</Anzahl> </ToComboStringMembers> <ToStringMembers> <Anzahl>0</Anzahl> </ToStringMembers> </Codegenerator> <ExternalTable>false</ExternalTable> <Farben> <Hintergrund>wei&amp;szlig;</Hintergrund> <Schrift>schwarz</Schrift> </Farben> <FirstGenerationDone>false</FirstGenerationDone> <History></History> <InDevelopment>false</InDevelopment> <Kommentar></Kommentar> <NMRelation>false</NMRelation> <Name>AnotherTableClass</Name> <Options> <Count>0</Count> </Options> <Panels> <Anzahl>1</Anzahl> <Panel0> <PanelClass></PanelClass> <PanelNumber>0</PanelNumber> <TabMnemonic>1</TabMnemonic> <TabTitle>1.Daten</TabTitle> <TabToolTipText>Hier k&ouml;nnen Sie die Daten des Objekt warten</TabToolTipText> </Panel0> </Panels> <Spalten> <Anzahl>4</Anzahl> <Codegenerator> <ActiveInApplication>false</ActiveInApplication> <AdditionalCreateConstraints></AdditionalCreateConstraints> <Codegeneratoroptionen></Codegeneratoroptionen> <Codeverzeichnis>.</Codeverzeichnis> <Codieren>true</Codieren> <DynamicCode>true</DynamicCode> <Inherited>false</Inherited> <Kontextname></Kontextname> <UniqueFormula></UniqueFormula> </Codegenerator> <Spalte0> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>true</CanBeReferenced> <Disabled>false</Disabled> <Domain>Ident</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Id</Name> <NotNull>true</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>true</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte0> <Spalte1> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Ident</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>true</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Reference</Name> <NotNull>true</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <Referenz> <Direction0>RIGHT</Direction0> <Direction1>LEFT</Direction1> <Offset0>25</Offset0> <Offset1>25</Offset1> <Spalte>Id</Spalte> <Tabelle>ReferencedTableClass</Tabelle> <Views> <Anzahl>1</Anzahl> <View0> <Direction0>RIGHT</Direction0> <Direction1>LEFT</Direction1> <Name>Main</Name> <Offset0>25</Offset0> <Offset1>25</Offset1> <Points> <Anzahl>0</Anzahl> </Points> </View0> </Views> </Referenz> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte1> <Spalte2> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Token</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue>""</IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>NameToken</Name> <NotNull>true</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte2> <Spalte3> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>PTimestamp</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Timestamp</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte3> </Spalten> <Stereotype> <Anzahl>1</Anzahl> </Stereotype> <Stereotype0>A</Stereotype0> <Views> <Anzahl>1</Anzahl> <View0> <Name>Main</Name> <X>400</X> <Y>125</Y> </View0> </Views> </Tabelle1> <Tabelle2> <Aufgehoben>false</Aufgehoben> <Codegenerator> <AuswahlMembers> <Anzahl>0</Anzahl> </AuswahlMembers> <CompareMembers> <Anzahl>0</Anzahl> </CompareMembers> <Equalsmembers> <Anzahl>0</Anzahl> </Equalsmembers> <HashCodeMembers> <Anzahl>0</Anzahl> </HashCodeMembers> <NReferenzen> <Anzahl>0</Anzahl> </NReferenzen> <OrderMembers> <Anzahl>0</Anzahl> </OrderMembers> <ToComboStringMembers> <Anzahl>0</Anzahl> </ToComboStringMembers> <ToStringMembers> <Anzahl>0</Anzahl> </ToStringMembers> </Codegenerator> <ExternalTable>false</ExternalTable> <Farben> <Hintergrund>wei&amp;szlig;</Hintergrund> <Schrift>schwarz</Schrift> </Farben> <FirstGenerationDone>false</FirstGenerationDone> <History></History> <InDevelopment>false</InDevelopment> <Kommentar></Kommentar> <NMRelation>false</NMRelation> <Name>UpdateMethodTableClass</Name> <Options> <Count>0</Count> </Options> <Panels> <Anzahl>1</Anzahl> <Panel0> <PanelClass></PanelClass> <PanelNumber>0</PanelNumber> <TabMnemonic>1</TabMnemonic> <TabTitle>1.Daten</TabTitle> <TabToolTipText>Hier k&ouml;nnen Sie die Daten des Objekt warten</TabToolTipText> </Panel0> </Panels> <Spalten> <Anzahl>6</Anzahl> <Codegenerator> <ActiveInApplication>false</ActiveInApplication> <AdditionalCreateConstraints></AdditionalCreateConstraints> <Codegeneratoroptionen></Codegeneratoroptionen> <Codeverzeichnis>.</Codeverzeichnis> <Codieren>true</Codieren> <DynamicCode>true</DynamicCode> <Inherited>false</Inherited> <Kontextname></Kontextname> <UniqueFormula></UniqueFormula> </Codegenerator> <Spalte0> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Ident</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>true</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Reference</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <Referenz> <Direction0>RIGHT</Direction0> <Direction1>DOWN</Direction1> <Offset0>25</Offset0> <Offset1>25</Offset1> <Spalte>Id</Spalte> <Tabelle>AnotherTableClass</Tabelle> <Views> <Anzahl>1</Anzahl> <View0> <Direction0>RIGHT</Direction0> <Direction1>DOWN</Direction1> <Name>Main</Name> <Offset0>25</Offset0> <Offset1>25</Offset1> <Points> <Anzahl>0</Anzahl> </Points> </View0> </Views> </Referenz> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte0> <Spalte1> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Boolean</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Active</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte1> <Spalte2> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Integer</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Counter</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte2> <Spalte3> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Boolean</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Deleted</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>true</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte3> <Spalte4> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>PTimestamp</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Timestamp</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte4> <Spalte5> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Token</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Token</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte5> </Spalten> <Stereotype> <Anzahl>1</Anzahl> </Stereotype> <Stereotype0>C</Stereotype0> <Views> <Anzahl>1</Anzahl> <View0> <Name>Main</Name> <X>125</X> <Y>350</Y> </View0> </Views> </Tabelle2> <Tabelle3> <Aufgehoben>false</Aufgehoben> <Codegenerator> <AuswahlMembers> <Anzahl>0</Anzahl> </AuswahlMembers> <CompareMembers> <Anzahl>0</Anzahl> </CompareMembers> <Equalsmembers> <Anzahl>0</Anzahl> </Equalsmembers> <HashCodeMembers> <Anzahl>0</Anzahl> </HashCodeMembers> <NReferenzen> <Anzahl>0</Anzahl> </NReferenzen> <OrderMembers> <Anzahl>0</Anzahl> </OrderMembers> <ToComboStringMembers> <Anzahl>0</Anzahl> </ToComboStringMembers> <ToStringMembers> <Anzahl>0</Anzahl> </ToStringMembers> </Codegenerator> <ExternalTable>false</ExternalTable> <Farben> <Hintergrund>wei&amp;szlig;</Hintergrund> <Schrift>schwarz</Schrift> </Farben> <FirstGenerationDone>false</FirstGenerationDone> <History></History> <InDevelopment>false</InDevelopment> <Kommentar></Kommentar> <NMRelation>false</NMRelation> <Name>ReferencedTableClass</Name> <Options> <Count>0</Count> </Options> <Panels> <Anzahl>1</Anzahl> <Panel0> <PanelClass></PanelClass> <PanelNumber>0</PanelNumber> <TabMnemonic>1</TabMnemonic> <TabTitle>1.Daten</TabTitle> <TabToolTipText>Hier k&ouml;nnen Sie die Daten des Objekt warten</TabToolTipText> </Panel0> </Panels> <Spalten> <Anzahl>2</Anzahl> <Codegenerator> <ActiveInApplication>false</ActiveInApplication> <AdditionalCreateConstraints></AdditionalCreateConstraints> <Codegeneratoroptionen></Codegeneratoroptionen> <Codeverzeichnis>.</Codeverzeichnis> <Codieren>true</Codieren> <DynamicCode>true</DynamicCode> <Inherited>false</Inherited> <Kontextname></Kontextname> <UniqueFormula></UniqueFormula> </Codegenerator> <Spalte0> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>true</CanBeReferenced> <Disabled>false</Disabled> <Domain>Ident</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Id</Name> <NotNull>true</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>true</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>false</Unique> </Spalte0> <Spalte1> <AlterInBatch>false</AlterInBatch> <Aufgehoben>false</Aufgehoben> <CanBeReferenced>false</CanBeReferenced> <Disabled>false</Disabled> <Domain>Token</Domain> <Editordescriptor> <Editormember>false</Editormember> <LabelText></LabelText> <MaxCharacters>0</MaxCharacters> <Mnemonic></Mnemonic> <Position>0</Position> <ReferenceWeight>keine</ReferenceWeight> <RessourceIdentifier></RessourceIdentifier> <ToolTipText></ToolTipText> </Editordescriptor> <ForeignKey>false</ForeignKey> <Global>false</Global> <GlobalId>false</GlobalId> <HideReference>false</HideReference> <History></History> <IndexSearchMember>false</IndexSearchMember> <Indexed>false</Indexed> <IndividualDefaultValue></IndividualDefaultValue> <Kodiert>false</Kodiert> <Kommentar></Kommentar> <Konsistenz> <Writeablemember>false</Writeablemember> </Konsistenz> <LastModificationField>false</LastModificationField> <ListItemField>false</ListItemField> <Name>Token</Name> <NotNull>false</NotNull> <PanelNumber>0</PanelNumber> <Parameter></Parameter> <PrimaryKey>false</PrimaryKey> <RemovedStateField>false</RemovedStateField> <SequenceForKeyGeneration></SequenceForKeyGeneration> <SuppressForeignKeyConstraints>false</SuppressForeignKeyConstraints> <TechnicalField>false</TechnicalField> <Transient>false</Transient> <Unique>true</Unique> </Spalte1> </Spalten> <Stereotype> <Anzahl>0</Anzahl> </Stereotype> <Views> <Anzahl>1</Anzahl> <View0> <Name>Main</Name> <X>725</X> <Y>125</Y> </View0> </Views> </Tabelle3> </Tabellen> <Views> <Anzahl>1</Anzahl> <View0> <Beschreibung>Diese Sicht beinhaltet alle Tabellen des Schemas</Beschreibung> <Name>Main</Name> <ReferenzierteSpaltenAnzeigen>true</ReferenzierteSpaltenAnzeigen> <Tabelle0>TableClass</Tabelle0> <Tabelle1>AnotherTableClass</Tabelle1> <Tabelle2>UpdateMethodTableClass</Tabelle2> <Tabelle3>ReferencedTableClass</Tabelle3> <Tabellenanzahl>4</Tabellenanzahl> <TechnischeSpaltenVerstecken>false</TechnischeSpaltenVerstecken> </View0> </Views> </Diagramm>
MinimSecure/unum-sdk
Ada
841
adb
-- Copyright 2014-2016 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. with Pck; use Pck; procedure Parse is My_Str : String := Foos; -- START begin Do_Nothing (My_Str'Address); end Parse;
AdaCore/langkit
Ada
921
adb
with Ada.Text_IO; use Ada.Text_IO; with Libfoolang.Analysis; use Libfoolang.Analysis; with Libfoolang.Common; use Libfoolang.Common; procedure Main is Ctx : constant Analysis_Context := Create_Context; U : constant Analysis_Unit := Ctx.Get_From_Buffer (Filename => "main.txt", Buffer => "1 + 2"); function Process (Node : Foo_Node'Class) return Visit_Status; -- If Node is an expression, print its lazy field ------------- -- Process -- ------------- function Process (Node : Foo_Node'Class) return Visit_Status is begin if Node.Kind in Foo_Expr then Put_Line (Node.Image & " -> " & Node.As_Expr.F_My_Field'Image); end if; return Into; end Process; begin Put_Line ("main.adb: Running..."); if U.Has_Diagnostics then raise Program_Error; end if; U.Root.Traverse (Process'Access); Put_Line ("main.adb: Done."); end Main;
reznikmm/matreshka
Ada
3,729
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Text_Database_Name_Attributes is pragma Preelaborate; type ODF_Text_Database_Name_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Text_Database_Name_Attribute_Access is access all ODF_Text_Database_Name_Attribute'Class with Storage_Size => 0; end ODF.DOM.Text_Database_Name_Attributes;
reznikmm/matreshka
Ada
4,630
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Svg.Stroke_Linecap_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Svg_Stroke_Linecap_Attribute_Node is begin return Self : Svg_Stroke_Linecap_Attribute_Node do Matreshka.ODF_Svg.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Svg_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Svg_Stroke_Linecap_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Stroke_Linecap_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Svg_URI, Matreshka.ODF_String_Constants.Stroke_Linecap_Attribute, Svg_Stroke_Linecap_Attribute_Node'Tag); end Matreshka.ODF_Svg.Stroke_Linecap_Attributes;
Rodeo-McCabe/orka
Ada
13,672
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2018 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Ada.Unchecked_Conversion; package GL.Pixels.Extensions is pragma Preelaborate; subtype Floating_Point_Format is Format range Red .. RG; subtype Integer_Format is Format range RG_Integer .. BGRA_Integer with Static_Predicate => Integer_Format /= Depth_Stencil; ----------------------------------------------------------------------------- subtype Non_Packed_Data_Type is Data_Type range Byte .. Half_Float; subtype Packed_Data_Type is Data_Type range Unsigned_Byte_3_3_2 .. Float_32_Unsigned_Int_24_8_Rev; subtype Floating_Point_Data_Type is Data_Type with Static_Predicate => Floating_Point_Data_Type in Half_Float | Float | Unsigned_Int_10F_11F_11F_Rev | Unsigned_Int_5_9_9_9_Rev; ----------------------------------------------------------------------------- type Format_Type is (Float_Or_Normalized_Type, Int_Type, Unsigned_Int_Type, Depth_Type); function Texture_Format_Type (Format : Pixels.Internal_Format) return Format_Type is (case Format is -- Shadow samplers when Depth_Component16 | Depth_Component24 | Depth_Component32F | Depth24_Stencil8 | Depth32F_Stencil8 => Depth_Type, -- Floating point or (un)signed normalized fixed-point when R8 | R8_SNorm | R16 | R16_SNorm | R16F | R32F => Float_Or_Normalized_Type, when RG8 | RG8_SNorm | RG16 | RG16_SNorm | RG16F | RG32F => Float_Or_Normalized_Type, when R3_G3_B2 | RGB4 | RGB5 | RGB8 | RGB8_SNorm | RGB10 | RGB12 | RGB16 | RGB16_SNorm | RGB16F | RGB32F | R11F_G11F_B10F | RGB9_E5 | SRGB8 => Float_Or_Normalized_Type, when RGBA2 | RGBA4 | RGB5_A1 | RGBA8 | RGBA8_SNorm | RGB10_A2 | RGBA12 | RGBA16 | RGBA16_SNorm | RGBA16F | RGBA32F | SRGB8_Alpha8 => Float_Or_Normalized_Type, -- Integer samplers when R8I | R16I | R32I => Int_Type, when RG8I | RG16I | RG32I => Int_Type, when RGB8I | RGB16I | RGB32I => Int_Type, when RGBA8I | RGBA16I | RGBA32I => Int_Type, -- Unsigned integer samplers when R8UI | R16UI | R32UI => Unsigned_Int_Type, when RG8UI | RG16UI | RG32UI => Unsigned_Int_Type, when RGB8UI | RGB16UI | RGB32UI => Unsigned_Int_Type, when RGBA8UI | RGBA16UI | RGBA32UI | RGB10_A2UI => Unsigned_Int_Type, when others => raise Constraint_Error with "Invalid format " & Format'Image & " for sampler"); function Image_Format_Type (Format : Pixels.Internal_Format) return Format_Type is (case Format is -- Floating point or (un)signed normalized fixed-point when R8_SNorm | R16_SNorm | RG8_SNorm | RG16_SNorm | RGBA8_SNorm | RGBA16_SNorm => Float_Or_Normalized_Type, when R8 | R16 | RG8 | RG16 => Float_Or_Normalized_Type, when RGBA8 | RGB10_A2 | RGBA16 => Float_Or_Normalized_Type, when R16F | R32F | R11F_G11F_B10F | RG16F | RG32F | RGBA16F | RGBA32F => Float_Or_Normalized_Type, -- Integer samplers when R8I | R16I | R32I => Int_Type, when RG8I | RG16I | RG32I => Int_Type, when RGBA8I | RGBA16I | RGBA32I => Int_Type, -- Unsigned integer samplers when R8UI | R16UI | R32UI => Unsigned_Int_Type, when RG8UI | RG16UI | RG32UI => Unsigned_Int_Type, when RGBA8UI | RGBA16UI | RGBA32UI | RGB10_A2UI => Unsigned_Int_Type, when others => raise Constraint_Error with "Invalid format " & Format'Image & " for image sampler"); function Texture_Format (Format : Pixels.Internal_Format) return Pixels.Format is (case Format is when Depth_Component16 | Depth_Component24 | Depth_Component32F => Depth_Component, when Depth24_Stencil8 | Depth32F_Stencil8 => Depth_Stencil, when Stencil_Index8 => Stencil_Index, when R8 | R8_SNorm | R16 | R16_SNorm | R16F | R32F => Red, when RG8 | RG8_SNorm | RG16 | RG16_SNorm | RG16F | RG32F => RG, when R3_G3_B2 | RGB4 | RGB5 | RGB8 | RGB8_SNorm | RGB10 | RGB12 | RGB16 | RGB16_SNorm | RGB16F | RGB32F | R11F_G11F_B10F | RGB9_E5 | SRGB8 => RGB, when RGBA2 | RGBA4 | RGB5_A1 | RGBA8 | RGBA8_SNorm | RGB10_A2 | RGBA12 | RGBA16 | RGBA16_SNorm | RGBA16F | RGBA32F | SRGB8_Alpha8 => RGBA, when R8I | R8UI | R16I | R16UI | R32I | R32UI => Red_Integer, when RG8I | RG8UI | RG16I | RG16UI | RG32I | RG32UI => RG_Integer, when RGB8I | RGB8UI | RGB16I | RGB16UI | RGB32I | RGB32UI => RGB_Integer, when RGBA8I | RGBA8UI | RGBA16I | RGBA16UI | RGBA32I | RGBA32UI | RGB10_A2UI => RGBA_Integer); function Texture_Data_Type (Format : Pixels.Internal_Format) return Pixels.Data_Type is (case Format is when Depth_Component16 => Unsigned_Short, when Depth_Component24 => Unsigned_Int, when Depth24_Stencil8 => Unsigned_Int_24_8, when Depth32F_Stencil8 => Float_32_Unsigned_Int_24_8_Rev, when Depth_Component32F => Float, when Stencil_Index8 => Unsigned_Byte, -- Educated guesses, might be wrong -- Based on Table 8.13 of the OpenGL specification when R3_G3_B2 => Unsigned_Byte_2_3_3_Rev, when RGB5_A1 => Unsigned_Short_1_5_5_5_Rev, when RGB9_E5 => Unsigned_Int_5_9_9_9_Rev, when R11F_G11F_B10F => Unsigned_Int_10F_11F_11F_Rev, when RGB10_A2UI | RGB10_A2 => Unsigned_Int_2_10_10_10_Rev, when R8I | RG8I | RGB8I | RGBA8I | R8_SNorm | RG8_SNorm | RGB8_SNorm | RGBA8_SNorm => Byte, when R8UI | RG8UI | RGB8UI | RGBA8UI | R8 | RG8 | RGB8 | SRGB8 | RGBA8 | SRGB8_Alpha8 => Unsigned_Byte, when R16I | RG16I | RGB16I | RGBA16I | R16_SNorm | RG16_SNorm | RGB16_SNorm | RGBA16_SNorm => Short, when R16UI | RG16UI | RGB16UI | RGBA16UI | R16 | RG16 | RGB16 | RGBA16 => Unsigned_Short, when R32I | RG32I | RGB32I | RGBA32I => Int, when R32UI | RG32UI | RGB32UI | RGBA32UI => Unsigned_Int, when R32F | RG32F | RGB32F | RGBA32F => Float, when R16F | RG16F | RGB16F | RGBA16F => Half_Float, -- Based on Table 8.8 and 8.27 of the OpenGL specification when RGB4 | RGB5 | RGB10 | RGB12 | RGBA2 | RGBA4 | RGBA12 => raise Constraint_Error); ----------------------------------------------------------------------------- function Compatible (Format : Pixels.Format; Data_Type : Pixels.Data_Type) return Boolean is (not (Format in Integer_Format and Data_Type in Floating_Point_Data_Type)); -- Floating point types are incompatible with integer formats according -- to Table 8.2 of the OpenGL specification function Components (Format : Pixels.Format) return Component_Count is (case Format is when Red | Green | Blue | Red_Integer | Green_Integer | Blue_Integer => 1, when RG | RG_Integer => 2, when RGB | BGR | RGB_Integer | BGR_Integer => 3, when RGBA | BGRA | RGBA_Integer | BGRA_Integer => 4, when others => raise Constraint_Error with "Unexpected format " & Format'Image); function Bytes (Data_Type : Non_Packed_Data_Type) return Byte_Count is (case Data_Type is when Byte | Unsigned_Byte => 1, when Short | Unsigned_Short | Half_Float => 2, when Int | Unsigned_Int | Float => 4); function Packed_Bytes (Data_Type : Packed_Data_Type) return Byte_Count is (case Data_Type is -- Unsigned_Byte formats (Table 8.6) when Unsigned_Byte_3_3_2 => 1, when Unsigned_Byte_2_3_3_Rev => 1, -- Unsigned_Short formats (Table 8.7) when Unsigned_Short_5_6_5 => 2, when Unsigned_Short_5_6_5_Rev => 2, when Unsigned_Short_4_4_4_4 => 2, when Unsigned_Short_4_4_4_4_Rev => 2, when Unsigned_Short_5_5_5_1 => 2, when Unsigned_Short_1_5_5_5_Rev => 2, -- Unsigned_Int formats (Table 8.8) when Unsigned_Int_8_8_8_8 => 4, when Unsigned_Int_8_8_8_8_Rev => 4, when Unsigned_Int_10_10_10_2 => 4, when Unsigned_Int_2_10_10_10_Rev => 4, when Unsigned_Int_24_8 => 4, when Unsigned_Int_10F_11F_11F_Rev => 4, when Unsigned_Int_5_9_9_9_Rev => 4, -- Float_Unsigned_Int formats (Table 8.9) when Float_32_Unsigned_Int_24_8_Rev => raise Constraint_Error); function Byte_Alignment (Value : Alignment) return Byte_Count; ----------------------------------------------------------------------------- subtype Compressed_Byte_Count is Types.Int range 8 .. 16 with Static_Predicate => Compressed_Byte_Count in 8 | 16; function Block_Bytes (Format : Pixels.Compressed_Format) return Compressed_Byte_Count is (case Format is -- RGTC when Compressed_Red_RGTC1 => 8, when Compressed_Signed_Red_RGTC1 => 8, when Compressed_RG_RGTC2 => 16, when Compressed_Signed_RG_RGTC2 => 16, -- BPTC when Compressed_RGBA_BPTC_Unorm => 16, when Compressed_SRGB_Alpha_BPTC_UNorm => 16, when Compressed_RGB_BPTC_Signed_Float => 16, when Compressed_RGB_BPTC_Unsigned_Float => 16, -- EAC / ETC when Compressed_R11_EAC => 8, when Compressed_Signed_R11_EAC => 8, when Compressed_RG11_EAC => 16, when Compressed_Signed_RG11_EAC => 16, when Compressed_RGB8_ETC2 => 8, when Compressed_SRGB8_ETC2 => 8, when Compressed_RGB8_Punchthrough_Alpha1_ETC2 => 8, when Compressed_SRGB8_Punchthrough_Alpha1_ETC2 => 8, when Compressed_RGBA8_ETC2_EAC => 16, when Compressed_SRGB8_Alpha8_ETC2_EAC => 16, -- ASTC when Compressed_RGBA_ASTC_4x4_KHR => 16, when Compressed_RGBA_ASTC_5x4_KHR => 16, when Compressed_RGBA_ASTC_5x5_KHR => 16, when Compressed_RGBA_ASTC_6x5_KHR => 16, when Compressed_RGBA_ASTC_6x6_KHR => 16, when Compressed_RGBA_ASTC_8x5_KHR => 16, when Compressed_RGBA_ASTC_8x6_KHR => 16, when Compressed_RGBA_ASTC_8x8_KHR => 16, when Compressed_RGBA_ASTC_10x5_KHR => 16, when Compressed_RGBA_ASTC_10x6_KHR => 16, when Compressed_RGBA_ASTC_10x8_KHR => 16, when Compressed_RGBA_ASTC_10x10_KHR => 16, when Compressed_RGBA_ASTC_12x10_KHR => 16, when Compressed_RGBA_ASTC_12x12_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_4x4_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_5x4_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_5x5_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_6x5_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_6x6_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_8x5_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_8x6_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_8x8_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_10x5_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_10x6_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_10x8_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_10x10_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_12x10_KHR => 16, when Compressed_SRGB8_ALPHA8_ASTC_12x12_KHR => 16); ----------------------------------------------------------------------------- function Depth_Stencil_Format (Format : Internal_Format) return Boolean is (Format in Depth24_Stencil8 | Depth32F_Stencil8); function Depth_Format (Format : Internal_Format) return Boolean is (Format in Depth_Component16 | Depth_Component24 | Depth_Component32F); function Stencil_Format (Format : Internal_Format) return Boolean is (Format in Stencil_Index8); private function Convert is new Ada.Unchecked_Conversion (Source => Alignment, Target => Types.Int); function Byte_Alignment (Value : Alignment) return Byte_Count is (Convert (Value)); end GL.Pixels.Extensions;
riccardo-bernardini/eugen
Ada
18,942
adb
pragma Ada_2012; with Tokenize.Token_Vectors; with Ada.Strings.Fixed; with Ada.Text_IO; use Ada.Text_IO; package body Symbolic_Expressions.Parsing is Verbose : constant Boolean := False; -- Set to true to enable debug prints ------------- -- Exactly -- ------------- function Exactly (N : Natural) return Parameter_Count is begin return Parameter_Count'(Min => N, Max => N); end Exactly; -------------- -- At_Least -- -------------- function At_Least (N : Natural) return Parameter_Count is begin return Parameter_Count'(Min => N, Max => Natural'Last); end At_Least; ------------- -- Between -- ------------- function Between (Min, Max : Natural) return Parameter_Count is begin return Parameter_Count'(Min => Min, Max => Max); end Between; --------------------- -- Define_Variable -- --------------------- procedure Define_Variable (Container : in out ID_Table_Type; Name : Variable_Name) is begin Container.T.Include (Identifier (Name), (Class => Var)); end Define_Variable; --------------------- -- Define_Function -- --------------------- procedure Define_Function (Container : in out ID_Table_Type; Name : Function_Name; N_Params : Parameter_Count) is begin Container.T.Include (Identifier (Name), (Class => Funct, N_Param => N_Params)); end Define_Function; ------------------- -- Is_Acceptable -- ------------------- function Is_Acceptable (N_Param : Natural; Limits : Parameter_Count) return Boolean is begin return N_Param >= Limits.Min and N_Param <= Limits.Max; end Is_Acceptable; function "&" (X : String ; ID : Identifier) return String is (X & " '" & ID_Image (ID) & "' "); function "&" (ID : Identifier; X : String) return String is (" '" & ID_Image (ID) & "' " & X); -- function Msg (ID : Identifier; Post : String) return String -- is ("'" & ID_Image (ID) & "' " & Post); -- -- function Msg (Pre : String; ID : Identifier; Post : String := "") return String -- is (Pre & " '" & ID_Image (ID) & "' " & Post); ----------- -- Parse -- ----------- function Parse (Input : String; ID_Table : ID_Table_Type := Empty_ID_Table; On_Unknown_ID : Unknown_ID_Action_Type := OK; Prefixes : String := ""; Prefix_Separator : String := "."; On_Multiple_Match : Multiple_Match_Action := Allow_Unprefixed) return Symbolic_Expression is pragma Unreferenced (Prefix_Separator); use Tokenize; Buffer : constant String := Input; Cursor : Positive; Current_Char : Character; EOS : constant Character := Character'Val (0); type ID_Array is array (Positive range <>) of Identifier; function To_ID_Array (X : Token_Vectors.Vector) return ID_Array is Result : ID_Array (X.First_Index .. X.Last_Index); begin for I in Result'Range loop declare S : constant String := X (I); OK : Boolean; Consumed : Natural; begin Read_Identifier (Input => S, Success => OK, Consumed => Consumed, Result => Result (I)); if not OK or Consumed < S'Length then raise Parsing_Error; end if; end; end loop; return Result; end To_ID_Array; Prefix_List : constant ID_Array := To_ID_Array (Token_Vectors.To_Vector (Split (Prefixes))); procedure Init_Scanner is begin Cursor := Buffer'First; while Cursor <= Buffer'Last and then Buffer (Cursor) = ' ' loop Cursor := Cursor + 1; end loop; if Cursor <= Buffer'Last then Current_Char := Buffer (Cursor); else Current_Char := EOS; end if; end Init_Scanner; procedure Next_Char (Skip_Spaces : Boolean := True) is begin loop if Cursor >= Buffer'Last then Current_Char := EOS; else Cursor := Cursor + 1; Current_Char := Buffer (Cursor); end if; exit when (not Skip_Spaces) or Current_Char /= ' '; end loop; end Next_Char; procedure Expect (What : Character) is begin if Current_Char /= What then raise Parsing_Error with "Expecting '" & What & "' got '" & Current_Char & "'"; else Next_Char; end if; end Expect; function Remaining return String is begin return Buffer (Cursor .. Buffer'Last); end Remaining; Level : Natural := 0; function Indent return String is use Ada.Strings.Fixed; begin return (Level * 3) * " "; end Indent; procedure Down_Level is begin Level := Level + 1; end Down_Level; procedure Up_Level is begin Level := Level - 1; end Up_Level; procedure Ecco (X : String) is begin if Verbose then Ada.Text_Io.Put_Line (Indent & "Calling " & X & "[" & Remaining & "]" & "'" & Current_Char & "'"); Down_Level; end if; end Ecco; procedure Fine is begin if Verbose then Up_Level; Ada.Text_Io.Put_Line (Indent & "done " & "[" & Remaining & "]" & "'" & Current_Char & "'"); end if; end Fine; procedure Advance (N : Positive) is begin Cursor := Cursor + N - 1; Next_Char; end Advance; function Parse_Expr return Node_Access; -- function Parse_Identifier return Bounded_ID is -- use Ada.Strings.Maps; -- use Bounded_IDs; -- -- Result : Bounded_ID; -- ID_Chars : constant Character_Set := -- To_Set (Character_Range'('a', 'z')) or -- To_Set (Character_Range'('A', 'Z')) or -- To_Set (Character_Range'('0', '9')) or -- To_Set ('.') or -- To_Set ('_'); -- begin -- Ecco ("ID"); -- -- while Is_In (Current_Char, ID_Chars) loop -- Result := Result & Current_Char; -- Next_Char (Skip_Spaces => False); -- end loop; -- -- if Current_Char = ' ' then -- Next_Char; -- end if; -- -- Fine; -- return Result; -- end Parse_Identifier; procedure Parse_Parameter_List (Parameters : out Parameter_Array; N_Params : out Natural) is begin Ecco ("par-list"); if Current_Char = ')' then N_Params := 0; else N_Params := 1; Parameters (1) := Parse_Expr; while Current_Char = ',' loop Next_Char; N_Params := N_Params + 1; Parameters (N_Params) := Parse_Expr; end loop; end if; Expect (')'); Fine; exception when others => for I in Parameters'First .. N_Params - 1 loop Free (Parameters (I)); end loop; raise; end Parse_Parameter_List; procedure Resolve_Identifier (Raw_ID : in Identifier; Pos : out ID_Tables.Cursor; N_Matches : out Natural; Resolved : out Identifier; No_Prefix_Needed : out Boolean) with Post => ( (ID_Tables."=" (Pos, ID_Tables.No_Element) = (N_Matches = 0)) ); procedure Resolve_Identifier (Raw_ID : in Identifier; Pos : out ID_Tables.Cursor; N_Matches : out Natural; Resolved : out Identifier; No_Prefix_Needed : out Boolean) is use ID_Tables; begin No_Prefix_Needed := False; N_Matches := 0; Pos := ID_Table.T.Find (Raw_ID); if Pos /= No_Element then Resolved := Raw_ID; No_Prefix_Needed := True; N_Matches := 1; end if; declare Tmp : Identifier; begin for I in Prefix_List'Range loop Tmp := Join (Prefix_List (I), Raw_ID); Pos := ID_Table.T.Find (Tmp); if Pos /= No_Element then N_Matches := N_Matches + 1; if N_Matches = 1 then Resolved := Tmp; end if; end if; end loop; end; pragma Assert ((Pos /= No_Element) = (N_Matches > 0)); end Resolve_Identifier; function Parse_Simple return Node_Access is use ID_Tables; function Try_Parenthesis (Result : out Node_Access) return Boolean is begin if Current_Char = '(' then Next_Char; Result := Parse_Expr; Expect (')'); return True; else return False; end if; end Try_Parenthesis; function Try_Scalar (Result : out Node_Access) return Boolean is Success : Boolean; Consumed : Natural; Val : Scalar_Type; begin Read_Scalar (Remaining, Success, Consumed, Val); if Success then Advance (Consumed); Result := new Node_Type'(Class => Const, Value => Val); return True; else return False; end if; end Try_Scalar; -------------------- -- Try_Identifier -- -------------------- function Try_Identifier (ID : out Identifier) return Boolean is Success : Boolean; Consumed : Natural; begin -- Put_Line ("TRY ID"); Read_Identifier (Remaining, Success, Consumed, ID); if Success then -- Put_Line ("SUCCESS (" & ID_Image(Id) & ")"); Advance (Consumed); return True; else -- Put_Line ("NO"); return False; end if; end Try_Identifier; --------------------- -- Handle_Function -- --------------------- function Handle_Function (ID : Identifier; Pos : ID_Tables.Cursor) return Node_Access is Parameters : Parameter_Array; N_Params : Natural; begin if Pos = No_Element then if On_Unknown_ID /= OK then raise Parsing_Error with "Unknown ID '" & ID; end if; else if Element (Pos).Class /= Funct then raise Parsing_Error with "Variable" & ID & "used as function"; end if; end if; Next_Char; Parse_Parameter_List (Parameters, N_Params); if Pos /= No_Element then pragma Assert (Element (Pos).Class = Funct); if not Is_Acceptable (N_Params, Element (Pos).N_Param) then raise Parsing_Error with "Wrong # of arguments"; end if; end if; return new Node_Type'(Class => Fun_Call, Fun_Name => Function_Name (ID), Parameters => Parameters, N_Params => N_Params); end Handle_Function; --------------------- -- Handle_Variable -- --------------------- function Handle_Variable (ID : Identifier; Pos : ID_Tables.Cursor) return Node_Access is begin if Pos /= No_Element and then Element (Pos).Class /= Var then raise Parsing_Error with "Function '" & ID & "' used as variable"; end if; return new Node_Type'(Class => Var, Var_Name => Variable_Name (ID)); end Handle_Variable; Result : Node_Access := null; Raw_ID : Identifier; ID : Identifier; Pos : ID_Tables.Cursor; N_Matches : Natural; No_Prefix : Boolean; begin -- Put_Line ("PARSING '" & Input & "'"); Ecco ("simple"); if Try_Parenthesis (Result) then return Result; elsif Try_Scalar (Result) then return Result; elsif Try_Identifier (Raw_ID) then Resolve_Identifier (Raw_ID => Raw_ID, Pos => Pos, N_Matches => N_Matches, Resolved => ID, No_Prefix_Needed => No_Prefix); if Pos = No_Element then if On_Unknown_ID = Die then raise Parsing_Error with "Unknown ID" & Raw_ID; end if; end if; if N_Matches > 1 then case On_Multiple_Match is when Die => raise Parsing_Error with Raw_ID & "has multiple matches"; when Allow_Unprefixed => if not No_Prefix then raise Parsing_Error with Raw_ID & "has multiple prefixed matches"; end if; when Allow => null; end case; end if; pragma Assert (if On_Multiple_Match = Die then N_Matches <= 1); if Current_Char = '(' then return Handle_Function (ID, Pos); else return Handle_Variable (ID, Pos); end if; else raise Parsing_Error; end if; exception when others => Free (Result); raise; end Parse_Simple; function Parse_Fact return Node_Access is Result : Node_Access := null; Operator : Character; Operand : Node_Access; begin Ecco ("fact"); if Current_Char = '+' or Current_Char = '-' then Operator := Current_Char; Next_Char; Operand := Parse_Simple; case Operator is when '+' => Result := new Node_Type'(Class => Unary_Plus, Term => Operand); when '-' => Result := new Node_Type'(Class => Unary_Minus, Term => Operand); when others => -- We should never arrive here raise Program_Error; end case; else Result := Parse_Simple; end if; Fine; return Result; exception when others => Free (Result); raise; end Parse_Fact; function Parse_Term return Node_Access is Result : Node_Access := null; Operator : Character; Operand : Node_Access; begin Ecco ("term"); Result := Parse_Fact; while Current_Char = '*' or Current_Char = '/' loop Operator := Current_Char; Next_Char; Operand := Parse_Fact; case Operator is when '*' => Result := new Node_Type'(Class => Mult, Left => Result, Right => Operand); when '/' => Result := new Node_Type'(Class => Div, Left => Result, Right => Operand); when others => -- We should never arrive here raise Program_Error; end case; end loop; Fine; return Result; exception when others => Free (Result); raise; end Parse_Term; function Parse_Expr return Node_Access is Result : Node_Access := null; Operator : Character; Operand : Node_Access; begin Ecco ("expr"); Result := Parse_Term; while Current_Char = '+' or Current_Char = '-' loop Operator := Current_Char; Next_Char; Operand := Parse_Term; case Operator is when '+' => Result := new Node_Type'(Class => Sum, Left => Result, Right => Operand); when '-' => Result := new Node_Type'(Class => Sub, Left => Result, Right => Operand); when others => -- We should never arrive here raise Program_Error; end case; end loop; Fine; return Result; exception when others => Free (Result); raise; end Parse_Expr; Result : Symbolic_Expression; begin Init_Scanner; Result.Expr := Parse_Expr; return Result; end Parse; end Symbolic_Expressions.Parsing;
zrmyers/VulkanAda
Ada
1,848
ads
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2021 Zane Myers -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --< @group Vulkan Math Basic Types -------------------------------------------------------------------------------- --< @summary --< This package provides a single precision floating point matrix with 2 rows --< and 2 columns. -------------------------------------------------------------------------------- package Vulkan.Math.Mat2x4.Test is -- Test Harness for Mat2x4 regression tests procedure Test_Mat2x4; end Vulkan.Math.Mat2x4.Test;
sungyeon/drake
Ada
357
ads
pragma License (Unrestricted); -- with Ada.Task_Identification; package Ada.Asynchronous_Task_Control is pragma Preelaborate; -- procedure Hold (T : Task_Identification.Task_Id); -- procedure Continue (T : Task_Identification.Task_Id); -- function Is_Held (T : Task_Identification.Task_Id) -- return Boolean; end Ada.Asynchronous_Task_Control;
AdaCore/libadalang
Ada
1,520
ads
-- -- Copyright (C) 2014-2022, AdaCore -- SPDX-License-Identifier: Apache-2.0 -- with Libadalang.Analysis; with Libadalang.Common; use Libadalang.Common; package Libadalang.Unit_Files is use Support.Text; package LAL renames Libadalang.Analysis; function Default_Provider return LAL.Unit_Provider_Reference; -- Default implementation for the Unit_Provider mechanism. It assumes that -- each compilation unit gets its own source file in the current directory, -- named according to the GNAT convention: See -- <http://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn -- /the_gnat_compilation_model.html#file-naming-rules> for more details. It -- also assumes these sources use GNAT's default native runtime. function Unit_String_Name (Name : Text_Type) return String; -- Return Name after lowering its case and encoding it appropriately for -- the file system. function File_From_Unit (Name : Text_Type; Kind : Analysis_Unit_Kind) return String; -- Convert an unit name and unit kind into the default filename subtype Root_Nodes is Ada_Node_Kind_Type with Static_Predicate => Root_Nodes in Ada_Compilation_Unit | Ada_Compilation_Unit_List | Ada_Pragma_Node_List; -- Possible nodes at the root of analysis units. Since the grammar allows -- for empty lists of compilation units, it is safe to assume that all -- analysis units have non-null roots, even when there are parsing errors. end Libadalang.Unit_Files;
AdaCore/libadalang
Ada
150
ads
generic type T is private; package A is generic type U is private; package B is function Convert (S : T) return U; end B; end A;
zhmu/ananas
Ada
312
ads
-- { dg-do compile } package Size_Clause5 is type Arr is array (1 .. 16) of Boolean; type RRec (D : Boolean) is record case D is when True => I : Integer; when False => A : Arr; end case; end record; for RRec'Object_Size use 160; for RRec'Value_Size use 160; end Size_Clause5;
osannolik/ada-canopen
Ada
57
adb
with App; procedure Main is begin App.Run; end Main;
MinimSecure/unum-sdk
Ada
892
adb
-- Copyright 2011-2019 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. with Pck; use Pck; procedure Foo is type Char_Enum_Type is ('A', 'B', 'C', 'D', 'E'); Char : Char_Enum_Type := 'D'; begin Do_Nothing (Char'Address); -- STOP end Foo;
reznikmm/matreshka
Ada
4,179
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.DOM.Table_Protection_Key_Digest_Algorithm_Attributes; package Matreshka.ODF_Table.Protection_Key_Digest_Algorithm_Attributes is type Table_Protection_Key_Digest_Algorithm_Attribute_Node is new Matreshka.ODF_Table.Abstract_Table_Attribute_Node and ODF.DOM.Table_Protection_Key_Digest_Algorithm_Attributes.ODF_Table_Protection_Key_Digest_Algorithm_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Table_Protection_Key_Digest_Algorithm_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Table_Protection_Key_Digest_Algorithm_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Table.Protection_Key_Digest_Algorithm_Attributes;
ohenley/ada-util
Ada
1,253
ads
----------------------------------------------------------------------- -- streams.files.tests -- Unit tests for buffered streams -- Copyright (C) 2010, 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Streams.Files.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test reading and writing on a buffered stream with various buffer sizes procedure Test_Read_Write (T : in out Test); procedure Test_Write (T : in out Test); end Util.Streams.Files.Tests;
reznikmm/matreshka
Ada
8,416
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2015, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); -- GNAT: enforce generation of preinitialized data section instead of -- generation of elaboration code. package Matreshka.Internals.Unicode.Ucd.Core_0018 is pragma Preelaborate; Group_0018 : aliased constant Core_Second_Stage := (16#00# .. 16#01# => -- 1800 .. 1801 (Other_Punctuation, Neutral, Other, Other, Other, Alphabetic, (Grapheme_Base => True, others => False)), 16#02# => -- 1802 (Other_Punctuation, Neutral, Other, Other, S_Continue, Exclamation, (Terminal_Punctuation | Grapheme_Base => True, others => False)), 16#03# => -- 1803 (Other_Punctuation, Neutral, Other, Other, S_Term, Exclamation, (STerm | Terminal_Punctuation | Grapheme_Base => True, others => False)), 16#04# .. 16#05# => -- 1804 .. 1805 (Other_Punctuation, Neutral, Other, Other, Other, Break_After, (Terminal_Punctuation | Grapheme_Base => True, others => False)), 16#06# => -- 1806 (Dash_Punctuation, Neutral, Other, Other, Other, Break_Before, (Dash | Hyphen | Grapheme_Base => True, others => False)), 16#07# => -- 1807 (Other_Punctuation, Neutral, Other, Other, Other, Alphabetic, (Grapheme_Base => True, others => False)), 16#08# => -- 1808 (Other_Punctuation, Neutral, Other, Other, S_Continue, Exclamation, (Terminal_Punctuation | Grapheme_Base => True, others => False)), 16#09# => -- 1809 (Other_Punctuation, Neutral, Other, Other, S_Term, Exclamation, (STerm | Terminal_Punctuation | Grapheme_Base => True, others => False)), 16#0A# => -- 180A (Other_Punctuation, Neutral, Other, Other, Other, Alphabetic, (Extender | Grapheme_Base => True, others => False)), 16#0B# .. 16#0D# => -- 180B .. 180D (Nonspacing_Mark, Neutral, Extend, Extend, Extend, Combining_Mark, (Variation_Selector | Case_Ignorable | Default_Ignorable_Code_Point | Grapheme_Extend | ID_Continue | XID_Continue | Changes_When_NFKC_Casefolded => True, others => False)), 16#0E# => -- 180E (Format, Neutral, Control, Format, Format, Glue, (Case_Ignorable | Default_Ignorable_Code_Point | Changes_When_NFKC_Casefolded => True, others => False)), 16#0F# => -- 180F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#10# .. 16#19# => -- 1810 .. 1819 (Decimal_Number, Neutral, Other, Numeric, Numeric, Numeric, (Grapheme_Base | ID_Continue | XID_Continue => True, others => False)), 16#1A# .. 16#1F# => -- 181A .. 181F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#43# => -- 1843 (Modifier_Letter, Neutral, Other, A_Letter, O_Letter, Alphabetic, (Extender | Alphabetic | Case_Ignorable | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start => True, others => False)), 16#78# .. 16#7F# => -- 1878 .. 187F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#A9# => -- 18A9 (Nonspacing_Mark, Neutral, Extend, Extend, Extend, Combining_Mark, (Other_Alphabetic | Alphabetic | Case_Ignorable | Grapheme_Extend | ID_Continue | XID_Continue => True, others => False)), 16#AB# .. 16#AF# => -- 18AB .. 18AF (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#F6# .. 16#FF# => -- 18F6 .. 18FF (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), others => (Other_Letter, Neutral, Other, A_Letter, O_Letter, Alphabetic, (Alphabetic | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start => True, others => False))); end Matreshka.Internals.Unicode.Ucd.Core_0018;
zhmu/ananas
Ada
6,810
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K I N G . U T I L I T I E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides RTS Internal Declarations. -- These declarations are not part of the GNARLI with Ada.Unchecked_Conversion; with System.Task_Primitives; package System.Tasking.Utilities is function ATCB_To_Address is new Ada.Unchecked_Conversion (Task_Id, System.Task_Primitives.Task_Address); --------------------------------- -- Task_Stage Related routines -- --------------------------------- function Make_Independent return Boolean; -- Move the current task to the outermost level (level 2) of the master -- hierarchy of the environment task. That is one level further out -- than normal tasks defined in library-level packages (level 3). The -- environment task will wait for level 3 tasks to terminate normally, -- then it will abort all the level 2 tasks. See Finalize_Global_Tasks -- procedure for more information. -- -- This is a dangerous operation, and should never be used on nested tasks -- or tasks that depend on any objects that might be finalized earlier than -- the termination of the environment task. It is primarily for internal -- use by the GNARL, to prevent such internal server tasks from preventing -- a partition from terminating. -- -- Also note that the run time assumes that the parent of an independent -- task is the environment task. If this is not the case, Make_Independent -- will change the task's parent. This assumption is particularly -- important for master level completion and for the computation of -- Independent_Task_Count. -- -- NOTE WELL: Make_Independent should be called before the task reaches its -- "begin", like this: -- -- task body Some_Independent_Task is -- ... -- Ignore : constant Boolean := Make_Independent; -- ... -- begin -- -- The return value is meaningless; the only reason this is a function is -- to get around the Ada limitation that makes a procedure call -- syntactically illegal before the "begin". -- -- Calling it before "begin" ensures that the call completes before the -- activating task can proceed. This is important for preventing race -- conditions. For example, if the environment task reaches -- Finalize_Global_Tasks before some task has finished Make_Independent, -- the program can hang. -- -- Note also that if a package declares independent tasks, it should not -- initialize its package-body data after "begin" of the package, because -- that's where the tasks are activated. Initializing such data before the -- task activation helps prevent the tasks from accessing uninitialized -- data. Independent_Task_Count : Natural := 0; -- Number of independent tasks. This counter is incremented each time -- Make_Independent is called. Note that if a server task terminates, -- this counter will not be decremented. Since Make_Independent locks -- the environment task (because every independent task depends on it), -- this counter is protected by the environment task's lock. --------------------------------- -- Task Abort Related Routines -- --------------------------------- procedure Cancel_Queued_Entry_Calls (T : Task_Id); -- Cancel any entry calls queued on target task. -- Call this while holding T's lock. procedure Exit_One_ATC_Level (Self_ID : Task_Id); pragma Inline (Exit_One_ATC_Level); -- Call only with abort deferred and holding lock of Self_ID. -- This is a bit of common code for all entry calls. -- The effect is to exit one level of ATC nesting. procedure Abort_One_Task (Self_ID : Task_Id; T : Task_Id); -- Similar to Locked_Abort_To_Level (Self_ID, T, Level_Completed_Task), -- but: -- (1) caller should be holding no locks -- (2) may be called for tasks that have not yet been activated -- (3) always aborts whole task procedure Abort_Tasks (Tasks : Task_List); -- Abort_Tasks is called to initiate abort, however, the actual -- aborting is done by aborted task by means of Abort_Handler procedure Make_Passive (Self_ID : Task_Id; Task_Completed : Boolean); -- Update counts to indicate current task is either terminated or -- accepting on a terminate alternative. Call holding no locks except -- Global_Task_Lock when calling from Terminate_Task. end System.Tasking.Utilities;
zhmu/ananas
Ada
340
adb
-- { dg-do compile } -- { dg-options "-g" } package body Import1 is procedure Create (Bounds : Arr) is type Bound_Array is array (Bounds'Range) of Integer; procedure Proc (Ptr : access Bound_Array); pragma Import (C, Proc); Temp : aliased Bound_Array; begin Proc (Temp'Access); end; end Import1;
sungyeon/drake
Ada
2,757
adb
with System.Formatting; with System.Img_Char; with System.Long_Long_Integer_Types; package body System.Img_WChar is subtype Word_Unsigned is Long_Long_Integer_Types.Word_Unsigned; -- implementation procedure Image_Wide_Character ( V : Wide_Character; S : in out String; P : out Natural; Ada_2005 : Boolean) is pragma Unreferenced (Ada_2005); begin case V is when Wide_Character'Val (0) .. Wide_Character'Val (16#7f#) => Img_Char.Image_Character_05 ( Character'Val (Wide_Character'Pos (V)), S, P); when Wide_Character'Val (16#ad#) => pragma Assert (S'Length >= Image_ad'Length); P := S'First - 1 + Image_ad'Length; S (S'First .. P) := Image_ad; when others => pragma Assert (S'Length >= Img_Char.Hex_Prefix'Length); S (S'First .. S'First - 1 + Img_Char.Hex_Prefix'Length) := Img_Char.Hex_Prefix; declare Error : Boolean; begin Formatting.Image ( Word_Unsigned'(Wide_Character'Pos (V)), S (S'First + Img_Char.Hex_Prefix'Length .. S'Last), P, Base => 16, Width => 4, Error => Error); pragma Assert (not Error); end; end case; end Image_Wide_Character; procedure Image_Wide_Wide_Character ( V : Wide_Wide_Character; S : in out String; P : out Natural) is subtype WWC is Wide_Wide_Character; -- for the case statement begin case V is when WWC'Val (0) .. WWC'Val (16#7f#) => Img_Char.Image_Character_05 ( Character'Val (Wide_Wide_Character'Pos (V)), S, P); when WWC'Val (16#ad#) => Image_Wide_Character ( Wide_Character'Val (Wide_Wide_Character'Pos (V)), S, P, Ada_2005 => True); when others => pragma Assert (S'Length >= Img_Char.Hex_Prefix'Length); S (S'First .. S'First - 1 + Img_Char.Hex_Prefix'Length) := Img_Char.Hex_Prefix; declare Error : Boolean; begin Formatting.Image ( Word_Unsigned'(Wide_Wide_Character'Pos (V)), S (S'First + Img_Char.Hex_Prefix'Length .. S'Last), P, Base => 16, Width => 8, Error => Error); pragma Assert (not Error); end; end case; end Image_Wide_Wide_Character; end System.Img_WChar;
sungyeon/drake
Ada
667
adb
with System.Zero_Terminated_WStrings; with C.winbase; with C.windef; with C.winnt; package body System.Native_Credentials is use type C.size_t; use type C.windef.WINBOOL; function User_Name return String is Result : aliased C.winnt.WCHAR_array (0 .. C.windef.MAX_PATH - 1); Length : aliased C.windef.DWORD := Result'Size; begin if C.winbase.GetUserName (Result (0)'Access, Length'Access) = C.windef.FALSE then raise Constraint_Error; -- ??? end if; return Zero_Terminated_WStrings.Value ( Result (0)'Access, C.size_t (Length) - 1); end User_Name; end System.Native_Credentials;
stcarrez/ada-servlet
Ada
5,889
ads
----------------------------------------------------------------------- -- Servlet tests - Servlet Tests Framework -- Copyright (C) 2011, 2012, 2015, 2018, 2020 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Properties; with Servlet.Requests.Mockup; with Servlet.Responses.Mockup; with Servlet.Server; with Servlet.Core; -- with Servlet.Applications.Main; with Util.Tests; with Util.XUnit; with EL.Contexts.Default; with EL.Variables; with GNAT.Source_Info; -- The <b>Servlet.Tests</b> package provides a set of utility procedures to write a unit test -- on top of Servlet. package Servlet.Tests is -- Initialize the servlet-test framework mockup. If the application is not specified, -- a default Servlet application is created. procedure Initialize (Props : in Util.Properties.Manager'Class; Context_Path : in String := "/servlet-unit"; Registry : in Servlet.Core.Servlet_Registry_Access := null); -- Called when the testsuite execution has finished. procedure Finish (Status : in Util.XUnit.Status); -- Get the server function Get_Server return access Servlet.Server.Container; -- Get the test application. function Get_Application return Servlet.Core.Servlet_Registry_Access; -- Simulate a GET request on the given URI with the request parameters. -- Get the result in the response object. procedure Do_Get (Request : in out Servlet.Requests.Mockup.Request'Class; Response : in out Servlet.Responses.Mockup.Response'Class; URI : in String; Save : in String := ""); -- Simulate a POST request on the given URI with the request parameters. -- Get the result in the response object. procedure Do_Post (Request : in out Servlet.Requests.Mockup.Request'Class; Response : in out Servlet.Responses.Mockup.Response'Class; URI : in String; Save : in String := ""); -- Simulate a raw request. The URI and method must have been set on the Request object. procedure Do_Req (Request : in out Servlet.Requests.Mockup.Request'Class; Response : in out Servlet.Responses.Mockup.Response'Class); -- Check that the response body contains the string procedure Assert_Contains (T : in Util.Tests.Test'Class; Value : in String; Reply : in out Servlet.Responses.Mockup.Response; Message : in String := "Test failed"; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line); -- Check that the response body matches the regular expression procedure Assert_Matches (T : in Util.Tests.Test'Class; Pattern : in String; Reply : in out Servlet.Responses.Mockup.Response; Message : in String := "Test failed"; Status : in Natural := Servlet.Responses.SC_OK; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line); -- Check that the response body is a redirect to the given URI. procedure Assert_Redirect (T : in Util.Tests.Test'Class; Value : in String; Reply : in out Servlet.Responses.Mockup.Response; Message : in String := "Test failed"; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line); -- Check that the response contains the given header. procedure Assert_Header (T : in Util.Tests.Test'Class; Header : in String; Value : in String; Reply : in out Servlet.Responses.Mockup.Response; Message : in String := "Test failed"; Status : in Natural := Servlet.Responses.SC_OK; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line); type EL_Test is new Util.Tests.Test with record -- The ELContext, Variables, Resolver, Form area controlled object. -- Due to AUnit implementation, we cannot store a controlled object in the Test object. -- This is due to the 'for Obj'Address use Ret;' clause used by AUnit to allocate -- a test object. -- The application object is allocated dyanmically by Set_Up. ELContext : EL.Contexts.Default.Default_Context_Access; Variables : EL.Variables.Variable_Mapper_Access; Root_Resolver : EL.Contexts.Default.Default_ELResolver_Access; end record; -- Cleanup the test instance. overriding procedure Tear_Down (T : in out EL_Test); -- Setup the test instance. overriding procedure Set_Up (T : in out EL_Test); end Servlet.Tests;
stcarrez/babel
Ada
2,890
ads
----------------------------------------------------------------------- -- bkp-files -- File and directories -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Ada.Calendar; with Ada.Directories; with Ada.Containers.Vectors; with Util.Encoders.SHA1; with Util.Concurrent.Fifos; with Util.Strings.Vectors; with ADO; with Babel.Base.Models; package Babel.Files.Queues is -- package Babel.Strategies.Flow/Optimize/Small/Larges/Default/Immediate/Simple/Pipeline/Serial -- File name -- Directory info -- File ID or null -- File size => sha1, file status, backup package File_Fifo is new Util.Concurrent.Fifos (Element_Type => File_Type, Default_Size => 100, Clear_On_Dequeue => False); -- -- procedure Execute (Backup : in out Small_Files_Strategy; -- Queue : in out File_Queue) is -- begin -- loop -- Queue.Dequeue (File, 1.0); -- -- load file -- -- compute sha1 -- -- if modified then backup file -- end loop; -- -- exception -- when File_Fifo.Timeout => -- null; -- end Execute; type File_Queue is tagged limited record Queue : File_Fifo.Fifo; end record; type File_Queue_Access is access all File_Queue'Class; procedure Add_File (Into : in out File_Queue; File : in File_Type); type Directory_Queue is limited private; -- Returns true if there is a directory in the queue. function Has_Directory (Queue : in Directory_Queue) return Boolean; -- Get the next directory from the queue. procedure Peek_Directory (Queue : in out Directory_Queue; Directory : out Directory_Type); -- Add the directory in the queue. procedure Add_Directory (Queue : in out Directory_Queue; Directory : in Directory_Type); private type Directory_Queue is limited record Directories : Directory_Vector; end record; end Babel.Files.Queues;
AdaCore/training_material
Ada
2,735
adb
------------------------------------------------------------------------------ -- -- -- Hardware Abstraction Layer for STM32 Targets -- -- -- -- Copyright (C) 2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with STM32F4_Discovery; use STM32F4_Discovery; with Ada.Real_Time; use Ada.Real_Time; package body Last_Chance_Handler is ------------------------- -- Last_Chance_Handler -- ------------------------- procedure Last_Chance_Handler (Msg : System.Address; Line : Integer) is pragma Unreferenced (Msg, Line); begin Initialize_LEDs; Off (Green); Off (Orange); Off (Blue); -- No-return procedure... loop On (Red); delay until Clock + Milliseconds (500); Off (Red); delay until Clock + Milliseconds (500); end loop; end Last_Chance_Handler; end Last_Chance_Handler;
reznikmm/matreshka
Ada
515,370
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Holders.Elements; with AMF.Holders.Reals; with AMF.Holders.Unlimited_Naturals; with AMF.Internals.Helpers; with AMF.Internals.Holders.OCL_Holders; with AMF.Internals.Holders.UML_Holders; with AMF.Internals.Tables.OCL_Element_Table; with AMF.Internals.Tables.OCL_Metamodel; with AMF.Internals.Tables.OCL_Types; with AMF.Internals.Tables.UML_Metamodel; with AMF.OCL.Any_Types; with AMF.OCL.Association_Class_Call_Exps; with AMF.OCL.Bag_Types; with AMF.OCL.Boolean_Literal_Exps; with AMF.OCL.Collection_Items; with AMF.OCL.Collection_Literal_Exps; with AMF.OCL.Collection_Literal_Parts.Collections; with AMF.OCL.Collection_Ranges; with AMF.OCL.Collection_Types; with AMF.OCL.Enum_Literal_Exps; with AMF.OCL.Expression_In_Ocls; with AMF.OCL.Holders.Collection_Kinds; with AMF.OCL.If_Exps; with AMF.OCL.Integer_Literal_Exps; with AMF.OCL.Invalid_Literal_Exps; with AMF.OCL.Invalid_Types; with AMF.OCL.Iterate_Exps; with AMF.OCL.Iterator_Exps; with AMF.OCL.Let_Exps; with AMF.OCL.Message_Exps; with AMF.OCL.Message_Types; with AMF.OCL.Null_Literal_Exps; with AMF.OCL.Ocl_Expressions.Collections; with AMF.OCL.Operation_Call_Exps; with AMF.OCL.Ordered_Set_Types; with AMF.OCL.Property_Call_Exps; with AMF.OCL.Real_Literal_Exps; with AMF.OCL.Sequence_Types; with AMF.OCL.Set_Types; with AMF.OCL.State_Exps; with AMF.OCL.String_Literal_Exps; with AMF.OCL.Template_Parameter_Types; with AMF.OCL.Tuple_Literal_Exps; with AMF.OCL.Tuple_Literal_Parts.Collections; with AMF.OCL.Tuple_Types; with AMF.OCL.Type_Exps; with AMF.OCL.Unlimited_Natural_Literal_Exps; with AMF.OCL.Unspecified_Value_Exps; with AMF.OCL.Variable_Exps; with AMF.OCL.Variables.Collections; with AMF.OCL.Void_Types; with AMF.String_Collections.Internals; with AMF.UML.Association_Classes; with AMF.UML.Behaviors; with AMF.UML.Call_Operation_Actions; with AMF.UML.Classifier_Template_Parameters; with AMF.UML.Classifiers.Collections; with AMF.UML.Collaboration_Uses.Collections; with AMF.UML.Comments.Collections; with AMF.UML.Constraints.Collections; with AMF.UML.Dependencies.Collections; with AMF.UML.Element_Imports.Collections; with AMF.UML.Elements.Collections; with AMF.UML.Enumeration_Literals; with AMF.UML.Features.Collections; with AMF.UML.Generalization_Sets.Collections; with AMF.UML.Generalizations.Collections; with AMF.UML.Holders.Visibility_Kinds; with AMF.UML.Named_Elements.Collections; with AMF.UML.Namespaces; with AMF.UML.Operations.Collections; with AMF.UML.Package_Imports.Collections; with AMF.UML.Packageable_Elements.Collections; with AMF.UML.Packages; with AMF.UML.Parameters; with AMF.UML.Properties.Collections; with AMF.UML.Redefinable_Elements.Collections; with AMF.UML.Redefinable_Template_Signatures; with AMF.UML.Send_Signal_Actions; with AMF.UML.Signals; with AMF.UML.States; with AMF.UML.String_Expressions; with AMF.UML.Substitutions.Collections; with AMF.UML.Template_Bindings.Collections; with AMF.UML.Template_Parameters; with AMF.UML.Template_Signatures; with AMF.UML.Types; with AMF.UML.Use_Cases.Collections; with League.Holders.Booleans; with League.Holders.Integers; package body AMF.Internals.Tables.OCL_Reflection is --------- -- Get -- --------- function Get (Self : AMF.Internals.AMF_Element; Property : CMOF_Element) return League.Holders.Holder is function OCL_Any_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of AnyType class. function OCL_Association_Class_Call_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of AssociationClassCallExp class. function OCL_Bag_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of BagType class. function OCL_Boolean_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of BooleanLiteralExp class. function OCL_Collection_Item_Get return League.Holders.Holder; -- Returns attribute's value of instance of CollectionItem class. function OCL_Collection_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of CollectionLiteralExp class. function OCL_Collection_Range_Get return League.Holders.Holder; -- Returns attribute's value of instance of CollectionRange class. function OCL_Collection_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of CollectionType class. function OCL_Enum_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of EnumLiteralExp class. function OCL_Expression_In_Ocl_Get return League.Holders.Holder; -- Returns attribute's value of instance of ExpressionInOcl class. function OCL_If_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of IfExp class. function OCL_Integer_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of IntegerLiteralExp class. function OCL_Invalid_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of InvalidLiteralExp class. function OCL_Invalid_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of InvalidType class. function OCL_Iterate_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of IterateExp class. function OCL_Iterator_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of IteratorExp class. function OCL_Let_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of LetExp class. function OCL_Message_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of MessageExp class. function OCL_Message_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of MessageType class. function OCL_Null_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of NullLiteralExp class. function OCL_Operation_Call_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of OperationCallExp class. function OCL_Ordered_Set_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of OrderedSetType class. function OCL_Property_Call_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of PropertyCallExp class. function OCL_Real_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of RealLiteralExp class. function OCL_Sequence_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of SequenceType class. function OCL_Set_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of SetType class. function OCL_State_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of StateExp class. function OCL_String_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of StringLiteralExp class. function OCL_Template_Parameter_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of TemplateParameterType class. function OCL_Tuple_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of TupleLiteralExp class. function OCL_Tuple_Literal_Part_Get return League.Holders.Holder; -- Returns attribute's value of instance of TupleLiteralPart class. function OCL_Tuple_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of TupleType class. function OCL_Type_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of TypeExp class. function OCL_Unlimited_Natural_Literal_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of UnlimitedNaturalLiteralExp class. function OCL_Unspecified_Value_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of UnspecifiedValueExp class. function OCL_Variable_Get return League.Holders.Holder; -- Returns attribute's value of instance of Variable class. function OCL_Variable_Exp_Get return League.Holders.Holder; -- Returns attribute's value of instance of VariableExp class. function OCL_Void_Type_Get return League.Holders.Holder; -- Returns attribute's value of instance of VoidType class. ---------------------- -- OCL_Any_Type_Get -- ---------------------- function OCL_Any_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Any_Type_Get; ---------------------------------------- -- OCL_Association_Class_Call_Exp_Get -- ---------------------------------------- function OCL_Association_Class_Call_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Navigation_Call_Exp_Navigation_Source_A_Exp9 then -- NavigationCallExp::navigationSource : Property return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Properties.UML_Property_Access' (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Navigation_Source)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Navigation_Call_Exp_Qualifier_A_Parent_Nav then -- NavigationCallExp::qualifier : OclExpression return AMF.OCL.Ocl_Expressions.Collections.OCL_Ocl_Expression_Collections.Internals.To_Holder (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualifier); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Association_Class_Call_Exp_Referred_Association_Class_A_Referring_Exp then -- AssociationClassCallExp::referredAssociationClass : AssociationClass return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Association_Classes.UML_Association_Class_Access' (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Association_Class)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Source)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Association_Class_Call_Exp_Get; ---------------------- -- OCL_Bag_Type_Get -- ---------------------- function OCL_Bag_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifiers.UML_Classifier_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Attribute_Property_Datatype then -- DataType::ownedAttribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Operation_Operation_Datatype then -- DataType::ownedOperation : Operation return AMF.UML.Operations.Collections.UML_Operation_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Operation); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Bag_Type_Get; --------------------------------- -- OCL_Boolean_Literal_Exp_Get -- --------------------------------- function OCL_Boolean_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Boolean_Literal_Exp_Boolean_Symbol then -- BooleanLiteralExp::booleanSymbol : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Boolean_Symbol); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Boolean_Literal_Exp_Get; ----------------------------- -- OCL_Collection_Item_Get -- ----------------------------- function OCL_Collection_Item_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Item_Item_A_Item1 then -- CollectionItem::item : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Item)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Collection_Item_Get; ------------------------------------ -- OCL_Collection_Literal_Exp_Get -- ------------------------------------ function OCL_Collection_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Literal_Exp_Kind then -- CollectionLiteralExp::kind : CollectionKind return AMF.OCL.Holders.Collection_Kinds.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Kind); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Literal_Exp_Part_A_Exp1 then -- CollectionLiteralExp::part : CollectionLiteralPart return AMF.OCL.Collection_Literal_Parts.Collections.OCL_Collection_Literal_Part_Collections.Internals.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Part); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Collection_Literal_Exp_Get; ------------------------------ -- OCL_Collection_Range_Get -- ------------------------------ function OCL_Collection_Range_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Range_First_A_First_Owner then -- CollectionRange::first : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_First)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Range_Last_A_Last_Owner then -- CollectionRange::last : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Last)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Collection_Range_Get; ----------------------------- -- OCL_Collection_Type_Get -- ----------------------------- function OCL_Collection_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifiers.UML_Classifier_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Attribute_Property_Datatype then -- DataType::ownedAttribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Operation_Operation_Datatype then -- DataType::ownedOperation : Operation return AMF.UML.Operations.Collections.UML_Operation_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Operation); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Collection_Type_Get; ------------------------------ -- OCL_Enum_Literal_Exp_Get -- ------------------------------ function OCL_Enum_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Enum_Literal_Exp_Referred_Enum_Literal_A_Literal_Exp then -- EnumLiteralExp::referredEnumLiteral : EnumerationLiteral return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Enumeration_Literals.UML_Enumeration_Literal_Access' (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Enum_Literal)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Enum_Literal_Exp_Get; ------------------------------- -- OCL_Expression_In_Ocl_Get -- ------------------------------- function OCL_Expression_In_Ocl_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Opaque_Expression_Behavior_A_Opaque_Expression then -- OpaqueExpression::behavior : Behavior return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Behaviors.UML_Behavior_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Behavior)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Opaque_Expression_Body then -- OpaqueExpression::body : String return AMF.String_Collections.Internals.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Body); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Body_Expression_A_Top_Expression then -- ExpressionInOcl::bodyExpression : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Body_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Context_Variable_A_Self_Owner then -- ExpressionInOcl::contextVariable : Variable return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Context_Variable)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Generated_Type_A_Owning_Classifier then -- ExpressionInOcl::generatedType : Classifier return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifiers.UML_Classifier_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generated_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Opaque_Expression_Language then -- OpaqueExpression::language : String return AMF.String_Collections.Internals.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Language); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Parameter_Variable_A_Var_Owner then -- ExpressionInOcl::parameterVariable : Variable return AMF.OCL.Variables.Collections.OCL_Variable_Collections.Internals.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Parameter_Variable); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Opaque_Expression_Result_A_Opaque_Expression then -- OpaqueExpression::result : Parameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Parameters.UML_Parameter_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Result)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Result_Variable_A_Result_Owner then -- ExpressionInOcl::resultVariable : Variable return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Result_Variable)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Expression_In_Ocl_Get; -------------------- -- OCL_If_Exp_Get -- -------------------- function OCL_If_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_If_Exp_Condition_A_If_Owner then -- IfExp::condition : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Condition)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_If_Exp_Else_Expression_A_Else_Owner then -- IfExp::elseExpression : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Else_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_If_Exp_Then_Expression_A_Then_Owner then -- IfExp::thenExpression : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Then_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_If_Exp_Get; --------------------------------- -- OCL_Integer_Literal_Exp_Get -- --------------------------------- function OCL_Integer_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Integer_Literal_Exp_Integer_Symbol then -- IntegerLiteralExp::integerSymbol : Integer return League.Holders.Integers.To_Holder (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Integer_Symbol); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Integer_Literal_Exp_Get; --------------------------------- -- OCL_Invalid_Literal_Exp_Get -- --------------------------------- function OCL_Invalid_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Invalid_Literal_Exp_Get; -------------------------- -- OCL_Invalid_Type_Get -- -------------------------- function OCL_Invalid_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Invalid_Type_Get; ------------------------- -- OCL_Iterate_Exp_Get -- ------------------------- function OCL_Iterate_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Loop_Exp_Body_A_Loop_Body_Owner then -- LoopExp::body : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Body)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Loop_Exp_Iterator_A_Loop_Exp then -- LoopExp::iterator : Variable return AMF.OCL.Variables.Collections.OCL_Variable_Collections.Internals.To_Holder (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Iterator); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Iterate_Exp_Result_A_Base_Exp then -- IterateExp::result : Variable return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access' (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Result)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Source)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Iterate_Exp_Get; -------------------------- -- OCL_Iterator_Exp_Get -- -------------------------- function OCL_Iterator_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Loop_Exp_Body_A_Loop_Body_Owner then -- LoopExp::body : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Body)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Loop_Exp_Iterator_A_Loop_Exp then -- LoopExp::iterator : Variable return AMF.OCL.Variables.Collections.OCL_Variable_Collections.Internals.To_Holder (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Iterator); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Source)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Iterator_Exp_Get; --------------------- -- OCL_Let_Exp_Get -- --------------------- function OCL_Let_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Let_Exp_In_A_Exp4 then -- LetExp::in : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_In)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Let_Exp_Variable_A_Exp5 then -- LetExp::variable : Variable return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access' (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Variable)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Let_Exp_Get; ------------------------- -- OCL_Message_Exp_Get -- ------------------------- function OCL_Message_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Exp_Argument_A_Exp2 then -- MessageExp::argument : OclExpression return AMF.OCL.Ocl_Expressions.Collections.OCL_Ocl_Expression_Collections.Internals.To_Holder (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Argument); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Exp_Called_Operation_A_Exp6 then -- MessageExp::calledOperation : CallOperationAction return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Call_Operation_Actions.UML_Call_Operation_Action_Access' (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Called_Operation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Exp_Sent_Signal_A_Exp7 then -- MessageExp::sentSignal : SendSignalAction return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Send_Signal_Actions.UML_Send_Signal_Action_Access' (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Sent_Signal)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Exp_Target_A_Exp8 then -- MessageExp::target : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Target)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Message_Exp_Get; -------------------------- -- OCL_Message_Type_Get -- -------------------------- function OCL_Message_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Type_Referred_Operation_A_Type2 then -- MessageType::referredOperation : Operation return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Operations.UML_Operation_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Operation)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Type_Referred_Signal_A_Type3 then -- MessageType::referredSignal : Signal return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Signals.UML_Signal_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Signal)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Message_Type_Get; ------------------------------ -- OCL_Null_Literal_Exp_Get -- ------------------------------ function OCL_Null_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Null_Literal_Exp_Get; -------------------------------- -- OCL_Operation_Call_Exp_Get -- -------------------------------- function OCL_Operation_Call_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Operation_Call_Exp_Argument_A_Parent_Call then -- OperationCallExp::argument : OclExpression return AMF.OCL.Ocl_Expressions.Collections.OCL_Ocl_Expression_Collections.Internals.To_Holder (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Argument); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Operation_Call_Exp_Referred_Operation_A_Refering_Exp then -- OperationCallExp::referredOperation : Operation return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Operations.UML_Operation_Access' (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Operation)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Source)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Operation_Call_Exp_Get; ------------------------------ -- OCL_Ordered_Set_Type_Get -- ------------------------------ function OCL_Ordered_Set_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifiers.UML_Classifier_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Attribute_Property_Datatype then -- DataType::ownedAttribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Operation_Operation_Datatype then -- DataType::ownedOperation : Operation return AMF.UML.Operations.Collections.UML_Operation_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Operation); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Ordered_Set_Type_Get; ------------------------------- -- OCL_Property_Call_Exp_Get -- ------------------------------- function OCL_Property_Call_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Navigation_Call_Exp_Navigation_Source_A_Exp9 then -- NavigationCallExp::navigationSource : Property return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Properties.UML_Property_Access' (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Navigation_Source)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Navigation_Call_Exp_Qualifier_A_Parent_Nav then -- NavigationCallExp::qualifier : OclExpression return AMF.OCL.Ocl_Expressions.Collections.OCL_Ocl_Expression_Collections.Internals.To_Holder (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualifier); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Property_Call_Exp_Referred_Property_A_Refering_Exp then -- PropertyCallExp::referredProperty : Property return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Properties.UML_Property_Access' (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Property)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Source)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Property_Call_Exp_Get; ------------------------------ -- OCL_Real_Literal_Exp_Get -- ------------------------------ function OCL_Real_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Real_Literal_Exp_Real_Symbol then -- RealLiteralExp::realSymbol : Real return AMF.Holders.Reals.To_Holder (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Real_Symbol); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Real_Literal_Exp_Get; --------------------------- -- OCL_Sequence_Type_Get -- --------------------------- function OCL_Sequence_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifiers.UML_Classifier_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Attribute_Property_Datatype then -- DataType::ownedAttribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Operation_Operation_Datatype then -- DataType::ownedOperation : Operation return AMF.UML.Operations.Collections.UML_Operation_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Operation); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Sequence_Type_Get; ---------------------- -- OCL_Set_Type_Get -- ---------------------- function OCL_Set_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifiers.UML_Classifier_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Attribute_Property_Datatype then -- DataType::ownedAttribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Operation_Operation_Datatype then -- DataType::ownedOperation : Operation return AMF.UML.Operations.Collections.UML_Operation_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Operation); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Set_Type_Get; ----------------------- -- OCL_State_Exp_Get -- ----------------------- function OCL_State_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_State_Exp_Referred_State_A_Exp9 then -- StateExp::referredState : State return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.States.UML_State_Access' (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_State)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_State_Exp_Get; -------------------------------- -- OCL_String_Literal_Exp_Get -- -------------------------------- function OCL_String_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_String_Literal_Exp_String_Symbol then -- StringLiteralExp::stringSymbol : String return League.Holders.To_Holder (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_String_Symbol); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_String_Literal_Exp_Get; ------------------------------------- -- OCL_Template_Parameter_Type_Get -- ------------------------------------- function OCL_Template_Parameter_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Template_Parameter_Type_Specification then -- TemplateParameterType::specification : String return AMF.Holders.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Specification); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Template_Parameter_Type_Get; ------------------------------- -- OCL_Tuple_Literal_Exp_Get -- ------------------------------- function OCL_Tuple_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Tuple_Literal_Exp_Part_A_Exp3 then -- TupleLiteralExp::part : TupleLiteralPart return AMF.OCL.Tuple_Literal_Parts.Collections.OCL_Tuple_Literal_Part_Collections.Internals.To_Holder (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Part); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Tuple_Literal_Exp_Get; -------------------------------- -- OCL_Tuple_Literal_Part_Get -- -------------------------------- function OCL_Tuple_Literal_Part_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Tuple_Literal_Part_Attribute_A_Part2 then -- TupleLiteralPart::attribute : Property return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Properties.UML_Property_Access' (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Tuple_Literal_Part_Get; ------------------------ -- OCL_Tuple_Type_Get -- ------------------------ function OCL_Tuple_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Attribute_Property_Datatype then -- DataType::ownedAttribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Data_Type_Owned_Operation_Operation_Datatype then -- DataType::ownedOperation : Operation return AMF.UML.Operations.Collections.UML_Operation_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Operation); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Tuple_Type_Get; ---------------------- -- OCL_Type_Exp_Get -- ---------------------- function OCL_Type_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Type_Exp_Referred_Type_A_Exp11 then -- TypeExp::referredType : Classifier return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifiers.UML_Classifier_Access' (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Type_Exp_Get; ------------------------------------------- -- OCL_Unlimited_Natural_Literal_Exp_Get -- ------------------------------------------- function OCL_Unlimited_Natural_Literal_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Unlimited_Natural_Literal_Exp_Unlimited_Natural_Symbol then -- UnlimitedNaturalLiteralExp::unlimitedNaturalSymbol : UnlimitedNatural return AMF.Holders.Unlimited_Naturals.To_Holder (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Unlimited_Natural_Symbol); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Unlimited_Natural_Literal_Exp_Get; ----------------------------------- -- OCL_Unspecified_Value_Exp_Get -- ----------------------------------- function OCL_Unspecified_Value_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Unspecified_Value_Exp_Get; ---------------------- -- OCL_Variable_Get -- ---------------------- function OCL_Variable_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Variable_Init_Expression_A_Initialized_Element then -- Variable::initExpression : OclExpression return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access' (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Init_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Variable_Represented_Parameter_A_Variable then -- Variable::representedParameter : Parameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Parameters.UML_Parameter_Access' (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Represented_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Variable_Get; -------------------------- -- OCL_Variable_Exp_Get -- -------------------------- function OCL_Variable_Exp_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Variable_Exp_Referred_Variable_A_Refering_Exp then -- VariableExp::referredVariable : Variable return AMF.Internals.Holders.OCL_Holders.To_Holder (AMF.OCL.Variables.OCL_Variable_Access' (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Referred_Variable)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Types.UML_Type_Access' (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Type)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Variable_Exp_Get; ----------------------- -- OCL_Void_Type_Get -- ----------------------- function OCL_Void_Type_Get return League.Holders.Holder is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Attribute_A_Classifier then -- Classifier::attribute : Property return AMF.UML.Properties.Collections.UML_Property_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Attribute); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Client_Dependency_Dependency_Client then -- NamedElement::clientDependency : Dependency return AMF.UML.Dependencies.Collections.UML_Dependency_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Client_Dependency); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Collaboration_Use_A_Classifier then -- Classifier::collaborationUse : CollaborationUse return AMF.UML.Collaboration_Uses.Collections.UML_Collaboration_Use_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Collaboration_Use); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace then -- Namespace::elementImport : ElementImport return AMF.UML.Element_Imports.Collections.UML_Element_Import_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Element_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Feature_Feature_Featuring_Classifier then -- Classifier::feature : Feature return AMF.UML.Features.Collections.UML_Feature_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Feature); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_General_A_Classifier then -- Classifier::general : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_General); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Generalization_Generalization_Specific then -- Classifier::generalization : Generalization return AMF.UML.Generalizations.Collections.UML_Generalization_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Generalization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Imported_Member_A_Namespace then -- Namespace::importedMember : PackageableElement return AMF.UML.Packageable_Elements.Collections.UML_Packageable_Element_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Imported_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Inherited_Member_A_Classifier then -- Classifier::inheritedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Inherited_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Abstract); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Final_Specialization); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean return League.Holders.Booleans.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Is_Leaf); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Member_A_Member_Namespace then -- Namespace::member : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String return AMF.Holders.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.String_Expressions.UML_String_Expression_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Name_Expression)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Namespace_Namespace_Owned_Member then -- NamedElement::namespace : Namespace return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Namespaces.UML_Namespace_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Namespace)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Comment_A_Owning_Element then -- Element::ownedComment : Comment return AMF.UML.Comments.Collections.UML_Comment_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Comment); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owned_Element_Element_Owner then -- Element::ownedElement : Element return AMF.UML.Elements.Collections.UML_Element_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Member_Named_Element_Namespace then -- Namespace::ownedMember : NamedElement return AMF.UML.Named_Elements.Collections.UML_Named_Element_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Member); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Owned_Rule_Constraint_Context then -- Namespace::ownedRule : Constraint return AMF.UML.Constraints.Collections.UML_Constraint_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Rule); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Signatures.UML_Template_Signature_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Template_Signature)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Use_Case_A_Classifier then -- Classifier::ownedUseCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owned_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Element_Owner_Element_Owned_Element then -- Element::owner : Element return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Elements.UML_Element_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owner)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Owning_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Packages.UML_Package_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace then -- Namespace::packageImport : PackageImport return AMF.UML.Package_Imports.Collections.UML_Package_Import_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Package_Import); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype then -- Classifier::powertypeExtent : GeneralizationSet return AMF.UML.Generalization_Sets.Collections.UML_Generalization_Set_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Powertype_Extent); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Qualified_Name then -- NamedElement::qualifiedName : String return AMF.Holders.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Qualified_Name); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Redefined_Classifier_A_Classifier then -- Classifier::redefinedClassifier : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Classifier); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element then -- RedefinableElement::redefinedElement : RedefinableElement return AMF.UML.Redefinable_Elements.Collections.UML_Redefinable_Element_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefined_Element); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element then -- RedefinableElement::redefinitionContext : Classifier return AMF.UML.Classifiers.Collections.UML_Classifier_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Redefinition_Context); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Representation)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier then -- Classifier::substitution : Substitution return AMF.UML.Substitutions.Collections.UML_Substitution_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Substitution); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element then -- TemplateableElement::templateBinding : TemplateBinding return AMF.UML.Template_Bindings.Collections.UML_Template_Binding_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Binding); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter return AMF.Internals.Holders.UML_Holders.To_Holder (AMF.UML.Template_Parameters.UML_Template_Parameter_Access' (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Template_Parameter)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Use_Case_Use_Case_Subject then -- Classifier::useCase : UseCase return AMF.UML.Use_Cases.Collections.UML_Use_Case_Collections.Internals.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Use_Case); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind return AMF.UML.Holders.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Get_Visibility); else raise Program_Error; end if; end OCL_Void_Type_Get; begin case AMF.Internals.Tables.OCL_Element_Table.Table (Self).Kind is when AMF.Internals.Tables.OCL_Types.E_None => raise Program_Error; when AMF.Internals.Tables.OCL_Types.E_OCL_Any_Type => return OCL_Any_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Association_Class_Call_Exp => return OCL_Association_Class_Call_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Bag_Type => return OCL_Bag_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Boolean_Literal_Exp => return OCL_Boolean_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Item => return OCL_Collection_Item_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Literal_Exp => return OCL_Collection_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Range => return OCL_Collection_Range_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Type => return OCL_Collection_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Enum_Literal_Exp => return OCL_Enum_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Expression_In_Ocl => return OCL_Expression_In_Ocl_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_If_Exp => return OCL_If_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Integer_Literal_Exp => return OCL_Integer_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Invalid_Literal_Exp => return OCL_Invalid_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Invalid_Type => return OCL_Invalid_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Iterate_Exp => return OCL_Iterate_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Iterator_Exp => return OCL_Iterator_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Let_Exp => return OCL_Let_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Message_Exp => return OCL_Message_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Message_Type => return OCL_Message_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Null_Literal_Exp => return OCL_Null_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Operation_Call_Exp => return OCL_Operation_Call_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Ordered_Set_Type => return OCL_Ordered_Set_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Property_Call_Exp => return OCL_Property_Call_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Real_Literal_Exp => return OCL_Real_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Sequence_Type => return OCL_Sequence_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Set_Type => return OCL_Set_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_State_Exp => return OCL_State_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_String_Literal_Exp => return OCL_String_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Template_Parameter_Type => return OCL_Template_Parameter_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Literal_Exp => return OCL_Tuple_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Literal_Part => return OCL_Tuple_Literal_Part_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Type => return OCL_Tuple_Type_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Type_Exp => return OCL_Type_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Unlimited_Natural_Literal_Exp => return OCL_Unlimited_Natural_Literal_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Unspecified_Value_Exp => return OCL_Unspecified_Value_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Variable => return OCL_Variable_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Variable_Exp => return OCL_Variable_Exp_Get; when AMF.Internals.Tables.OCL_Types.E_OCL_Void_Type => return OCL_Void_Type_Get; end case; end Get; -------------------- -- Get_Meta_Class -- -------------------- function Get_Meta_Class (Self : AMF.Internals.AMF_Element) return CMOF_Element is begin case OCL_Element_Table.Table (Self).Kind is when AMF.Internals.Tables.OCL_Types.E_None => return 0; when AMF.Internals.Tables.OCL_Types.E_OCL_Any_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Any_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Association_Class_Call_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Association_Class_Call_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Bag_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Bag_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Boolean_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Boolean_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Item => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Item; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Range => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Range; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Enum_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Enum_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Expression_In_Ocl => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Expression_In_Ocl; when AMF.Internals.Tables.OCL_Types.E_OCL_If_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_If_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Integer_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Integer_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Invalid_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Invalid_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Invalid_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Invalid_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Iterate_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Iterate_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Iterator_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Iterator_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Let_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Let_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Message_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Message_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Message_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Message_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Null_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Null_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Operation_Call_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Operation_Call_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Ordered_Set_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Ordered_Set_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Property_Call_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Property_Call_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Real_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Real_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Sequence_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Sequence_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Set_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Set_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_State_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_State_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_String_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_String_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Template_Parameter_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Template_Parameter_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Literal_Part => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Literal_Part; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Type; when AMF.Internals.Tables.OCL_Types.E_OCL_Type_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Type_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Unlimited_Natural_Literal_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Unlimited_Natural_Literal_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Unspecified_Value_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Unspecified_Value_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Variable => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Variable; when AMF.Internals.Tables.OCL_Types.E_OCL_Variable_Exp => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Variable_Exp; when AMF.Internals.Tables.OCL_Types.E_OCL_Void_Type => return AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Void_Type; end case; end Get_Meta_Class; --------- -- Set -- --------- procedure Set (Self : AMF.Internals.AMF_Element; Property : CMOF_Element; Value : League.Holders.Holder) is procedure OCL_Any_Type_Set; -- Sets attribute's value of instance of AnyType class. procedure OCL_Association_Class_Call_Exp_Set; -- Sets attribute's value of instance of AssociationClassCallExp class. procedure OCL_Bag_Type_Set; -- Sets attribute's value of instance of BagType class. procedure OCL_Boolean_Literal_Exp_Set; -- Sets attribute's value of instance of BooleanLiteralExp class. procedure OCL_Collection_Item_Set; -- Sets attribute's value of instance of CollectionItem class. procedure OCL_Collection_Literal_Exp_Set; -- Sets attribute's value of instance of CollectionLiteralExp class. procedure OCL_Collection_Range_Set; -- Sets attribute's value of instance of CollectionRange class. procedure OCL_Collection_Type_Set; -- Sets attribute's value of instance of CollectionType class. procedure OCL_Enum_Literal_Exp_Set; -- Sets attribute's value of instance of EnumLiteralExp class. procedure OCL_Expression_In_Ocl_Set; -- Sets attribute's value of instance of ExpressionInOcl class. procedure OCL_If_Exp_Set; -- Sets attribute's value of instance of IfExp class. procedure OCL_Integer_Literal_Exp_Set; -- Sets attribute's value of instance of IntegerLiteralExp class. procedure OCL_Invalid_Literal_Exp_Set; -- Sets attribute's value of instance of InvalidLiteralExp class. procedure OCL_Invalid_Type_Set; -- Sets attribute's value of instance of InvalidType class. procedure OCL_Iterate_Exp_Set; -- Sets attribute's value of instance of IterateExp class. procedure OCL_Iterator_Exp_Set; -- Sets attribute's value of instance of IteratorExp class. procedure OCL_Let_Exp_Set; -- Sets attribute's value of instance of LetExp class. procedure OCL_Message_Exp_Set; -- Sets attribute's value of instance of MessageExp class. procedure OCL_Message_Type_Set; -- Sets attribute's value of instance of MessageType class. procedure OCL_Null_Literal_Exp_Set; -- Sets attribute's value of instance of NullLiteralExp class. procedure OCL_Operation_Call_Exp_Set; -- Sets attribute's value of instance of OperationCallExp class. procedure OCL_Ordered_Set_Type_Set; -- Sets attribute's value of instance of OrderedSetType class. procedure OCL_Property_Call_Exp_Set; -- Sets attribute's value of instance of PropertyCallExp class. procedure OCL_Real_Literal_Exp_Set; -- Sets attribute's value of instance of RealLiteralExp class. procedure OCL_Sequence_Type_Set; -- Sets attribute's value of instance of SequenceType class. procedure OCL_Set_Type_Set; -- Sets attribute's value of instance of SetType class. procedure OCL_State_Exp_Set; -- Sets attribute's value of instance of StateExp class. procedure OCL_String_Literal_Exp_Set; -- Sets attribute's value of instance of StringLiteralExp class. procedure OCL_Template_Parameter_Type_Set; -- Sets attribute's value of instance of TemplateParameterType class. procedure OCL_Tuple_Literal_Exp_Set; -- Sets attribute's value of instance of TupleLiteralExp class. procedure OCL_Tuple_Literal_Part_Set; -- Sets attribute's value of instance of TupleLiteralPart class. procedure OCL_Tuple_Type_Set; -- Sets attribute's value of instance of TupleType class. procedure OCL_Type_Exp_Set; -- Sets attribute's value of instance of TypeExp class. procedure OCL_Unlimited_Natural_Literal_Exp_Set; -- Sets attribute's value of instance of UnlimitedNaturalLiteralExp class. procedure OCL_Unspecified_Value_Exp_Set; -- Sets attribute's value of instance of UnspecifiedValueExp class. procedure OCL_Variable_Set; -- Sets attribute's value of instance of Variable class. procedure OCL_Variable_Exp_Set; -- Sets attribute's value of instance of VariableExp class. procedure OCL_Void_Type_Set; -- Sets attribute's value of instance of VoidType class. ---------------------- -- OCL_Any_Type_Set -- ---------------------- procedure OCL_Any_Type_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Any_Types.OCL_Any_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Any_Type_Set; ---------------------------------------- -- OCL_Association_Class_Call_Exp_Set -- ---------------------------------------- procedure OCL_Association_Class_Call_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Navigation_Call_Exp_Navigation_Source_A_Exp9 then -- NavigationCallExp::navigationSource : Property AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Navigation_Source (AMF.UML.Properties.UML_Property_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Association_Class_Call_Exp_Referred_Association_Class_A_Referring_Exp then -- AssociationClassCallExp::referredAssociationClass : AssociationClass AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Association_Class (AMF.UML.Association_Classes.UML_Association_Class_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Source (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Association_Class_Call_Exp_Set; ---------------------- -- OCL_Bag_Type_Set -- ---------------------- procedure OCL_Bag_Type_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Element_Type (AMF.UML.Classifiers.UML_Classifier_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Bag_Types.OCL_Bag_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Bag_Type_Set; --------------------------------- -- OCL_Boolean_Literal_Exp_Set -- --------------------------------- procedure OCL_Boolean_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Boolean_Literal_Exp_Boolean_Symbol then -- BooleanLiteralExp::booleanSymbol : Boolean AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Boolean_Symbol (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Boolean_Literal_Exp_Set; ----------------------------- -- OCL_Collection_Item_Set -- ----------------------------- procedure OCL_Collection_Item_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Item_Item_A_Item1 then -- CollectionItem::item : OclExpression AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Item (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Collection_Items.OCL_Collection_Item_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Collection_Item_Set; ------------------------------------ -- OCL_Collection_Literal_Exp_Set -- ------------------------------------ procedure OCL_Collection_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Literal_Exp_Kind then -- CollectionLiteralExp::kind : CollectionKind AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Kind (AMF.OCL.Holders.Collection_Kinds.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Collection_Literal_Exp_Set; ------------------------------ -- OCL_Collection_Range_Set -- ------------------------------ procedure OCL_Collection_Range_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Range_First_A_First_Owner then -- CollectionRange::first : OclExpression AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Set_First (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Range_Last_A_Last_Owner then -- CollectionRange::last : OclExpression AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Last (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Collection_Range_Set; ----------------------------- -- OCL_Collection_Type_Set -- ----------------------------- procedure OCL_Collection_Type_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Element_Type (AMF.UML.Classifiers.UML_Classifier_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Collection_Types.OCL_Collection_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Collection_Type_Set; ------------------------------ -- OCL_Enum_Literal_Exp_Set -- ------------------------------ procedure OCL_Enum_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Enum_Literal_Exp_Referred_Enum_Literal_A_Literal_Exp then -- EnumLiteralExp::referredEnumLiteral : EnumerationLiteral AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Enum_Literal (AMF.UML.Enumeration_Literals.UML_Enumeration_Literal_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Enum_Literal_Exp_Set; ------------------------------- -- OCL_Expression_In_Ocl_Set -- ------------------------------- procedure OCL_Expression_In_Ocl_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Opaque_Expression_Behavior_A_Opaque_Expression then -- OpaqueExpression::behavior : Behavior AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Behavior (AMF.UML.Behaviors.UML_Behavior_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Body_Expression_A_Top_Expression then -- ExpressionInOcl::bodyExpression : OclExpression AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Body_Expression (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Context_Variable_A_Self_Owner then -- ExpressionInOcl::contextVariable : Variable AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Context_Variable (AMF.OCL.Variables.OCL_Variable_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Generated_Type_A_Owning_Classifier then -- ExpressionInOcl::generatedType : Classifier AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Generated_Type (AMF.UML.Classifiers.UML_Classifier_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Expression_In_Ocl_Result_Variable_A_Result_Owner then -- ExpressionInOcl::resultVariable : Variable AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Result_Variable (AMF.OCL.Variables.OCL_Variable_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Expression_In_Ocl_Set; -------------------- -- OCL_If_Exp_Set -- -------------------- procedure OCL_If_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_If_Exp_Condition_A_If_Owner then -- IfExp::condition : OclExpression AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Condition (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_If_Exp_Else_Expression_A_Else_Owner then -- IfExp::elseExpression : OclExpression AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Else_Expression (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_If_Exp_Then_Expression_A_Then_Owner then -- IfExp::thenExpression : OclExpression AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Then_Expression (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.If_Exps.OCL_If_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_If_Exp_Set; --------------------------------- -- OCL_Integer_Literal_Exp_Set -- --------------------------------- procedure OCL_Integer_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Integer_Literal_Exp_Integer_Symbol then -- IntegerLiteralExp::integerSymbol : Integer AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Integer_Symbol (League.Holders.Integers.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Integer_Literal_Exp_Set; --------------------------------- -- OCL_Invalid_Literal_Exp_Set -- --------------------------------- procedure OCL_Invalid_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Invalid_Literal_Exp_Set; -------------------------- -- OCL_Invalid_Type_Set -- -------------------------- procedure OCL_Invalid_Type_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Invalid_Type_Set; ------------------------- -- OCL_Iterate_Exp_Set -- ------------------------- procedure OCL_Iterate_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Loop_Exp_Body_A_Loop_Body_Owner then -- LoopExp::body : OclExpression AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Body (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Iterate_Exp_Result_A_Base_Exp then -- IterateExp::result : Variable AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Result (AMF.OCL.Variables.OCL_Variable_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Source (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Iterate_Exp_Set; -------------------------- -- OCL_Iterator_Exp_Set -- -------------------------- procedure OCL_Iterator_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Loop_Exp_Body_A_Loop_Body_Owner then -- LoopExp::body : OclExpression AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Body (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Source (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Iterator_Exp_Set; --------------------- -- OCL_Let_Exp_Set -- --------------------- procedure OCL_Let_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Let_Exp_In_A_Exp4 then -- LetExp::in : OclExpression AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_In (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Let_Exp_Variable_A_Exp5 then -- LetExp::variable : Variable AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Variable (AMF.OCL.Variables.OCL_Variable_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Let_Exps.OCL_Let_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Let_Exp_Set; ------------------------- -- OCL_Message_Exp_Set -- ------------------------- procedure OCL_Message_Exp_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Exp_Called_Operation_A_Exp6 then -- MessageExp::calledOperation : CallOperationAction AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Called_Operation (AMF.UML.Call_Operation_Actions.UML_Call_Operation_Action_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Exp_Sent_Signal_A_Exp7 then -- MessageExp::sentSignal : SendSignalAction AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Sent_Signal (AMF.UML.Send_Signal_Actions.UML_Send_Signal_Action_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Exp_Target_A_Exp8 then -- MessageExp::target : OclExpression AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Target (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Message_Exps.OCL_Message_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Message_Exp_Set; -------------------------- -- OCL_Message_Type_Set -- -------------------------- procedure OCL_Message_Type_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Type_Referred_Operation_A_Type2 then -- MessageType::referredOperation : Operation AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Operation (AMF.UML.Operations.UML_Operation_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Message_Type_Referred_Signal_A_Type3 then -- MessageType::referredSignal : Signal AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Signal (AMF.UML.Signals.UML_Signal_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Message_Types.OCL_Message_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Message_Type_Set; ------------------------------ -- OCL_Null_Literal_Exp_Set -- ------------------------------ procedure OCL_Null_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Null_Literal_Exp_Set; -------------------------------- -- OCL_Operation_Call_Exp_Set -- -------------------------------- procedure OCL_Operation_Call_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Operation_Call_Exp_Referred_Operation_A_Refering_Exp then -- OperationCallExp::referredOperation : Operation AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Operation (AMF.UML.Operations.UML_Operation_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Source (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Operation_Call_Exp_Set; ------------------------------ -- OCL_Ordered_Set_Type_Set -- ------------------------------ procedure OCL_Ordered_Set_Type_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Element_Type (AMF.UML.Classifiers.UML_Classifier_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Ordered_Set_Type_Set; ------------------------------- -- OCL_Property_Call_Exp_Set -- ------------------------------- procedure OCL_Property_Call_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Navigation_Call_Exp_Navigation_Source_A_Exp9 then -- NavigationCallExp::navigationSource : Property AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Navigation_Source (AMF.UML.Properties.UML_Property_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Property_Call_Exp_Referred_Property_A_Refering_Exp then -- PropertyCallExp::referredProperty : Property AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Property (AMF.UML.Properties.UML_Property_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Call_Exp_Source_A_Applied_Element then -- CallExp::source : OclExpression AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Source (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Property_Call_Exp_Set; ------------------------------ -- OCL_Real_Literal_Exp_Set -- ------------------------------ procedure OCL_Real_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Real_Literal_Exp_Real_Symbol then -- RealLiteralExp::realSymbol : Real AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Real_Symbol (AMF.Holders.Reals.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Real_Literal_Exp_Set; --------------------------- -- OCL_Sequence_Type_Set -- --------------------------- procedure OCL_Sequence_Type_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Element_Type (AMF.UML.Classifiers.UML_Classifier_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Sequence_Type_Set; ---------------------- -- OCL_Set_Type_Set -- ---------------------- procedure OCL_Set_Type_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Collection_Type_Element_Type_A_Type1 then -- CollectionType::elementType : Classifier AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Element_Type (AMF.UML.Classifiers.UML_Classifier_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Set_Types.OCL_Set_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Set_Type_Set; ----------------------- -- OCL_State_Exp_Set -- ----------------------- procedure OCL_State_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_State_Exp_Referred_State_A_Exp9 then -- StateExp::referredState : State AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_State (AMF.UML.States.UML_State_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.State_Exps.OCL_State_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_State_Exp_Set; -------------------------------- -- OCL_String_Literal_Exp_Set -- -------------------------------- procedure OCL_String_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_String_Literal_Exp_String_Symbol then -- StringLiteralExp::stringSymbol : String AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_String_Symbol (League.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_String_Literal_Exp_Set; ------------------------------------- -- OCL_Template_Parameter_Type_Set -- ------------------------------------- procedure OCL_Template_Parameter_Type_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Template_Parameter_Type_Specification then -- TemplateParameterType::specification : String AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Specification (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Template_Parameter_Type_Set; ------------------------------- -- OCL_Tuple_Literal_Exp_Set -- ------------------------------- procedure OCL_Tuple_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Tuple_Literal_Exp_Set; -------------------------------- -- OCL_Tuple_Literal_Part_Set -- -------------------------------- procedure OCL_Tuple_Literal_Part_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Tuple_Literal_Part_Attribute_A_Part2 then -- TupleLiteralPart::attribute : Property AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Attribute (AMF.UML.Properties.UML_Property_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Tuple_Literal_Part_Set; ------------------------ -- OCL_Tuple_Type_Set -- ------------------------ procedure OCL_Tuple_Type_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Tuple_Type_Set; ---------------------- -- OCL_Type_Exp_Set -- ---------------------- procedure OCL_Type_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Type_Exp_Referred_Type_A_Exp11 then -- TypeExp::referredType : Classifier AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Type (AMF.UML.Classifiers.UML_Classifier_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Type_Exps.OCL_Type_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Type_Exp_Set; ------------------------------------------- -- OCL_Unlimited_Natural_Literal_Exp_Set -- ------------------------------------------- procedure OCL_Unlimited_Natural_Literal_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Unlimited_Natural_Literal_Exp_Unlimited_Natural_Symbol then -- UnlimitedNaturalLiteralExp::unlimitedNaturalSymbol : UnlimitedNatural AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Unlimited_Natural_Symbol (AMF.Holders.Unlimited_Naturals.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Unlimited_Natural_Literal_Exp_Set; ----------------------------------- -- OCL_Unspecified_Value_Exp_Set -- ----------------------------------- procedure OCL_Unspecified_Value_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Unspecified_Value_Exp_Set; ---------------------- -- OCL_Variable_Set -- ---------------------- procedure OCL_Variable_Set is begin if Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Variable_Init_Expression_A_Initialized_Element then -- Variable::initExpression : OclExpression AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Init_Expression (AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Variable_Represented_Parameter_A_Variable then -- Variable::representedParameter : Parameter AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Represented_Parameter (AMF.UML.Parameters.UML_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Variables.OCL_Variable_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Variable_Set; -------------------------- -- OCL_Variable_Exp_Set -- -------------------------- procedure OCL_Variable_Exp_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.OCL_Metamodel.MP_OCL_Variable_Exp_Referred_Variable_A_Refering_Exp then -- VariableExp::referredVariable : Variable AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Referred_Variable (AMF.OCL.Variables.OCL_Variable_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Typed_Element_Type_A_Typed_Element then -- TypedElement::type : Type AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Type (AMF.UML.Types.UML_Type_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); else raise Program_Error; end if; end OCL_Variable_Exp_Set; ----------------------- -- OCL_Void_Type_Set -- ----------------------- procedure OCL_Void_Type_Set is begin if Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Abstract then -- Classifier::isAbstract : Boolean AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Abstract (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Is_Final_Specialization then -- Classifier::isFinalSpecialization : Boolean AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Final_Specialization (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Redefinable_Element_Is_Leaf then -- RedefinableElement::isLeaf : Boolean AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Is_Leaf (League.Holders.Booleans.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name then -- NamedElement::name : String AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name (AMF.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Name_Expression_A_Named_Element then -- NamedElement::nameExpression : StringExpression AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Name_Expression (AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier then -- Classifier::ownedTemplateSignature : RedefinableTemplateSignature AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template then -- TemplateableElement::ownedTemplateSignature : TemplateSignature AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owned_Template_Signature (AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element then -- ParameterableElement::owningTemplateParameter : TemplateParameter AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Owning_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Type_Package_Package_Owned_Type then -- Type::package : Package AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Package (AMF.UML.Packages.UML_Package_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Representation_A_Classifier then -- Classifier::representation : CollaborationUse AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Representation (AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element then -- Classifier::templateParameter : ClassifierTemplateParameter AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element then -- ParameterableElement::templateParameter : TemplateParameter AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Template_Parameter (AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Holders.Elements.Element (Value))); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Named_Element_Visibility then -- NamedElement::visibility : VisibilityKind AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Element (Value)); elsif Property = AMF.Internals.Tables.UML_Metamodel.MP_UML_Packageable_Element_Visibility then -- PackageableElement::visibility : VisibilityKind AMF.OCL.Void_Types.OCL_Void_Type_Access (AMF.Internals.Helpers.To_Element (Self)).Set_Visibility (AMF.UML.Holders.Visibility_Kinds.Element (Value)); else raise Program_Error; end if; end OCL_Void_Type_Set; begin case OCL_Element_Table.Table (Self).Kind is when AMF.Internals.Tables.OCL_Types.E_None => raise Program_Error; when AMF.Internals.Tables.OCL_Types.E_OCL_Any_Type => OCL_Any_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Association_Class_Call_Exp => OCL_Association_Class_Call_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Bag_Type => OCL_Bag_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Boolean_Literal_Exp => OCL_Boolean_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Item => OCL_Collection_Item_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Literal_Exp => OCL_Collection_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Range => OCL_Collection_Range_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Collection_Type => OCL_Collection_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Enum_Literal_Exp => OCL_Enum_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Expression_In_Ocl => OCL_Expression_In_Ocl_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_If_Exp => OCL_If_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Integer_Literal_Exp => OCL_Integer_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Invalid_Literal_Exp => OCL_Invalid_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Invalid_Type => OCL_Invalid_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Iterate_Exp => OCL_Iterate_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Iterator_Exp => OCL_Iterator_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Let_Exp => OCL_Let_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Message_Exp => OCL_Message_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Message_Type => OCL_Message_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Null_Literal_Exp => OCL_Null_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Operation_Call_Exp => OCL_Operation_Call_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Ordered_Set_Type => OCL_Ordered_Set_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Property_Call_Exp => OCL_Property_Call_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Real_Literal_Exp => OCL_Real_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Sequence_Type => OCL_Sequence_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Set_Type => OCL_Set_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_State_Exp => OCL_State_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_String_Literal_Exp => OCL_String_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Template_Parameter_Type => OCL_Template_Parameter_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Literal_Exp => OCL_Tuple_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Literal_Part => OCL_Tuple_Literal_Part_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Tuple_Type => OCL_Tuple_Type_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Type_Exp => OCL_Type_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Unlimited_Natural_Literal_Exp => OCL_Unlimited_Natural_Literal_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Unspecified_Value_Exp => OCL_Unspecified_Value_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Variable => OCL_Variable_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Variable_Exp => OCL_Variable_Exp_Set; when AMF.Internals.Tables.OCL_Types.E_OCL_Void_Type => OCL_Void_Type_Set; end case; end Set; end AMF.Internals.Tables.OCL_Reflection;
Tim-Tom/project-euler
Ada
490
ads
package Problem_69 is -- Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the -- number of numbers less than n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, -- and 8, are all less than nine and relatively prime to nine, φ(9)=6. -- -- It can be seen that n=6 produces a maximum n/φ(n) for n ≤ 10. -- -- Find the value of n ≤ 1,000,000 for which n/φ(n) is a maximum. procedure Solve; end Problem_69;
pombredanne/ravenadm
Ada
9,217
adb
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Parameters; with HelperText; with Unix; with File_Operations; with Ada.Directories; with Ada.Text_IO; package body Ravenports is package PM renames Parameters; package HT renames HelperText; package FOP renames File_Operations; package TIO renames Ada.Text_IO; package DIR renames Ada.Directories; -------------------------------------------------------------------------------------------- -- check_version_available -------------------------------------------------------------------------------------------- procedure check_version_available is consdir : constant String := HT.USS (PM.configuration.dir_conspiracy); version_loc : constant String := consdir & conspiracy_version; begin if DIR.Exists (version_loc) then if fetch_latest_version_info (temporary_ver_loc) then declare currentver : constant String := FOP.head_n1 (version_loc); latestver : constant String := FOP.head_n1 (temporary_ver_loc); begin if latestver = currentver then TIO.Put_Line ("The latest version of Ravenports, " & latestver & ", is currently installed."); else TIO.Put_Line ("A newer version of Ravenports is available: " & latestver); TIO.Put_Line ("The " & currentver & " version is currently installed."); end if; end; DIR.Delete_File (temporary_ver_loc); end if; else TIO.Put_Line ("It appears that Ravenports has not been installed at " & consdir); end if; exception when others => null; end check_version_available; -------------------------------------------------------------------------------------------- -- fetch_latest_version_info -------------------------------------------------------------------------------------------- function fetch_latest_version_info (tmp_location : String) return Boolean is sysroot : constant String := HT.USS (PM.configuration.dir_sysroot); fetch_program : constant String := sysroot & "/usr/bin/fetch"; cmd_output : HT.Text; cmd : constant String := fetch_program & " -q --no-verify-peer " & remote_version & " -o " & tmp_location; use type DIR.File_Kind; begin if not DIR.Exists ("/tmp") or else DIR.Kind ("/tmp") /= DIR.Directory then TIO.Put_Line ("The /tmp directory does not exist, bailing ..."); return False; end if; if not DIR.Exists (fetch_program) then TIO.Put_Line ("It appears that the system root has not yet been installed at " & sysroot); TIO.Put_Line ("This must be rectified before Ravenports can be checked or fetched."); return False; end if; return Unix.piped_mute_command (cmd, cmd_output); end fetch_latest_version_info; -------------------------------------------------------------------------------------------- -- fetch_latest_tarball -------------------------------------------------------------------------------------------- function fetch_latest_tarball (latest_version : String) return Boolean is sysroot : constant String := HT.USS (PM.configuration.dir_sysroot); fetch_program : constant String := sysroot & "/usr/bin/fetch"; tarball : constant String := github_archive & "/" & latest_version & ".tar.gz"; cmd_output : HT.Text; cmd : constant String := fetch_program & " -q " & tarball & " -o /tmp"; begin -- covered by previous existence checks of fetch_latest_version_info return Unix.piped_mute_command (cmd, cmd_output); end fetch_latest_tarball; -------------------------------------------------------------------------------------------- -- later_version_available -------------------------------------------------------------------------------------------- function later_version_available (available : out Boolean) return String is consdir : constant String := HT.USS (PM.configuration.dir_conspiracy); version_loc : constant String := consdir & conspiracy_version; begin available := True; -- We know consdir exists because we couldn't get if if it didn't. if fetch_latest_version_info (temporary_ver_loc) then declare latestver : constant String := FOP.head_n1 (temporary_ver_loc); begin DIR.Delete_File (temporary_ver_loc); if DIR.Exists (version_loc) then declare currentver : constant String := FOP.head_n1 (version_loc); begin if latestver = currentver then available := False; end if; end; end if; return latestver; end; else available := False; TIO.Put_Line ("Failed to fetch latest version information from Github"); return ""; end if; end later_version_available; -------------------------------------------------------------------------------------------- -- retrieve_latest_ravenports -------------------------------------------------------------------------------------------- procedure retrieve_latest_ravenports is available : Boolean; latest_version : constant String := later_version_available (available); begin if not available then TIO.Put_Line ("Ravenports update skipped as no new version is available."); return; end if; clean_up (latest_version); if not fetch_latest_tarball (latest_version) then TIO.Put_Line ("Ravenports update skipped as tarball download failed."); return; end if; if relocate_existing_ravenports and then explode_tarball_into_conspiracy (latest_version) then clean_up (latest_version); end if; end retrieve_latest_ravenports; -------------------------------------------------------------------------------------------- -- retrieve_latest_ravenports -------------------------------------------------------------------------------------------- function relocate_existing_ravenports return Boolean is consdir : constant String := HT.USS (PM.configuration.dir_conspiracy); consdir_old : constant String := consdir & ".old"; begin DIR.Rename (Old_Name => consdir, New_Name => consdir_old); return True; exception when others => return False; end relocate_existing_ravenports; -------------------------------------------------------------------------------------------- -- explode_tarball_into_conspiracy -------------------------------------------------------------------------------------------- function explode_tarball_into_conspiracy (latest_version : String) return Boolean is sysroot : constant String := HT.USS (PM.configuration.dir_sysroot); consdir : constant String := HT.USS (PM.configuration.dir_conspiracy); tar_program : constant String := sysroot & "/usr/bin/tar"; tarball : constant String := "/tmp/" & latest_version & ".tar.gz"; extract_dir : constant String := "/tmp/Ravenports-" & latest_version; cmd_output : HT.Text; command : constant String := tar_program & " -C /tmp -xf " & tarball; command2 : constant String := sysroot & "/bin/mv " & extract_dir & " " & consdir; begin if Unix.piped_mute_command (command, cmd_output) then return Unix.piped_mute_command (command2, cmd_output); else return False; end if; end explode_tarball_into_conspiracy; -------------------------------------------------------------------------------------------- -- clean_up -------------------------------------------------------------------------------------------- procedure clean_up (latest_version : String) is sysroot : constant String := HT.USS (PM.configuration.dir_sysroot); consdir : constant String := HT.USS (PM.configuration.dir_conspiracy); consdir_old : constant String := consdir & ".old"; extract_old : constant String := "/tmp/Ravenports-" & latest_version; command : constant String := sysroot & "/bin/rm -rf " & consdir_old; command2 : constant String := sysroot & "/bin/rm -rf " & extract_old; tarball : constant String := "/tmp/" & latest_version & ".tar.gz"; cmd_output : HT.Text; success : Boolean; begin if DIR.Exists (consdir_old) then success := Unix.piped_mute_command (command, cmd_output); end if; if DIR.Exists (tarball) then DIR.Delete_File (tarball); end if; if DIR.Exists (extract_old) then success := Unix.piped_mute_command (command2, cmd_output); end if; exception when others => null; end clean_up; end Ravenports;
AdaCore/ada-traits-containers
Ada
3,851
ads
-- -- Copyright (C) 2016-2016, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- -- This package provides wrappers around SPARK compatible algorithms of -- Conts.Algorithms providing postconditions. -- They should be instanciated with appropriate models -- of the container. More precisely, for every container Self, the -- result of Content.Model (Self) must be such that Content.Get (Content.Model -- (Self), Content.First + I) is always the element returned by -- Getters.Get (Self, C) on the cursor C obtained by applying Cursors.Next -- I times on Cursors.First (Self). -- These algorithms have a body with SPARK_Mode => Off so they must be -- instantiated at library level inside SPARK code. pragma Ada_2012; with Conts.Cursors; with Conts.Properties; with Conts.Properties.SPARK; package Conts.Algorithms.SPARK is ---------- -- Find -- ---------- generic with package Cursors is new Conts.Cursors.Forward_Cursors (<>); with package Getters is new Conts.Properties.Read_Only_Maps (Map_Type => Cursors.Container, Key_Type => Cursors.Cursor, others => <>); with function "=" (K1, K2 : Getters.Element) return Boolean is <>; with package Content is new Conts.Properties.SPARK.Content_Models (Map_Type => Getters.Map, Element_Type => Getters.Element_Type, others => <>); function Find (Self : Cursors.Container; E : Getters.Element) return Cursors.Cursor with SPARK_Mode, Global => null, Contract_Cases => ((for all I in Content.First .. Content.Last (Content.Model (Self)) => Content.Get (Content.Model (Self), I) /= E) => Cursors."=" (Find'Result, Cursors.No_Element), others => Cursors.Has_Element (Self, Find'Result) and then Getters.Get (Self, Find'Result) = E); -------------- -- Contains -- -------------- generic with package Cursors is new Conts.Cursors.Forward_Cursors (<>); with package Getters is new Conts.Properties.Read_Only_Maps (Map_Type => Cursors.Container, Key_Type => Cursors.Cursor, others => <>); with function "=" (K1, K2 : Getters.Element) return Boolean is <>; with package Content is new Conts.Properties.SPARK.Content_Models (Map_Type => Getters.Map, Element_Type => Getters.Element_Type, others => <>); function Contains (Self : Cursors.Container; E : Getters.Element) return Boolean with SPARK_Mode, Global => null, Post => Contains'Result = (for some I in Content.First .. Content.Last (Content.Model (Self)) => Content.Get (Content.Model (Self), I) = E); ------------ -- Equals -- ------------ generic with package Cursors is new Conts.Cursors.Random_Access_Cursors (<>); with package Getters is new Conts.Properties.Read_Only_Maps (Map_Type => Cursors.Container, Key_Type => Cursors.Index_Type, others => <>); with function "=" (K1, K2 : Getters.Element) return Boolean is <>; with package Content is new Conts.Properties.SPARK.Content_Models (Map_Type => Getters.Map, Element_Type => Getters.Element_Type, others => <>); function Equals (Left, Right : Cursors.Container) return Boolean with SPARK_Mode, Global => null, Post => Equals'Result = (Content."=" (Content.Last (Content.Model (Left)), Content.Last (Content.Model (Right))) and then (for all I in Content.First .. Content.Last (Content.Model (Left)) => Content.Get (Content.Model (Left), I) = Content.Get (Content.Model (Right), I))); end Conts.Algorithms.SPARK;
zhmu/ananas
Ada
319
adb
-- { dg-do compile } procedure Fixedpnt4 is type T is delta 2.0/5.0 range -10.0 .. 10.0 with Small => 2.0/5.0; type T2 is delta 1.0/25.0 range -10.0 .. 10.0 with Small => 1.0/25.0; X : T := 1.0; Y : T2; begin Y := X / X; Y := X / (X + X); Y := X / (X + X + 1.0); Y := (X + X) * (X + X); end;
kraileth/ravenadm
Ada
38,241
adb
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Definitions; use Definitions; with Ada.Characters.Latin_1; with Ada.Directories; with Ada.Text_IO; with Ada.Exceptions; with Package_Manifests; with File_Operations; with Utilities; package body Port_Specification.Buildsheet is package TIO renames Ada.Text_IO; package DIR renames Ada.Directories; package LAT renames Ada.Characters.Latin_1; package MAN renames Package_Manifests; package FOP renames File_Operations; package UTL renames Utilities; package EX renames Ada.Exceptions; -------------------------------------------------------------------------------------------- -- generator -------------------------------------------------------------------------------------------- procedure generator (specs : Portspecs; ravensrcdir : String; output_file : String) is package crate is new CON.Vectors (Index_Type => Positive, Element_Type => HT.Text, "=" => HT.SU."="); package local_sorter is new crate.Generic_Sorting ("<" => HT.SU."<"); procedure send (data : String; use_put : Boolean := False); procedure send (varname : String; value, default : Integer); procedure send (varname, value : String); procedure send (varname : String; value : HT.Text); procedure send (varname : String; crate : string_crate.Vector; flavor : Positive); procedure send (varname : String; crate : def_crate.Map); procedure send (varname : String; crate : list_crate.Map; flavor : Positive); procedure send (varname : String; value : Boolean; show_when : Boolean); procedure send_options; procedure send_targets; procedure send_descriptions; procedure send_scripts; procedure send_manifests; procedure send_download_groups; procedure print_item (position : string_crate.Cursor); procedure print_item40 (position : string_crate.Cursor); procedure print_straight (position : string_crate.Cursor); procedure print_adjacent (position : string_crate.Cursor); procedure dump_vardesc (position : string_crate.Cursor); procedure dump_vardesc2 (position : string_crate.Cursor); procedure dump_manifest (position : string_crate.Cursor); procedure dump_manifest2 (position : string_crate.Cursor); procedure dump_sdesc (position : def_crate.Cursor); procedure dump_subpkgs (position : list_crate.Cursor); procedure dump_optgroup (position : list_crate.Cursor); procedure dump_distfiles (position : string_crate.Cursor); procedure dump_targets (position : list_crate.Cursor); procedure dump_helper (option_name : String; crate : string_crate.Vector; helper : String); procedure expand_option_record (position : option_crate.Cursor); procedure blank_line; procedure send_file (filename : String); procedure send_plist (filename : String); procedure send_directory (dirname : String; pattern : String := ""); procedure send_catchall; write_to_file : constant Boolean := (output_file /= ""); makefile_handle : TIO.File_Type; varname_prefix : HT.Text; save_variant : HT.Text; current_len : Natural; currently_blank : Boolean := True; desc_prefix : constant String := "descriptions/desc."; plist_prefix : constant String := "manifests/plist."; distinfo : constant String := "distinfo"; temp_storage : string_crate.Vector; procedure send (data : String; use_put : Boolean := False) is begin if write_to_file then if use_put then TIO.Put (makefile_handle, data); else TIO.Put_Line (makefile_handle, data); end if; else if use_put then TIO.Put (data); else TIO.Put_Line (data); end if; end if; if data /= "" then currently_blank := False; end if; end send; procedure send (varname, value : String) is begin if value /= "" then send (align24 (varname & LAT.Equals_Sign) & value); end if; end send; procedure send (varname : String; value : HT.Text) is begin if not HT.IsBlank (value) then send (align24 (varname & LAT.Equals_Sign) & HT.USS (value)); end if; end send; procedure send (varname : String; value, default : Integer) is begin if value /= default then send (align24 (varname & LAT.Equals_Sign) & HT.int2str (value)); end if; end send; procedure send (varname : String; crate : string_crate.Vector; flavor : Positive) is begin if crate.Is_Empty then return; end if; case flavor is when 1 => send (align24 (varname & "="), True); crate.Iterate (Process => print_item'Access); when 2 => current_len := 0; send (align24 (varname & "="), True); crate.Iterate (Process => print_adjacent'Access); send (""); when 3 => varname_prefix := HT.SUS (varname); crate.Iterate (Process => dump_distfiles'Access); when others => null; end case; end send; procedure send (varname : String; crate : def_crate.Map) is begin varname_prefix := HT.SUS (varname); crate.Iterate (Process => dump_sdesc'Access); end send; procedure send (varname : String; crate : list_crate.Map; flavor : Positive) is begin varname_prefix := HT.SUS (varname); case flavor is when 4 => crate.Iterate (Process => dump_subpkgs'Access); when 5 => crate.Iterate (Process => dump_optgroup'Access); when others => null; end case; end send; procedure send (varname : String; value : Boolean; show_when : Boolean) is begin if value = show_when then send (align24 (varname & LAT.Equals_Sign) & "yes"); end if; end send; procedure print_item (position : string_crate.Cursor) is index : Natural := string_crate.To_Index (position); item : String := HT.USS (string_crate.Element (position)); begin if index = 1 then send (item); else send (LAT.HT & LAT.HT & LAT.HT & item); end if; end print_item; procedure print_item40 (position : string_crate.Cursor) is index : Natural := string_crate.To_Index (position); item : String := HT.USS (string_crate.Element (position)); begin if index = 1 then send (item); else send (LAT.HT & LAT.HT & LAT.HT & LAT.HT & LAT.HT & item); end if; end print_item40; procedure print_adjacent (position : string_crate.Cursor) is index : Natural := string_crate.To_Index (position); item : String := HT.USS (string_crate.Element (position)); len : Natural := item'Length; begin -- Try to hit 75 chars -- 76 - 24 = 52 if current_len + len + 1 > 52 then current_len := 0; send (""); send (LAT.HT & LAT.HT & LAT.HT, True); end if; if current_len > 0 then send (" ", True); current_len := current_len + 1; end if; send (item, True); current_len := current_len + len; end print_adjacent; procedure print_straight (position : string_crate.Cursor) is item : String := HT.USS (string_crate.Element (position)); begin send (item); end print_straight; procedure dump_sdesc (position : def_crate.Cursor) is varname : String := HT.USS (varname_prefix) & LAT.Left_Square_Bracket & HT.USS (def_crate.Key (position)) & LAT.Right_Square_Bracket & LAT.Equals_Sign; begin send (align24 (varname) & HT.USS (def_crate.Element (position))); end dump_sdesc; procedure dump_subpkgs (position : list_crate.Cursor) is rec : group_list renames list_crate.Element (position); varname : String := HT.USS (varname_prefix) & LAT.Left_Square_Bracket & HT.USS (rec.group) & LAT.Right_Square_Bracket & LAT.Equals_Sign; begin if not rec.list.Is_Empty then send (align24 (varname), True); rec.list.Iterate (Process => print_item'Access); end if; end dump_subpkgs; procedure dump_optgroup (position : list_crate.Cursor) is rec : group_list renames list_crate.Element (position); varname : String := HT.USS (varname_prefix) & LAT.Left_Square_Bracket & HT.USS (rec.group) & LAT.Right_Square_Bracket & LAT.Equals_Sign; begin if not rec.list.Is_Empty then current_len := 0; send (align24 (varname), True); rec.list.Iterate (Process => print_adjacent'Access); send (""); end if; end dump_optgroup; procedure dump_distfiles (position : string_crate.Cursor) is index : Natural := string_crate.To_Index (position); NDX : String := HT.USS (varname_prefix) & LAT.Left_Square_Bracket & HT.int2str (index) & LAT.Right_Square_Bracket & LAT.Equals_Sign; begin send (align24 (NDX) & HT.USS (string_crate.Element (position))); end dump_distfiles; procedure blank_line is begin if not currently_blank then send (""); end if; currently_blank := True; end blank_line; procedure send_targets is begin specs.make_targets.Iterate (Process => dump_targets'Access); end send_targets; procedure dump_targets (position : list_crate.Cursor) is rec : group_list renames list_crate.Element (position); target : String := HT.USS (rec.group) & LAT.Colon; begin blank_line; send (target); rec.list.Iterate (Process => print_straight'Access); end dump_targets; procedure dump_helper (option_name : String; crate : string_crate.Vector; helper : String) is begin if not crate.Is_Empty then send (align40 (LAT.Left_Square_Bracket & option_name & "]." & helper & LAT.Equals_Sign), True); crate.Iterate (Process => print_item40'Access); end if; end dump_helper; procedure expand_option_record (position : option_crate.Cursor) is rec : Option_Helper renames option_crate.Element (position); name : String := HT.USS (rec.option_name); begin blank_line; if not HT.IsBlank (rec.option_description) then send (align40 (LAT.Left_Square_Bracket & name & "].DESCRIPTION=") & HT.USS (rec.option_description)); end if; if not HT.IsBlank (rec.BROKEN_ON) then send (align40 (LAT.Left_Square_Bracket & name & "].BROKEN_ON=") & HT.USS (rec.BROKEN_ON)); end if; dump_helper (name, rec.BUILDRUN_DEPENDS_OFF, "BUILDRUN_DEPENDS_OFF"); dump_helper (name, rec.BUILDRUN_DEPENDS_ON, "BUILDRUN_DEPENDS_ON"); dump_helper (name, rec.BUILD_DEPENDS_OFF, "BUILD_DEPENDS_OFF"); dump_helper (name, rec.BUILD_DEPENDS_ON, "BUILD_DEPENDS_ON"); dump_helper (name, rec.BUILD_TARGET_OFF, "BUILD_TARGET_OFF"); dump_helper (name, rec.BUILD_TARGET_ON, "BUILD_TARGET_ON"); dump_helper (name, rec.CFLAGS_OFF, "CFLAGS_OFF"); dump_helper (name, rec.CFLAGS_ON, "CFLAGS_ON"); dump_helper (name, rec.CMAKE_ARGS_OFF, "CMAKE_ARGS_OFF"); dump_helper (name, rec.CMAKE_ARGS_ON, "CMAKE_ARGS_ON"); dump_helper (name, rec.CMAKE_BOOL_T_BOTH, "CMAKE_BOOL_T_BOTH"); dump_helper (name, rec.CMAKE_BOOL_F_BOTH, "CMAKE_BOOL_F_BOTH"); dump_helper (name, rec.CONFIGURE_ARGS_OFF, "CONFIGURE_ARGS_OFF"); dump_helper (name, rec.CONFIGURE_ARGS_ON, "CONFIGURE_ARGS_ON"); dump_helper (name, rec.CONFIGURE_ENABLE_BOTH, "CONFIGURE_ENABLE_BOTH"); dump_helper (name, rec.CONFIGURE_ENV_OFF, "CONFIGURE_ENV_OFF"); dump_helper (name, rec.CONFIGURE_ENV_ON, "CONFIGURE_ENV_ON"); dump_helper (name, rec.CONFIGURE_WITH_BOTH, "CONFIGURE_WITH_BOTH"); dump_helper (name, rec.CPPFLAGS_OFF, "CPPFLAGS_OFF"); dump_helper (name, rec.CPPFLAGS_ON, "CPPFLAGS_ON"); dump_helper (name, rec.CXXFLAGS_OFF, "CXXFLAGS_OFF"); dump_helper (name, rec.CXXFLAGS_ON, "CXXFLAGS_ON"); dump_helper (name, rec.DF_INDEX_OFF, "DF_INDEX_OFF"); dump_helper (name, rec.DF_INDEX_ON, "DF_INDEX_ON"); dump_helper (name, rec.EXTRACT_ONLY_OFF, "EXTRACT_ONLY_OFF"); dump_helper (name, rec.EXTRACT_ONLY_ON, "EXTRACT_ONLY_ON"); dump_helper (name, rec.EXTRA_PATCHES_OFF, "EXTRA_PATCHES_OFF"); dump_helper (name, rec.EXTRA_PATCHES_ON, "EXTRA_PATCHES_ON"); dump_helper (name, rec.GNOME_COMPONENTS_OFF, "GNOME_COMPONENTS_OFF"); dump_helper (name, rec.GNOME_COMPONENTS_ON, "GNOME_COMPONENTS_ON"); dump_helper (name, rec.IMPLIES_ON, "IMPLIES_ON"); dump_helper (name, rec.INFO_OFF, "INFO_OFF"); dump_helper (name, rec.INFO_ON, "INFO_ON"); dump_helper (name, rec.INSTALL_TARGET_OFF, "INSTALL_TARGET_OFF"); dump_helper (name, rec.INSTALL_TARGET_ON, "INSTALL_TARGET_ON"); dump_helper (name, rec.KEYWORDS_OFF, "KEYWORDS_OFF"); dump_helper (name, rec.KEYWORDS_ON, "KEYWORDS_ON"); dump_helper (name, rec.LDFLAGS_OFF, "LDFLAGS_OFF"); dump_helper (name, rec.LDFLAGS_ON, "LDFLAGS_ON"); dump_helper (name, rec.MAKEFILE_OFF, "MAKEFILE_OFF"); dump_helper (name, rec.MAKEFILE_ON, "MAKEFILE_ON"); dump_helper (name, rec.MAKE_ARGS_OFF, "MAKE_ARGS_OFF"); dump_helper (name, rec.MAKE_ARGS_ON, "MAKE_ARGS_ON"); dump_helper (name, rec.MAKE_ENV_OFF, "MAKE_ENV_OFF"); dump_helper (name, rec.MAKE_ENV_ON, "MAKE_ENV_ON"); dump_helper (name, rec.ONLY_FOR_OPSYS_ON, "ONLY_FOR_OPSYS_ON"); dump_helper (name, rec.PATCHFILES_OFF, "PATCHFILES_OFF"); dump_helper (name, rec.PATCHFILES_ON, "PATCHFILES_ON"); dump_helper (name, rec.PLIST_SUB_OFF, "PLIST_SUB_OFF"); dump_helper (name, rec.PLIST_SUB_ON, "PLIST_SUB_ON"); dump_helper (name, rec.PHP_EXTENSIONS_OFF, "PHP_EXTENSIONS_OFF"); dump_helper (name, rec.PHP_EXTENSIONS_ON, "PHP_EXTENSIONS_ON"); dump_helper (name, rec.PREVENTS_ON, "PREVENTS_ON"); dump_helper (name, rec.QMAKE_ARGS_OFF, "QMAKE_ARGS_OFF"); dump_helper (name, rec.QMAKE_ARGS_ON, "QMAKE_ARGS_ON"); dump_helper (name, rec.RUN_DEPENDS_OFF, "RUN_DEPENDS_OFF"); dump_helper (name, rec.RUN_DEPENDS_ON, "RUN_DEPENDS_ON"); dump_helper (name, rec.SUB_FILES_OFF, "SUB_FILES_OFF"); dump_helper (name, rec.SUB_FILES_ON, "SUB_FILES_ON"); dump_helper (name, rec.SUB_LIST_OFF, "SUB_LIST_OFF"); dump_helper (name, rec.SUB_LIST_ON, "SUB_LIST_ON"); dump_helper (name, rec.TEST_TARGET_OFF, "TEST_TARGET_OFF"); dump_helper (name, rec.TEST_TARGET_ON, "TEST_TARGET_ON"); dump_helper (name, rec.USES_OFF, "USES_OFF"); dump_helper (name, rec.USES_ON, "USES_ON"); dump_helper (name, rec.XORG_COMPONENTS_OFF, "XORG_COMPONENTS_OFF"); dump_helper (name, rec.XORG_COMPONENTS_ON, "XORG_COMPONENTS_ON"); end expand_option_record; procedure send_options is begin specs.ops_helpers.Iterate (Process => expand_option_record'Access); end send_options; procedure send_file (filename : String) is abspath : constant String := ravensrcdir & "/" & filename; begin if DIR.Exists (abspath) then declare contents : constant String := FOP.get_file_contents (abspath); begin blank_line; send ("[FILE:" & HT.int2str (contents'Length) & LAT.Colon & filename & LAT.Right_Square_Bracket); send (contents); end; end if; end send_file; procedure send_plist (filename : String) is abspath : constant String := ravensrcdir & "/" & filename; begin if DIR.Exists (abspath) then declare contents : constant String := MAN.compress_manifest (MAN.Filename (abspath)); begin blank_line; send ("[FILE:" & HT.int2str (contents'Length) & LAT.Colon & filename & LAT.Right_Square_Bracket); send (contents); end; end if; end send_plist; procedure dump_vardesc2 (position : string_crate.Cursor) is item : HT.Text renames string_crate.Element (position); subpkg : String := HT.USS (item); begin send_file (desc_prefix & subpkg & LAT.Full_Stop & HT.USS (varname_prefix)); if DIR.Exists (ravensrcdir & "/" & desc_prefix & subpkg) and then not temp_storage.Contains (item) then temp_storage.Append (item); send_file (desc_prefix & subpkg); end if; end dump_vardesc2; procedure dump_vardesc (position : string_crate.Cursor) is begin varname_prefix := string_crate.Element (position); specs.subpackages.Element (varname_prefix).list.Iterate (dump_vardesc2'Access); end dump_vardesc; procedure send_descriptions is begin specs.variants.Iterate (Process => dump_vardesc'Access); temp_storage.Clear; end send_descriptions; procedure send_scripts is function get_phasestr (index : Positive) return String; function get_prefix (index : Positive) return String; function get_phasestr (index : Positive) return String is begin case index is when 1 => return "fetch"; when 2 => return "extract"; when 3 => return "patch"; when 4 => return "configure"; when 5 => return "build"; when 6 => return "install"; when others => return ""; end case; end get_phasestr; function get_prefix (index : Positive) return String is begin case index is when 1 => return "pre-"; when 2 => return "post-"; when others => return ""; end case; end get_prefix; begin for phase in Positive range 1 .. 6 loop for prefix in Positive range 1 .. 2 loop declare target : String := get_prefix (prefix) & get_phasestr (phase) & "-script"; begin send_file ("scripts/" & target); end; end loop; end loop; end send_scripts; procedure send_directory (dirname : String; pattern : String := "") is procedure dump_file (cursor : string_crate.Cursor); Search : DIR.Search_Type; Dir_Ent : DIR.Directory_Entry_Type; bucket : string_crate.Vector; abspath : constant String := ravensrcdir & "/" & dirname; filter : constant DIR.Filter_Type := (DIR.Directory => False, DIR.Ordinary_File => True, DIR.Special_File => False); procedure dump_file (cursor : string_crate.Cursor) is filename : String := HT.USS (string_crate.Element (cursor)); begin send_file (dirname & "/" & filename); end dump_file; begin if not DIR.Exists (abspath) then return; end if; DIR.Start_Search (Search => Search, Directory => abspath, Pattern => pattern, Filter => filter); while DIR.More_Entries (Search => Search) loop DIR.Get_Next_Entry (Search => Search, Directory_Entry => Dir_Ent); bucket.Append (HT.SUS (DIR.Simple_Name (Dir_Ent))); end loop; DIR.End_Search (Search); sorter.Sort (Container => bucket); bucket.Iterate (Process => dump_file'Access); end send_directory; procedure dump_manifest2 (position : string_crate.Cursor) is item : HT.Text renames string_crate.Element (position); subpkg : String := HT.USS (item); fullkey : HT.Text; shortlist : String := plist_prefix & subpkg; fullplist : String := shortlist & "." & HT.USS (save_variant); begin if DIR.Exists (ravensrcdir & "/" & fullplist) then fullkey := HT.SUS (subpkg & "." & HT.USS (save_variant)); if not temp_storage.Contains (fullkey) then temp_storage.Append (fullkey); send_plist (fullplist); end if; else if DIR.Exists (ravensrcdir & "/" & shortlist) and then not temp_storage.Contains (item) then temp_storage.Append (item); send_plist (shortlist); end if; end if; end dump_manifest2; procedure dump_manifest (position : string_crate.Cursor) is variant : HT.Text renames string_crate.Element (position); begin save_variant := variant; specs.subpackages.Element (variant).list.Iterate (dump_manifest2'Access); end dump_manifest; procedure send_manifests is -- Manifests are subpackage-based -- Not having a subpackage manifest is ok. -- Subpackages typically missing: docs, examples, complete (Metaport) begin specs.variants.Iterate (Process => dump_manifest'Access); temp_storage.Clear; end send_manifests; procedure send_download_groups is -- The first group must be either "main" or "none" procedure gather (position : list_crate.Cursor); procedure dump_groups (position : crate.Cursor); procedure dump_sites (position : crate.Cursor); num_groups : constant Natural := Natural (specs.dl_sites.Length); first_one : constant String := HT.USS (list_crate.Element (specs.dl_sites.First).group); groups : crate.Vector; gcounter : Natural := 0; procedure dump_groups (position : crate.Cursor) is index : HT.Text renames crate.Element (position); rec : group_list renames specs.dl_sites.Element (index); site : constant String := HT.USS (rec.group); begin gcounter := gcounter + 1; if gcounter = 1 then send (site, True); else send (" " & site, True); end if; end dump_groups; procedure dump_sites (position : crate.Cursor) is index : HT.Text renames crate.Element (position); rec : group_list renames specs.dl_sites.Element (index); vname : String := "SITES[" & HT.USS (rec.group) & "]="; begin if not rec.list.Is_Empty then send (align24 (vname), True); rec.list.Iterate (Process => print_item'Access); end if; end dump_sites; procedure gather (position : list_crate.Cursor) is name : HT.Text renames list_crate.Key (position); begin if not HT.equivalent (name, dlgroup_main) then groups.Append (name); end if; end gather; begin send (align24 ("DOWNLOAD_GROUPS="), True); if num_groups = 1 and then first_one = dlgroup_none then send (dlgroup_none, False); -- no SITES entry in this case else specs.dl_sites.Iterate (gather'Access); local_sorter.Sort (Container => groups); if specs.dl_sites.Contains (HT.SUS (dlgroup_main)) then groups.Prepend (HT.SUS (dlgroup_main)); end if; groups.Iterate (Process => dump_groups'Access); send (""); -- list SITES entries in same order groups.Iterate (Process => dump_sites'Access); end if; end send_download_groups; procedure send_catchall is procedure scan (position : list_crate.Cursor); procedure putout (position : string_crate.Cursor); temp_storage : string_crate.Vector; procedure scan (position : list_crate.Cursor) is rec : group_list renames list_crate.Element (position); begin temp_storage.Append (rec.group); end scan; procedure putout (position : string_crate.Cursor) is text_value : HT.Text renames string_crate.Element (position); begin send (align24 (HT.USS (text_value) & "="), True); specs.catch_all.Element (text_value).list.Iterate (print_item'Access); end putout; begin specs.catch_all.Iterate (scan'Access); sorter.Sort (temp_storage); temp_storage.Iterate (putout'Access); end send_catchall; begin if write_to_file then TIO.Create (File => makefile_handle, Mode => TIO.Out_File, Name => output_file); end if; send ("# Buildsheet autogenerated by ravenadm tool -- Do not edit." & LAT.LF); send ("NAMEBASE", specs.namebase); send ("VERSION", specs.version); send ("REVISION", specs.revision, 0); send ("EPOCH", specs.epoch, 0); send ("KEYWORDS", specs.keywords, 2); send ("VARIANTS", specs.variants, 2); send ("SDESC", specs.taglines); send ("HOMEPAGE", specs.homepage); send ("CONTACT", specs.contacts, 1); blank_line; send_download_groups; send ("DISTFILE", specs.distfiles, 3); send ("DIST_SUBDIR", specs.dist_subdir); send ("DF_INDEX", specs.df_index, 2); send ("SPKGS", specs.subpackages, 4); blank_line; send ("OPTIONS_AVAILABLE", specs.ops_avail, 2); send ("OPTIONS_STANDARD", specs.ops_standard, 2); send ("OPTGROUP_RADIO", specs.opt_radio, 2); send ("OPTGROUP_RESTRICTED", specs.opt_restrict, 2); send ("OPTGROUP_UNLIMITED", specs.opt_unlimited, 2); send ("OPTDESCR", specs.optgroup_desc, 4); send ("OPTGROUP", specs.optgroups, 5); send ("VOPTS", specs.variantopts, 5); send ("OPT_ON", specs.options_on, 5); blank_line; send ("BROKEN", specs.broken, 4); send ("BROKEN_SSL", specs.broken_ssl, 2); send ("BROKEN_MYSQL", specs.broken_mysql, 2); send ("BROKEN_PGSQL", specs.broken_pgsql, 2); send ("NOT_FOR_OPSYS", specs.exc_opsys, 2); send ("ONLY_FOR_OPSYS", specs.inc_opsys, 2); send ("NOT_FOR_ARCH", specs.exc_arch, 2); send ("DEPRECATED", specs.deprecated); send ("EXPIRATION_DATE", specs.expire_date); blank_line; send ("BUILD_DEPENDS", specs.build_deps, 1); send ("BUILDRUN_DEPENDS", specs.buildrun_deps, 1); send ("RUN_DEPENDS", specs.run_deps, 1); send ("B_DEPS", specs.opsys_b_deps, 5); send ("BR_DEPS", specs.opsys_br_deps, 5); send ("R_DEPS", specs.opsys_r_deps, 5); send ("EXRUN", specs.extra_rundeps, 4); blank_line; send ("USERS", specs.users, 2); send ("GROUPS", specs.groups, 2); send ("USERGROUP_SPKG", specs.usergroup_pkg); blank_line; send ("USES", specs.uses, 2); send ("C_USES", specs.opsys_c_uses, 5); send ("GNOME_COMPONENTS", specs.gnome_comps, 2); send ("SDL_COMPONENTS", specs.sdl_comps, 2); send ("XORG_COMPONENTS", specs.xorg_comps, 2); send ("PHP_EXTENSIONS", specs.php_extensions, 2); blank_line; send ("DISTNAME", specs.distname); send ("EXTRACT_DIRTY", specs.extract_dirty, 2); send ("EXTRACT_ONLY", specs.extract_only, 2); send ("EXTRACT_WITH_UNZIP", specs.extract_zip, 2); send ("EXTRACT_WITH_7Z", specs.extract_7z, 2); send ("EXTRACT_WITH_LHA", specs.extract_lha, 2); send ("EXTRACT_DEB_PACKAGE", specs.extract_deb, 2); send ("EXTRACT_HEAD", specs.extract_head, 4); send ("EXTRACT_TAIL", specs.extract_tail, 4); blank_line; send ("LICENSE", specs.licenses, 2); send ("LICENSE_TERMS", specs.lic_terms, 1); send ("LICENSE_NAME", specs.lic_names, 1); send ("LICENSE_FILE", specs.lic_files, 1); send ("LICENSE_AWK", specs.lic_awk, 1); send ("LICENSE_SOURCE", specs.lic_source, 1); send ("LICENSE_SCHEME", specs.lic_scheme); blank_line; send ("PREFIX", specs.prefix); send ("INFO", specs.info, 1); send_catchall; send ("GENERATED", specs.generated, True); send ("SKIP_CCACHE", specs.skip_ccache, True); blank_line; send ("PATCH_WRKSRC", specs.patch_wrksrc); send ("PATCHFILES", specs.patchfiles, 2); send ("EXTRA_PATCHES", specs.extra_patches, 1); send ("PATCH_STRIP", specs.patch_strip, 2); send ("PATCHFILES_STRIP", specs.pfiles_strip, 2); blank_line; send ("INVALID_RPATH", specs.fatal_rpath, False); send ("MUST_CONFIGURE", specs.config_must); send ("GNU_CONFIGURE_PREFIX", specs.config_prefix); send ("CONFIGURE_OUTSOURCE", specs.config_outsrc, True); send ("CONFIGURE_WRKSRC", specs.config_wrksrc); send ("CONFIGURE_SCRIPT", specs.config_script); send ("CONFIGURE_TARGET", specs.config_target); send ("CONFIGURE_ARGS", specs.config_args, 1); send ("CONFIGURE_ENV", specs.config_env, 1); blank_line; send ("SKIP_BUILD", specs.skip_build, True); send ("BUILD_WRKSRC", specs.build_wrksrc); send ("BUILD_TARGET", specs.build_target, 2); send ("MAKEFILE", specs.makefile); send ("MAKE_ARGS", specs.make_args, 1); send ("MAKE_ENV", specs.make_env, 1); send ("DESTDIRNAME", specs.destdirname); send ("DESTDIR_VIA_ENV", specs.destdir_env, True); send ("MAKE_JOBS_NUMBER_LIMIT", specs.job_limit, 0); send ("SINGLE_JOB", specs.single_job, True); blank_line; send ("SKIP_INSTALL", specs.skip_install, True); send ("INSTALL_WRKSRC", specs.install_wrksrc); send ("INSTALL_TARGET", specs.install_tgt, 2); send ("INSTALL_REQ_TOOLCHAIN", specs.shift_install, True); send ("MANDIRS", specs.mandirs, 1); send ("SOVERSION", specs.soversion); send ("PLIST_SUB", specs.plist_sub, 1); send ("RC_SUBR", specs.subr_scripts, 1); send ("SUB_FILES", specs.sub_files, 1); send ("SUB_LIST", specs.sub_list, 1); blank_line; send ("REPOLOGY_SUCKS", specs.repology_sucks, True); send ("BLOCK_WATCHDOG", specs.kill_watchdog, True); send ("SET_DEBUGGING_ON", specs.debugging_on, True); send ("CFLAGS", specs.cflags, 1); send ("CXXFLAGS", specs.cxxflags, 1); send ("CPPFLAGS", specs.cppflags, 1); send ("LDFLAGS", specs.ldflags, 1); send ("OPTIMIZER_LEVEL", specs.optimizer_lvl, 2); send ("CMAKE_ARGS", specs.cmake_args, 1); send ("QMAKE_ARGS", specs.qmake_args, 1); send ("TEST_TARGET", specs.test_tgt, 2); send ("TEST_ARGS", specs.test_args, 1); send ("TEST_ENV", specs.test_env, 1); send ("VAR_OPSYS", specs.var_opsys, 4); send ("VAR_ARCH", specs.var_arch, 4); send ("CARGO_SKIP_CONFIGURE", specs.cgo_skip_conf, True); send ("CARGO_SKIP_BUILD", specs.cgo_skip_build, True); send ("CARGO_SKIP_INSTALL", specs.cgo_skip_inst, True); send ("CARGO_CONFIG_ARGS", specs.cgo_conf_args, 2); send ("CARGO_BUILD_ARGS", specs.cgo_build_args, 2); send ("CARGO_INSTALL_ARGS", specs.cgo_inst_args, 2); send ("CARGO_FEATURES", specs.cgo_features, 2); send_options; send_targets; send_descriptions; send_file (distinfo); send_manifests; send_scripts; send_directory ("patches", "patch-*"); send_directory ("files", ""); for opsys in supported_opsys'Range loop send_directory (UTL.lower_opsys (opsys), ""); end loop; if write_to_file then TIO.Close (makefile_handle); end if; exception when issue : others => if TIO.Is_Open (makefile_handle) then TIO.Close (makefile_handle); end if; TIO.Put_Line ("PROBLEM: Buildsheet generation aborted"); TIO.Put_Line (EX.Exception_Information (issue)); end generator; -------------------------------------------------------------------------------------------- -- align24 -------------------------------------------------------------------------------------------- function align24 (payload : String) return String is len : Natural := payload'Length; begin if len < 8 then return payload & LAT.HT & LAT.HT & LAT.HT; elsif len < 16 then return payload & LAT.HT & LAT.HT; elsif len < 24 then return payload & LAT.HT; else return payload; end if; end align24; -------------------------------------------------------------------------------------------- -- align40 -------------------------------------------------------------------------------------------- function align40 (payload : String) return String is len : Natural := payload'Length; begin if len < 8 then return payload & LAT.HT & LAT.HT & LAT.HT & LAT.HT & LAT.HT; elsif len < 16 then return payload & LAT.HT & LAT.HT & LAT.HT & LAT.HT; elsif len < 24 then return payload & LAT.HT & LAT.HT & LAT.HT; elsif len < 32 then return payload & LAT.HT & LAT.HT; elsif len < 40 then return payload & LAT.HT; else return payload; end if; end align40; -------------------------------------------------------------------------------------------- -- print_specification_template -------------------------------------------------------------------------------------------- procedure print_specification_template (dump_to_file : Boolean) is tab : constant Character := LAT.HT; CR : constant Character := LAT.LF; part1 : constant String := "# DEF[PORTVERSION]=" & tab & "1.00" & CR & "# ----------------------------------------------------------------------------"; part2 : constant String := CR & "NAMEBASE=" & tab & tab & "..." & CR & "VERSION=" & tab & tab & "${PORTVERSION}" & CR & "KEYWORDS=" & tab & tab & "..." & CR & "VARIANTS=" & tab & tab & "standard" & CR & "SDESC[standard]=" & tab & "..." & CR & "HOMEPAGE=" & tab & tab & "none" & CR & "CONTACT=" & tab & tab & "Jay_Leno[[email protected]]" & CR & CR & "DOWNLOAD_GROUPS=" & tab & "main" & CR & "SITES[main]=" & tab & tab & "http://www.example.com/" & CR & "DISTFILE[1]=" & tab & tab & "x-${PORTVERSION}.tar.gz:main" & CR & CR & "SPKGS[standard]=" & tab & "single" & CR & CR & "OPTIONS_AVAILABLE=" & tab & "none" & CR & "OPTIONS_STANDARD=" & tab & "none" & CR & CR & "FPC_EQUIVALENT=" & tab & tab & "..."; template : TIO.File_Type; filename : constant String := "specification"; begin if dump_to_file then if DIR.Exists (filename) then TIO.Put_Line ("The " & filename & " file already exists. I wouldn't want to overwrite it!"); return; end if; TIO.Create (File => template, Mode => TIO.Out_File, Name => filename); TIO.Put_Line (template, part1); TIO.Put_Line (template, part2); TIO.Close (template); DIR.Create_Directory ("manifests"); DIR.Create_Directory ("descriptions"); else TIO.Put_Line (part1); TIO.Put_Line (part2); end if; exception when others => if TIO.Is_Open (template) then TIO.Close (template); end if; end print_specification_template; end Port_Specification.Buildsheet;
melwyncarlo/ProjectEuler
Ada
456
adb
with Ada.Long_Integer_Text_IO; -- Copyright 2021 Melwyn Francis Carlo procedure A015 is use Ada.Long_Integer_Text_IO; Input_Grid_Dimension : constant Integer := 20; Routes_N : Long_Float := 1.0; begin for I in 1 .. Input_Grid_Dimension loop Routes_N := Routes_N * (Long_Float (I + Input_Grid_Dimension) / Long_Float (I)); end loop; Put (Long_Integer (Long_Float'Ceiling (Routes_N)), Width => 0); end A015;
reznikmm/matreshka
Ada
9,470
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Lists; with Matreshka.DOM_Nodes.Attributes; with XML.DOM.Elements.Internals; with XML.DOM.Visitors; package body Matreshka.DOM_Nodes.Elements is ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access Abstract_Element; Visitor : in out Standard.XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out Standard.XML.DOM.Visitors.Traverse_Control) is begin Visitor.Enter_Element (Standard.XML.DOM.Elements.Internals.Create (Matreshka.DOM_Nodes.Element_Access (Self)), Control); end Enter_Element; -------------- -- Finalize -- -------------- overriding procedure Finalize (Self : not null access Abstract_Element) is Current : Matreshka.DOM_Nodes.Attribute_Access := Self.First_Attribute; begin while Current /= null loop Matreshka.DOM_Nodes.Dereference (Matreshka.DOM_Nodes.Node_Access (Current)); Current := Self.First_Attribute; end loop; Matreshka.DOM_Nodes.Finalize (Matreshka.DOM_Nodes.Abstract_Node (Self.all)'Access); end Finalize; ------------------------ -- Get_Attribute_Node -- ------------------------ function Get_Attribute_Node (Self : not null access constant Abstract_Element; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String) return Matreshka.DOM_Nodes.Attribute_Access is use type League.Strings.Universal_String; Attribute : Matreshka.DOM_Nodes.Attribute_Access := Self.First_Attribute; begin while Attribute /= null loop exit when Attribute.Get_Namespace_URI = Namespace_URI and Attribute.Get_Local_Name = Local_Name; Attribute := Matreshka.DOM_Nodes.Attribute_Access (Attribute.Next); end loop; return Attribute; end Get_Attribute_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Element_V1_Node) return League.Strings.Universal_String is begin -- It is always null for attributes created with a DOM Level 1 methods. return League.Strings.Empty_Universal_String; end Get_Local_Name; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Element_V2_Node) return League.Strings.Universal_String is begin return Self.Local_Name; end Get_Local_Name; ----------------------- -- Get_Namespace_URI -- ----------------------- overriding function Get_Namespace_URI (Self : not null access constant Element_V1_Node) return League.Strings.Universal_String is begin -- It is always null for attributes created with a DOM Level 1 methods. return League.Strings.Empty_Universal_String; end Get_Namespace_URI; ----------------------- -- Get_Namespace_URI -- ----------------------- overriding function Get_Namespace_URI (Self : not null access constant Element_V2_Node) return League.Strings.Universal_String is begin return Self.Namespace_URI; end Get_Namespace_URI; ---------------- -- Initialize -- ---------------- procedure Initialize (Self : not null access Element_V1_Node'Class; Document : not null Matreshka.DOM_Nodes.Document_Access; Name : League.Strings.Universal_String) is begin Matreshka.DOM_Nodes.Initialize (Self, Document); Self.Name := Name; end Initialize; ---------------- -- Initialize -- ---------------- procedure Initialize (Self : not null access Element_V2_Node'Class; Document : not null Matreshka.DOM_Nodes.Document_Access; Namespace_URI : League.Strings.Universal_String; Qualified_Name : League.Strings.Universal_String) is Delimiter : constant Natural := Qualified_Name.Index (':'); begin Matreshka.DOM_Nodes.Initialize (Self, Document); Self.Namespace_URI := Namespace_URI; if Delimiter /= 0 then Self.Local_Name := Qualified_Name.Slice (Delimiter + 1, Qualified_Name.Length); else Self.Local_Name := Qualified_Name; end if; end Initialize; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access Abstract_Element; Visitor : in out Standard.XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out Standard.XML.DOM.Visitors.Traverse_Control) is begin Visitor.Leave_Element (Standard.XML.DOM.Elements.Internals.Create (Matreshka.DOM_Nodes.Element_Access (Self)), Control); end Leave_Element; ------------------------ -- Set_Attribute_Node -- ------------------------ function Set_Attribute_Node (Self : in out Abstract_Element'Class; Attr : Matreshka.DOM_Nodes.Attribute_Access) return Matreshka.DOM_Nodes.Attribute_Access is use type Matreshka.DOM_Nodes.Node_Access; -- Current : Matreshka.XML.DOM_Nodes.Node_Access := Self.First_Attribute; begin -- while Current /= null loop -- Current := Current.Next; -- end loop; Matreshka.DOM_Lists.Append_Attribute_Node (Self'Unchecked_Access, Attr); return null; end Set_Attribute_Node; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access Abstract_Element; Iterator : in out Standard.XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out Standard.XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out Standard.XML.DOM.Visitors.Traverse_Control) is begin Iterator.Visit_Element (Visitor, Standard.XML.DOM.Elements.Internals.Create (Matreshka.DOM_Nodes.Element_Access (Self)), Control); end Visit_Element; end Matreshka.DOM_Nodes.Elements;
AaronC98/PlaneSystem
Ada
16,548
ads
------------------------------------------------------------------------------ -- Ada Web Server -- -- -- -- Copyright (C) 2000-2017, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify -- -- it under terms of the GNU General Public License as published by the -- -- Free Software Foundation; either version 3, or (at your option) any -- -- later version. This library is distributed in the hope that it will be -- -- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ------------------------------------------------------------------------------ pragma Ada_2012; -- This package is used to keep the HTTP protocol status. Client can then -- request the status for various values like the requested URI, the -- Content_Length and the Session ID for example. with Ada.Calendar; with Ada.Real_Time; with Ada.Streams; with Ada.Strings.Unbounded; with AWS.Attachments; with AWS.Headers; with AWS.Messages; with AWS.Net; with AWS.Parameters; with AWS.Session; with AWS.URL; private with AWS.Resources.Streams.Memory; private with GNAT.SHA256; package AWS.Status is use Ada; use Ada.Streams; use Ada.Strings.Unbounded; type Data is private; type Request_Method is (OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, EXTENSION_METHOD); -- EXTENSION_METHOD indicates that a method is an extension-method, -- ie none of the eight method tokens predefined in the RFC 2616. type Authorization_Type is (None, Basic, Digest); ------------------ -- Request-Line -- ------------------ function Method (D : Data) return Request_Method with Inline; -- Returns the request method function Method (D : Data) return String with Inline; -- Returns the request method as a String. Useful to get the method String -- for an extension-method, ie a method that is not already predefined -- in the RFC 2616. function URI (D : Data) return String with Inline; -- Returns the requested resource function URI (D : Data) return URL.Object with Inline; -- As above but return an URL object function URL (D : Data) return String with Inline; -- Returns the requested URL function Parameters (D : Data) return Parameters.List with Inline; -- Returns the list of parameters for the request. This list can be empty -- if there was no form or URL parameters. function Parameter (D : Data; Name : String; N : Positive := 1) return String with Inline; function HTTP_Version (D : Data) return String with Inline; -- Returns the HTTP version used by the client function Request_Time (D : Data) return Calendar.Time with Inline; -- Returns the time of the request function Request_Time (D : Data) return Real_Time.Time with Inline; ------------ -- Header -- ------------ function Header (D : Data) return Headers.List with Inline; -- Returns the list of header lines for the request function Accept_Encoding (D : Data) return String with Inline; -- Get the value for "Accept-Encoding:" header function Connection (D : Data) return String with Inline; -- Get the value for "Connection:" header function Content_Length (D : Data) return Stream_Element_Count with Inline; -- Get the value for "Content-Length:" header, this is the number of -- bytes in the message body. function Content_Type (D : Data) return String with Inline; -- Get value for "Content-Type:" header function Transfer_Encoding (D : Data) return String with Inline; -- Get value for "Transfer-Encoding:" header function Expect (D : Data) return String with Inline; -- Get value for "Expect:" header function Host (D : Data) return String with Inline; -- Get value for "Host:" header function If_Modified_Since (D : Data) return String with Inline; -- Get value for "If-Modified-Since:" header function Keep_Alive (D : Data) return Boolean with Inline; -- Returns the flag if the current HTTP connection is keep-alive function User_Agent (D : Data) return String with Inline; -- Get value for "User-Agent:" header function Referer (D : Data) return String with Inline; -- Get value for "Referer:" header function Cache_Control (D : Data) return Messages.Cache_Option with Inline; -- Get value for "Cache-Control:" header function Cache_Control (D : Data) return Messages.Cache_Data with Inline; -- Returns the cache control data specified for the request function Is_Supported (D : Data; Encoding : Messages.Content_Encoding) return Boolean; -- Returns True if the content encoding scheme is supported by the client function Preferred_Coding (D : Data) return Messages.Content_Encoding; -- Returns supported by AWS coding preferred by client from the -- Accept-Coding header. function Upgrade (D : Data) return String with Inline; -- Get value for "Upgrade:" header function Sec_WebSocket_Key (D : Data) return String with Inline; -- Get value for "Sec-WebSocket-Key:" header ------------------------------------------- -- Cross-Origin Resource Sharing Headers -- ------------------------------------------- function Origin (D : Data) return String with Inline; -- Get value for "Origin:" header function Access_Control_Request_Headers (D : Data) return String with Inline; -- Get value for "Access-Control-Request-Headers:" header function Access_Control_Request_Method (D : Data) return String with Inline; -- Get value for "Access-Control-Request-Method:" header ---------------- -- Connection -- ---------------- function Peername (D : Data) return String with Inline; -- Returns the address of the peer (the IP address of the client computer) function Socket (D : Data) return Net.Socket_Type'Class with Inline; -- Returns the socket used to transfer data between the client and -- server. function Socket (D : Data) return Net.Socket_Access with Inline; -- Returns the socket used to transfer data between the client and -- server. Use Socket_Access to avoid memory allocation if we would need -- socket access further. ---------- -- Data -- ---------- function Is_Body_Uploaded (D : Data) return Boolean with Inline; -- Returns True if the message body has been uploaded and False if not. -- The reason being that the body size is above Upload_Size_Limit. -- User can upload the file using AWS.Server.Get_Message_Body, the size -- being returned by Content_Length. function Multipart_Boundary (D : Data) return String with Inline; -- Get value for the boundary part in "Content-Type: ...; boundary=..." -- parameter. This is a string that will be used to separate each chunk of -- data in a multipart message. function Binary_Data (D : Data) return Stream_Element_Array with Inline; -- Returns the binary data message content. -- Note that only the root part of a multipart/related message is returned. function Binary_Data (D : Data) return Unbounded_String; -- Returns the binary data message content in a Unbounded_String -- Note that only the root part of a multipart/related message is returned. function Binary_Size (D : Data) return Stream_Element_Offset with Inline; -- Returns size of the binary data message content procedure Reset_Body_Index (D : Data) with Inline; -- Reset message body read position to the start procedure Read_Body (D : Data; Buffer : out Stream_Element_Array; Last : out Stream_Element_Offset) with Inline; -- Read a chunk of data from message body and put them into Buffer. -- Last is the index of the last item returned in Buffer. function End_Of_Body (D : Data) return Boolean with Inline; -- Returns true if there is no more data to read from the message body ----------------- -- Attachments -- ----------------- function Attachments (D : Data) return AWS.Attachments.List with Inline; -- Returns the list of Attachments for the request ------------- -- Session -- ------------- function Has_Session (D : Data) return Boolean with Inline; -- Returns true if a session ID has been received function Session_Private (D : Data) return String with Inline; -- Returns the private Session ID for the request. Raises Constraint_Error -- if server's session support not activated. function Session (D : Data) return Session.Id with Inline; -- Returns the Session ID for the request. Raises Constraint_Error if -- server's session support not activated. function Session_Created (D : Data) return Boolean; -- Returns True if session was just created and is going to be sent to -- client. function Session_Timed_Out (D : Data) return Boolean; -- Returns True if a previous session was timeout (even if a new session -- has been created). ---------- -- SOAP -- ---------- function Is_SOAP (D : Data) return Boolean with Inline; -- Returns True if it is a SOAP request. In this case SOAPAction return -- the SOAPAction header and Payload returns the XML SOAP Payload message. function SOAPAction (D : Data) return String with Inline; -- Get value for "SOAPAction:" parameter. This is a standard header to -- support SOAP over HTTP protocol. function Payload (D : Data) return String with Inline; -- Returns the XML Payload message. XML payload is the actual SOAP -- request. This is the root part of multipart/related SOAP message. function Payload (D : Data) return Unbounded_String; -- Returns the XML Payload message. XML payload is the actual SOAP -- request. This is the root part of multipart/related SOAP message. ----------- -- HTTPS -- ----------- function Check_Digest (D : Data; Password : String) return Messages.Status_Code; -- This function is used by the digest authentication to check if the -- client password and authentication parameters are correct. -- The password is not transferred between the client and the server, -- the server check that the client knows the right password using the -- MD5 checksum. -- Returns Messages.S200 in case of successful authentication, -- Messages.S400 in case of wrong authentication request -- (RFC 2617 3.2.2, 3.2.2.5), -- and Messages.S401 in case of authentication error. function Check_Digest (D : Data; Password : String) return Boolean; -- The same as above, but do not distinguish wrong requests and -- authentication errors. function Authorization_Mode (D : Data) return Authorization_Type with Inline; -- Returns the type of the "Authorization:" parameter function Authorization_Name (D : Data) return String with Inline; -- Returns "username" value in the "Authorization:" parameter function Authorization_URI (D : Data) return String with Inline; -- Returns "uri" value in the "Authorization:" parameter -- Note, it could differ from HTTP URI field, for example Mozilla browser -- places http parameters to the authorization uri field. function Authorization_Password (D : Data) return String with Inline; -- Returns "password" value in the "Authorization:" parameter function Authorization_Realm (D : Data) return String with Inline; -- Returns "realm" value in the "Authorization:" parameter function Authorization_Nonce (D : Data) return String with Inline; -- Returns "nonce" value in the "Authorization:" parameter function Authorization_NC (D : Data) return String with Inline; -- Returns "nc" value in the "Authorization:" parameter function Authorization_CNonce (D : Data) return String with Inline; -- Returns "cnonce" value in the "Authorization:" parameter function Authorization_QOP (D : Data) return String with Inline; -- Retruns "qop" value in the "Authorization:" parameter function Authorization_Response (D : Data) return String with Inline; -- Returns "response" value in the "Authorization:" parameter function Authorization_Tail (D : Data) return String with Inline; -- Returns precalculated part of digest composed of -- Nonce, NC, CNonce, QOP, Method, URI authorization fields. -- To build a full authorization response you can use: -- -- MD5.Digest -- (MD5.Digest (Username & ':' & Realm & ':' & Password) -- & Authorization_Tail); -- -- This method can be used to avoid sending a password over the network. private use GNAT; type Memory_Stream_Access is access Resources.Streams.Memory.Stream_Type'Class; No_Session_Private : constant SHA256.Message_Digest := (others => ASCII.NUL); type Data is record -- Connection info Socket : Net.Socket_Access; Peername : Unbounded_String; -- Request Header : Headers.List; Query : Unbounded_String; Method : Request_Method := GET; Method_String : Unbounded_String; HTTP_Version : Unbounded_String; URI : aliased AWS.URL.Object; Calendar_Time : Calendar.Time; Monotonic_Time : Real_Time.Time; Binary_Data : Memory_Stream_Access; Uploaded : Boolean := False; Content_Length : Stream_Element_Count := 0; Keep_Alive : Boolean; File_Up_To_Date : Boolean := False; Attachments : AWS.Attachments.List; -- SOAP SOAP_Action : Boolean := False; -- True if SOAPAction is set in the header list -- Authentication Auth_Mode : Authorization_Type := None; Auth_Name : Unbounded_String; -- for Basic and Digest Auth_Password : Unbounded_String; -- for Basic Auth_Realm : Unbounded_String; -- for Digest Auth_Nonce : Unbounded_String; -- for Digest Auth_NC : Unbounded_String; -- for Digest Auth_CNonce : Unbounded_String; -- for Digest Auth_QOP : Unbounded_String; -- for Digest Auth_URI : Unbounded_String; -- for Digest Auth_Response : Unbounded_String; -- for Digest -- Session Session_Id : AWS.Session.Id := AWS.Session.No_Session; Session_Private : SHA256.Message_Digest := No_Session_Private; Session_Created : Boolean := False; Session_Timed_Out : Boolean := False; end record; end AWS.Status;
RREE/ada-util
Ada
2,542
ads
----------------------------------------------------------------------- -- Util.Beans.Objects.Lists -- List bean holding some object -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Beans.Objects; with Util.Beans.Objects.Vectors; with Util.Beans.Basic; package Util.Beans.Objects.Lists is -- The list of elements is defined in a public part so that applications -- can easily add or remove elements in the target list. The <b>List_Bean</b> -- type holds the real implementation with the private parts. type Abstract_List_Bean is abstract new Util.Beans.Basic.List_Bean with record List : aliased Vectors.Vector; end record; -- ------------------------------ -- List of objects -- ------------------------------ -- The <b>List_Bean</b> type gives access to a list of objects. type List_Bean is new Abstract_List_Bean with private; type List_Bean_Access is access all List_Bean'Class; -- Get the number of elements in the list. overriding function Get_Count (From : in List_Bean) return Natural; -- Set the current row index. Valid row indexes start at 1. overriding procedure Set_Row_Index (From : in out List_Bean; Index : in Natural); -- Get the element at the current row index. overriding function Get_Row (From : in List_Bean) return Util.Beans.Objects.Object; -- Get the value identified by the name. -- If the name cannot be found, the method should return the Null object. overriding function Get_Value (From : in List_Bean; Name : in String) return Util.Beans.Objects.Object; private type List_Bean is new Abstract_List_Bean with record Current : Natural := 0; end record; end Util.Beans.Objects.Lists;
persan/AdaYaml
Ada
271
ads
-- part of AdaYaml, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "copying.txt" with Yaml.Stream_Concept; package Yaml.Events.Queue.Stream is new Stream_Concept (Stream_Instance, Stream_Reference, Stream_Accessor, Value, Next);
glencornell/ada-socketcan
Ada
2,735
adb
-- MIT License -- -- Copyright (c) 2021 Glen Cornell <[email protected]> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. with Ada.Strings.Fixed; with Ada.Text_Io; with Interfaces; --------------------- -- Print_Can_Frame -- --------------------- procedure Print_Can_Frame (Frame : in Sockets.Can_Frame.Can_Frame; Prefix : in String := "") is package Can_Id_Io is new Ada.Text_Io.Modular_Io (Sockets.Can_Frame.Can_Id_Type); package Can_Data_Io is new Ada.Text_Io.Modular_Io (Interfaces.Unsigned_8); -- Modular_Io.Put (wth a non-decimal base) is represented as -- "base#value#". This function strips away all characters -- (including whitespace) away from the value. Not very -- efficient, but this is printing out stuff... function Strip (S : String) return String is S1 : constant String := Ada.Strings.Fixed.Trim(S, Ada.Strings.Both); Start : constant Integer := Ada.Strings.Fixed.Index (S1, "#") + 1; begin return S1(Start .. S1'Last - 1); end Strip; S : String (1 .. 80); begin -- Print the prefix (if exists): if Prefix'Length > 0 then Ada.Text_Io.Put (Prefix & " "); end if; -- Print the can ID: Can_Id_Io.Put (S, Frame.Can_Id, 16); Ada.Text_Io.Put (Strip(S)); -- Print the number of bytes in the payload Ada.Text_Io.Put (" ["); Ada.Text_Io.Put (Ada.Strings.Fixed.Trim(Frame.Can_Dlc'Image, Ada.Strings.Both)); Ada.Text_Io.Put ("]"); -- Print the payload in hex for I in Frame.Data'First .. Frame.Can_Dlc loop Ada.Text_Io.Put (" "); Can_Data_Io.Put (S, Frame.Data(I), 16); Ada.Text_Io.Put (Strip(S)); end loop; Ada.Text_Io.New_Line; end Print_Can_Frame;
faelys/natools
Ada
2,014
ads
------------------------------------------------------------------------------ -- Copyright (c) 2016, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Natools.Smaz.Tools.GNAT gather tools to handle Smaz diction aries that -- -- depend so heavily on GNAT that they cannot be considered portable. -- ------------------------------------------------------------------------------ package Natools.Smaz.Tools.GNAT is procedure Build_Perfect_Hash (List : in String_Lists.List; Package_Name : in String) with Pre => (for all S of List => S'First = 1); -- Generate a static hash function that can be used with a dictionary -- built from List, using GNAT.Perfect_Hash_Generators. -- The precondition reflects an assumption made by -- GNAT.Perfect_Hash_Generators but not enforced, -- which leads to nasty bugs. end Natools.Smaz.Tools.GNAT;
reznikmm/matreshka
Ada
4,005
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2015, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); -- GNAT: enforce generation of preinitialized data section instead of -- generation of elaboration code. package Matreshka.Internals.Unicode.Ucd.Core_01FF is pragma Preelaborate; Group_01FF : aliased constant Core_Second_Stage := (16#FE# .. 16#FF# => -- 01FFFE .. 01FFFF (Unassigned, Neutral, Other, Other, Other, Unknown, (Noncharacter_Code_Point => True, others => False)), others => (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False))); end Matreshka.Internals.Unicode.Ucd.Core_01FF;
charlie5/lace
Ada
6,872
adb
with lace.Strings.fixed, ada.Characters.handling, ada.Strings.Hash; package body lace.Text is --------------- -- Construction -- function to_Text (From : in String; Trim : in Boolean := False) return Item is begin return to_Text (From, Capacity => From'Length, Trim => Trim); end to_Text; function to_Text (From : in String; Capacity : in Natural; Trim : in Boolean := False) return Item is the_String : constant String := (if Trim then lace.Strings.fixed.Trim (From, ada.Strings.Both) else From); Self : Item (Capacity); begin Self.Length := the_String'Length; Self.Data (1 .. Self.Length) := the_String; return Self; end to_Text; function "+" (From : in String) return Item is begin return to_Text (From); end "+"; ------------- -- Attributes -- procedure String_is (Self : in out Item; Now : in String) is begin Self.Data (1 .. Now'Length) := Now; Self.Length := Now'Length; end String_is; function to_String (Self : in Item) return String is begin return Self.Data (1 .. Self.Length); end to_String; function is_Empty (Self : in Item) return Boolean is begin return Self.Length = 0; end is_Empty; function Length (Self : in Item) return Natural is begin return Self.Length; end Length; function Image (Self : in Item) return String is begin return "(Capacity =>" & Self.Capacity'Image & "," & " Length =>" & Self.Length 'Image & "," & " Data => '" & to_String (Self) & "')"; end Image; function Hashed (Self : in Item) return ada.Containers.Hash_type is begin return ada.strings.Hash (Self.Data (1 .. Self.Length)); end Hashed; overriding function "=" (Left, Right : in Item) return Boolean is begin if Left.Length /= Right.Length then return False; end if; return to_String (Left) = to_String (Right); end "="; function to_Lowercase (Self : in Item) return Item is use ada.Characters.handling; Result : Item := Self; begin for i in 1 .. Self.Length loop Result.Data (i) := to_Lower (Self.Data (i)); end loop; return Result; end to_Lowercase; function mono_Spaced (Self : in Item) return Item is Result : Item (Self.Capacity); Prior : Character := 'a'; Length : Natural := 0; begin for i in 1 .. Self.Length loop if Self.Data (i) = ' ' and Prior = ' ' then null; else Length := Length + 1; Result.Data (Length) := Self.Data (i); Prior := Self.Data (i); end if; end loop; Result.Length := Length; return Result; end mono_Spaced; function Element (Self : in Item; Index : in Positive) return Character is begin if Index > Self.Length then raise Error with "Index" & Index'Image & " exceeds length of" & Self.Length'Image; end if; return Self.Data (Index); end Element; procedure append (Self : in out Item; Extra : in String) is First : constant Positive := Self.Length + 1; Last : constant Positive := First + Extra'Length - 1; begin Self.Length := Last; Self.Data (First .. Last) := Extra; exception when constraint_Error => raise Error with "Appending '" & Extra & "' to '" & to_String (Self) & "' exceeds capacity of" & Self.Capacity'Image & "."; end append; function delete (Self : in Text.item; From : Positive; Through : Natural := Natural'Last) return Text.item is Result : Text.item (Self.Capacity); begin delete (Result, From, Through); return Result; end delete; procedure delete (Self : in out Text.item; From : Positive; Through : Natural := Natural'Last) is Thru : constant Natural := Natural'Min (Through, Self.Length); Tail : constant String := Self.Data (Thru + 1 .. Self.Length); begin Self.Data (From .. From + Tail'Length - 1) := Tail; Self.Length := Self.Length - (Natural'Min (Thru, Self.Length) - From + 1); end delete; -- procedure delete (Self : in out Text.item; From : Positive; -- Through : Natural := Natural'Last) -- is -- Thru : constant Natural := Natural'Min (Through, Self.Length) -- Tail : constant String := Self.Data (Through + 1 .. Self.Length); -- begin -- Self.Data (From .. From + Tail'Length - 1) := Tail; -- Self.Length := Self.Length -- - (Natural'Min (Through, -- Self.Length) - From + 1); -- end delete; ---------- -- Streams -- function Item_input (Stream : access ada.Streams.root_Stream_type'Class) return Item is Capacity : Positive; Length : Natural; begin Positive'read (Stream, Capacity); Natural 'read (Stream, Length); declare Data : String (1 .. Capacity); begin String'read (Stream, Data (1 .. Length)); return (Capacity => Capacity, Data => Data, Length => Length); end; end Item_input; procedure Item_output (Stream : access ada.Streams.root_Stream_type'Class; the_Item : in Item) is begin Positive'write (Stream, the_Item.Capacity); Natural 'write (Stream, the_Item.Length); String 'write (Stream, the_Item.Data (1 .. the_Item.Length)); end Item_output; procedure Write (Stream : access ada.Streams.root_Stream_type'Class; Self : in Item) is begin Natural'write (Stream, Self.Length); String 'write (Stream, Self.Data (1 .. Self.Length)); end Write; procedure Read (Stream : access ada.Streams.root_Stream_type'Class; Self : out Item) is begin Natural'read (Stream, Self.Length); String 'read (Stream, Self.Data (1 .. Self.Length)); end Read; end lace.Text;
faelys/natools
Ada
2,410
ads
-- Generated at 2017-06-17 18:23:38 +0000 by Natools.Static_Hash_Maps -- from src/natools-s_expressions-conditionals-strings-maps.sx package Natools.Static_Maps.S_Expressions.Conditionals.Strings is pragma Pure; type Parametric_Condition is (Unknown_Parametric_Condition, Case_Insensitive, Case_Sensitive, Contains_All, Contains_Any, Is_Equal_To, Starts_With); type Simple_Condition is (Unknown_Simple_Condition, Is_ASCII, Is_Empty); function To_Parametric (Key : String) return Parametric_Condition; function To_Simple (Key : String) return Simple_Condition; private Map_1_Key_0 : aliased constant String := "case-insensitive"; Map_1_Key_1 : aliased constant String := "case-sensitive"; Map_1_Key_2 : aliased constant String := "contains"; Map_1_Key_3 : aliased constant String := "contains-all"; Map_1_Key_4 : aliased constant String := "contains-all-of"; Map_1_Key_5 : aliased constant String := "contains-any"; Map_1_Key_6 : aliased constant String := "contains-any-of"; Map_1_Key_7 : aliased constant String := "is"; Map_1_Key_8 : aliased constant String := "is-equal-to"; Map_1_Key_9 : aliased constant String := "="; Map_1_Key_10 : aliased constant String := "starts-with"; Map_1_Keys : constant array (0 .. 10) of access constant String := (Map_1_Key_0'Access, Map_1_Key_1'Access, Map_1_Key_2'Access, Map_1_Key_3'Access, Map_1_Key_4'Access, Map_1_Key_5'Access, Map_1_Key_6'Access, Map_1_Key_7'Access, Map_1_Key_8'Access, Map_1_Key_9'Access, Map_1_Key_10'Access); Map_1_Elements : constant array (0 .. 10) of Parametric_Condition := (Case_Insensitive, Case_Sensitive, Contains_All, Contains_All, Contains_All, Contains_Any, Contains_Any, Is_Equal_To, Is_Equal_To, Is_Equal_To, Starts_With); Map_2_Key_0 : aliased constant String := "is-ascii"; Map_2_Key_1 : aliased constant String := "is-empty"; Map_2_Keys : constant array (0 .. 1) of access constant String := (Map_2_Key_0'Access, Map_2_Key_1'Access); Map_2_Elements : constant array (0 .. 1) of Simple_Condition := (Is_ASCII, Is_Empty); end Natools.Static_Maps.S_Expressions.Conditionals.Strings;
ohenley/awt
Ada
1,610
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2021 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Ada.Streams; with Wayland; with AWT.Inputs; private with C_Binding; private package AWT.OS is pragma Preelaborate; subtype Unsigned_32 is Standard.Wayland.Unsigned_32; function Code_To_Button (Code : Unsigned_32) return AWT.Inputs.Pointer_Button; function Code_To_Button (Code : Unsigned_32) return AWT.Inputs.Keyboard_Button; type Pipe is record Read, Write : Standard.Wayland.File_Descriptor; end record; procedure Create_Pipe (Result : out Pipe); type File (File_Descriptor : Standard.Wayland.File_Descriptor) is tagged limited private; function Read (Object : in out File) return Ada.Streams.Stream_Element_Array; procedure Write (Object : in out File; Value : String); procedure Close (Object : in out File); private type File (File_Descriptor : Standard.Wayland.File_Descriptor) is tagged limited record Handle : C_Binding.File (File_Descriptor); end record; end AWT.OS;
ekoeppen/MSP430_Generic_Ada_Drivers
Ada
200
adb
with MSPGD.Board; use MSPGD.Board; procedure Main is pragma Preelaborate; begin Init; loop if BUTTON.Is_Set then LED_GREEN.Set; else LED_GREEN.Clear; end if; end loop; end Main;
AdaCore/Ada_Drivers_Library
Ada
9,332
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of STMicroelectronics nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- -- -- -- This file is based on: -- -- -- -- @file stm32f429i_discovery.h -- -- @author MCD Application Team -- -- @version V1.1.0 -- -- @date 19-June-2014 -- -- @brief This file contains definitions for STM32F429I-Discovery Kit -- -- LEDs, push-buttons hardware resources. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ -- This file provides declarations for devices on the STM32F429 Discovery kits -- manufactured by ST Microelectronics. with STM32.Device; use STM32.Device; with STM32.GPIO; use STM32.GPIO; with STM32.SPI; use STM32.SPI; with STM32.FMC; use STM32.FMC; with L3GD20; with Framebuffer_ILI9341; with Touch_Panel_STMPE811; with Ada.Interrupts.Names; use Ada.Interrupts; package STM32.Board is pragma Elaborate_Body; ---------- -- LEDs -- ---------- subtype User_LED is GPIO_Point; Green_LED : User_LED renames PG13; Red_LED : User_LED renames PG14; LCH_LED : User_LED renames Red_LED; All_LEDs : GPIO_Points := Green_LED & Red_LED; procedure Initialize_LEDs; -- MUST be called prior to any use of the LEDs unless initialization is -- done by the app elsewhere. procedure Turn_On (This : in out User_LED) renames STM32.GPIO.Set; procedure Turn_Off (This : in out User_LED) renames STM32.GPIO.Clear; procedure Toggle (This : in out User_LED) renames STM32.GPIO.Toggle; procedure All_LEDs_Off with Inline; procedure All_LEDs_On with Inline; procedure Toggle_LEDs (These : in out GPIO_Points) renames STM32.GPIO.Toggle; --------- -- FMC -- --------- FMC_D : constant GPIO_Points := (PD14, PD15, PD0, PD1, PE7, PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PD8, PD9, PD10); FMC_A : constant GPIO_Points := (PF0, PF1, PF2, PF3, PF4, PF5, PF12, PF13, PF14, PF15, PG0, PG1); FMC_SDNWE : GPIO_Point renames PC0; FMC_SDNRAS : GPIO_Point renames PF11; FMC_SDNCAS : GPIO_Point renames PG15; FMC_SDCLK : GPIO_Point renames PG8; FMC_BA0 : GPIO_Point renames PG4; FMC_BA1 : GPIO_Point renames PG5; FMC_NBL0 : GPIO_Point renames PE0; FMC_NBL1 : GPIO_Point renames PE1; FMC_SDNE1 : GPIO_Point renames PB6; FMC_SDCKE1 : GPIO_Point renames PB5; SDRAM_PINS : constant GPIO_Points := FMC_A & FMC_D & FMC_SDNWE & FMC_SDNRAS & FMC_SDNCAS & FMC_SDCLK & FMC_BA0 & FMC_BA1 & FMC_SDNE1 & FMC_SDCKE1 & FMC_NBL0 & FMC_NBL1; -- SDRAM CONFIGURATION Parameters SDRAM_Base : constant := 16#D0000000#; SDRAM_Size : constant := 16#800000#; SDRAM_Bank : constant STM32.FMC.FMC_SDRAM_Cmd_Target_Bank := STM32.FMC.FMC_Bank2_SDRAM; SDRAM_Row_Bits : constant STM32.FMC.FMC_SDRAM_Row_Address_Bits := STM32.FMC.FMC_RowBits_Number_12b; SDRAM_Mem_Width : constant STM32.FMC.FMC_SDRAM_Memory_Bus_Width := STM32.FMC.FMC_SDMemory_Width_16b; SDRAM_CAS_Latency : constant STM32.FMC.FMC_SDRAM_CAS_Latency := STM32.FMC.FMC_CAS_Latency_3; SDRAM_CLOCK_Period : constant STM32.FMC.FMC_SDRAM_Clock_Configuration := STM32.FMC.FMC_SDClock_Period_2; SDRAM_Read_Burst : constant STM32.FMC.FMC_SDRAM_Burst_Read := STM32.FMC.FMC_Read_Burst_Disable; SDRAM_Read_Pipe : constant STM32.FMC.FMC_SDRAM_Read_Pipe_Delay := STM32.FMC.FMC_ReadPipe_Delay_1; SDRAM_Refresh_Cnt : constant := 1386; SDRAM_Min_Delay_In_ns : constant := 70; --------------- -- SPI5 Pins -- --------------- -- Required for the gyro and LCD so defined here SPI5_SCK : GPIO_Point renames PF7; SPI5_MISO : GPIO_Point renames PF8; SPI5_MOSI : GPIO_Point renames PF9; NCS_MEMS_SPI : GPIO_Point renames PC1; MEMS_INT1 : GPIO_Point renames PA1; MEMS_INT2 : GPIO_Point renames PA2; ------------------------- -- LCD and Touch Panel -- ------------------------- LCD_SPI : SPI_Port renames SPI_5; -- See the STM32F429I-Discovery board schematics for the actual pin -- assignments -- RGB connection LCD_VSYNC : GPIO_Point renames PA4; LCD_HSYNC : GPIO_Point renames PC6; LCD_ENABLE : GPIO_Point renames PF10; LCD_CLK : GPIO_Point renames PG7; -- See the STM32F427xx/STM32F429xx datasheet for the aleternate function -- mapping. LCD_RGB_AF9 : constant GPIO_Points := (PB0, PB1, PG10, PG12); LCD_RGB_AF14 : constant GPIO_Points := (PC10, PA11, PA12, PG6, PA6, PB10, PB11, PC7, PD3, PD6, PG11, PA3, PB8, PB9); LCD_PINS : constant GPIO_Points := LCD_RGB_AF14 & LCD_RGB_AF9 & LCD_VSYNC & LCD_HSYNC & LCD_ENABLE & LCD_CLK; LCD_Natural_Width : constant := 240; LCD_Natural_Height : constant := 320; Display : Framebuffer_ILI9341.Frame_Buffer; Touch_Panel : Touch_Panel_STMPE811.Touch_Panel; ----------------- -- User button -- ----------------- User_Button_Point : GPIO_Point renames PA0; User_Button_Interrupt : constant Interrupt_ID := Names.EXTI0_Interrupt; procedure Configure_User_Button_GPIO; -- Configures the GPIO port/pin for the blue user button. Sufficient -- for polling the button, and necessary for having the button generate -- interrupts. ---------- -- Gyro -- ---------- Gyro_SPI : SPI_Port renames LCD_SPI; -- The gyro and LCD use the same port and pins. See the STM32F429 Discovery -- kit User Manual (UM1670) pages 21 and 23. Gyro_Interrupt_1_Pin : GPIO_Point renames MEMS_INT1; Gyro_Interrupt_2_Pin : GPIO_Point renames MEMS_INT2; -- Theese are the GPIO pins on which the gyro generates interrupts if so -- commanded. The gyro package does not references these, only clients' -- interrupt handlers do. Gyro : L3GD20.Three_Axis_Gyroscope; procedure Initialize_Gyro_IO; -- This is a board-specific routine. It initializes and configures the -- GPIO, SPI, etc. for the on-board L3GD20 gyro as required for the F429 -- Disco board. See the STM32F429 Discovery kit User Manual (UM1670) for -- specifics. end STM32.Board;
reznikmm/matreshka
Ada
5,252
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Testsuite Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- Checks whether type of property is not null when it imported from another -- metamodel and critical error was encountered when one of XMI document is -- loaded. ------------------------------------------------------------------------------ with League.Application; with AMF.Facility; with AMF.UML.Properties; with AMF.UML.Types; with AMF.URI_Stores; with AMF.Visitors.UML_Visitors; with AMF.Visitors.UML_Containment; with XMI.Reader; with AMF.Internals.Modules.MOFEXT_Module; pragma Unreferenced (AMF.Internals.Modules.MOFEXT_Module); with AMF.Internals.Modules.UML_Module; pragma Unreferenced (AMF.Internals.Modules.UML_Module); procedure Test_226 is type Test_226_Visitor is limited new AMF.Visitors.UML_Visitors.UML_Visitor with record Found : Boolean := False; end record; overriding procedure Enter_Property (Self : in out Test_226_Visitor; Element : not null AMF.UML.Properties.UML_Property_Access; Control : in out AMF.Visitors.Traverse_Control); -------------------- -- Enter_Property -- -------------------- overriding procedure Enter_Property (Self : in out Test_226_Visitor; Element : not null AMF.UML.Properties.UML_Property_Access; Control : in out AMF.Visitors.Traverse_Control) is use type AMF.UML.Types.UML_Type_Access; The_Type : constant AMF.UML.Types.UML_Type_Access := Element.Get_Type; begin Self.Found := True; if The_Type = null then raise Program_Error; end if; end Enter_Property; Store : AMF.URI_Stores.URI_Store_Access; Iterator : AMF.Visitors.UML_Containment.UML_Containment_Iterator; Test : Test_226_Visitor; begin AMF.Facility.Initialize; Store := XMI.Reader.Read_URI (League.Application.Arguments.Element (1)); Iterator.Visit (Test, Store); if not Test.Found then raise Program_Error; end if; end Test_226;
RREE/ada-util
Ada
1,070
ads
----------------------------------------------------------------------- -- util-http-clients-curl-tests -- HTTP unit tests for CURL implementation -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Http.Clients.Curl; with Util.Http.Clients.Tests; package Util.Http.Clients.Curl.Tests is new Util.Http.Clients.Tests.Http_Tests (Util.Http.Clients.Curl.Register, "curl");
esbullington/aflex
Ada
15,172
adb
-- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by John Self of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and this paragraph are -- duplicated in all such forms and that any documentation, -- advertising materials, and other materials related to such -- distribution and use acknowledge that the software was developed -- by the University of California, Irvine. The name of the -- University may not be used to endorse or promote products derived -- from this software without specific prior written permission. -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- TITLE skeleton manager -- AUTHOR: John Self (UCI) -- DESCRIPTION outputs skeleton sections when called by gen. -- NOTES allows use of internal or external skeleton -- $Header: /dc/uc/self/arcadia/aflex/ada/src/RCS/skeleton_managerB.a,v 1.19 1992/12/29 22:46:15 self Exp self $ with MISC_DEFS, Text_IO, FILE_STRING; package body SKELETON_MANAGER is use FILE_STRING; -- to save having to type FILE_STRING 177 times USE_EXTERNAL_SKELETON : BOOLEAN := FALSE; -- are we using an external skelfile? CURRENT_LINE : INTEGER := 1; type FILE_ARRAY is array(POSITIVE range <>) of FILE_STRING.VSTRING; SKEL_TEMPLATE : access FILE_ARRAY; procedure Initialize (Use_Text_IO : in Boolean) is function Get_Text_IO return String is begin if Use_Text_IO then return "with Text_IO; use Text_IO;"; else return ""; end if; end Get_Text_IO; begin SKEL_TEMPLATE := new FILE_ARRAY '( -- START OF SKELETON -- START OF S1 VSTR("-- Warning: This lexical scanner is automatically generated by AFLEX."), VSTR("-- It is useless to modify it. Change the "".Y"" & "".L"" files instead."), VSTR(Get_Text_IO), VSTR("%% user's code up to the double pound goes right here"), -- BEGIN S2 VSTR(" function YYLex return Token is"), VSTR(" subtype Short is Integer range -32768 .. 32767;"), VSTR(" yy_act : Integer;"), VSTR(" yy_c : Short;"), VSTR(""), VSTR(" -- returned upon end-of-file"), VSTR(" YY_END_TOK : constant Integer := 0;"), VSTR("%% tables get generated here."), -- BEGIN S3 VSTR(""), VSTR(" -- copy whatever the last rule matched to the standard output"), VSTR(""), VSTR("-- ECHO CODES :"), VSTR(" procedure ECHO is"), VSTR(" begin"), VSTR(" if Text_IO.Is_Open (user_output_file) then"), VSTR(" Text_IO.Put (user_output_file, YYText);"), VSTR(" else"), VSTR(" Text_IO.Put (YYText);"), VSTR(" end if;"), VSTR(" end ECHO;"), VSTR("-- END OF ECHO CODES."), VSTR(""), VSTR(" -- enter a start condition."), VSTR(" -- Using procedure requires a () after the ENTER, but makes everything"), VSTR(" -- much neater."), VSTR(""), VSTR(" procedure ENTER (state : Integer) is"), VSTR(" begin"), VSTR(" yy_start := 1 + 2 * state;"), VSTR(" end ENTER;"), VSTR(""), VSTR(" -- action number for EOF rule of a given start state"), VSTR(" function YY_STATE_EOF (state : Integer) return Integer is"), VSTR(" begin"), VSTR(" return YY_END_OF_BUFFER + state + 1;"), VSTR(" end YY_STATE_EOF;"), VSTR(""), VSTR(" -- return all but the first 'n' matched characters back to the input stream"), VSTR(" procedure yyless (n : Integer) is"), VSTR(" begin"), VSTR(" yy_ch_buf (yy_cp) := yy_hold_char; -- undo effects of setting up yytext"), VSTR(" yy_cp := yy_bp + n;"), VSTR(" yy_c_buf_p := yy_cp;"), VSTR(" YY_DO_BEFORE_ACTION; -- set up yytext again"), VSTR(" end yyless;"), VSTR(""), VSTR(" -- redefine this if you have something you want each time."), VSTR(" procedure YY_USER_ACTION is"), VSTR(" begin"), VSTR(" null;"), VSTR(" end YY_USER_ACTION;"), VSTR(""), VSTR(" -- yy_get_previous_state - get the state just before the EOB char was reached"), VSTR(""), VSTR(" function yy_get_previous_state return yy_state_type is"), VSTR(" yy_current_state : yy_state_type;"), VSTR(" yy_c : Short;"), VSTR("%% a local declaration of yy_bp goes here if bol_needed"), VSTR(" begin"), VSTR("%% code to get the start state into yy_current_state goes here"), -- BEGIN S3A VSTR(""), VSTR(" for yy_cp in yytext_ptr .. yy_c_buf_p - 1 loop"), VSTR("%% code to find the next state goes here"), -- BEGIN S4 VSTR(" end loop;"), VSTR(""), VSTR(" return yy_current_state;"), VSTR(" end yy_get_previous_state;"), VSTR(""), VSTR(" procedure yyrestart (input_file : File_Type) is"), VSTR(" begin"), VSTR(" Open_Input (Text_IO.Name (input_file));"), VSTR(" end yyrestart;"), VSTR(""), VSTR(" begin -- of YYLex"), VSTR(" <<new_file>>"), VSTR(" -- this is where we enter upon encountering an end-of-file and"), VSTR(" -- yyWrap () indicating that we should continue processing"), VSTR(""), VSTR(" if yy_init then"), VSTR(" if yy_start = 0 then"), VSTR(" yy_start := 1; -- first start state"), VSTR(" end if;"), VSTR(""), VSTR(" -- we put in the '\n' and start reading from [1] so that an"), VSTR(" -- initial match-at-newline will be true."), VSTR(""), VSTR(" yy_ch_buf (0) := ASCII.LF;"), VSTR(" yy_n_chars := 1;"), VSTR(""), VSTR(" -- we always need two end-of-buffer characters. The first causes"), VSTR(" -- a transition to the end-of-buffer state. The second causes"), VSTR(" -- a jam in that state."), VSTR(""), VSTR(" yy_ch_buf (yy_n_chars) := YY_END_OF_BUFFER_CHAR;"), VSTR(" yy_ch_buf (yy_n_chars + 1) := YY_END_OF_BUFFER_CHAR;"), VSTR(""), VSTR(" yy_eof_has_been_seen := False;"), VSTR(""), VSTR(" yytext_ptr := 1;"), VSTR(" yy_c_buf_p := yytext_ptr;"), VSTR(" yy_hold_char := yy_ch_buf (yy_c_buf_p);"), VSTR(" yy_init := False;"), VSTR("-- UMASS CODES :"), VSTR(" -- Initialization"), VSTR(" tok_begin_line := 1;"), VSTR(" tok_end_line := 1;"), VSTR(" tok_begin_col := 0;"), VSTR(" tok_end_col := 0;"), VSTR(" token_at_end_of_line := False;"), VSTR(" line_number_of_saved_tok_line1 := 0;"), VSTR(" line_number_of_saved_tok_line2 := 0;"), VSTR("-- END OF UMASS CODES."), VSTR(" end if; -- yy_init"), VSTR(""), VSTR(" loop -- loops until end-of-file is reached"), VSTR(""), VSTR("-- UMASS CODES :"), VSTR(" -- if last matched token is end_of_line, we must"), VSTR(" -- update the token_end_line and reset tok_end_col."), VSTR(" if Token_At_End_Of_Line then"), VSTR(" Tok_End_Line := Tok_End_Line + 1;"), VSTR(" Tok_End_Col := 0;"), VSTR(" Token_At_End_Of_Line := False;"), VSTR(" end if;"), VSTR("-- END OF UMASS CODES."), VSTR(""), VSTR(" yy_cp := yy_c_buf_p;"), VSTR(""), VSTR(" -- support of yytext"), VSTR(" yy_ch_buf (yy_cp) := yy_hold_char;"), VSTR(""), VSTR(" -- yy_bp points to the position in yy_ch_buf of the start of the"), VSTR(" -- current run."), VSTR("%%"), -- BEGIN S5 VSTR(""), VSTR(" <<next_action>>"), VSTR("%% call to gen_find_action goes here"), -- BEGIN S6 VSTR(" YY_DO_BEFORE_ACTION;"), VSTR(" YY_USER_ACTION;"), VSTR(""), VSTR(" if aflex_debug then -- output acceptance info. for (-d) debug mode"), VSTR(" Text_IO.Put (Standard_Error, ""--accepting rule #"");"), VSTR(" Text_IO.Put (Standard_Error, Integer'Image (yy_act));"), VSTR(" Text_IO.Put_Line (Standard_Error, ""("""""" & YYText & """""")"");"), VSTR(" end if;"), VSTR(""), VSTR("-- UMASS CODES :"), VSTR(" -- Update tok_begin_line, tok_end_line, tok_begin_col and tok_end_col"), VSTR(" -- after matching the token."), VSTR(" if yy_act /= YY_END_OF_BUFFER and then yy_act /= 0 then"), VSTR(" -- Token are matched only when yy_act is not yy_end_of_buffer or 0."), VSTR(" Tok_Begin_Line := Tok_End_Line;"), VSTR(" Tok_Begin_Col := Tok_End_Col + 1;"), VSTR(" Tok_End_Col := Tok_Begin_Col + yy_cp - yy_bp - 1;"), VSTR(" if yy_ch_buf ( yy_bp ) = ASCII.LF then"), VSTR(" Token_At_End_Of_Line := True;"), VSTR(" end if;"), VSTR(" end if;"), VSTR("-- END OF UMASS CODES."), VSTR(""), VSTR(" <<do_action>> -- this label is used only to access EOF actions"), VSTR(" case yy_act is"), VSTR("%% actions go here"), -- BEGIN S7 VSTR(" when YY_END_OF_BUFFER =>"), VSTR(" -- undo the effects of YY_DO_BEFORE_ACTION"), VSTR(" yy_ch_buf (yy_cp) := yy_hold_char;"), VSTR(""), VSTR(" yytext_ptr := yy_bp;"), VSTR(""), VSTR(" case yy_get_next_buffer is"), VSTR(" when EOB_ACT_END_OF_FILE =>"), -- VSTR(" begin"), VSTR(" if yyWrap then"), VSTR(" -- note: because we've taken care in"), VSTR(" -- yy_get_next_buffer() to have set up yytext,"), VSTR(" -- we can now set up yy_c_buf_p so that if some"), VSTR(" -- total hoser (like aflex itself) wants"), VSTR(" -- to call the scanner after we return the"), VSTR(" -- End_Of_Input, it'll still work - another"), VSTR(" -- End_Of_Input will get returned."), VSTR(""), VSTR(" yy_c_buf_p := yytext_ptr;"), VSTR(""), VSTR(" yy_act := YY_STATE_EOF ((yy_start - 1) / 2);"), VSTR(""), VSTR(" goto do_action;"), VSTR(" else"), VSTR(" -- start processing a new file"), VSTR(" yy_init := True;"), VSTR(" goto new_file;"), VSTR(" end if;"), -- VSTR(" end;"), VSTR(""), VSTR(" when EOB_ACT_RESTART_SCAN =>"), VSTR(" yy_c_buf_p := yytext_ptr;"), VSTR(" yy_hold_char := yy_ch_buf (yy_c_buf_p);"), VSTR(""), VSTR(" when EOB_ACT_LAST_MATCH =>"), VSTR(" yy_c_buf_p := yy_n_chars;"), VSTR(" yy_current_state := yy_get_previous_state;"), VSTR(""), VSTR(" yy_cp := yy_c_buf_p;"), VSTR(" yy_bp := yytext_ptr;"), VSTR(" goto next_action;"), VSTR(" when others =>"), VSTR(" null;"), VSTR(" end case; -- case yy_get_next_buffer()"), VSTR(""), VSTR(" when others =>"), VSTR(" Text_IO.Put (""action # "");"), VSTR(" Text_IO.Put (Integer'Image (yy_act));"), VSTR(" Text_IO.New_Line;"), VSTR(" raise AFLEX_INTERNAL_ERROR;"), VSTR(" end case; -- case (yy_act)"), VSTR(" end loop; -- end of loop waiting for end of file"), VSTR(" end YYLex;"), VSTR("%%"), VSTR("ERROR tried to output beyond end of skeleton file") -- END OF SKELETON ); end Initialize; -- set_external_skeleton -- -- DESCRIPTION -- sets flag so we know to use an external skelfile procedure SET_EXTERNAL_SKELETON is begin USE_EXTERNAL_SKELETON := TRUE; end SET_EXTERNAL_SKELETON; procedure GET_INTERNAL(BUFFER : in out FILE_STRING.VSTRING) is begin BUFFER := SKEL_TEMPLATE(CURRENT_LINE); CURRENT_LINE := CURRENT_LINE + 1; end GET_INTERNAL; procedure GET_EXTERNAL(BUFFER : in out FILE_STRING.VSTRING) is begin FILE_STRING.GET_LINE(MISC_DEFS.SKELFILE, BUFFER); end GET_EXTERNAL; -- end_of_skeleton -- -- DESCRIPTION -- returns true if there are no more lines left to output in the skeleton function END_OF_SKELETON return BOOLEAN is begin if USE_EXTERNAL_SKELETON then -- we're using an external skelfile return Text_IO.END_OF_FILE(MISC_DEFS.SKELFILE); else -- internal skeleton return CURRENT_LINE > SKEL_TEMPLATE'LAST; end if; end END_OF_SKELETON; procedure GET_FILE_LINE(BUFFER : in out FILE_STRING.VSTRING) is begin if USE_EXTERNAL_SKELETON then GET_EXTERNAL(BUFFER); else GET_INTERNAL(BUFFER); end if; end GET_FILE_LINE; -- skelout - write out one section of the skeleton file -- -- DESCRIPTION -- Either outputs internal skeleton, or from a file with "%%" dividers -- if a skeleton file is specified by the user. -- Copies from skelfile to stdout until a line beginning with "%%" or -- EOF is found. procedure SKELOUT is BUF : FILE_STRING.VSTRING; -- UMASS CODES : Umass_Codes : Boolean := False; -- Indicates whether or not current line of the template -- is the Umass codes. -- END OF UMASS CODES. Echo_Codes : Boolean := False; Ignore_Line : Boolean := False; begin while not END_OF_SKELETON loop GET_FILE_LINE(BUF); if ((FILE_STRING.LEN(BUF) >= 2) and then ((FILE_STRING.CHAR(BUF, 1) = '%') and (FILE_STRING.CHAR(BUF, 2) = '%'))) then exit; else -- UMASS CODES : -- In the template, the codes between "-- UMASS CODES : " and -- "-- END OF UMASS CODES." are specific to be used by Ayacc -- extension. Ayacc extension has more power in error recovery. -- So we generate those codes only when Ayacc_Extension_Flag is True. if FILE_STRING.STR(BUF) = "-- UMASS CODES :" then Umass_Codes := True; Ignore_Line := True; elsif FILE_STRING.STR(BUF) = "-- ECHO CODES :" then Echo_Codes := True; Ignore_Line := True; end if; if Umass_Codes and not MISC_DEFS.Ayacc_Extension_Flag then Ignore_Line := True; end if; if Echo_Codes and MISC_DEFS.SPPRDFLT then Ignore_Line := True; end if; if FILE_STRING.STR(BUF) = "-- END OF UMASS CODES." then Umass_Codes := False; Ignore_Line := True; end if; if FILE_STRING.STR(BUF) = "-- END OF ECHO CODES." then Echo_Codes := False; Ignore_Line := True; end if; if not Ignore_Line then FILE_STRING.PUT_LINE(BUF); end if; Ignore_Line := False; end if; end loop; end SKELOUT; end SKELETON_MANAGER;
reznikmm/matreshka
Ada
604
ads
with league.strings; use league.strings; with ada.containers.ordered_maps; use ada.containers; with Matreshka.Opts.options; use Matreshka.Opts.options; package Matreshka.Opts.internal.available_options_maps is package available_options_container is new ada.containers.ordered_maps(Key_Type => Universal_String, Element_Type => Option_Access); subtype available_options_map is available_options_container.Map; type available_options_map_access is access all available_options_map; end Matreshka.Opts.internal.available_options_maps;
reznikmm/matreshka
Ada
4,543
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Form.Id_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Form_Id_Attribute_Node is begin return Self : Form_Id_Attribute_Node do Matreshka.ODF_Form.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Form_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Form_Id_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Id_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Form_URI, Matreshka.ODF_String_Constants.Id_Attribute, Form_Id_Attribute_Node'Tag); end Matreshka.ODF_Form.Id_Attributes;
AdaCore/libadalang
Ada
232
adb
package body Foo is function To_String (I : Integer) return String is begin return I'Image; end To_String; procedure Print_T (Inst : T) is begin Put_Line (To_String (I)); end Print_Int_Gen; end Foo;
reznikmm/matreshka
Ada
3,681
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Asis; with Engines.Contexts; with League.Strings; package Properties.Expressions.Enumeration_Literal is function Code (Engine : access Engines.Contexts.Context; Element : Asis.Expression; Name : Engines.Text_Property) return League.Strings.Universal_String; end Properties.Expressions.Enumeration_Literal;
Gabriel-Degret/adalib
Ada
14,271
ads
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual --------------------------------------------------------------------------- with Ada.Strings.Maps; package Ada.Strings.Bounded is pragma Preelaborate (Bounded); generic Max : Positive; -- Maximum length of a Bounded_String package Generic_Bounded_Length is Max_Length : constant Positive := Max; type Bounded_String is private; Null_Bounded_String : constant Bounded_String; subtype Length_Range is Natural range 0 .. Max_Length; function Length (Source : in Bounded_String) return Length_Range; -- Conversion, Concatenation, and Selection functions function To_Bounded_String (Source : in String; Drop : in Truncation := Error) return Bounded_String; function To_String (Source : in Bounded_String) return String; procedure Set_Bounded_String (Target : out Bounded_String; Source : in String; Drop : in Truncation := Error); function Append (Left, Right : in Bounded_String; Drop : in Truncation := Error) return Bounded_String; function Append (Left : in Bounded_String; Right : in String; Drop : in Truncation := Error) return Bounded_String; function Append (Left : in String; Right : in Bounded_String; Drop : in Truncation := Error) return Bounded_String; function Append (Left : in Bounded_String; Right : in Character; Drop : in Truncation := Error) return Bounded_String; function Append (Left : in Character; Right : in Bounded_String; Drop : in Truncation := Error) return Bounded_String; procedure Append (Source : in out Bounded_String; New_Item : in Bounded_String; Drop : in Truncation := Error); procedure Append (Source : in out Bounded_String; New_Item : in String; Drop : in Truncation := Error); procedure Append (Source : in out Bounded_String; New_Item : in Character; Drop : in Truncation := Error); function "&" (Left, Right : in Bounded_String) return Bounded_String; function "&" (Left : in Bounded_String; Right : in String) return Bounded_String; function "&" (Left : in String; Right : in Bounded_String) return Bounded_String; function "&" (Left : in Bounded_String; Right : in Character) return Bounded_String; function "&" (Left : in Character; Right : in Bounded_String) return Bounded_String; function Element (Source : in Bounded_String; Index : in Positive) return Character; procedure Replace_Element (Source : in out Bounded_String; Index : in Positive; By : in Character); function Slice (Source : in Bounded_String; Low : in Positive; High : in Natural) return String; function Bounded_Slice (Source : in Bounded_String; Low : in Positive; High : in Natural) return Bounded_String; procedure Bounded_Slice (Source : in Bounded_String; Target : out Bounded_String; Low : in Positive; High : in Natural); function "=" (Left, Right : in Bounded_String) return Boolean; function "=" (Left : in Bounded_String; Right : in String) return Boolean; function "=" (Left : in String; Right : in Bounded_String) return Boolean; function "<" (Left, Right : in Bounded_String) return Boolean; function "<" (Left : in Bounded_String; Right : in String) return Boolean; function "<" (Left : in String; Right : in Bounded_String) return Boolean; function "<=" (Left, Right : in Bounded_String) return Boolean; function "<=" (Left : in Bounded_String; Right : in String) return Boolean; function "<=" (Left : in String; Right : in Bounded_String) return Boolean; function ">" (Left, Right : in Bounded_String) return Boolean; function ">" (Left : in Bounded_String; Right : in String) return Boolean; function ">" (Left : in String; Right : in Bounded_String) return Boolean; function ">=" (Left, Right : in Bounded_String) return Boolean; function ">=" (Left : in Bounded_String; Right : in String) return Boolean; function ">=" (Left : in String; Right : in Bounded_String) return Boolean; -- Search subprograms function Index (Source : in Bounded_String; Pattern : in String; From : in Positive; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural; function Index (Source : in Bounded_String; Pattern : in String; From : in Positive; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping_Function) return Natural; function Index (Source : in Bounded_String; Pattern : in String; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural; function Index (Source : in Bounded_String; Pattern : in String; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping_Function) return Natural; function Index (Source : in Bounded_String; Set : in Maps.Character_Set; From : in Positive; Test : in Membership := Inside; Going : in Direction := Forward) return Natural; function Index (Source : in Bounded_String; Set : in Maps.Character_Set; Test : in Membership := Inside; Going : in Direction := Forward) return Natural; function Index_Non_Blank (Source : in Bounded_String; From : in Positive; Going : in Direction := Forward) return Natural; function Index_Non_Blank (Source : in Bounded_String; Going : in Direction := Forward) return Natural; function Count (Source : in Bounded_String; Pattern : in String; Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural; function Count (Source : in Bounded_String; Pattern : in String; Mapping : in Maps.Character_Mapping_Function) return Natural; function Count (Source : in Bounded_String; Set : in Maps.Character_Set) return Natural; procedure Find_Token (Source : in Bounded_String; Set : in Maps.Character_Set; Test : in Membership; First : out Positive; Last : out Natural); procedure Find_Token (Source : in Bounded_String; Set : in Maps.Character_Set; Test : in Membership; First : out Positive; Last : out Natural); -- String translation subprograms function Translate (Source : in Bounded_String; Mapping : in Maps.Character_Mapping) return Bounded_String; procedure Translate (Source : in out Bounded_String; Mapping : in Maps.Character_Mapping); function Translate (Source : in Bounded_String; Mapping : in Maps.Character_Mapping_Function) return Bounded_String; procedure Translate (Source : in out Bounded_String; Mapping : in Maps.Character_Mapping_Function); -- String transformation subprograms function Replace_Slice (Source : in Bounded_String; Low : in Positive; High : in Natural; By : in String; Drop : in Truncation := Error) return Bounded_String; procedure Replace_Slice (Source : in out Bounded_String; Low : in Positive; High : in Natural; By : in String; Drop : in Truncation := Error); function Insert (Source : in Bounded_String; Before : in Positive; New_Item : in String; Drop : in Truncation := Error) return Bounded_String; procedure Insert (Source : in out Bounded_String; Before : in Positive; New_Item : in String; Drop : in Truncation := Error); function Overwrite (Source : in Bounded_String; Position : in Positive; New_Item : in String; Drop : in Truncation := Error) return Bounded_String; procedure Overwrite (Source : in out Bounded_String; Position : in Positive; New_Item : in String; Drop : in Truncation := Error); function Delete (Source : in Bounded_String; From : in Positive; Through : in Natural) return Bounded_String; procedure Delete (Source : in out Bounded_String; From : in Positive; Through : in Natural); --String selector subprograms function Trim (Source : in Bounded_String; Side : in Trim_End) return Bounded_String; procedure Trim (Source : in out Bounded_String; Side : in Trim_End); function Trim (Source : in Bounded_String; Left : in Maps.Character_Set; Right : in Maps.Character_Set) return Bounded_String; procedure Trim (Source : in out Bounded_String; Left : in Maps.Character_Set; Right : in Maps.Character_Set); function Head (Source : in Bounded_String; Count : in Natural; Pad : in Character := Space; Drop : in Truncation := Error) return Bounded_String; procedure Head (Source : in out Bounded_String; Count : in Natural; Pad : in Character := Space; Drop : in Truncation := Error); function Tail (Source : in Bounded_String; Count : in Natural; Pad : in Character := Space; Drop : in Truncation := Error) return Bounded_String; procedure Tail (Source : in out Bounded_String; Count : in Natural; Pad : in Character := Space; Drop : in Truncation := Error); --String constructor subprograms function "*" (Left : in Natural; Right : in Character) return Bounded_String; function "*" (Left : in Natural; Right : in String) return Bounded_String; function "*" (Left : in Natural; Right : in Bounded_String) return Bounded_String; function Replicate (Count : in Natural; Item : in Character; Drop : in Truncation := Error) return Bounded_String; function Replicate (Count : in Natural; Item : in String; Drop : in Truncation := Error) return Bounded_String; function Replicate (Count : in Natural; Item : in Bounded_String; Drop : in Truncation := Error) return Bounded_String; private type Bounded_String is null record; Null_Bounded_String : constant Bounded_String := (null record); end Generic_Bounded_Length; end Ada.Strings.Bounded;
MinimSecure/unum-sdk
Ada
833
adb
-- Copyright 2013-2016 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. package body Pck is procedure Do_Nothing (A : System.Address) is begin null; end Do_Nothing; end Pck;
optikos/oasis
Ada
4,097
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Terminate_Alternative_Statements; with Program.Element_Visitors; package Program.Nodes.Terminate_Alternative_Statements is pragma Preelaborate; type Terminate_Alternative_Statement is new Program.Nodes.Node and Program.Elements.Terminate_Alternative_Statements .Terminate_Alternative_Statement and Program.Elements.Terminate_Alternative_Statements .Terminate_Alternative_Statement_Text with private; function Create (Terminate_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Terminate_Alternative_Statement; type Implicit_Terminate_Alternative_Statement is new Program.Nodes.Node and Program.Elements.Terminate_Alternative_Statements .Terminate_Alternative_Statement with private; function Create (Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Terminate_Alternative_Statement with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Terminate_Alternative_Statement is abstract new Program.Nodes.Node and Program.Elements.Terminate_Alternative_Statements .Terminate_Alternative_Statement with null record; procedure Initialize (Self : aliased in out Base_Terminate_Alternative_Statement'Class); overriding procedure Visit (Self : not null access Base_Terminate_Alternative_Statement; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Is_Terminate_Alternative_Statement_Element (Self : Base_Terminate_Alternative_Statement) return Boolean; overriding function Is_Statement_Element (Self : Base_Terminate_Alternative_Statement) return Boolean; type Terminate_Alternative_Statement is new Base_Terminate_Alternative_Statement and Program.Elements.Terminate_Alternative_Statements .Terminate_Alternative_Statement_Text with record Terminate_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Terminate_Alternative_Statement_Text (Self : aliased in out Terminate_Alternative_Statement) return Program.Elements.Terminate_Alternative_Statements .Terminate_Alternative_Statement_Text_Access; overriding function Terminate_Token (Self : Terminate_Alternative_Statement) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Semicolon_Token (Self : Terminate_Alternative_Statement) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Terminate_Alternative_Statement is new Base_Terminate_Alternative_Statement with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Terminate_Alternative_Statement_Text (Self : aliased in out Implicit_Terminate_Alternative_Statement) return Program.Elements.Terminate_Alternative_Statements .Terminate_Alternative_Statement_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Terminate_Alternative_Statement) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Terminate_Alternative_Statement) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Terminate_Alternative_Statement) return Boolean; end Program.Nodes.Terminate_Alternative_Statements;
Asier98/AdaCar
Ada
1,261
adb
with AdaCar.Parametros; with AdaCar.Motores; package body AdaCar.Organizador_Movimiento is Minima_Distancia: constant Unidades_Distancia:= Parametros.Distancia_Minima; -------------------- -- Organizador_PO -- -------------------- protected Organizador_PO with Priority => Parametros.Techo_Organizador_PO is procedure Nueva_Distancia_Sensor(Valor: Unidades_Distancia); end Organizador_PO; ---------------------------- -- Nueva_Distancia_Sensor -- ---------------------------- procedure Nueva_Distancia_Sensor (Valor : Unidades_Distancia) is begin Organizador_PO.Nueva_Distancia_Sensor(Valor); end Nueva_Distancia_Sensor; ------------------------------- -- Organizador_Movimiento_PO -- ------------------------------- protected body Organizador_PO is procedure Nueva_Distancia_Sensor(Valor: Unidades_Distancia) is begin if Valor > Minima_Distancia then Motores.Actua_Direccion(Ambos_Motores,Hacia_Delante); else Motores.Actua_Direccion(Ambos_Motores,Hacia_Detras); end if; Motores.Actua_Step(Ambos_Motores,1); end Nueva_Distancia_Sensor; end Organizador_PO; end AdaCar.Organizador_Movimiento;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
12,304
ads
-- This spec has been automatically generated from STM32F103.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.SPI is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR1_CPHA_Field is STM32_SVD.Bit; subtype CR1_CPOL_Field is STM32_SVD.Bit; subtype CR1_MSTR_Field is STM32_SVD.Bit; subtype CR1_BR_Field is STM32_SVD.UInt3; subtype CR1_SPE_Field is STM32_SVD.Bit; subtype CR1_LSBFIRST_Field is STM32_SVD.Bit; subtype CR1_SSI_Field is STM32_SVD.Bit; subtype CR1_SSM_Field is STM32_SVD.Bit; subtype CR1_RXONLY_Field is STM32_SVD.Bit; subtype CR1_DFF_Field is STM32_SVD.Bit; subtype CR1_CRCNEXT_Field is STM32_SVD.Bit; subtype CR1_CRCEN_Field is STM32_SVD.Bit; subtype CR1_BIDIOE_Field is STM32_SVD.Bit; subtype CR1_BIDIMODE_Field is STM32_SVD.Bit; -- control register 1 type CR1_Register is record -- Clock phase CPHA : CR1_CPHA_Field := 16#0#; -- Clock polarity CPOL : CR1_CPOL_Field := 16#0#; -- Master selection MSTR : CR1_MSTR_Field := 16#0#; -- Baud rate control BR : CR1_BR_Field := 16#0#; -- SPI enable SPE : CR1_SPE_Field := 16#0#; -- Frame format LSBFIRST : CR1_LSBFIRST_Field := 16#0#; -- Internal slave select SSI : CR1_SSI_Field := 16#0#; -- Software slave management SSM : CR1_SSM_Field := 16#0#; -- Receive only RXONLY : CR1_RXONLY_Field := 16#0#; -- Data frame format DFF : CR1_DFF_Field := 16#0#; -- CRC transfer next CRCNEXT : CR1_CRCNEXT_Field := 16#0#; -- Hardware CRC calculation enable CRCEN : CR1_CRCEN_Field := 16#0#; -- Output enable in bidirectional mode BIDIOE : CR1_BIDIOE_Field := 16#0#; -- Bidirectional data mode enable BIDIMODE : CR1_BIDIMODE_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register use record CPHA at 0 range 0 .. 0; CPOL at 0 range 1 .. 1; MSTR at 0 range 2 .. 2; BR at 0 range 3 .. 5; SPE at 0 range 6 .. 6; LSBFIRST at 0 range 7 .. 7; SSI at 0 range 8 .. 8; SSM at 0 range 9 .. 9; RXONLY at 0 range 10 .. 10; DFF at 0 range 11 .. 11; CRCNEXT at 0 range 12 .. 12; CRCEN at 0 range 13 .. 13; BIDIOE at 0 range 14 .. 14; BIDIMODE at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CR2_RXDMAEN_Field is STM32_SVD.Bit; subtype CR2_TXDMAEN_Field is STM32_SVD.Bit; subtype CR2_SSOE_Field is STM32_SVD.Bit; subtype CR2_ERRIE_Field is STM32_SVD.Bit; subtype CR2_RXNEIE_Field is STM32_SVD.Bit; subtype CR2_TXEIE_Field is STM32_SVD.Bit; -- control register 2 type CR2_Register is record -- Rx buffer DMA enable RXDMAEN : CR2_RXDMAEN_Field := 16#0#; -- Tx buffer DMA enable TXDMAEN : CR2_TXDMAEN_Field := 16#0#; -- SS output enable SSOE : CR2_SSOE_Field := 16#0#; -- unspecified Reserved_3_4 : STM32_SVD.UInt2 := 16#0#; -- Error interrupt enable ERRIE : CR2_ERRIE_Field := 16#0#; -- RX buffer not empty interrupt enable RXNEIE : CR2_RXNEIE_Field := 16#0#; -- Tx buffer empty interrupt enable TXEIE : CR2_TXEIE_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register use record RXDMAEN at 0 range 0 .. 0; TXDMAEN at 0 range 1 .. 1; SSOE at 0 range 2 .. 2; Reserved_3_4 at 0 range 3 .. 4; ERRIE at 0 range 5 .. 5; RXNEIE at 0 range 6 .. 6; TXEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SR_RXNE_Field is STM32_SVD.Bit; subtype SR_TXE_Field is STM32_SVD.Bit; subtype SR_CHSIDE_Field is STM32_SVD.Bit; subtype SR_UDR_Field is STM32_SVD.Bit; subtype SR_CRCERR_Field is STM32_SVD.Bit; subtype SR_MODF_Field is STM32_SVD.Bit; subtype SR_OVR_Field is STM32_SVD.Bit; subtype SR_BSY_Field is STM32_SVD.Bit; -- status register type SR_Register is record -- Read-only. Receive buffer not empty RXNE : SR_RXNE_Field := 16#0#; -- Read-only. Transmit buffer empty TXE : SR_TXE_Field := 16#1#; -- Read-only. Channel side CHSIDE : SR_CHSIDE_Field := 16#0#; -- Read-only. Underrun flag UDR : SR_UDR_Field := 16#0#; -- CRC error flag CRCERR : SR_CRCERR_Field := 16#0#; -- Read-only. Mode fault MODF : SR_MODF_Field := 16#0#; -- Read-only. Overrun flag OVR : SR_OVR_Field := 16#0#; -- Read-only. Busy flag BSY : SR_BSY_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record RXNE at 0 range 0 .. 0; TXE at 0 range 1 .. 1; CHSIDE at 0 range 2 .. 2; UDR at 0 range 3 .. 3; CRCERR at 0 range 4 .. 4; MODF at 0 range 5 .. 5; OVR at 0 range 6 .. 6; BSY at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype DR_DR_Field is STM32_SVD.UInt16; -- data register type DR_Register is record -- Data register DR : DR_DR_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DR_Register use record DR at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CRCPR_CRCPOLY_Field is STM32_SVD.UInt16; -- CRC polynomial register type CRCPR_Register is record -- CRC polynomial register CRCPOLY : CRCPR_CRCPOLY_Field := 16#7#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CRCPR_Register use record CRCPOLY at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype RXCRCR_RxCRC_Field is STM32_SVD.UInt16; -- RX CRC register type RXCRCR_Register is record -- Read-only. Rx CRC register RxCRC : RXCRCR_RxCRC_Field; -- unspecified Reserved_16_31 : STM32_SVD.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for RXCRCR_Register use record RxCRC at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype TXCRCR_TxCRC_Field is STM32_SVD.UInt16; -- TX CRC register type TXCRCR_Register is record -- Read-only. Tx CRC register TxCRC : TXCRCR_TxCRC_Field; -- unspecified Reserved_16_31 : STM32_SVD.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TXCRCR_Register use record TxCRC at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype I2SCFGR_CHLEN_Field is STM32_SVD.Bit; subtype I2SCFGR_DATLEN_Field is STM32_SVD.UInt2; subtype I2SCFGR_CKPOL_Field is STM32_SVD.Bit; subtype I2SCFGR_I2SSTD_Field is STM32_SVD.UInt2; subtype I2SCFGR_PCMSYNC_Field is STM32_SVD.Bit; subtype I2SCFGR_I2SCFG_Field is STM32_SVD.UInt2; subtype I2SCFGR_I2SE_Field is STM32_SVD.Bit; subtype I2SCFGR_I2SMOD_Field is STM32_SVD.Bit; -- I2S configuration register type I2SCFGR_Register is record -- Channel length (number of bits per audio channel) CHLEN : I2SCFGR_CHLEN_Field := 16#0#; -- Data length to be transferred DATLEN : I2SCFGR_DATLEN_Field := 16#0#; -- Steady state clock polarity CKPOL : I2SCFGR_CKPOL_Field := 16#0#; -- I2S standard selection I2SSTD : I2SCFGR_I2SSTD_Field := 16#0#; -- unspecified Reserved_6_6 : STM32_SVD.Bit := 16#0#; -- PCM frame synchronization PCMSYNC : I2SCFGR_PCMSYNC_Field := 16#0#; -- I2S configuration mode I2SCFG : I2SCFGR_I2SCFG_Field := 16#0#; -- I2S Enable I2SE : I2SCFGR_I2SE_Field := 16#0#; -- I2S mode selection I2SMOD : I2SCFGR_I2SMOD_Field := 16#0#; -- unspecified Reserved_12_31 : STM32_SVD.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for I2SCFGR_Register use record CHLEN at 0 range 0 .. 0; DATLEN at 0 range 1 .. 2; CKPOL at 0 range 3 .. 3; I2SSTD at 0 range 4 .. 5; Reserved_6_6 at 0 range 6 .. 6; PCMSYNC at 0 range 7 .. 7; I2SCFG at 0 range 8 .. 9; I2SE at 0 range 10 .. 10; I2SMOD at 0 range 11 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype I2SPR_I2SDIV_Field is STM32_SVD.Byte; subtype I2SPR_ODD_Field is STM32_SVD.Bit; subtype I2SPR_MCKOE_Field is STM32_SVD.Bit; -- I2S prescaler register type I2SPR_Register is record -- I2S Linear prescaler I2SDIV : I2SPR_I2SDIV_Field := 16#A#; -- Odd factor for the prescaler ODD : I2SPR_ODD_Field := 16#0#; -- Master clock output enable MCKOE : I2SPR_MCKOE_Field := 16#0#; -- unspecified Reserved_10_31 : STM32_SVD.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for I2SPR_Register use record I2SDIV at 0 range 0 .. 7; ODD at 0 range 8 .. 8; MCKOE at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Serial peripheral interface type SPI_Peripheral is record -- control register 1 CR1 : aliased CR1_Register; -- control register 2 CR2 : aliased CR2_Register; -- status register SR : aliased SR_Register; -- data register DR : aliased DR_Register; -- CRC polynomial register CRCPR : aliased CRCPR_Register; -- RX CRC register RXCRCR : aliased RXCRCR_Register; -- TX CRC register TXCRCR : aliased TXCRCR_Register; -- I2S configuration register I2SCFGR : aliased I2SCFGR_Register; -- I2S prescaler register I2SPR : aliased I2SPR_Register; end record with Volatile; for SPI_Peripheral use record CR1 at 16#0# range 0 .. 31; CR2 at 16#4# range 0 .. 31; SR at 16#8# range 0 .. 31; DR at 16#C# range 0 .. 31; CRCPR at 16#10# range 0 .. 31; RXCRCR at 16#14# range 0 .. 31; TXCRCR at 16#18# range 0 .. 31; I2SCFGR at 16#1C# range 0 .. 31; I2SPR at 16#20# range 0 .. 31; end record; -- Serial peripheral interface SPI1_Periph : aliased SPI_Peripheral with Import, Address => System'To_Address (16#40013000#); -- Serial peripheral interface SPI2_Periph : aliased SPI_Peripheral with Import, Address => System'To_Address (16#40003800#); -- Serial peripheral interface SPI3_Periph : aliased SPI_Peripheral with Import, Address => System'To_Address (16#40003C00#); end STM32_SVD.SPI;
vpodzime/ada-util
Ada
1,200
ads
----------------------------------------------------------------------- -- Util-strings-sets -- Set of strings -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Hash; with Ada.Containers.Indefinite_Hashed_Sets; -- The <b>Util.Strings.Sets</b> package provides an instantiation -- of a hashed set with Strings. package Util.Strings.Sets is new Ada.Containers.Indefinite_Hashed_Sets (Element_Type => String, Hash => Ada.Strings.Hash, Equivalent_Elements => "=");
pchapin/acrypto
Ada
1,430
ads
--------------------------------------------------------------------------- -- FILE : aco-octet_operations.ads -- SUBJECT : Intrinsic and related operations for ACO.Octet -- AUTHOR : (C) Copyright 2014 by Peter Chapin -- -- Please send comments or bug reports to -- -- Peter Chapin <[email protected]> --------------------------------------------------------------------------- pragma SPARK_Mode(On); package ACO.Octet_Operations is function Shift_Left(Value : ACO.Octet; Count : Natural) return ACO.Octet with Import, Convention => Intrinsic, Global => null; function Shift_Right(Value : ACO.Octet; Count : Natural) return ACO.Octet with Import, Convention => Intrinsic, Global => null, Post => Shift_Right'Result = Value / (2**Count); function Rotate_Left(Value : ACO.Octet; Count : Natural) return ACO.Octet with Import, Convention => Intrinsic, Global => null; function Rotate_Right(Value : ACO.Octet; Count : Natural) return ACO.Octet with Import, Convention => Intrinsic, Global => null; procedure Xor_Array (Accumulator : in out ACO.Octet_Array; Incoming : in ACO.Octet_Array; Success_Flag : out Boolean) with Depends => ((Accumulator, Success_Flag) => (Accumulator, Incoming)); end ACO.Octet_Operations;
RREE/ada-util
Ada
1,900
ads
-- Generated by utildgen.c from system includes with Interfaces.C; package Util.Systems.Constants is pragma Pure; -- Flags used when opening a file with open/creat. O_RDONLY : constant Interfaces.C.int := 8#000000#; O_WRONLY : constant Interfaces.C.int := 8#000001#; O_RDWR : constant Interfaces.C.int := 8#000002#; O_CREAT : constant Interfaces.C.int := 8#001000#; O_EXCL : constant Interfaces.C.int := 8#004000#; O_TRUNC : constant Interfaces.C.int := 8#002000#; O_APPEND : constant Interfaces.C.int := 8#000010#; O_CLOEXEC : constant Interfaces.C.int := 8#20000000#; O_SYNC : constant Interfaces.C.int := 8#000200#; O_DIRECT : constant Interfaces.C.int := 8#2000000#; O_NONBLOCK : constant Interfaces.C.int := 8#000004#; -- Flags used by fcntl F_SETFL : constant Interfaces.C.int := 4; F_GETFL : constant Interfaces.C.int := 3; FD_CLOEXEC : constant Interfaces.C.int := 1; -- Flags used by dlopen RTLD_LAZY : constant Interfaces.C.int := 8#000001#; RTLD_NOW : constant Interfaces.C.int := 8#000002#; RTLD_NOLOAD : constant Interfaces.C.int := 8#020000#; RTLD_DEEPBIND : constant Interfaces.C.int := 8#000000#; RTLD_GLOBAL : constant Interfaces.C.int := 8#000400#; RTLD_LOCAL : constant Interfaces.C.int := 8#001000#; RTLD_NODELETE : constant Interfaces.C.int := 8#010000#; DLL_OPTIONS : constant String := ""; SYMBOL_PREFIX : constant String := ""; end Util.Systems.Constants;
michalkonecny/polypaver
Ada
2,780
ads
------------------------------------------------------------------------------ -- -- -- ASIS APPLICATION TEMPLATE COMPONENTS -- -- -- -- C O N T E X T _ P R O C E S S I N G -- -- -- -- S p e c -- -- -- -- Copyright (c) 2000, Free Software Foundation, Inc. -- -- -- -- ASIS Application Templates are free software; you can redistribute it -- -- and/or modify it under terms of the GNU General Public License as -- -- published by the Free Software Foundation; either version 2, or (at your -- -- option) any later version. ASIS Application Templates are distributed in -- -- the hope that they will be useful, but WITHOUT ANY WARRANTY; without -- -- even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -- -- PURPOSE. See the GNU General Public License for more details. You should -- -- have received a copy of the GNU General Public License distributed with -- -- distributed with GNAT; see file COPYING. If not, write to the Free -- -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- -- USA. -- -- -- -- ASIS Application Templates were developed and are now maintained by Ada -- -- Core Technologies Inc (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ -- This package contains routines for high-level processing of -- (terating through) an ASIS Context with Asis; package Context_Processing is procedure Process_Context (The_Context : Asis.Context; Trace : Boolean := False; Output_Path : String); -- This procedure iterates through the whole content of its argument -- Context and it calls a unit processing routine for those ASIS -- Compilation Units which are of An_Application_Unit origin (that is, -- user-defined units). If Trace parameter is set ON, it generate the -- simple trace of the unit processing (consisting of the names of the -- units in the Context being processed or skipped). end Context_Processing;
reznikmm/matreshka
Ada
4,735
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Db_Table_Settings_Elements; package Matreshka.ODF_Db.Table_Settings_Elements is type Db_Table_Settings_Element_Node is new Matreshka.ODF_Db.Abstract_Db_Element_Node and ODF.DOM.Db_Table_Settings_Elements.ODF_Db_Table_Settings with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Db_Table_Settings_Element_Node; overriding function Get_Local_Name (Self : not null access constant Db_Table_Settings_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Db_Table_Settings_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Db_Table_Settings_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Db_Table_Settings_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Db.Table_Settings_Elements;
reznikmm/matreshka
Ada
3,689
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Text_Fixed_Attributes is pragma Preelaborate; type ODF_Text_Fixed_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Text_Fixed_Attribute_Access is access all ODF_Text_Fixed_Attribute'Class with Storage_Size => 0; end ODF.DOM.Text_Fixed_Attributes;
reznikmm/matreshka
Ada
3,633
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.OCL.Boolean_Literal_Exps.Hash is new AMF.Elements.Generic_Hash (OCL_Boolean_Literal_Exp, OCL_Boolean_Literal_Exp_Access);
reznikmm/matreshka
Ada
4,965
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.Utp.Log_Actions.Collections is pragma Preelaborate; package Utp_Log_Action_Collections is new AMF.Generic_Collections (Utp_Log_Action, Utp_Log_Action_Access); type Set_Of_Utp_Log_Action is new Utp_Log_Action_Collections.Set with null record; Empty_Set_Of_Utp_Log_Action : constant Set_Of_Utp_Log_Action; type Ordered_Set_Of_Utp_Log_Action is new Utp_Log_Action_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_Utp_Log_Action : constant Ordered_Set_Of_Utp_Log_Action; type Bag_Of_Utp_Log_Action is new Utp_Log_Action_Collections.Bag with null record; Empty_Bag_Of_Utp_Log_Action : constant Bag_Of_Utp_Log_Action; type Sequence_Of_Utp_Log_Action is new Utp_Log_Action_Collections.Sequence with null record; Empty_Sequence_Of_Utp_Log_Action : constant Sequence_Of_Utp_Log_Action; private Empty_Set_Of_Utp_Log_Action : constant Set_Of_Utp_Log_Action := (Utp_Log_Action_Collections.Set with null record); Empty_Ordered_Set_Of_Utp_Log_Action : constant Ordered_Set_Of_Utp_Log_Action := (Utp_Log_Action_Collections.Ordered_Set with null record); Empty_Bag_Of_Utp_Log_Action : constant Bag_Of_Utp_Log_Action := (Utp_Log_Action_Collections.Bag with null record); Empty_Sequence_Of_Utp_Log_Action : constant Sequence_Of_Utp_Log_Action := (Utp_Log_Action_Collections.Sequence with null record); end AMF.Utp.Log_Actions.Collections;
reznikmm/matreshka
Ada
5,592
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.Standard_Profile_L2.Specifications.Collections is pragma Preelaborate; package Standard_Profile_L2_Specification_Collections is new AMF.Generic_Collections (Standard_Profile_L2_Specification, Standard_Profile_L2_Specification_Access); type Set_Of_Standard_Profile_L2_Specification is new Standard_Profile_L2_Specification_Collections.Set with null record; Empty_Set_Of_Standard_Profile_L2_Specification : constant Set_Of_Standard_Profile_L2_Specification; type Ordered_Set_Of_Standard_Profile_L2_Specification is new Standard_Profile_L2_Specification_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_Standard_Profile_L2_Specification : constant Ordered_Set_Of_Standard_Profile_L2_Specification; type Bag_Of_Standard_Profile_L2_Specification is new Standard_Profile_L2_Specification_Collections.Bag with null record; Empty_Bag_Of_Standard_Profile_L2_Specification : constant Bag_Of_Standard_Profile_L2_Specification; type Sequence_Of_Standard_Profile_L2_Specification is new Standard_Profile_L2_Specification_Collections.Sequence with null record; Empty_Sequence_Of_Standard_Profile_L2_Specification : constant Sequence_Of_Standard_Profile_L2_Specification; private Empty_Set_Of_Standard_Profile_L2_Specification : constant Set_Of_Standard_Profile_L2_Specification := (Standard_Profile_L2_Specification_Collections.Set with null record); Empty_Ordered_Set_Of_Standard_Profile_L2_Specification : constant Ordered_Set_Of_Standard_Profile_L2_Specification := (Standard_Profile_L2_Specification_Collections.Ordered_Set with null record); Empty_Bag_Of_Standard_Profile_L2_Specification : constant Bag_Of_Standard_Profile_L2_Specification := (Standard_Profile_L2_Specification_Collections.Bag with null record); Empty_Sequence_Of_Standard_Profile_L2_Specification : constant Sequence_Of_Standard_Profile_L2_Specification := (Standard_Profile_L2_Specification_Collections.Sequence with null record); end AMF.Standard_Profile_L2.Specifications.Collections;
stcarrez/ada-awa
Ada
1,282
ads
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); -- Test vote. procedure Test_Vote_Undo (T : in out Test); end AWA.Votes.Modules.Tests;
zhmu/ananas
Ada
13,243
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ M E C H -- -- -- -- B o d y -- -- -- -- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Atree; use Atree; with Einfo; use Einfo; with Einfo.Entities; use Einfo.Entities; with Einfo.Utils; use Einfo.Utils; with Errout; use Errout; with Namet; use Namet; with Sem; use Sem; with Sem_Aux; use Sem_Aux; with Sinfo; use Sinfo; with Sinfo.Nodes; use Sinfo.Nodes; with Snames; use Snames; package body Sem_Mech is ------------------------- -- Set_Mechanism_Value -- ------------------------- procedure Set_Mechanism_Value (Ent : Entity_Id; Mech_Name : Node_Id) is procedure Bad_Mechanism; -- Signal bad mechanism name ------------------- -- Bad_Mechanism -- ------------------- procedure Bad_Mechanism is begin Error_Msg_N ("unrecognized mechanism name", Mech_Name); end Bad_Mechanism; -- Start of processing for Set_Mechanism_Value begin if Mechanism (Ent) /= Default_Mechanism then Error_Msg_NE ("mechanism for & has already been set", Mech_Name, Ent); end if; -- MECHANISM_NAME ::= value | reference if Nkind (Mech_Name) = N_Identifier then if Chars (Mech_Name) = Name_Value then Set_Mechanism_With_Checks (Ent, By_Copy, Mech_Name); elsif Chars (Mech_Name) = Name_Reference then Set_Mechanism_With_Checks (Ent, By_Reference, Mech_Name); elsif Chars (Mech_Name) = Name_Copy then Error_Msg_N ("bad mechanism name, Value assumed", Mech_Name); Set_Mechanism (Ent, By_Copy); else Bad_Mechanism; end if; else Bad_Mechanism; end if; end Set_Mechanism_Value; ------------------------------- -- Set_Mechanism_With_Checks -- ------------------------------- procedure Set_Mechanism_With_Checks (Ent : Entity_Id; Mech : Mechanism_Type; Enod : Node_Id) is pragma Unreferenced (Enod); begin -- Right now we don't do any checks, should we do more ??? Set_Mechanism (Ent, Mech); end Set_Mechanism_With_Checks; -------------------- -- Set_Mechanisms -- -------------------- procedure Set_Mechanisms (E : Entity_Id) is Formal : Entity_Id; Typ : Entity_Id; begin -- Skip this processing if inside a generic template. Not only is -- it unnecessary (since neither extra formals nor mechanisms are -- relevant for the template itself), but at least at the moment, -- procedures get frozen early inside a template so attempting to -- look at the formal types does not work too well if they are -- private types that have not been frozen yet. if Inside_A_Generic then return; end if; -- Loop through formals Formal := First_Formal (E); while Present (Formal) loop if Mechanism (Formal) = Default_Mechanism then Typ := Underlying_Type (Etype (Formal)); -- If there is no underlying type, then skip this processing and -- leave the convention set to Default_Mechanism. It seems odd -- that there should ever be such cases but there are (see -- comments for filed regression tests 1418-001 and 1912-009) ??? if No (Typ) then goto Skip_Formal; end if; case Convention (E) is --------- -- Ada -- --------- -- Note: all RM defined conventions are treated the same from -- the point of view of parameter passing mechanism. Convention -- Ghost has the same dynamic semantics as convention Ada. when Convention_Ada | Convention_Entry | Convention_Intrinsic | Convention_Protected | Convention_Stubbed => -- By reference types are passed by reference (RM 6.2(4)) if Is_By_Reference_Type (Typ) then Set_Mechanism (Formal, By_Reference); -- By copy types are passed by copy (RM 6.2(3)) elsif Is_By_Copy_Type (Typ) then Set_Mechanism (Formal, By_Copy); -- All other types we leave the Default_Mechanism set, so -- that the backend can choose the appropriate method. else null; end if; -- Special Ada conventions specifying passing mechanism when Convention_Ada_Pass_By_Copy => Set_Mechanism (Formal, By_Copy); when Convention_Ada_Pass_By_Reference => Set_Mechanism (Formal, By_Reference); ------- -- C -- ------- -- Note: Assembler and Stdcall also use C conventions when Convention_Assembler | Convention_C_Family | Convention_Stdcall => -- The following values are passed by copy -- IN Scalar parameters (RM B.3(66)) -- IN parameters of access types (RM B.3(67)) -- Access parameters (RM B.3(68)) -- Access to subprogram types (RM B.3(71)) -- Note: in the case of access parameters, it is the pointer -- that is passed by value. In GNAT access parameters are -- treated as IN parameters of an anonymous access type, so -- this falls out free. -- The bottom line is that all IN elementary types are -- passed by copy in GNAT. if Is_Elementary_Type (Typ) then if Ekind (Formal) = E_In_Parameter then Set_Mechanism (Formal, By_Copy); -- OUT and IN OUT parameters of elementary types are -- passed by reference (RM B.3(68)). Note that we are -- not following the advice to pass the address of a -- copy to preserve by copy semantics. else Set_Mechanism (Formal, By_Reference); end if; -- Records are normally passed by reference (RM B.3(69)). -- However, this can be overridden by the use of the -- C_Pass_By_Copy pragma or C_Pass_By_Copy convention. elsif Is_Record_Type (Typ) then -- If the record is not convention C, then we always -- pass by reference, C_Pass_By_Copy does not apply. if Convention (Typ) /= Convention_C then Set_Mechanism (Formal, By_Reference); -- OUT and IN OUT parameters of record types are passed -- by reference regardless of pragmas (RM B.3 (69/2)). elsif Ekind (Formal) in E_Out_Parameter | E_In_Out_Parameter then Set_Mechanism (Formal, By_Reference); -- IN parameters of record types are passed by copy only -- when the related type has convention C_Pass_By_Copy -- (RM B.3 (68.1/2)). elsif Ekind (Formal) = E_In_Parameter and then C_Pass_By_Copy (Typ) then Set_Mechanism (Formal, By_Copy); -- Otherwise, for a C convention record, we set the -- convention in accordance with a possible use of -- the C_Pass_By_Copy pragma. Note that the value of -- Default_C_Record_Mechanism in the absence of such -- a pragma is By_Reference. else Set_Mechanism (Formal, Default_C_Record_Mechanism); end if; -- Array types are passed by reference (B.3 (71)) elsif Is_Array_Type (Typ) then Set_Mechanism (Formal, By_Reference); -- For all other types, use Default_Mechanism mechanism else null; end if; ----------- -- COBOL -- ----------- when Convention_COBOL => -- Access parameters (which in GNAT look like IN parameters -- of an access type) are passed by copy (RM B.4(96)) as -- are all other IN parameters of scalar type (RM B.4(97)). -- For now we pass these parameters by reference as well. -- The RM specifies the intent BY_CONTENT, but gigi does -- not currently transform By_Copy properly. If we pass by -- reference, it will be imperative to introduce copies ??? if Is_Elementary_Type (Typ) and then Ekind (Formal) = E_In_Parameter then Set_Mechanism (Formal, By_Reference); -- All other parameters (i.e. all non-scalar types, and -- all OUT or IN OUT parameters) are passed by reference. -- Note that at the moment we are not bothering to make -- copies of scalar types as recommended in the RM. else Set_Mechanism (Formal, By_Reference); end if; ------------- -- Fortran -- ------------- when Convention_Fortran => -- Access types are passed by default (presumably this -- will mean they are passed by copy) if Is_Access_Type (Typ) then null; -- For now, we pass all other parameters by reference. -- It is not clear that this is right in the long run, -- but it seems to correspond to what gnu f77 wants. else Set_Mechanism (Formal, By_Reference); end if; end case; end if; <<Skip_Formal>> -- remove this when problem above is fixed ??? Next_Formal (Formal); end loop; -- Note: there is nothing we need to do for the return type here. -- We deal with returning by reference in the Ada sense, by use of -- the flag By_Ref, rather than by messing with mechanisms. -- A mechanism of Reference for the return means that an extra -- parameter must be provided for the return value (that is the -- DEC meaning of the pragma), and is unrelated to the Ada notion -- of return by reference. -- Note: there was originally code here to set the mechanism to -- By_Reference for types that are "by reference" in the Ada sense, -- but, in accordance with the discussion above, this is wrong, and -- the code was removed. end Set_Mechanisms; end Sem_Mech;
twdroeger/ada-awa
Ada
10,599
adb
----------------------------------------------------------------------- -- awa-workspaces-beans -- Beans for module workspaces -- Copyright (C) 2011, 2012, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Contexts.Flash; with ASF.Contexts.Faces; with ASF.Applications.Messages.Factory; with ADO.Utils; with ADO.Sessions; with ADO.Queries; with ADO.Datasets; with AWA.Services.Contexts; with AWA.Events.Action_Method; package body AWA.Workspaces.Beans is use ASF.Applications; package ASC renames AWA.Services.Contexts; -- ------------------------------ -- Get the value identified by the name. -- ------------------------------ overriding function Get_Value (From : in Member_Bean; Name : in String) return Util.Beans.Objects.Object is begin return AWA.Workspaces.Models.Member_Bean (From).Get_Value (Name); end Get_Value; -- ------------------------------ -- Set the value identified by the name -- ------------------------------ overriding procedure Set_Value (Item : in out Member_Bean; Name : in String; Value : in Util.Beans.Objects.Object) is begin if Name = "id" and not Util.Beans.Objects.Is_Empty (Value) then Item.Set_Id (ADO.Utils.To_Identifier (Value)); else AWA.Workspaces.Models.Member_Bean (Item).Set_Value (Name, Value); end if; end Set_Value; overriding procedure Load (Bean : in out Member_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is pragma Unreferenced (Outcome); begin null; end Load; overriding procedure Delete (Bean : in out Member_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is pragma Unreferenced (Outcome); begin Bean.Module.Delete_Member (Bean.Get_Id); end Delete; -- ------------------------------ -- Create the Member_Bean bean instance. -- ------------------------------ function Create_Member_Bean (Module : in AWA.Workspaces.Modules.Workspace_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Object : constant Member_Bean_Access := new Member_Bean; begin Object.Module := Module; return Object.all'Access; end Create_Member_Bean; -- ------------------------------ -- Get the value identified by the name. -- ------------------------------ overriding function Get_Value (From : in Invitation_Bean; Name : in String) return Util.Beans.Objects.Object is begin if Name = "inviter" then return From.Inviter.Get_Value ("name"); else return AWA.Workspaces.Models.Invitation_Bean (From).Get_Value (Name); end if; end Get_Value; overriding procedure Load (Bean : in out Invitation_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is begin Bean.Module.Load_Invitation (Key => Ada.Strings.Unbounded.To_String (Bean.Key), Invitation => Bean, Inviter => Bean.Inviter); exception when others => Outcome := Ada.Strings.Unbounded.To_Unbounded_String ("not-found"); end Load; overriding procedure Accept_Invitation (Bean : in out Invitation_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is pragma Unreferenced (Outcome); Ctx : constant ASF.Contexts.Faces.Faces_Context_Access := ASF.Contexts.Faces.Current; Flash : constant ASF.Contexts.Faces.Flash_Context_Access := Ctx.Get_Flash; begin Bean.Module.Accept_Invitation (Key => Ada.Strings.Unbounded.To_String (Bean.Key)); Flash.Set_Keep_Messages (True); Messages.Factory.Add_Message (Ctx.all, "workspaces.workspace_welcome_message", Messages.INFO); end Accept_Invitation; overriding procedure Send (Bean : in out Invitation_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is pragma Unreferenced (Outcome); Ctx : constant ASF.Contexts.Faces.Faces_Context_Access := ASF.Contexts.Faces.Current; Flash : constant ASF.Contexts.Faces.Flash_Context_Access := Ctx.Get_Flash; begin Bean.Module.Send_Invitation (Bean); Flash.Set_Keep_Messages (True); Messages.Factory.Add_Message (Ctx.all, "workspaces.workspace_invitation_sent", Messages.INFO); end Send; -- ------------------------------ -- Create the Invitation_Bean bean instance. -- ------------------------------ function Create_Invitation_Bean (Module : in AWA.Workspaces.Modules.Workspace_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Object : constant Invitation_Bean_Access := new Invitation_Bean; begin Object.Module := Module; return Object.all'Access; end Create_Invitation_Bean; -- ------------------------------ -- Event action called to create the workspace when the given event is posted. -- ------------------------------ procedure Create (Bean : in out Workspaces_Bean; Event : in AWA.Events.Module_Event'Class) is pragma Unreferenced (Event); WS : AWA.Workspaces.Models.Workspace_Ref; begin Bean.Module.Create_Workspace (WS); end Create; package Create_Binding is new AWA.Events.Action_Method.Bind (Name => "create", Bean => Workspaces_Bean, Method => Create); Workspaces_Bean_Binding : aliased constant Util.Beans.Methods.Method_Binding_Array := (1 => Create_Binding.Proxy'Access); -- ------------------------------ -- Get the value identified by the name. -- ------------------------------ overriding function Get_Value (From : in Workspaces_Bean; Name : in String) return Util.Beans.Objects.Object is begin if Name = "count" then return Util.Beans.Objects.To_Object (From.Count); else return Util.Beans.Objects.Null_Object; end if; end Get_Value; -- ------------------------------ -- Set the value identified by the name. -- ------------------------------ overriding procedure Set_Value (From : in out Workspaces_Bean; Name : in String; Value : in Util.Beans.Objects.Object) is begin if Name = "count" then From.Count := Util.Beans.Objects.To_Integer (Value); end if; end Set_Value; -- ------------------------------ -- This bean provides some methods that can be used in a Method_Expression -- ------------------------------ overriding function Get_Method_Bindings (From : in Workspaces_Bean) return Util.Beans.Methods.Method_Binding_Array_Access is pragma Unreferenced (From); begin return Workspaces_Bean_Binding'Access; end Get_Method_Bindings; -- ------------------------------ -- Create the Workspaces_Bean bean instance. -- ------------------------------ function Create_Workspaces_Bean (Module : in AWA.Workspaces.Modules.Workspace_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Object : constant Workspaces_Bean_Access := new Workspaces_Bean; begin Object.Module := Module; return Object.all'Access; end Create_Workspaces_Bean; -- ------------------------------ -- Get the value identified by the name. -- ------------------------------ overriding function Get_Value (From : in Member_List_Bean; Name : in String) return Util.Beans.Objects.Object is begin if Name = "members" then return Util.Beans.Objects.To_Object (Value => From.Members_Bean, Storage => Util.Beans.Objects.STATIC); else return AWA.Workspaces.Models.Member_List_Bean (From).Get_Value (Name); end if; end Get_Value; -- ------------------------------ -- Load the list of members. -- ------------------------------ overriding procedure Load (Into : in out Member_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is pragma Unreferenced (Outcome); Ctx : constant ASC.Service_Context_Access := ASC.Current; User : constant ADO.Identifier := Ctx.Get_User_Identifier; Session : ADO.Sessions.Session := Into.Module.Get_Session; Query : ADO.Queries.Context; Count_Query : ADO.Queries.Context; begin Query.Set_Query (AWA.Workspaces.Models.Query_Workspace_Member_List); Count_Query.Set_Count_Query (AWA.Workspaces.Models.Query_Workspace_Member_List); Query.Bind_Param (Name => "user_id", Value => User); Count_Query.Bind_Param (Name => "user_id", Value => User); AWA.Workspaces.Models.List (Into.Members, Session, Query); Into.Count := ADO.Datasets.Get_Count (Session, Count_Query); end Load; -- ------------------------------ -- Create the Member_List_Bean bean instance. -- ------------------------------ function Create_Member_List_Bean (Module : in AWA.Workspaces.Modules.Workspace_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Object : constant Member_List_Bean_Access := new Member_List_Bean; begin Object.Module := Module; Object.Members_Bean := Object.Members'Access; Object.Page_Size := 20; Object.Page := 1; Object.Count := 0; return Object.all'Access; end Create_Member_List_Bean; end AWA.Workspaces.Beans;
sungyeon/drake
Ada
542
adb
with Ada.Unchecked_Conversion; package body System.Stack is pragma Suppress (All_Checks); -- implementation procedure Get ( TEB : C.winnt.struct_TEB_ptr := C.winnt.NtCurrentTeb; Top, Bottom : out Address) is function Cast is new Ada.Unchecked_Conversion ( C.winnt.struct_TEB_ptr, C.winnt.NT_TIB_ptr); TIB : constant C.winnt.NT_TIB_ptr := Cast (TEB); begin Top := Address (TIB.StackLimit); Bottom := Address (TIB.StackBase); end Get; end System.Stack;
AdaCore/libadalang
Ada
2,314
adb
-- This testcase tries to make sure that foreign nodes/exiled entries in -- analysis units are properly updated after various analysis units reloads. with Ada.Text_IO; use Ada.Text_IO; with Langkit_Support.Diagnostics; with Langkit_Support.Text; use Langkit_Support.Text; with Libadalang.Analysis; use Libadalang.Analysis; procedure Main is Ctx : constant Analysis_Context := Create_Context; function Get (Filename : String) return Analysis_Unit; procedure Dump; Pkg : Analysis_Unit; Child : Analysis_Unit; --------- -- Get -- --------- function Get (Filename : String) return Analysis_Unit is Unit : constant Analysis_Unit := Get_From_File (Ctx, Filename, Reparse => True); begin Reparse (Unit); if Has_Diagnostics (Unit) then for D of Diagnostics (Unit) loop Put_Line ("error " & Get_Filename (Unit) & ": " & Langkit_Support.Diagnostics.To_Pretty_String (D)); end loop; raise Program_Error; end if; Populate_Lexical_Env (Unit); return Unit; end Get; ---------- -- Dump -- ---------- procedure Dump is begin Put_Line ("## Pkg ##"); Dump_Lexical_Env (Pkg); Put_Line ("## Child ##"); Dump_Lexical_Env (Child); end Dump; begin -- Load both packages a first time Pkg := Get ("pkg.ads"); Child := Get ("pkg-child.ads"); -- Reload Child, so that the foreign node (Pkg.Child) in Pkg becomes a -- dangling reference. Child := Get ("pkg-child.ads"); -- Then reload Pkg. If foreign nodes handling is correct, this dangling -- reference should have been removed when reaching this statement. -- Otherwise, we will end up trying to access this node, and thus Valgrind -- will report an invalid read error (crash is not guaranteed in case of -- memory corruption...). Put_Line ("==================="); Put_Line ("== Reloading Pkg =="); Put_Line ("==================="); Pkg := Get ("pkg.ads"); Dump; -- Then reload Pkg, so that this time we test exiled entries Put_Line ("====================="); Put_Line ("== Reloading Child =="); Put_Line ("====================="); Child := Get ("pkg-child.ads"); Dump; Put_Line ("Done."); end Main;