repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
Abhiroop/cpa-lang-shootout
Ada
2,354
adb
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Real_Time; use Ada.Real_Time; with Ada.Numerics.Float_Random; use Ada.Numerics.Float_Random; procedure MonteCarloPi is EXPERIMENTS : constant Integer := 100; ITERATIONS : constant Integer := 2**24; task type Master(workers : Integer) is entry Result(pi : in Float); end Master; task body Master is Start : Time; Total : Time_Span; Results : File_Type; Total_Pi : Float; begin Create(File => Results, Mode => Out_File, Name => "results/mcp-ada-" & Integer'Image(workers) & ".csv"); Start := Clock; for i in 1..EXPERIMENTS loop Total_Pi := 0.0; for w in 1..workers loop accept Result(pi : in Float) do Total_Pi := Total_Pi + pi; end Result; end loop; Total_Pi := Total_Pi / Float(workers); Total := (Clock - Start) * 1000000000; Put_Line(Float'Image(Total_Pi) & " in " & Float'Image(Float(To_Duration(Total))) & "ns"); Put_Line(Results, Float'Image(Float(To_Duration(Total)))); Start := Clock; end loop; end Master; Master_Task : access Master := null; task type Worker(iters : Integer); task body Worker is gen : Generator; in_circle : Integer := 0; x : Float; y : Float; pi : Float; begin for i in 1..EXPERIMENTS loop for j in 1..iters loop x := Random(gen); y := Random(gen); if x**2 + y**2 <= 1.0 then in_circle := in_circle + 1; end if; end loop; pi := (4.0 * Float(in_circle)) / Float(iters); Master_Task.Result(pi); in_circle := 0; end loop; end Worker; procedure Experiment(writers : Integer) is workers : array(1..writers) of access Worker; begin Master_Task := new Master(writers); for i in 1..writers loop workers(i) := new Worker(ITERATIONS / writers); end loop; end Experiment; begin Put_Line("Monte Carlo Pi Benchmark"); Put_Line("1"); Experiment(1); Put_Line("2"); Experiment(2); Put_Line("4"); Experiment(4); Put_Line("8"); Experiment(8); Put_Line("16"); Experiment(16); end MonteCarloPi;
zhmu/ananas
Ada
351
ads
package Discr21_Pkg is type Position is record x,y,z : Float; end record; type Dim is (Two, Three); type VPosition (D: Dim := Three) is record x, y : Float; case D is when Two => null; when Three => z : Float; end case; end record; function To_Position (x, y, z : Float) return VPosition; end Discr21_Pkg;
AdaCore/gpr
Ada
3,702
adb
-- -- Copyright (C) 2019-2023, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-Exception -- with Ada.Containers.Ordered_Maps; package body GPR2.Project.Parser.Registry is package Project_Store is new Ada.Containers.Ordered_Maps (GPR2.Path_Name.Object, GPR2.Project.Parser.Object); protected Shared is function Exist (Pathname : GPR2.Path_Name.Object) return Boolean; function Get (Pathname : GPR2.Path_Name.Object) return Project.Parser.Object; procedure Register (Pathname : GPR2.Path_Name.Object; Project : GPR2.Project.Parser.Object); procedure Check_Registry (Pathname : GPR2.Path_Name.Object; Project : out GPR2.Project.Parser.Object); procedure Clear; private Store : Project_Store.Map; end Shared; ------------------- -- Check_Project -- ------------------- function Check_Project (Pathname : GPR2.Path_Name.Object; Project : out GPR2.Project.Parser.Object) return Boolean is begin Shared.Check_Registry (Pathname, Project); return Project.Is_Defined; end Check_Project; ----------------- -- Clear_Cache -- ----------------- procedure Clear_Cache is begin Shared.Clear; end Clear_Cache; ------------ -- Exists -- ------------ function Exists (Pathname : GPR2.Path_Name.Object) return Boolean is begin return Shared.Exist (Pathname); end Exists; --------- -- Get -- --------- function Get (Pathname : GPR2.Path_Name.Object) return GPR2.Project.Parser.Object is begin return Shared.Get (Pathname); end Get; -------------- -- Register -- -------------- procedure Register (Pathname : GPR2.Path_Name.Object; Project : GPR2.Project.Parser.Object) is begin Shared.Register (Pathname, Project); end Register; ------------ -- Shared -- ------------ protected body Shared is -------------------- -- Check_Registry -- -------------------- procedure Check_Registry (Pathname : GPR2.Path_Name.Object; Project : out GPR2.Project.Parser.Object) is CP : constant Project_Store.Cursor := Store.Find (Pathname); begin if Project_Store.Has_Element (CP) then declare Ref : constant Project_Store.Reference_Type := Store.Reference (CP); begin Project := Ref; end; else Project := GPR2.Project.Parser.Undefined; end if; end Check_Registry; ----------- -- Clear -- ----------- procedure Clear is begin Store.Clear; end Clear; ----------- -- Exist -- ----------- function Exist (Pathname : GPR2.Path_Name.Object) return Boolean is begin return Store.Contains (Pathname); end Exist; --------- -- Get -- --------- function Get (Pathname : GPR2.Path_Name.Object) return Project.Parser.Object is begin return Store (Pathname); end Get; -------------- -- Register -- -------------- procedure Register (Pathname : GPR2.Path_Name.Object; Project : GPR2.Project.Parser.Object) is use type Project_Store.Cursor; Pos : constant Project_Store.Cursor := Store.Find (Pathname); begin if Pos = Project_Store.No_Element then Store.Insert (Pathname, Project); end if; end Register; end Shared; end GPR2.Project.Parser.Registry;
coopht/axmpp
Ada
4,733
ads
------------------------------------------------------------------------------ -- -- -- AXMPP Project -- -- -- -- XMPP Library for Ada -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2016, Alexander Basov <[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 Alexander Basov, 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 Ada.Containers.Vectors; with League.Strings; with XML.SAX.Pretty_Writers; with XMPP.Objects; package XMPP.Stream_Features is type XMPP_Stream_Feature is new XMPP.Objects.XMPP_Object with private; type XMPP_Stream_Feature_Access is access all XMPP_Stream_Feature'Class; package Mechanisms_Vectors is new Ada.Containers.Vectors (Natural, Mechanism); procedure Add_Mechanism (Self : in out XMPP_Stream_Feature; Value : Wide_Wide_String); function Create return XMPP_Stream_Feature_Access; overriding function Get_Kind (Self : XMPP_Stream_Feature) return XMPP.Object_Kind; overriding procedure Serialize (Self : XMPP_Stream_Feature; Writer : in out XML.SAX.Pretty_Writers.XML_Pretty_Writer'Class); procedure Set_Has_TLS (Self : in out XMPP_Stream_Feature; Value : Boolean := True); overriding procedure Set_Content (Self : in out XMPP_Stream_Feature; Parameter : League.Strings.Universal_String; Value : League.Strings.Universal_String); function Is_Bind_Supported (Self : XMPP_Stream_Feature) return Boolean; function Is_Session_Supported (Self : XMPP_Stream_Feature) return Boolean; private type XMPP_Stream_Feature is new XMPP.Objects.XMPP_Object with record Has_TLS : Boolean := False; Mechanisms : Mechanisms_Vectors.Vector; Bind_Supported : Boolean := False; Session_Supported : Boolean := False; end record; end XMPP.Stream_Features;
zhmu/ananas
Ada
5,883
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . I M A G E _ W -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ package body System.Image_W is ----------------------------- -- Set_Image_Width_Integer -- ----------------------------- procedure Set_Image_Width_Integer (V : Int; W : Integer; S : out String; P : in out Natural) is Start : Natural; begin -- Positive case can just use the unsigned circuit directly if V >= 0 then Set_Image_Width_Unsigned (Uns (V), W, S, P); -- Negative case has to set a minus sign. Note also that we have to be -- careful not to generate overflow with the largest negative number. else P := P + 1; S (P) := ' '; Start := P; declare pragma Suppress (Overflow_Check); pragma Suppress (Range_Check); begin Set_Image_Width_Unsigned (Uns (-V), W - 1, S, P); end; -- Set minus sign in last leading blank location. Because of the -- code above, there must be at least one such location. while S (Start + 1) = ' ' loop Start := Start + 1; end loop; S (Start) := '-'; end if; end Set_Image_Width_Integer; ------------------------------ -- Set_Image_Width_Unsigned -- ------------------------------ procedure Set_Image_Width_Unsigned (V : Uns; W : Integer; S : out String; P : in out Natural) is Start : constant Natural := P; F, T : Natural; procedure Set_Digits (T : Uns); -- Set digits of absolute value of T ---------------- -- Set_Digits -- ---------------- procedure Set_Digits (T : Uns) is begin if T >= 10 then Set_Digits (T / 10); pragma Assert (P >= (S'First - 1) and P < S'Last and P < Natural'Last); -- No check is done since, as documented in the specification, -- the caller guarantees that S is long enough to hold the result. P := P + 1; S (P) := Character'Val (T mod 10 + Character'Pos ('0')); else pragma Assert (P >= (S'First - 1) and P < S'Last and P < Natural'Last); -- No check is done since, as documented in the specification, -- the caller guarantees that S is long enough to hold the result. P := P + 1; S (P) := Character'Val (T + Character'Pos ('0')); end if; end Set_Digits; -- Start of processing for Set_Image_Width_Unsigned begin Set_Digits (V); -- Add leading spaces if required by width parameter if P - Start < W then F := P; P := P + (W - (P - Start)); T := P; while F > Start loop pragma Assert (T >= S'First and T <= S'Last and F >= S'First and F <= S'Last); -- No check is done since, as documented in the specification, -- the caller guarantees that S is long enough to hold the result. S (T) := S (F); T := T - 1; F := F - 1; end loop; for J in Start + 1 .. T loop pragma Assert (J >= S'First and J <= S'Last); -- No check is done since, as documented in the specification, -- the caller guarantees that S is long enough to hold the result. S (J) := ' '; end loop; end if; end Set_Image_Width_Unsigned; end System.Image_W;
zhmu/ananas
Ada
109
ads
package Sin_Cos is subtype T is Float; procedure Sin_Cos (Angle : T; SinA, CosA : out T); end Sin_Cos;
annexi-strayline/ASAP-UUIDs
Ada
3,664
ads
------------------------------------------------------------------------------ -- -- -- Common UUID Handling Package -- -- - RFC 4122 Implementation - -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Version 5 (SHA-1 Name-Based) UUID Generation Package -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Copyright (C) 2021 ANNEXI-STRAYLINE Trans-Human Ltd. -- -- All rights reserved. -- -- -- -- Original Contributors: -- -- * Richard Wai (ANNEXI-STRAYLINE) -- -- -- -- 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 ANNEXI-STRAYLINE 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 ANNEXI-STRAYLINE -- -- 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. -- -- -- ------------------------------------------------------------------------------ function UUIDs.Version_5 (Namespace: UUIDs.UUID; Name: String) return UUIDs.UUID;
pdaxrom/Kino2
Ada
3,962
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- 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, 1996 -- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: -- $Revision: 1.7 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; package body Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is use type Interfaces.C.int; procedure Set_Field_Type (Fld : in Field; Typ : in AlphaNumeric_Field) is C_AlphaNumeric_Field_Type : C_Field_Type; pragma Import (C, C_AlphaNumeric_Field_Type, "TYPE_ALNUM"); function Set_Fld_Type (F : Field := Fld; Cft : C_Field_Type := C_AlphaNumeric_Field_Type; Arg1 : C_Int) return C_Int; pragma Import (C, Set_Fld_Type, "set_field_type"); Res : Eti_Error; begin Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)); if Res /= E_Ok then Eti_Exception (Res); end if; Wrap_Builtin (Fld, Typ); end Set_Field_Type; end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric;
RREE/ada-util
Ada
7,591
ads
----------------------------------------------------------------------- -- util-http-clients-web -- HTTP Clients with AWS implementation -- Copyright (C) 2011, 2012, 2017, 2019, 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. ----------------------------------------------------------------------- private with Util.Http.Clients.AWS_I.Headers; private with Util.Http.Clients.AWS_I.Response; private with Util.Http.Clients.AWS_I.Client; package Util.Http.Clients.AWS is -- Register the Http manager. procedure Register; private type AWS_Http_Manager is new Http_Manager with record Timeout : Duration := 60.0; end record; type AWS_Http_Manager_Access is access all Http_Manager'Class; procedure Create (Manager : in AWS_Http_Manager; Http : in out Client'Class); overriding procedure Do_Get (Manager : in AWS_Http_Manager; Http : in Client'Class; URI : in String; Reply : out Response'Class); overriding procedure Do_Head (Manager : in AWS_Http_Manager; Http : in Client'Class; URI : in String; Reply : out Response'Class); overriding procedure Do_Post (Manager : in AWS_Http_Manager; Http : in Client'Class; URI : in String; Data : in String; Reply : out Response'Class); overriding procedure Do_Put (Manager : in AWS_Http_Manager; Http : in Client'Class; URI : in String; Data : in String; Reply : out Response'Class); overriding procedure Do_Patch (Manager : in AWS_Http_Manager; Http : in Client'Class; URI : in String; Data : in String; Reply : out Response'Class); overriding procedure Do_Delete (Manager : in AWS_Http_Manager; Http : in Client'Class; URI : in String; Reply : out Response'Class); overriding procedure Do_Options (Manager : in AWS_Http_Manager; Http : in Client'Class; URI : in String; Reply : out Response'Class); -- Set the timeout for the connection. overriding procedure Set_Timeout (Manager : in AWS_Http_Manager; Http : in Client'Class; Timeout : in Duration); type AWS_Http_Request is new Http_Request with record Timeouts : AWS_I.Client.Timeouts_Values := AWS_I.Client.No_Timeout; Headers : AWS_I.Headers.List; end record; type AWS_Http_Request_Access is access all AWS_Http_Request'Class; -- Returns a boolean indicating whether the named request header has already -- been set. overriding function Contains_Header (Http : in AWS_Http_Request; Name : in String) return Boolean; -- Returns the value of the specified request header as a String. If the request -- did not include a header of the specified name, this method returns null. -- If there are multiple headers with the same name, this method returns the -- first head in the request. The header name is case insensitive. You can use -- this method with any response header. overriding function Get_Header (Request : in AWS_Http_Request; Name : in String) return String; -- Sets a request header with the given name and value. If the header had already -- been set, the new value overwrites the previous one. The containsHeader -- method can be used to test for the presence of a header before setting its value. overriding procedure Set_Header (Http : in out AWS_Http_Request; Name : in String; Value : in String); -- Adds a request header with the given name and value. -- This method allows request headers to have multiple values. overriding procedure Add_Header (Http : in out AWS_Http_Request; Name : in String; Value : in String); -- Iterate over the request headers and executes the <b>Process</b> procedure. overriding procedure Iterate_Headers (Request : in AWS_Http_Request; Process : not null access procedure (Name : in String; Value : in String)); type AWS_Http_Response is new Http_Response with record Data : AWS_I.Response.Data; end record; type AWS_Http_Response_Access is access all AWS_Http_Response'Class; -- Returns a boolean indicating whether the named response header has already -- been set. overriding function Contains_Header (Reply : in AWS_Http_Response; Name : in String) return Boolean; -- Returns the value of the specified response header as a String. If the response -- did not include a header of the specified name, this method returns null. -- If there are multiple headers with the same name, this method returns the -- first head in the request. The header name is case insensitive. You can use -- this method with any response header. overriding function Get_Header (Reply : in AWS_Http_Response; Name : in String) return String; -- Sets a message header with the given name and value. If the header had already -- been set, the new value overwrites the previous one. The containsHeader -- method can be used to test for the presence of a header before setting its value. overriding procedure Set_Header (Reply : in out AWS_Http_Response; Name : in String; Value : in String); -- Adds a request header with the given name and value. -- This method allows request headers to have multiple values. overriding procedure Add_Header (Reply : in out AWS_Http_Response; Name : in String; Value : in String); -- Iterate over the response headers and executes the <b>Process</b> procedure. overriding procedure Iterate_Headers (Reply : in AWS_Http_Response; Process : not null access procedure (Name : in String; Value : in String)); -- Get the response body as a string. function Get_Body (Reply : in AWS_Http_Response) return String; -- Get the response status code. overriding function Get_Status (Reply : in AWS_Http_Response) return Natural; end Util.Http.Clients.AWS;
apple-oss-distributions/old_ncurses
Ada
4,146
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.Numeric -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- 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.1.1.1 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; package body Terminal_Interface.Curses.Forms.Field_Types.Numeric is use type Interfaces.C.int; procedure Set_Field_Type (Fld : in Field; Typ : in Numeric_Field) is type Double is new Interfaces.C.double; C_Numeric_Field_Type : C_Field_Type; pragma Import (C, C_Numeric_Field_Type, "TYPE_NUMERIC"); function Set_Fld_Type (F : Field := Fld; Cft : C_Field_Type := C_Numeric_Field_Type; Arg1 : C_Int; Arg2 : Double; Arg3 : Double) return C_Int; pragma Import (C, Set_Fld_Type, "set_field_type"); Res : Eti_Error; begin Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision), Arg2 => Double (Typ.Lower_Limit), Arg3 => Double (Typ.Upper_Limit)); if Res /= E_Ok then Eti_Exception (Res); end if; Wrap_Builtin (Fld, Typ); end Set_Field_Type; end Terminal_Interface.Curses.Forms.Field_Types.Numeric;
stcarrez/ada-css
Ada
427
ads
-- Warning: This lexical scanner is automatically generated by AFLEX. -- It is useless to modify it. Change the ".Y" & ".L" files instead. -- Template: templates/body-lex.adb with Ada.Strings.Unbounded; with CSS.Parser.Parser_Tokens; package CSS.Parser.Lexer is use CSS.Parser.Parser_Tokens; function YYLex return Token; Current_Comment : Ada.Strings.Unbounded.Unbounded_String; end CSS.Parser.Lexer;
sungyeon/drake
Ada
705
ads
pragma License (Unrestricted); -- implementation unit required by compiler with System.Packed_Arrays; package System.Compare_Array_Unsigned_32 is pragma Preelaborate; -- It can not be Pure, subprograms would become __attribute__((const)). type Unsigned_32 is mod 2 ** 32; for Unsigned_32'Size use 32; for Unsigned_32'Alignment use 1; package Ordering is new Packed_Arrays.Ordering (Unsigned_32); -- required to compare arrays by compiler (s-caun32.ads) function Compare_Array_U32 ( Left : Address; Right : Address; Left_Len : Natural; Right_Len : Natural) return Integer renames Ordering.Compare; end System.Compare_Array_Unsigned_32;
AdaCore/gpr
Ada
12,082
adb
-- -- Copyright (C) 2022, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-Exception -- with GPR2.Path_Name; with GPR2.View_Ids; with GPR2.Project.Configuration; with GPR2.Project.Source.Artifact; with GPR2.Project.Source.Part_Set; with GPR2.Source_Info; package body GPR2.C.Utils is function To_Dir (Path : String) return GPR2.Path_Name.Object; ----------------- -- Add_Path -- ----------------- procedure Add_Path (Paths : in out GPR_Paths; Path : String) is begin Paths.Append (GPR2.Path_Name.Create_File (Filename_Optional (Path))); end Add_Path; -------------------- -- Archive_Suffix -- -------------------- function Archive_Suffix (Tree : GPR_Tree) return String is begin return String (Tree.Archive_Suffix); end Archive_Suffix; --------------- -- Attribute -- --------------- function Attribute (View : GPR_View; Name : String; Pkg : String := Empty_String; Index : Index_Type := No_Index) return GPR_Attribute is begin return View.Attribute (Name => (GPR2."+" (Optional_Name_Type (Pkg)), GPR2."+" (Optional_Name_Type (Name))), Index => Index.GPR2_Index, At_Pos => Index.Position); end Attribute; -------------------- -- Callgraph_File -- -------------------- function Callgraph_File (Source : GPR_Source) return String is Artifact : constant GPR2.Project.Source.Artifact.Object := GPR2.Project.Source.Artifact.Create (Source => Source); begin if Artifact.Has_Callgraph then return String (Artifact.Callgraph.Value); else return Empty_String; end if; end Callgraph_File; ------------------- -- Coverage_File -- ------------------- function Coverage_File (Source : GPR_Source) return String is Artifact : constant GPR2.Project.Source.Artifact.Object := GPR2.Project.Source.Artifact.Create (Source => Source); begin if Artifact.Has_Coverage then return String (Artifact.Coverage.Value); else return Empty_String; end if; end Coverage_File; ---------------- -- Delete_Var -- ---------------- procedure Delete_External_Variable (Ctx : in out GPR_Context; Name : String) is begin Ctx.Exclude (Optional_Name_Type (Name)); end Delete_External_Variable; ------------------ -- Dependencies -- ------------------ function Dependencies (Source : GPR_Source; Closure : Boolean := False) return GPR_Sources is Parts : constant GPR2.Project.Source.Part_Set.Object := Source.Dependencies (Closure => Closure); Result : GPR_Sources; begin for Part of Parts loop Result.Include (Part.Source); end loop; return Result; end Dependencies; ---------------- -- Dependency -- ---------------- function Dependency_File (Source : GPR_Source; Index : Unit_Index := No_Unit_Index) return String is Artifact : constant GPR2.Project.Source.Artifact.Object := GPR2.Project.Source.Artifact.Create (Source => Source); begin if Artifact.Has_Dependency (Index => Index) then return String (Artifact.Dependency (Index => Index).Value); else return Empty_String; end if; end Dependency_File; -------------- -- Filename -- -------------- function Filename (Name : String; Position : Unit_Index := No_Unit_Index) return Index_Type is begin return (Kind => Filename_Index, GPR2_Index => GPR2.Project.Attribute_Index.Create (Name, Case_Sensitive => GPR2.File_Names_Case_Sensitive), Position => Position); end Filename; -------------- -- Get_View -- -------------- function Get_View (Tree : GPR_Tree; Id : String) return GPR_View is GPR2_Id : constant GPR2.View_Ids.View_Id := GPR2.View_Ids.Import (Name => GPR2.Value_Type (Id)); begin return GPR2.Project.Tree.Instance_Of (Tree, GPR2_Id); end Get_View; -------------- -- Language -- -------------- function Language (Name : String) return Index_Type is begin return (Kind => Language_Index, GPR2_Index => GPR2.Project.Attribute_Index.Create (Name, Case_Sensitive => False), Position => No_Unit_Index); end Language; function Library_Filename (View : GPR_View) return String is begin return String (View.Library_Filename.Value); end Library_Filename; ------------------ -- Load_Project -- ------------------ procedure Load_Project (Tree : in out GPR_Tree; Filename : String; Context : GPR_Context := Empty_Context; Build_Path : String := Empty_String; Subdirs : String := Empty_String; Src_Subdirs : String := Empty_String; Project_Dir : String := Empty_String; Check_Shared_Lib : Boolean := True; Absent_Dir_Error : Boolean := False; Implicit_With : GPR_Paths := No_Paths; Config : String := Empty_String; Target : String := Empty_String; Runtimes : GPR_Runtimes := No_Runtimes) is Project : constant GPR2.Path_Name.Object := (if Filename'Length > 0 then GPR2.Path_Name.Create_File (Filename_Type (Filename)) else To_Dir (Project_Dir)); Build_Path_P : constant GPR2.Path_Name.Object := To_Dir (Build_Path); begin if Config /= Empty_String then declare Config_Project : GPR2.Project.Configuration.Object; begin Config_Project := GPR2.Project.Configuration.Load (GPR2.Path_Name.Create_File (Filename_Optional (Config))); Tree.Load (Filename => Project, Context => Context, Config => Config_Project, Build_Path => Build_Path_P, Subdirs => Optional_Name_Type (Subdirs), Src_Subdirs => Optional_Name_Type (Src_Subdirs), Check_Shared_Lib => Check_Shared_Lib, Absent_Dir_Error => (if Absent_Dir_Error then GPR2.Project.Tree.Error else GPR2.Project.Tree.Warning), Implicit_With => Implicit_With); end; else Tree.Load_Autoconf (Filename => Project, Context => Context, Build_Path => Build_Path_P, Subdirs => Optional_Name_Type (Subdirs), Src_Subdirs => Optional_Name_Type (Src_Subdirs), Check_Shared_Lib => Check_Shared_Lib, Absent_Dir_Error => (if Absent_Dir_Error then GPR2.Project.Tree.Error else GPR2.Project.Tree.Warning), Implicit_With => Implicit_With, Target => Optional_Name_Type (Target), Language_Runtimes => Runtimes); end if; end Load_Project; ---------- -- Name -- ---------- function Name (Name : String) return Index_Type is begin return (Kind => Filename_Index, GPR2_Index => GPR2.Project.Attribute_Index.Create (Name, Case_Sensitive => False), Position => No_Unit_Index); end Name; function Object_File (Source : GPR_Source; Index : Unit_Index := No_Unit_Index) return String is Artifact : constant GPR2.Project.Source.Artifact.Object := GPR2.Project.Source.Artifact.Create (Source => Source); begin if Artifact.Has_Object_Code (Index => Index) then return String (Artifact.Object_Code (Index => Index).Value); else return Empty_String; end if; end Object_File; procedure Prepend_Search_Path (Tree : in out GPR_Tree; Path : String) is begin Tree.Register_Project_Search_Path (Dir => GPR2.Path_Name.Create_Directory (Filename_Optional (Path))); end Prepend_Search_Path; --------------- -- Root_View -- --------------- function Root_View (Tree : GPR_Tree) return GPR_View is begin return Tree.Root_Project; end Root_View; ------------------ -- Runtime_View -- ------------------ function Runtime_View (Tree : GPR_Tree) return GPR_View is begin if Tree.Has_Runtime_Project then return Tree.Runtime_Project; else return Undefined_View; end if; end Runtime_View; ------------------ -- Search_Paths -- ------------------ function Search_Paths (Tree : GPR_Tree) return GPR_Paths is begin return Tree.Project_Search_Paths; end Search_Paths; --------------------------- -- Set_External_Variable -- --------------------------- procedure Set_External_Variable (Ctx : in out GPR_Context; Name : String; Value : String) is begin Ctx.Include (Optional_Name_Type (Name), Value); end Set_External_Variable; ----------------- -- Set_Runtime -- ----------------- procedure Set_Runtime (Runtimes : in out GPR_Runtimes; Language : String; Runtime : String) is begin Runtimes.Include (GPR2."+" (Optional_Name_Type (Language)), Runtime); end Set_Runtime; ------------ -- Source -- ------------ function Source (View : GPR_View; Path : String) return GPR_Source is begin return View.Source (File => GPR2.Path_Name.Create_File (Filename_Optional (Path))); end Source; ------------ -- Target -- ------------ function Target (Tree : GPR_Tree) return String is begin return String (Tree.Target); end Target; ------------ -- To_Dir -- ------------ function To_Dir (Path : String) return GPR2.Path_Name.Object is begin if Path = Empty_String then return GPR2.Path_Name.Undefined; else return GPR2.Path_Name.Create_Directory (Filename_Optional (Path)); end if; end To_Dir; ------------------------- -- Update_Source_Infos -- ------------------------- procedure Update_Source_Infos (Tree : GPR_Tree; Allow_Source_Parsing : Boolean := False) is use GPR2.Source_Info; Backend_List : Backend_Set := All_Backends; begin if not Allow_Source_Parsing then Backend_List (Source) := False; end if; Tree.Update_Sources (Stop_On_Error => False, With_Runtime => False, Backends => Backend_List); end Update_Source_Infos; procedure Update_Source_Infos (Source : in out GPR_Source; Allow_Source_Parsing : Boolean := False) is use GPR2.Source_Info; Backend_List : Backend_Set := All_Backends; begin if not Allow_Source_Parsing then Backend_List (GPR2.Source_Info.Source) := False; end if; Source.Update (Backends => Backend_List); end Update_Source_Infos; ------------------------ -- Update_Source_List -- ------------------------ procedure Update_Source_List (Tree : GPR_Tree) is use GPR2.Source_Info; Backend_List : constant Backend_Set := (LI => True, others => False); begin -- In theory we should call here Update_Sources with no backend to be -- as fast as possible. In practice calling Update_Sources with no -- backend, does not mark sources as loaded. Thus when looking for -- sources afterward in the view we reload everything with all backends -- including source backend (which is slow). -- Current workaround is to use the "LI" backend only. Tree.Update_Sources (Stop_On_Error => False, With_Runtime => False, Backends => Backend_List); end Update_Source_List; end GPR2.C.Utils;
reznikmm/matreshka
Ada
4,311
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.ODF_String_Constants; package body Matreshka.ODF_FO is ------------------ -- Constructors -- ------------------ package body Constructors is ---------------- -- Initialize -- ---------------- procedure Initialize (Self : not null access Abstract_FO_Attribute_Node'Class; Document : not null Matreshka.DOM_Nodes.Document_Access; Prefix : League.Strings.Universal_String) is begin Matreshka.DOM_Attributes.Constructors.Initialize (Self, Document); Self.Prefix := Prefix; end Initialize; end Constructors; ----------------------- -- Get_Namespace_URI -- ----------------------- overriding function Get_Namespace_URI (Self : not null access constant Abstract_FO_Attribute_Node) return League.Strings.Universal_String is begin return Matreshka.ODF_String_Constants.FO_URI; end Get_Namespace_URI; end Matreshka.ODF_FO;
jorge-real/TTS-Runtime-Ravenscar
Ada
5,786
ads
with Ada.Real_Time; with XAda.Dispatching.TTS; generic with package TTS is new XAda.Dispatching.TTS(<>); package TT_Patterns is type Task_State is abstract tagged record Release_Time: Ada.Real_Time.Time := Ada.Real_Time.Time_First; Work_Id : TTS.TT_Work_Id; Sync_Id : TTS.TT_Sync_Id; end record; -- Simple Task State. Initialize + Main_Code type Simple_Task_State is abstract new Task_State with null record; procedure Initialize (S : in out Simple_Task_State) is abstract; procedure Main_Code (S : in out Simple_Task_State) is abstract; type Any_Simple_Task_State is access all Simple_Task_State'Class; -- Initial_Final Task State. Initialize + Initial_Code + Final_Code type Initial_Final_Task_State is abstract new Task_State with null record; procedure Initialize (S : in out Initial_Final_Task_State) is abstract; procedure Initial_Code (S : in out Initial_Final_Task_State) is abstract; procedure Final_Code (S : in out Initial_Final_Task_State) is abstract; type Any_Initial_Final_Task_State is access all Initial_Final_Task_State'Class; -- Initial_Mandatory_Final Task State. Initialize + Initial_Code + Mandatory_Code + Final_Code type Initial_Mandatory_Final_Task_State is abstract new Task_State with null record; procedure Initialize (S : in out Initial_Mandatory_Final_Task_State) is abstract; procedure Initial_Code (S : in out Initial_Mandatory_Final_Task_State) is abstract; procedure Mandatory_Code (S : in out Initial_Mandatory_Final_Task_State) is abstract; procedure Final_Code (S : in out Initial_Mandatory_Final_Task_State) is abstract; type Any_Initial_Mandatory_Final_Task_State is access all Initial_Mandatory_Final_Task_State'Class; -- Initial_OptionalFinal Task State. Initialize + (S)Initial_Code + [Condition] Final_Code type Initial_OptionalFinal_Task_State is abstract new Task_State with null record; procedure Initialize (S : in out Initial_OptionalFinal_Task_State) is abstract; procedure Initial_Code (S : in out Initial_OptionalFinal_Task_State) is abstract; function Final_Is_Required (S : in out Initial_OptionalFinal_Task_State) return Boolean is abstract; procedure Final_Code (S : in out Initial_OptionalFinal_Task_State) is abstract; type Any_Initial_OptionalFinal_Task_State is access all Initial_OptionalFinal_Task_State'Class; ------------------------------- -- SIMPLE TT TASK -- -- -- -- Requires 1 slot per job -- ------------------------------- task type Simple_TT_Task (Work_Id : TTS.TT_Work_Id; Task_State : Any_Simple_Task_State; Synced_Init : Boolean); --------------------------------- -- INITIAL-FINAL TT TASK -- -- -- -- Requires 2 slots per job, -- -- one for I, and one for F -- --------------------------------- task type Initial_Final_TT_Task (Work_Id : TTS.TT_Work_Id; Task_State : Any_Initial_Final_Task_State; Synced_Init : Boolean); ---------------------------------------------------- -- INITIAL - MANDATORY (sliced) - FINAL TT TASK -- -- -- -- Requires 3 or more slots per job, -- -- for I, M(s) and F parts -- ---------------------------------------------------- task type Initial_Mandatory_Final_TT_Task (Work_Id : TTS.TT_Work_Id; Task_State : Any_Initial_Mandatory_Final_Task_State; Synced_Init : Boolean); ---------------------------------------------------- -- INITIAL and MANDATORY sliced - FINAL TT TASK -- -- -- -- Requires one slot for IMs, which starts the -- -- sliced part, then the sliced sequence -- -- ending with a terminal slot, and a slot for -- -- the F part -- ---------------------------------------------------- task type InitialMandatorySliced_Final_TT_Task (Work_Id : TTS.TT_Work_Id; Task_State : Any_Initial_Mandatory_Final_Task_State; Synced_Init : Boolean); ---------------------------------------------------- -- INITIAL - [FINAL] TT TASK -- -- -- -- Requires one slot for I, starting the -- -- initial part, then ending with an optional -- -- slot for the final part -- ---------------------------------------------------- task type Initial_OptionalFinal_TT_Task (Initial_Work_Id : TTS.TT_Work_Id; Optional_Work_Id : TTS.TT_Work_Id; Task_State : Any_Initial_OptionalFinal_Task_State; Synced_Init : Boolean); ------------------------------------ -- SIMPLE SYNCED ET TASK -- -- -- -- Requires 1 sync slot per job -- ------------------------------------ task type Simple_Synced_ET_Task (Sync_Id : TTS.TT_Sync_Id; Task_State : Any_Simple_Task_State; Synced_Init : Boolean); ---------------------------------------------------- -- SYNC_INITIAL - [FINAL] ET TASK -- -- -- -- Requires one sync slot for starting the -- -- initial part (priority-based), then ending -- -- with an optional slot for the final part -- ---------------------------------------------------- task type SyncedInitial_OptionalFinal_ET_Task (Sync_Id : TTS.TT_Sync_Id; Work_Id : TTS.TT_Work_Id; Task_State : Any_Initial_OptionalFinal_Task_State; Synced_Init : Boolean); end TT_Patterns;
onedigitallife-net/Byron
Ada
246
ads
With Ada.Containers.Indefinite_Vectors, Lexington.Aux; Use Type Lexington.Aux.Token; Package Lexington.Token_Vector_Pkg is new Ada.Containers.Indefinite_Vectors( Index_Type => Positive, Element_Type => Lexington.Aux.Token );
zhmu/ananas
Ada
232
ads
-- { dg-excess-errors "no code generated" } with Size_Attribute1_Pkg2; generic type T is private; package Size_Attribute1_Pkg1 is package My_R is new Size_Attribute1_Pkg2 (T); procedure Dummy; end Size_Attribute1_Pkg1;
seipy/ada-voxel-space-demo
Ada
1,452
adb
with SDL.Events; use SDL.Events; with SDL.Events.Events; use SDL.Events.Events; with SDL.Events.Keyboards; use SDL.Events.Keyboards; package body Keyboard is Is_Pressed : array (Key_Kind) of Boolean := (others => False); ------------ -- Update -- ------------ procedure Update is Event : SDL.Events.Events.Events; Pressed : Boolean; begin while SDL.Events.Events.Poll (Event) loop if Event.Common.Event_Type in Key_Down | Key_Up then Pressed := Event.Common.Event_Type = Key_Down; case Event.Keyboard.Key_Sym.Scan_Code is when Scan_Code_Left => Is_Pressed (Left) := Pressed; when Scan_Code_Right => Is_Pressed (Right) := Pressed; when Scan_Code_Down => Is_Pressed (Backward) := Pressed; when Scan_Code_Up => Is_Pressed (Forward) := Pressed; when Scan_Code_Page_Down => Is_Pressed (Down) := Pressed; when Scan_Code_Page_Up => Is_Pressed (Up) := Pressed; when Scan_Code_Escape => Is_Pressed (Esc) := Pressed; when others => null; end case; end if; end loop; end Update; ------------- -- Pressed -- ------------- function Pressed (Key : Key_Kind) return Boolean is (Is_Pressed (Key)); end Keyboard;
optikos/oasis
Ada
7,771
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Defining_Identifiers; with Program.Elements.Known_Discriminant_Parts; with Program.Elements.Aspect_Specifications; with Program.Elements.Expressions; with Program.Elements.Task_Definitions; with Program.Elements.Task_Type_Declarations; with Program.Element_Visitors; package Program.Nodes.Task_Type_Declarations is pragma Preelaborate; type Task_Type_Declaration is new Program.Nodes.Node and Program.Elements.Task_Type_Declarations.Task_Type_Declaration and Program.Elements.Task_Type_Declarations.Task_Type_Declaration_Text with private; function Create (Task_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Type_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Discriminant_Part : Program.Elements.Known_Discriminant_Parts .Known_Discriminant_Part_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; New_Token : Program.Lexical_Elements.Lexical_Element_Access; Progenitors : Program.Elements.Expressions.Expression_Vector_Access; With_Token_2 : Program.Lexical_Elements.Lexical_Element_Access; Definition : not null Program.Elements.Task_Definitions .Task_Definition_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Task_Type_Declaration; type Implicit_Task_Type_Declaration is new Program.Nodes.Node and Program.Elements.Task_Type_Declarations.Task_Type_Declaration with private; function Create (Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Discriminant_Part : Program.Elements.Known_Discriminant_Parts .Known_Discriminant_Part_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Progenitors : Program.Elements.Expressions .Expression_Vector_Access; Definition : not null Program.Elements.Task_Definitions .Task_Definition_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Task_Type_Declaration with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Task_Type_Declaration is abstract new Program.Nodes.Node and Program.Elements.Task_Type_Declarations.Task_Type_Declaration with record Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Discriminant_Part : Program.Elements.Known_Discriminant_Parts .Known_Discriminant_Part_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Progenitors : Program.Elements.Expressions .Expression_Vector_Access; Definition : not null Program.Elements.Task_Definitions .Task_Definition_Access; end record; procedure Initialize (Self : aliased in out Base_Task_Type_Declaration'Class); overriding procedure Visit (Self : not null access Base_Task_Type_Declaration; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Name (Self : Base_Task_Type_Declaration) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; overriding function Discriminant_Part (Self : Base_Task_Type_Declaration) return Program.Elements.Known_Discriminant_Parts .Known_Discriminant_Part_Access; overriding function Aspects (Self : Base_Task_Type_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; overriding function Progenitors (Self : Base_Task_Type_Declaration) return Program.Elements.Expressions.Expression_Vector_Access; overriding function Definition (Self : Base_Task_Type_Declaration) return not null Program.Elements.Task_Definitions.Task_Definition_Access; overriding function Is_Task_Type_Declaration_Element (Self : Base_Task_Type_Declaration) return Boolean; overriding function Is_Declaration_Element (Self : Base_Task_Type_Declaration) return Boolean; type Task_Type_Declaration is new Base_Task_Type_Declaration and Program.Elements.Task_Type_Declarations.Task_Type_Declaration_Text with record Task_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Type_Token : not null Program.Lexical_Elements .Lexical_Element_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; New_Token : Program.Lexical_Elements.Lexical_Element_Access; With_Token_2 : Program.Lexical_Elements.Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Task_Type_Declaration_Text (Self : aliased in out Task_Type_Declaration) return Program.Elements.Task_Type_Declarations .Task_Type_Declaration_Text_Access; overriding function Task_Token (Self : Task_Type_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Type_Token (Self : Task_Type_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function With_Token (Self : Task_Type_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Is_Token (Self : Task_Type_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function New_Token (Self : Task_Type_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function With_Token_2 (Self : Task_Type_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Semicolon_Token (Self : Task_Type_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Task_Type_Declaration is new Base_Task_Type_Declaration with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Task_Type_Declaration_Text (Self : aliased in out Implicit_Task_Type_Declaration) return Program.Elements.Task_Type_Declarations .Task_Type_Declaration_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Task_Type_Declaration) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Task_Type_Declaration) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Task_Type_Declaration) return Boolean; end Program.Nodes.Task_Type_Declarations;
charlie5/aShell
Ada
509
adb
with Shell.Commands.Unsafe, Ada.Text_IO; procedure Test_Unused_Unsafe_Command is use Ada.Text_IO; begin Put_Line ("Begin 'Unused_Unsafe_Command' test."); declare use Shell.Commands.Unsafe, Shell.Commands.Unsafe.Forge; The_Command : Command := To_Command ("ls /non_existent_file") with Unreferenced; begin null; end; New_Line; Put_Line ("Success."); New_Line; Put_Line ("End 'Unused_Unsafe_Command' test."); end Test_Unused_Unsafe_Command;
AdaCore/training_material
Ada
1,689
adb
with Ada.Text_IO; --$ line answer with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package body Char_Display_Driver is function Make (Surf : Surface_T; Lux_Charset : Sorted_Charset_T) return Char_Display is begin --$ begin question -- TODO return (others => <>); --$ end question --$ begin answer return Char_Display' (Rows => Surf'Length (1), Columns => Surf'Length (2), Surf => Surf, Lux_Charset => Lux_Charset); --$ end answer end Make; function Get_Row (CD : Char_Display; Row : Row_T) return String is --$ begin answer Lux : constant Pixel_Component_Row_Array_T := Row_Luminosity (CD.Surf, Row); S : Unbounded_String; --$ end answer begin --$ begin question -- TODO return ""; --$ end question --$ begin answer for L of Lux loop Append (S, Image (Closest (CD.Lux_Charset, Drawable_Char_Characteristic_T (L)))); end loop; return To_String (S); --$ end answer end Get_Row; procedure Display_Row (CD : Char_Display; Row : Row_T) is begin --$ begin question -- TODO null; --$ end question --$ line answer Ada.Text_IO.Put_Line (Get_Row (CD, Row)); end Display_Row; procedure Display (CD : Char_Display) is begin -- Clear screen Ada.Text_IO.Put (Character'Val (8#33#) & "[2J"); --$ line question -- TODO --$ begin answer for Row in CD.Surf'Range (1) loop Display_Row (CD, Row); end loop; --$ end answer end Display; end Char_Display_Driver;
davidkristola/vole
Ada
24,275
adb
with Ada.Text_IO; with Ada.Exceptions; with Text_IO; -- Old style with Vole_Tokens; with Vole_Goto; with Vole_Shift_Reduce; with vole_lex_dfa; with kv.avm.Vole_Lex; with kv.avm.Vole_Tree; with kv.avm.Instructions; with kv.avm.Registers; use Ada.Text_IO; use Ada.Exceptions; use Text_IO; -- Old style use Vole_Tokens; use Vole_Goto; use Vole_Shift_Reduce; use vole_lex_dfa; use kv.avm.Vole_Lex; use kv.avm.Vole_Tree; use kv.avm.Instructions; use kv.avm.Registers; package body kv.avm.vole_parser is procedure YYError(Text : in String) is begin New_Line; Put_Line("PARSE ERROR on line"&Positive'IMAGE(kv.avm.Vole_Lex.Line_Number)&" parsing '"&vole_lex_dfa.yytext&"'"); end YYError; procedure YYParse is -- Rename User Defined Packages to Internal Names. package yy_goto_tables renames Vole_Goto; package yy_shift_reduce_tables renames Vole_Shift_Reduce; package yy_tokens renames Vole_Tokens; use yy_tokens, yy_goto_tables, yy_shift_reduce_tables; procedure yyerrok; procedure yyclearin; package yy is -- the size of the value and state stacks stack_size : constant Natural := 300; -- subtype rule is natural; subtype parse_state is natural; -- subtype nonterminal is integer; -- encryption constants default : constant := -1; first_shift_entry : constant := 0; accept_code : constant := -3001; error_code : constant := -3000; -- stack data used by the parser tos : natural := 0; value_stack : array(0..stack_size) of yy_tokens.yystype; state_stack : array(0..stack_size) of parse_state; -- current input symbol and action the parser is on action : integer; rule_id : rule; input_symbol : yy_tokens.token; -- error recovery flag error_flag : natural := 0; -- indicates 3 - (number of valid shifts after an error occurs) look_ahead : boolean := true; index : integer; -- Is Debugging option on or off DEBUG : boolean renames Verbose; end yy; function goto_state (state : yy.parse_state; sym : nonterminal) return yy.parse_state; function parse_action (state : yy.parse_state; t : yy_tokens.token) return integer; pragma inline(goto_state, parse_action); function goto_state(state : yy.parse_state; sym : nonterminal) return yy.parse_state is index : integer; begin index := goto_offset(state); while integer(goto_matrix(index).nonterm) /= sym loop index := index + 1; end loop; return integer(goto_matrix(index).newstate); end goto_state; function parse_action(state : yy.parse_state; t : yy_tokens.token) return integer is index : integer; tok_pos : integer; default : constant integer := -1; begin tok_pos := yy_tokens.token'pos(t); index := shift_reduce_offset(state); while integer(shift_reduce_matrix(index).t) /= tok_pos and then integer(shift_reduce_matrix(index).t) /= default loop index := index + 1; end loop; return integer(shift_reduce_matrix(index).act); end parse_action; -- error recovery stuff procedure handle_error is temp_action : integer; begin if yy.error_flag = 3 then -- no shift yet, clobber input. if yy.debug then text_io.put_line("Ayacc.YYParse: Error Recovery Clobbers " & yy_tokens.token'image(yy.input_symbol)); end if; if yy.input_symbol = yy_tokens.end_of_input then -- don't discard, if yy.debug then text_io.put_line("Ayacc.YYParse: Can't discard END_OF_INPUT, quiting..."); end if; raise yy_tokens.syntax_error; end if; yy.look_ahead := true; -- get next token return; -- and try again... end if; if yy.error_flag = 0 then -- brand new error yyerror("Syntax Error"); end if; yy.error_flag := 3; -- find state on stack where error is a valid shift -- if yy.debug then text_io.put_line("Ayacc.YYParse: Looking for state with error as valid shift"); end if; loop if yy.debug then text_io.put_line("Ayacc.YYParse: Examining State " & yy.parse_state'image(yy.state_stack(yy.tos))); end if; temp_action := parse_action(yy.state_stack(yy.tos), error); if temp_action >= yy.first_shift_entry then if yy.tos = yy.stack_size then text_io.put_line(" Stack size exceeded on state_stack"); raise yy_Tokens.syntax_error; end if; yy.tos := yy.tos + 1; yy.state_stack(yy.tos) := temp_action; exit; end if; Decrement_Stack_Pointer : begin yy.tos := yy.tos - 1; exception when Constraint_Error => yy.tos := 0; end Decrement_Stack_Pointer; if yy.tos = 0 then if yy.debug then text_io.put_line("Ayacc.YYParse: Error recovery popped entire stack, aborting..."); end if; raise yy_tokens.syntax_error; end if; end loop; if yy.debug then text_io.put_line("Ayacc.YYParse: Shifted error token in state " & yy.parse_state'image(yy.state_stack(yy.tos))); end if; end handle_error; -- print debugging information for a shift operation procedure shift_debug(state_id: yy.parse_state; lexeme: yy_tokens.token) is begin text_io.put_line("Ayacc.YYParse: Shift "& yy.parse_state'image(state_id)&" on input symbol "& yy_tokens.token'image(lexeme) ); end; -- print debugging information for a reduce operation procedure reduce_debug(rule_id: rule; state_id: yy.parse_state) is begin text_io.put_line("Ayacc.YYParse: Reduce by rule "&rule'image(rule_id)&" goto state "& yy.parse_state'image(state_id)); end; -- make the parser believe that 3 valid shifts have occured. -- used for error recovery. procedure yyerrok is begin yy.error_flag := 0; end yyerrok; -- called to clear input symbol that caused an error. procedure yyclearin is begin -- yy.input_symbol := yylex; yy.look_ahead := true; end yyclearin; begin -- initialize by pushing state 0 and getting the first input symbol yy.state_stack(yy.tos) := 0; loop yy.index := shift_reduce_offset(yy.state_stack(yy.tos)); if integer(shift_reduce_matrix(yy.index).t) = yy.default then yy.action := integer(shift_reduce_matrix(yy.index).act); else if yy.look_ahead then yy.look_ahead := false; yy.input_symbol := yylex; end if; yy.action := parse_action(yy.state_stack(yy.tos), yy.input_symbol); end if; if yy.action >= yy.first_shift_entry then -- SHIFT if yy.debug then shift_debug(yy.action, yy.input_symbol); end if; -- Enter new state if yy.tos = yy.stack_size then text_io.put_line(" Stack size exceeded on state_stack"); raise yy_Tokens.syntax_error; end if; yy.tos := yy.tos + 1; yy.state_stack(yy.tos) := yy.action; yy.value_stack(yy.tos) := yylval; if yy.error_flag > 0 then -- indicate a valid shift yy.error_flag := yy.error_flag - 1; end if; -- Advance lookahead yy.look_ahead := true; elsif yy.action = yy.error_code then -- ERROR handle_error; elsif yy.action = yy.accept_code then if yy.debug then text_io.put_line("Ayacc.YYParse: Accepting Grammar..."); end if; exit; else -- Reduce Action -- Convert action into a rule yy.rule_id := -1 * yy.action; -- Execute User Action -- user_action(yy.rule_id); case yy.rule_id is when 1 => --#line 64 Build_Program( yyval.Node, Line_Number, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); Save_Program( yyval.Node); when 4 => --#line 76 Put_Line("unimp 01"); when 5 => --#line 80 Put_Line("unimp 02"); when 6 => --#line 84 Put_Line("unimp 03"); when 7 => --#line 89 yyval.Node := yy.value_stack(yy.tos-2).Node; -- Copy up yy.value_stack(yy.tos-2).Node := null; -- Only keep one reference to this node. Add_Next( yyval.Node, yy.value_stack(yy.tos).Node); when 8 => --#line 97 yyval.Node := null; when 9 => --#line 98 yyval.Node := yy.value_stack(yy.tos).Node; when 10 => --#line 103 Build_Actor_Node( yyval.Node, Line_Number, yy.value_stack(yy.tos-4).Node, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos-1).Node); when 11 => --#line 105 Build_Actor_Node( yyval.Node, Line_Number, yy.value_stack(yy.tos-6).Node, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos-4).Node); when 12 => --#line 109 yyval.Node := null; when 13 => --#line 110 yyval.Node := yy.value_stack(yy.tos).Node; when 14 => --#line 115 yyval.Node := yy.value_stack(yy.tos-1).Node; -- Copy up yy.value_stack(yy.tos-1).Node := null; -- Only keep one reference to this node. Add_Next( yyval.Node, yy.value_stack(yy.tos).Node); when 15 => --#line 123 Build_Attribute( yyval.Node, Line_Number, yy.value_stack(yy.tos-3).Node, yy.value_stack(yy.tos-1).Node); when 16 => --#line 124 Build_Attribute( yyval.Node, Line_Number, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 17 => --#line 128 Build_Kind( yyval.Node, Line_Number, Bit_Or_Boolean); when 18 => --#line 129 Build_Kind( yyval.Node, Line_Number, Bit_Or_Boolean, yy.value_stack(yy.tos-1).Node); when 19 => --#line 133 yyval.Node := yy.value_stack(yy.tos).Node; when 20 => --#line 134 yyval.Node := yy.value_stack(yy.tos).Node; when 21 => --#line 135 yyval.Node := yy.value_stack(yy.tos).Node; when 22 => --#line 136 yyval.Node := yy.value_stack(yy.tos).Node; when 23 => --#line 137 yyval.Node := yy.value_stack(yy.tos).Node; when 24 => --#line 138 yyval.Node := yy.value_stack(yy.tos).Node; when 25 => --#line 139 yyval.Node := yy.value_stack(yy.tos).Node; when 26 => --#line 144 Build_Kind( yyval.Node, Line_Number, Signed_Integer); when 27 => --#line 146 Build_Kind( yyval.Node, Line_Number, Signed_Integer, yy.value_stack(yy.tos).Node); when 28 => --#line 151 Build_Kind( yyval.Node, Line_Number, Unsigned_Integer); when 29 => --#line 153 Build_Kind( yyval.Node, Line_Number, Unsigned_Integer, yy.value_stack(yy.tos).Node); when 30 => --#line 157 Put_Line("unimp 06"); when 31 => --#line 158 Put_Line("unimp 07"); when 32 => --#line 162 Put_Line("unimp 08"); when 33 => --#line 163 Build_Kind( yyval.Node, Line_Number, Immutable_String, yy.value_stack(yy.tos).Node); when 34 => --#line 168 Build_Kind( yyval.Node, Line_Number, Actor_Definition); when 35 => --#line 170 Build_Kind( yyval.Node, Line_Number, Actor_Definition, yy.value_stack(yy.tos).Node); when 36 => --#line 172 Build_Kind( yyval.Node, Line_Number, Actor_Definition, New_Constructor_Send( yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node)); when 37 => --#line 176 Put_Line("unimp 10"); when 38 => --#line 177 Put_Line("unimp 11"); when 39 => --#line 182 Build_Kind( yyval.Node, Line_Number, Bit_Or_Boolean); when 40 => --#line 184 Build_Kind( yyval.Node, Line_Number, Bit_Or_Boolean, yy.value_stack(yy.tos).Node); when 41 => --#line 190 Build_Kind( yyval.Node, Line_Number, Signed_Integer); when 42 => --#line 192 Build_Kind( yyval.Node, Line_Number, Unsigned_Integer); when 43 => --#line 194 Build_Kind( yyval.Node, Line_Number, Floatingpoint); when 44 => --#line 196 Build_Kind( yyval.Node, Line_Number, Actor_Definition); when 45 => --#line 198 Build_Kind( yyval.Node, Line_Number, Tuple); when 46 => --#line 200 Build_Kind( yyval.Node, Line_Number, Immutable_String); when 47 => --#line 205 yyval.Node := yy.value_stack(yy.tos-2).Node; -- Copy up yy.value_stack(yy.tos-2).Node := null; -- Only keep one reference to this node. Add_Next( yyval.Node, yy.value_stack(yy.tos).Node); when 48 => --#line 213 yyval.Node := null; when 49 => --#line 214 yyval.Node := yy.value_stack(yy.tos).Node; when 50 => --#line 219 Build_Message( yyval.Node, Line_Number, True, yy.value_stack(yy.tos-4).Node, yy.value_stack(yy.tos-3).Node, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node, null); when 51 => --#line 221 Build_Message( yyval.Node, Line_Number, True, yy.value_stack(yy.tos-4).Node, yy.value_stack(yy.tos-3).Node, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node, yy.value_stack(yy.tos-6).Node); when 52 => --#line 223 Build_Message( yyval.Node, Line_Number, False, yy.value_stack(yy.tos-4).Node, yy.value_stack(yy.tos-3).Node, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node, null); when 53 => --#line 225 Build_Constructor( yyval.Node, Line_Number, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 54 => --#line 230 yyval.Node := yy.value_stack(yy.tos-1).Node; when 55 => --#line 234 yyval.Node := null; when 56 => --#line 235 yyval.Node := yy.value_stack(yy.tos).Node; when 57 => --#line 240 yyval.Node := yy.value_stack(yy.tos).Node; when 58 => --#line 242 yyval.Node := yy.value_stack(yy.tos-2).Node; -- Copy up yy.value_stack(yy.tos-2).Node := null; -- Only keep one reference to this node. Add_Next( yyval.Node, yy.value_stack(yy.tos).Node); when 59 => --#line 251 Build_Arg( yyval.Node, Line_Number, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 60 => --#line 256 Build_Id_Node( yyval.Node, Line_Number, yytext); when 61 => --#line 260 yyval.Node := yy.value_stack(yy.tos-1).Node; when 62 => --#line 264 yyval.Node := null; when 63 => --#line 265 yyval.Node := yy.value_stack(yy.tos).Node; when 64 => --#line 270 yyval.Node := yy.value_stack(yy.tos-2).Node; -- Copy up yy.value_stack(yy.tos-2).Node := null; -- Only keep one reference to this node. Add_Next( yyval.Node, yy.value_stack(yy.tos).Node); when 65 => --#line 278 yyval.Node := yy.value_stack(yy.tos).Node; when 66 => --#line 279 yyval.Node := yy.value_stack(yy.tos).Node; when 67 => --#line 280 yyval.Node := yy.value_stack(yy.tos).Node; when 68 => --#line 281 yyval.Node := yy.value_stack(yy.tos).Node; when 69 => --#line 282 yyval.Node := yy.value_stack(yy.tos).Node; when 70 => --#line 283 yyval.Node := yy.value_stack(yy.tos).Node; when 71 => --#line 284 yyval.Node := yy.value_stack(yy.tos).Node; when 72 => --#line 285 yyval.Node := yy.value_stack(yy.tos).Node; when 73 => --#line 289 Build_While( yyval.Node, Line_Number, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 74 => --#line 290 Build_While( yyval.Node, Line_Number, null, yy.value_stack(yy.tos).Node); when 75 => --#line 294 Build_Assert( yyval.Node, Line_Number, yy.value_stack(yy.tos).Node); when 76 => --#line 298 yyval.Node := yy.value_stack(yy.tos).Node; when 77 => --#line 302 yyval.Node := yy.value_stack(yy.tos).Node; when 78 => --#line 303 yyval.Node := yy.value_stack(yy.tos).Node; when 79 => --#line 307 Build_If( yyval.Node, Line_Number, yy.value_stack(yy.tos-4).Node, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 80 => --#line 311 yyval.Node := null; when 81 => --#line 312 yyval.Node := yy.value_stack(yy.tos).Node; when 82 => --#line 313 Build_If( yyval.Node, Line_Number, yy.value_stack(yy.tos-5).Node, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos-1).Node); when 83 => --#line 317 Build_Return( yyval.Node, Line_Number, yy.value_stack(yy.tos).Node); when 84 => --#line 321 yyval.Node := null; when 85 => --#line 322 yyval.Node := yy.value_stack(yy.tos).Node; when 86 => --#line 323 yyval.Node := yy.value_stack(yy.tos).Node; when 87 => --#line 324 yyval.Node := yy.value_stack(yy.tos).Node; when 88 => --#line 325 yyval.Node := yy.value_stack(yy.tos).Node; when 89 => --#line 326 yyval.Node := yy.value_stack(yy.tos).Node; when 90 => --#line 331 yyval.Node := yy.value_stack(yy.tos-1).Node; when 91 => --#line 335 Put_Line("unimp 30"); when 92 => --#line 340 Put_Line("unimp 29"); when 93 => --#line 344 Build_Send_Statement( yyval.Node, Line_Number, Self, null, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 94 => --#line 348 Build_Send_Statement( yyval.Node, Line_Number, Actor, yy.value_stack(yy.tos-3).Node, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 95 => --#line 352 Build_Call_Statement( yyval.Node, Line_Number, Self, null, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 96 => --#line 356 Build_Call_Statement( yyval.Node, Line_Number, Super, null, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 97 => --#line 360 Build_Call_Statement( yyval.Node, Line_Number, Actor, yy.value_stack(yy.tos-3).Node, yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node); when 98 => --#line 364 Build_Assignment( yyval.Node, Line_Number, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 99 => --#line 365 Raise_Exception(Unimplemented_Error'IDENTITY, "Rule statement_assign (tuple)"); when 100 => --#line 369 yyval.Node := yy.value_stack(yy.tos).Node; when 101 => --#line 370 yyval.Node := yy.value_stack(yy.tos).Node; when 102 => --#line 371 yyval.Node := yy.value_stack(yy.tos).Node; when 103 => --#line 372 yyval.Node := yy.value_stack(yy.tos).Node; when 104 => --#line 376 Build_Op_Expression( yyval.Node, Line_Number, Op_Pos, null, yy.value_stack(yy.tos).Node); when 105 => --#line 380 Build_Kind( yyval.Node, Line_Number, Actor_Definition, New_Constructor_Send( yy.value_stack(yy.tos-1).Node, yy.value_stack(yy.tos).Node)); when 106 => --#line 385 Build_Var_Expression( yyval.Node, Line_Number, True, yy.value_stack(yy.tos).Node); when 107 => --#line 387 Build_Var_Expression( yyval.Node, Line_Number, False, yy.value_stack(yy.tos).Node); when 108 => --#line 391 Put_Line("unimp 35"); when 109 => --#line 392 Put_Line("unimp 36"); when 110 => --#line 393 Put_Line("unimp 37"); when 111 => --#line 394 Put_Line("unimp 38"); when 112 => --#line 398 yyval.Node := null; when 113 => --#line 400 yyval.Node := yy.value_stack(yy.tos).Node; when 114 => --#line 405 yyval.Node := yy.value_stack(yy.tos).Node; when 115 => --#line 407 yyval.Node := yy.value_stack(yy.tos-2).Node; -- Copy up yy.value_stack(yy.tos-2).Node := null; -- Only keep one reference to this node. Add_Next( yyval.Node, yy.value_stack(yy.tos).Node); when 116 => --#line 415 Build_Op_Expression( yyval.Node, Line_Number, Add, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 117 => --#line 416 Build_Op_Expression( yyval.Node, Line_Number, Sub, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 118 => --#line 417 Build_Op_Expression( yyval.Node, Line_Number, Mul, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 119 => --#line 418 Build_Op_Expression( yyval.Node, Line_Number, Div, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 120 => --#line 419 Build_Op_Expression( yyval.Node, Line_Number, Modulo, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 121 => --#line 420 Build_Op_Expression( yyval.Node, Line_Number, Exp, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 122 => --#line 421 Build_Op_Expression( yyval.Node, Line_Number, Eq, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 123 => --#line 422 Build_Op_Expression( yyval.Node, Line_Number, Neq, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 124 => --#line 423 Build_Op_Expression( yyval.Node, Line_Number, L_t, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 125 => --#line 424 Build_Op_Expression( yyval.Node, Line_Number, Lte, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 126 => --#line 425 Build_Op_Expression( yyval.Node, Line_Number, G_t, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 127 => --#line 426 Build_Op_Expression( yyval.Node, Line_Number, Gte, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 128 => --#line 427 Build_Op_Expression( yyval.Node, Line_Number, Shift_Left, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 129 => --#line 428 Build_Op_Expression( yyval.Node, Line_Number, Shift_Right, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 130 => --#line 429 Build_Op_Expression( yyval.Node, Line_Number, B_And, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 131 => --#line 430 Build_Op_Expression( yyval.Node, Line_Number, B_Or , yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 132 => --#line 431 Build_Op_Expression( yyval.Node, Line_Number, B_Xor, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 133 => --#line 432 yyval.Node := yy.value_stack(yy.tos-1).Node; when 134 => --#line 433 Build_Op_Expression( yyval.Node, Line_Number, Negate, yy.value_stack(yy.tos).Node); when 135 => --#line 434 Build_Op_Expression( yyval.Node, Line_Number, Op_Neg, yy.value_stack(yy.tos).Node); when 136 => --#line 435 Build_Op_Expression( yyval.Node, Line_Number, Op_Pos, yy.value_stack(yy.tos).Node); when 137 => --#line 436 yyval.Node := yy.value_stack(yy.tos).Node; when 138 => --#line 437 yyval.Node := yy.value_stack(yy.tos).Node; when 139 => --#line 441 Build_Literal_Expression( yyval.Node, Line_Number, Signed_Integer, yytext); when 140 => --#line 442 Build_Literal_Expression( yyval.Node, Line_Number, Floatingpoint, yytext); when 141 => --#line 443 Build_Literal_Expression( yyval.Node, Line_Number, Immutable_String, yytext); when 142 => --#line 444 yyval.Node := yy.value_stack(yy.tos).Node; when 143 => --#line 448 Build_Literal_Expression( yyval.Node, Line_Number, Bit_Or_Boolean, yytext); when 144 => --#line 449 Build_Literal_Expression( yyval.Node, Line_Number, Bit_Or_Boolean, yytext); when 145 => --#line 454 Build_Var_Def( yyval.Node, Line_Number, yy.value_stack(yy.tos-2).Node, yy.value_stack(yy.tos).Node); when 146 => --#line 458 Build_Emit( yyval.Node, Line_Number, yy.value_stack(yy.tos).Node); when others => null; end case; -- Pop RHS states and goto next state yy.tos := yy.tos - rule_length(yy.rule_id) + 1; if yy.tos > yy.stack_size then text_io.put_line(" Stack size exceeded on state_stack"); raise yy_Tokens.syntax_error; end if; yy.state_stack(yy.tos) := goto_state(yy.state_stack(yy.tos-1) , get_lhs_rule(yy.rule_id)); yy.value_stack(yy.tos) := yyval; if yy.debug then reduce_debug(yy.rule_id, goto_state(yy.state_stack(yy.tos - 1), get_lhs_rule(yy.rule_id))); end if; end if; end loop; end yyparse; end kv.avm.vole_parser;
AdaCore/Ada_Drivers_Library
Ada
4,315
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, 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 stm32f4_discovery.c -- -- @author MCD Application Team -- -- @version V1.1.0 -- -- @date 19-June-2014 -- -- @brief This file provides set of firmware functions to manage Leds -- -- and push-button available on STM32F42-Discovery Kit from -- -- STMicroelectronics. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ package body STM32.Board is ------------------ -- All_LEDs_Off -- ------------------ procedure All_LEDs_Off is begin Clear (All_LEDs); end All_LEDs_Off; ----------------- -- All_LEDs_On -- ----------------- procedure All_LEDs_On is begin Set (All_LEDs); end All_LEDs_On; --------------------- -- Initialize_LEDs -- --------------------- procedure Initialize_LEDs is begin Enable_Clock (All_LEDs); Configure_IO (All_LEDs, (Mode_Out, Resistors => Floating, Output_Type => Push_Pull, Speed => Speed_100MHz)); end Initialize_LEDs; -------------------------------- -- Configure_User_Button_GPIO -- -------------------------------- procedure Configure_User_Button_GPIO is begin Enable_Clock (User_Button_Point); Configure_IO (User_Button_Point, (Mode_In, Resistors => Floating)); end Configure_User_Button_GPIO; end STM32.Board;
io7m/coreland-opengl-ada
Ada
506
ads
package OpenGL.Light is type Light_Index_t is (Light_0, Light_1, Light_2, Light_3, Light_4, Light_5, Light_6, Light_7); -- proc_map : glEnable procedure Enable (Index : in Light_Index_t); pragma Inline (Enable); -- proc_map : glDisable procedure Disable (Index : in Light_Index_t); pragma Inline (Disable); -- proc_map : glIsEnabled function Is_Enabled (Index : in Light_Index_t) return Boolean; pragma Inline (Is_Enabled); end OpenGL.Light;
Fabien-Chouteau/samd51-hal
Ada
2,395
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, 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 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. -- -- -- ------------------------------------------------------------------------------ package SAM is end SAM;
AaronC98/PlaneSystem
Ada
2,902
ads
------------------------------------------------------------------------------ -- Templates Parser -- -- -- -- Copyright (C) 2003-2012, 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/>. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ------------------------------------------------------------------------------ package Templates_Parser.Query is function Kind (Association : Templates_Parser.Association) return Association_Kind; -- Returns the kind for this association function Variable (Association : Templates_Parser.Association) return String; -- Returns the variable name for Association function Composite (Association : Templates_Parser.Association) return Tag; -- Returns the vector tag for this association, raises Constraint_Error -- if it is not a vector. function Nested_Level (T : Tag) return Positive; -- Returns the nested level for tag T, 1 means that this is a vector tag, -- 2 that it is a matrix. end Templates_Parser.Query;
rbkmoney/swagger-codegen
Ada
49
ads
package Samples.Petstore is end Samples.Petstore;
reznikmm/matreshka
Ada
3,627
ads
------------------------------------------------------------------------------ -- -- -- 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 XML.DOM.Attributes; package ODF.DOM.Attributes.Text.Offset is type ODF_Text_Offset is new XML.DOM.Attributes.DOM_Attribute with private; private type ODF_Text_Offset is new XML.DOM.Attributes.DOM_Attribute with null record; end ODF.DOM.Attributes.Text.Offset;
RREE/ada-util
Ada
64,704
adb
----------------------------------------------------------------------- -- util-beans-objects -- Generic Typed Data Representation -- Copyright (C) 2009, 2010, 2011, 2013, 2016, 2017, 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 Ada.Characters.Conversions; with Ada.Unchecked_Deallocation; with Ada.Tags; with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; with Util.Beans.Basic; package body Util.Beans.Objects is use Util.Concurrent.Counters; use Ada.Characters.Conversions; function UTF8_Decode (S : in String) return Wide_Wide_String renames Ada.Strings.UTF_Encoding.Wide_Wide_Strings.Decode; -- Find the data type to be used for an arithmetic operation between two objects. function Get_Arithmetic_Type (Left, Right : Object) return Data_Type; -- Find the data type to be used for a composition operation between two objects. function Get_Compose_Type (Left, Right : Object) return Data_Type; -- Find the best type to be used to compare two operands. function Get_Compare_Type (Left, Right : Object) return Data_Type; Integer_Type : aliased constant Int_Type := Int_Type '(null record); Bool_Type : aliased constant Boolean_Type := Boolean_Type '(null record); Str_Type : aliased constant String_Type := String_Type '(null record); WString_Type : aliased constant Wide_String_Type := Wide_String_Type '(null record); Flt_Type : aliased constant Float_Type := Float_Type '(null record); Duration_Type : aliased constant Duration_Type_Def := Duration_Type_Def '(null record); Bn_Type : aliased constant Bean_Type := Bean_Type '(null record); Ar_Type : aliased constant Array_Type := Array_Type '(null record); -- ------------------------------ -- Convert the value into a wide string. -- ------------------------------ function To_Wide_Wide_String (Type_Def : in Basic_Type; Value : in Object_Value) return Wide_Wide_String is begin return UTF8_Decode (Object_Type'Class (Type_Def).To_String (Value)); end To_Wide_Wide_String; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Basic_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def, Value); begin return 0.0; end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Basic_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def, Value); begin return False; end To_Boolean; -- ------------------------------ -- Convert the value into a duration. -- ------------------------------ function To_Duration (Type_Def : in Basic_Type; Value : in Object_Value) return Duration is pragma Unreferenced (Type_Def, Value); begin return 0.0; end To_Duration; -- ------------------------------ -- Returns False -- ------------------------------ function Is_Empty (Type_Def : in Basic_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def, Value); begin return False; end Is_Empty; -- ------------------------------ -- Null Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : Null_Type) return String is pragma Unreferenced (Type_Def); begin return "Null"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : Null_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_NULL; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Null_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def, Value); begin return "null"; end To_String; -- ------------------------------ -- Returns True -- ------------------------------ function Is_Empty (Type_Def : in Null_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def, Value); begin return True; end Is_Empty; -- ------------------------------ -- Integer Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : Int_Type) return String is pragma Unreferenced (Type_Def); begin return "Integer"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : Int_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_INTEGER; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Int_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); S : constant String := Long_Long_Integer'Image (Value.Int_Value); begin if Value.Int_Value >= 0 then return S (S'First + 1 .. S'Last); else return S; end if; end To_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in Int_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def); begin return Value.Int_Value; end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Int_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def); begin return Long_Long_Float (Value.Int_Value); end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Int_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); begin return Value.Int_Value /= 0; end To_Boolean; -- ------------------------------ -- Convert the value into a duration. -- ------------------------------ function To_Duration (Type_Def : in Int_Type; Value : in Object_Value) return Duration is pragma Unreferenced (Type_Def); begin return Duration (Value.Int_Value); end To_Duration; -- ------------------------------ -- Float Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : in Float_Type) return String is pragma Unreferenced (Type_Def); begin return "Float"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : in Float_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_FLOAT; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Float_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); begin return Long_Long_Float'Image (Value.Float_Value); end To_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in Float_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def); begin return Long_Long_Integer (Value.Float_Value); end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Float_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def); begin return Value.Float_Value; end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Float_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); begin return Value.Float_Value /= 0.0; end To_Boolean; -- ------------------------------ -- Convert the value into a duration. -- ------------------------------ function To_Duration (Type_Def : in Float_Type; Value : in Object_Value) return Duration is pragma Unreferenced (Type_Def); begin return Duration (Value.Float_Value); end To_Duration; -- ------------------------------ -- String Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : in String_Type) return String is pragma Unreferenced (Type_Def); begin return "String"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : in String_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_STRING; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in String_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); Proxy : constant String_Proxy_Access := Value.String_Proxy; begin if Proxy = null then return "null"; else return Proxy.Value; end if; end To_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in String_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def); Proxy : constant String_Proxy_Access := Value.String_Proxy; begin if Proxy = null then return 0; else return Long_Long_Integer'Value (Proxy.Value); end if; end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in String_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def); Proxy : constant String_Proxy_Access := Value.String_Proxy; begin if Proxy = null then return 0.0; else return Long_Long_Float'Value (Proxy.Value); end if; end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in String_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); Proxy : constant String_Proxy_Access := Value.String_Proxy; begin return Proxy /= null and then (Proxy.Value = "true" or Proxy.Value = "TRUE" or Proxy.Value = "1"); end To_Boolean; -- ------------------------------ -- Returns True if the value is empty. -- ------------------------------ function Is_Empty (Type_Def : in String_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); Proxy : constant String_Proxy_Access := Value.String_Proxy; begin return Proxy = null or else Proxy.Value = ""; end Is_Empty; -- ------------------------------ -- Convert the value into a duration. -- ------------------------------ function To_Duration (Type_Def : in String_Type; Value : in Object_Value) return Duration is pragma Unreferenced (Type_Def); Proxy : constant String_Proxy_Access := Value.String_Proxy; begin if Proxy = null then return 0.0; else return Duration'Value (Proxy.Value); end if; end To_Duration; -- ------------------------------ -- Wide String Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : in Wide_String_Type) return String is pragma Unreferenced (Type_Def); begin return "WideString"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : in Wide_String_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_WIDE_STRING; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Wide_String_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); Proxy : constant Wide_String_Proxy_Access := Value.Wide_Proxy; begin if Proxy = null then return "null"; else return To_String (Proxy.Value); end if; end To_String; -- ------------------------------ -- Convert the value into a wide string. -- ------------------------------ function To_Wide_Wide_String (Type_Def : in Wide_String_Type; Value : in Object_Value) return Wide_Wide_String is pragma Unreferenced (Type_Def); Proxy : constant Wide_String_Proxy_Access := Value.Wide_Proxy; begin if Proxy = null then return "null"; else return Proxy.Value; end if; end To_Wide_Wide_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in Wide_String_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def); Proxy : constant Wide_String_Proxy_Access := Value.Wide_Proxy; begin if Proxy = null then return 0; else return Long_Long_Integer'Value (To_String (Proxy.Value)); end if; end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Wide_String_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def); Proxy : constant Wide_String_Proxy_Access := Value.Wide_Proxy; begin if Proxy = null then return 0.0; else return Long_Long_Float'Value (To_String (Proxy.Value)); end if; end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Wide_String_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); Proxy : constant Wide_String_Proxy_Access := Value.Wide_Proxy; begin return Proxy /= null and then (Proxy.Value = "true" or Proxy.Value = "TRUE" or Proxy.Value = "1"); end To_Boolean; -- ------------------------------ -- Convert the value into a duration. -- ------------------------------ function To_Duration (Type_Def : in Wide_String_Type; Value : in Object_Value) return Duration is pragma Unreferenced (Type_Def); Proxy : constant Wide_String_Proxy_Access := Value.Wide_Proxy; begin if Proxy = null then return 0.0; else return Duration'Value (To_String (Proxy.Value)); end if; end To_Duration; -- ------------------------------ -- Returns True if the value is empty. -- ------------------------------ function Is_Empty (Type_Def : in Wide_String_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); Proxy : constant Wide_String_Proxy_Access := Value.Wide_Proxy; begin return Proxy = null or else Proxy.Value = ""; end Is_Empty; -- ------------------------------ -- Boolean Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : in Boolean_Type) return String is pragma Unreferenced (Type_Def); begin return "Boolean"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : in Boolean_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_BOOLEAN; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Boolean_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); begin if Value.Bool_Value then return "TRUE"; else return "FALSE"; end if; end To_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in Boolean_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def); begin if Value.Bool_Value then return 1; else return 0; end if; end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Boolean_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def); begin if Value.Bool_Value then return 1.0; else return 0.0; end if; end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Boolean_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); begin return Value.Bool_Value; end To_Boolean; -- ------------------------------ -- Duration Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : in Duration_Type_Def) return String is pragma Unreferenced (Type_Def); begin return "Duration"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : in Duration_Type_Def) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_TIME; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Duration_Type_Def; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); begin return Duration'Image (Value.Time_Value); end To_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in Duration_Type_Def; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def); begin return Long_Long_Integer (Value.Time_Value); end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Duration_Type_Def; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def); begin return Long_Long_Float (Value.Time_Value); end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Duration_Type_Def; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); begin return Value.Time_Value > 0.0; end To_Boolean; -- ------------------------------ -- Convert the value into a duration. -- ------------------------------ function To_Duration (Type_Def : in Duration_Type_Def; Value : in Object_Value) return Duration is pragma Unreferenced (Type_Def); begin return Value.Time_Value; end To_Duration; -- ------------------------------ -- Bean Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : in Bean_Type) return String is pragma Unreferenced (Type_Def); begin return "Bean"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : in Bean_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_BEAN; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Bean_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); begin if Value.Proxy = null then return "<null bean>"; else return "<" & Ada.Tags.Expanded_Name (Value.Proxy'Tag) & ">"; end if; end To_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in Bean_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def, Value); begin return 0; end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Bean_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def, Value); begin return 0.0; end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Bean_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); Proxy : constant Bean_Proxy_Access := Value.Proxy; begin return Proxy /= null; end To_Boolean; -- ------------------------------ -- Returns True if the value is empty. -- ------------------------------ function Is_Empty (Type_Def : in Bean_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); Proxy : constant Bean_Proxy_Access := Value.Proxy; begin if Proxy = null then return True; end if; if not (Proxy.all in Bean_Proxy'Class) then return False; end if; if not (Bean_Proxy (Proxy.all).Bean.all in Util.Beans.Basic.List_Bean'Class) then return False; end if; declare L : constant Util.Beans.Basic.List_Bean_Access := Beans.Basic.List_Bean'Class (Bean_Proxy (Proxy.all).Bean.all)'Unchecked_Access; begin return L.Get_Count = 0; end; end Is_Empty; -- ------------------------------ -- Array Type -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Name (Type_Def : in Array_Type) return String is pragma Unreferenced (Type_Def); begin return "Array"; end Get_Name; -- ------------------------------ -- Get the base data type. -- ------------------------------ function Get_Data_Type (Type_Def : in Array_Type) return Data_Type is pragma Unreferenced (Type_Def); begin return TYPE_ARRAY; end Get_Data_Type; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_String (Type_Def : in Array_Type; Value : in Object_Value) return String is pragma Unreferenced (Type_Def); begin if Value.Array_Proxy = null then return "<null array>"; else return "<array>"; end if; end To_String; -- ------------------------------ -- Convert the value into an integer. -- ------------------------------ function To_Long_Long (Type_Def : in Array_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def, Value); begin return 0; end To_Long_Long; -- ------------------------------ -- Convert the value into a float. -- ------------------------------ function To_Long_Float (Type_Def : in Array_Type; Value : in Object_Value) return Long_Long_Float is pragma Unreferenced (Type_Def, Value); begin return 0.0; end To_Long_Float; -- ------------------------------ -- Convert the value into a boolean. -- ------------------------------ function To_Boolean (Type_Def : in Array_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); Proxy : constant Bean_Proxy_Access := Value.Proxy; begin return Proxy /= null; end To_Boolean; -- ------------------------------ -- Returns True if the value is empty. -- ------------------------------ function Is_Empty (Type_Def : in Array_Type; Value : in Object_Value) return Boolean is pragma Unreferenced (Type_Def); begin if Value.Array_Proxy = null then return True; else return Value.Array_Proxy.Len = 0; end if; end Is_Empty; -- ------------------------------ -- Convert the value into a string. -- ------------------------------ function To_Long_Long (Type_Def : in Basic_Type; Value : in Object_Value) return Long_Long_Integer is pragma Unreferenced (Type_Def, Value); begin return 0; end To_Long_Long; -- ------------------------------ -- Check whether the object contains a value. -- Returns true if the object does not contain a value. -- ------------------------------ function Is_Null (Value : in Object) return Boolean is begin return Value.V.Of_Type = TYPE_NULL; end Is_Null; -- ------------------------------ -- Check whether the object is empty. -- If the object is null, returns true. -- If the object is the empty string, returns true. -- If the object is a list bean whose Get_Count is 0, returns true. -- Otherwise returns false. -- ------------------------------ function Is_Empty (Value : in Object) return Boolean is begin return Value.Type_Def.Is_Empty (Value.V); end Is_Empty; function Get_Array_Bean (Value : in Object) return access Util.Beans.Basic.Array_Bean'Class is Bean : constant access Util.Beans.Basic.Readonly_Bean'Class := To_Bean (Value); begin if Bean = null or else not (Bean.all in Util.Beans.Basic.Array_Bean'Class) then return null; else return Util.Beans.Basic.Array_Bean'Class (Bean.all)'Access; end if; end Get_Array_Bean; -- ------------------------------ -- Returns True if the object is an array. -- ------------------------------ function Is_Array (Value : in Object) return Boolean is begin if Value.V.Of_Type = TYPE_ARRAY then return True; elsif Value.V.Of_Type /= TYPE_BEAN then return False; else return Get_Array_Bean (Value) /= null; end if; end Is_Array; -- ------------------------------ -- Generic Object holding a value -- ------------------------------ -- ------------------------------ -- Get the type name -- ------------------------------ function Get_Type_Name (Value : in Object) return String is begin return Value.Type_Def.Get_Name; end Get_Type_Name; -- ------------------------------ -- Get a type identification for the object value. -- ------------------------------ function Get_Type (Value : in Object) return Data_Type is begin return Value.V.Of_Type; end Get_Type; -- ------------------------------ -- Get the type definition of the object value. -- ------------------------------ function Get_Type (Value : Object) return Object_Type_Access is begin return Value.Type_Def; end Get_Type; -- ------------------------------ -- Get the value identified by the name in the bean object. -- If the value object is not a bean, returns the null object. -- ------------------------------ function Get_Value (Value : in Object; Name : in String) return Object is Bean : constant access Util.Beans.Basic.Readonly_Bean'Class := To_Bean (Value); begin if Bean = null then return Null_Object; else return Bean.Get_Value (Name); end if; end Get_Value; -- ------------------------------ -- Set into the target object a value identified by the name. -- The target object must be a <tt>Bean</tt> instance that implements the <tt>Set_Value</tt> -- procedure. The operation does nothing if this is not the case. -- ------------------------------ procedure Set_Value (Into : in Object; Name : in String; Value : in Object) is Bean : constant access Util.Beans.Basic.Readonly_Bean'Class := To_Bean (Into); begin if Bean /= null and then Bean.all in Util.Beans.Basic.Bean'Class then Util.Beans.Basic.Bean'Class (Bean.all).Set_Value (Name, Value); end if; end Set_Value; -- ------------------------------ -- Get the number of elements in the array object. -- Returns 0 if the object is not an array. -- ------------------------------ function Get_Count (From : in Object) return Natural is use type Util.Beans.Basic.Array_Bean_Access; Bean : Util.Beans.Basic.Array_Bean_Access; begin if From.V.Of_Type = TYPE_ARRAY then return From.V.Array_Proxy.Len; elsif From.V.Of_Type /= TYPE_BEAN or else From.V.Proxy = null then return 0; else Bean := Get_Array_Bean (From); if Bean = null then return 0; else return Bean.Get_Count; end if; end if; end Get_Count; -- ------------------------------ -- Get the array element at the given position. -- ------------------------------ function Get_Value (From : in Object; Position : in Positive) return Object is use type Util.Beans.Basic.Array_Bean_Access; Bean : Util.Beans.Basic.Array_Bean_Access; begin if From.V.Of_Type = TYPE_BEAN then Bean := Get_Array_Bean (From); if Bean /= null then return Bean.Get_Row (Position); else return Null_Object; end if; elsif From.V.Of_Type /= TYPE_ARRAY then return Null_Object; elsif From.V.Array_Proxy.Len < Position then return Null_Object; else return From.V.Array_Proxy.Values (Position); end if; end Get_Value; -- ------------------------------ -- Convert the object to the corresponding type. -- ------------------------------ function To_String (Value : Object) return String is begin return Value.Type_Def.To_String (Value.V); end To_String; -- ------------------------------ -- Convert the object to a wide string. -- ------------------------------ function To_Wide_Wide_String (Value : Object) return Wide_Wide_String is begin return Value.Type_Def.To_Wide_Wide_String (Value.V); end To_Wide_Wide_String; -- ------------------------------ -- Convert the object to an unbounded string. -- ------------------------------ function To_Unbounded_String (Value : Object) return Unbounded_String is begin case Value.V.Of_Type is when TYPE_STRING => if Value.V.String_Proxy = null then return To_Unbounded_String ("null"); end if; return To_Unbounded_String (Value.V.String_Proxy.Value); when others => return To_Unbounded_String (To_String (Value)); end case; end To_Unbounded_String; -- ------------------------------ -- Convert the object to an unbounded wide string. -- ------------------------------ function To_Unbounded_Wide_Wide_String (Value : Object) return Unbounded_Wide_Wide_String is begin case Value.V.Of_Type is when TYPE_WIDE_STRING => if Value.V.Wide_Proxy = null then return To_Unbounded_Wide_Wide_String ("null"); end if; return To_Unbounded_Wide_Wide_String (Value.V.Wide_Proxy.Value); when TYPE_STRING => if Value.V.String_Proxy = null then return To_Unbounded_Wide_Wide_String ("null"); end if; return To_Unbounded_Wide_Wide_String (UTF8_Decode (Value.V.String_Proxy.Value)); when others => return To_Unbounded_Wide_Wide_String (To_Wide_Wide_String (To_String (Value))); end case; end To_Unbounded_Wide_Wide_String; -- ------------------------------ -- Convert the object to an integer. -- ------------------------------ function To_Integer (Value : Object) return Integer is begin return Integer (Value.Type_Def.To_Long_Long (Value.V)); end To_Integer; -- ------------------------------ -- Convert the object to an integer. -- ------------------------------ function To_Long_Integer (Value : Object) return Long_Integer is begin return Long_Integer (Value.Type_Def.To_Long_Long (Value.V)); end To_Long_Integer; -- ------------------------------ -- Convert the object to a long integer. -- ------------------------------ function To_Long_Long_Integer (Value : Object) return Long_Long_Integer is begin return Value.Type_Def.To_Long_Long (Value.V); end To_Long_Long_Integer; -- ------------------------------ -- Convert the object to a duration. -- ------------------------------ function To_Duration (Value : in Object) return Duration is begin return Value.Type_Def.To_Duration (Value.V); end To_Duration; function To_Bean (Value : in Object) return access Util.Beans.Basic.Readonly_Bean'Class is -- Proxy : constant Bean_Proxy_Access; begin if Value.V.Of_Type = TYPE_BEAN and then Value.V.Proxy /= null then return Bean_Proxy (Value.V.Proxy.all).Bean; else return null; end if; end To_Bean; -- ------------------------------ -- Convert the object to a boolean. -- ------------------------------ function To_Boolean (Value : Object) return Boolean is begin return Value.Type_Def.To_Boolean (Value.V); end To_Boolean; -- ------------------------------ -- Convert the object to a float. -- ------------------------------ function To_Float (Value : Object) return Float is begin return Float (Value.Type_Def.To_Long_Float (Value.V)); end To_Float; -- ------------------------------ -- Convert the object to a long float. -- ------------------------------ function To_Long_Float (Value : Object) return Long_Float is begin return Long_Float (Value.Type_Def.To_Long_Float (Value.V)); end To_Long_Float; -- ------------------------------ -- Convert the object to a long float. -- ------------------------------ function To_Long_Long_Float (Value : Object) return Long_Long_Float is begin return Value.Type_Def.To_Long_Float (Value.V); end To_Long_Long_Float; -- ------------------------------ -- Convert an integer into a generic typed object. -- ------------------------------ function To_Object (Value : Integer) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_INTEGER, Int_Value => Long_Long_Integer (Value)), Type_Def => Integer_Type'Access); end To_Object; -- ------------------------------ -- Convert an integer into a generic typed object. -- ------------------------------ function To_Object (Value : Long_Integer) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_INTEGER, Int_Value => Long_Long_Integer (Value)), Type_Def => Integer_Type'Access); end To_Object; -- ------------------------------ -- Convert an integer into a generic typed object. -- ------------------------------ function To_Object (Value : Long_Long_Integer) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_INTEGER, Int_Value => Value), Type_Def => Integer_Type'Access); end To_Object; -- ------------------------------ -- Convert a boolean into a generic typed object. -- ------------------------------ function To_Object (Value : Boolean) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_BOOLEAN, Bool_Value => Value), Type_Def => Bool_Type'Access); end To_Object; -- ------------------------------ -- Convert a float into a generic typed object. -- ------------------------------ function To_Object (Value : Float) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_FLOAT, Float_Value => Long_Long_Float (Value)), Type_Def => Flt_Type'Access); end To_Object; -- ------------------------------ -- Convert a long float into a generic typed object. -- ------------------------------ function To_Object (Value : Long_Float) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_FLOAT, Float_Value => Long_Long_Float (Value)), Type_Def => Flt_Type'Access); end To_Object; -- ------------------------------ -- Convert a long long float into a generic typed object. -- ------------------------------ function To_Object (Value : Long_Long_Float) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_FLOAT, Float_Value => Value), Type_Def => Flt_Type'Access); end To_Object; -- ------------------------------ -- Convert a duration into a generic typed object. -- ------------------------------ function To_Object (Value : in Duration) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_TIME, Time_Value => Value), Type_Def => Duration_Type'Access); end To_Object; -- ------------------------------ -- Convert a string into a generic typed object. -- ------------------------------ function To_Object (Value : String) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_STRING, String_Proxy => new String_Proxy '(Ref_Counter => ONE, Len => Value'Length, Value => Value)), Type_Def => Str_Type'Access); end To_Object; -- ------------------------------ -- Convert a wide string into a generic typed object. -- ------------------------------ function To_Object (Value : Wide_Wide_String) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_WIDE_STRING, Wide_Proxy => new Wide_String_Proxy '(Ref_Counter => ONE, Len => Value'Length, Value => Value)), Type_Def => WString_Type'Access); end To_Object; -- ------------------------------ -- Convert an unbounded string into a generic typed object. -- ------------------------------ function To_Object (Value : Unbounded_String) return Object is Len : constant Natural := Length (Value); begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_STRING, String_Proxy => new String_Proxy '(Ref_Counter => ONE, Len => Len, Value => To_String (Value))), Type_Def => Str_Type'Access); end To_Object; -- ------------------------------ -- Convert a unbounded wide string into a generic typed object. -- ------------------------------ function To_Object (Value : Unbounded_Wide_Wide_String) return Object is Len : constant Natural := Length (Value); begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_WIDE_STRING, Wide_Proxy => new Wide_String_Proxy '(Ref_Counter => ONE, Len => Len, Value => To_Wide_Wide_String (Value))), Type_Def => WString_Type'Access); end To_Object; function To_Object (Value : access Util.Beans.Basic.Readonly_Bean'Class; Storage : in Storage_Type := DYNAMIC) return Object is begin if Value = null then return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_BEAN, Proxy => null), Type_Def => Bn_Type'Access); else return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_BEAN, Proxy => new Bean_Proxy '(Ref_Counter => ONE, Bean => Value, Storage => Storage)), Type_Def => Bn_Type'Access); end if; end To_Object; function To_Object (Value : in Object_Array) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_ARRAY, Array_Proxy => new Array_Proxy '(Ref_Counter => ONE, Len => Value'Length, Count => Value'Length, Values => Value)), Type_Def => Ar_Type'Access); end To_Object; -- ------------------------------ -- Convert the object to an object of another time. -- Force the object to be an integer. -- ------------------------------ function Cast_Integer (Value : Object) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_INTEGER, Int_Value => Value.Type_Def.To_Long_Long (Value.V)), Type_Def => Integer_Type'Access); end Cast_Integer; -- ------------------------------ -- Force the object to be a float. -- ------------------------------ function Cast_Float (Value : Object) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_FLOAT, Float_Value => Value.Type_Def.To_Long_Float (Value.V)), Type_Def => Flt_Type'Access); end Cast_Float; -- ------------------------------ -- Convert the object to an object of another time. -- Force the object to be a duration. -- ------------------------------ function Cast_Duration (Value : Object) return Object is begin return Object '(Controlled with V => Object_Value '(Of_Type => TYPE_TIME, Time_Value => Value.Type_Def.To_Duration (Value.V)), Type_Def => Duration_Type'Access); end Cast_Duration; -- ------------------------------ -- Force the object to be a string. -- ------------------------------ function Cast_String (Value : Object) return Object is begin if Value.V.Of_Type = TYPE_STRING or Value.V.Of_Type = TYPE_WIDE_STRING then return Value; else return To_Object (To_Wide_Wide_String (Value)); end if; end Cast_String; -- ------------------------------ -- Find the best type to be used to compare two operands. -- -- ------------------------------ function Get_Compare_Type (Left, Right : Object) return Data_Type is begin -- Operands are of the same type. if Left.V.Of_Type = Right.V.Of_Type then return Left.V.Of_Type; end if; -- 12 >= "23" -- if Left.Of_Type = TYPE_STRING or case Left.V.Of_Type is when TYPE_BOOLEAN => case Right.V.Of_Type is when TYPE_INTEGER | TYPE_BOOLEAN | TYPE_TIME => return TYPE_INTEGER; when TYPE_FLOAT | TYPE_STRING | TYPE_WIDE_STRING => return Right.V.Of_Type; when others => null; end case; when TYPE_INTEGER => case Right.V.Of_Type is when TYPE_BOOLEAN | TYPE_TIME => return TYPE_INTEGER; when TYPE_FLOAT => return TYPE_FLOAT; when others => null; end case; when TYPE_TIME => case Right.V.Of_Type is when TYPE_INTEGER | TYPE_BOOLEAN | TYPE_FLOAT => return TYPE_INTEGER; when others => null; end case; when TYPE_FLOAT => case Right.V.Of_Type is when TYPE_INTEGER | TYPE_BOOLEAN => return TYPE_FLOAT; when TYPE_TIME => return TYPE_INTEGER; when others => null; end case; when others => null; end case; return TYPE_STRING; end Get_Compare_Type; -- ------------------------------ -- Find the data type to be used for an arithmetic operation between two objects. -- ------------------------------ function Get_Arithmetic_Type (Left, Right : Object) return Data_Type is begin if Left.V.Of_Type = TYPE_FLOAT or Right.V.Of_Type = TYPE_FLOAT then return TYPE_FLOAT; end if; if Left.V.Of_Type = TYPE_INTEGER or Right.V.Of_Type = TYPE_INTEGER then return TYPE_INTEGER; end if; if Left.V.Of_Type = TYPE_BOOLEAN and Right.V.Of_Type = TYPE_BOOLEAN then return TYPE_BOOLEAN; end if; return TYPE_FLOAT; end Get_Arithmetic_Type; -- ------------------------------ -- Find the data type to be used for a composition operation between two objects. -- ------------------------------ function Get_Compose_Type (Left, Right : Object) return Data_Type is begin if Left.V.Of_Type = Right.V.Of_Type then return Left.V.Of_Type; end if; if Left.V.Of_Type = TYPE_FLOAT or Right.V.Of_Type = TYPE_FLOAT then return TYPE_FLOAT; end if; if Left.V.Of_Type = TYPE_INTEGER or Right.V.Of_Type = TYPE_INTEGER then return TYPE_INTEGER; end if; if Left.V.Of_Type = TYPE_TIME or Right.V.Of_Type = TYPE_TIME then return TYPE_TIME; end if; if Left.V.Of_Type = TYPE_BOOLEAN and Right.V.Of_Type = TYPE_BOOLEAN then return TYPE_BOOLEAN; end if; return TYPE_FLOAT; end Get_Compose_Type; -- ------------------------------ -- Comparison of objects -- ------------------------------ generic with function Int_Comparator (Left, Right : Long_Long_Integer) return Boolean; with function Time_Comparator (Left, Right : Duration) return Boolean; with function Boolean_Comparator (Left, Right : Boolean) return Boolean; with function Float_Comparator (Left, Right : Long_Long_Float) return Boolean; with function String_Comparator (Left, Right : String) return Boolean; with function Wide_String_Comparator (Left, Right : Wide_Wide_String) return Boolean; function Compare (Left, Right : Object) return Boolean; -- ------------------------------ -- Comparison of objects -- ------------------------------ function Compare (Left, Right : Object) return Boolean is T : constant Data_Type := Get_Compare_Type (Left, Right); begin case T is when TYPE_BOOLEAN => return Boolean_Comparator (Left.Type_Def.To_Boolean (Left.V), Right.Type_Def.To_Boolean (Right.V)); when TYPE_INTEGER => return Int_Comparator (Left.Type_Def.To_Long_Long (Left.V), Right.Type_Def.To_Long_Long (Right.V)); when TYPE_TIME => return Time_Comparator (Left.Type_Def.To_Duration (Left.V), Right.Type_Def.To_Duration (Right.V)); when TYPE_FLOAT => return Float_Comparator (Left.Type_Def.To_Long_Float (Left.V), Right.Type_Def.To_Long_Float (Right.V)); when TYPE_STRING => return String_Comparator (To_String (Left), To_String (Right)); when TYPE_WIDE_STRING => return Wide_String_Comparator (To_Wide_Wide_String (Left), To_Wide_Wide_String (Right)); when others => return False; end case; end Compare; function ">" (Left, Right : Object) return Boolean is function Cmp is new Compare (Int_Comparator => ">", Time_Comparator => ">", Boolean_Comparator => ">", Float_Comparator => ">", String_Comparator => ">", Wide_String_Comparator => ">"); begin return Cmp (Left, Right); end ">"; function "<" (Left, Right : Object) return Boolean is function Cmp is new Compare (Int_Comparator => "<", Time_Comparator => "<", Boolean_Comparator => "<", Float_Comparator => "<", String_Comparator => "<", Wide_String_Comparator => "<"); begin return Cmp (Left, Right); end "<"; function "<=" (Left, Right : Object) return Boolean is function Cmp is new Compare (Int_Comparator => "<=", Time_Comparator => "<=", Boolean_Comparator => "<=", Float_Comparator => "<=", String_Comparator => "<=", Wide_String_Comparator => "<="); begin return Cmp (Left, Right); end "<="; function ">=" (Left, Right : Object) return Boolean is function Cmp is new Compare (Int_Comparator => ">=", Time_Comparator => ">=", Boolean_Comparator => ">=", Float_Comparator => ">=", String_Comparator => ">=", Wide_String_Comparator => ">="); begin return Cmp (Left, Right); end ">="; -- function "=" (Left, Right : Object) return Boolean; function "=" (Left, Right : Object) return Boolean is function Cmp is new Compare (Int_Comparator => "=", Time_Comparator => "=", Boolean_Comparator => "=", Float_Comparator => "=", String_Comparator => "=", Wide_String_Comparator => "="); begin return Cmp (Left, Right); end "="; -- ------------------------------ -- Arithmetic operations of objects -- ------------------------------ generic with function Int_Operation (Left, Right : Long_Long_Integer) return Long_Long_Integer; with function Duration_Operation (Left, Right : Duration) return Duration; with function Float_Operation (Left, Right : Long_Long_Float) return Long_Long_Float; function Arith (Left, Right : Object) return Object; -- Comparison of objects function Arith (Left, Right : Object) return Object is begin -- If we have a time object, keep the time definition. if Left.V.Of_Type = TYPE_TIME then return Result : Object do Result.Type_Def := Left.Type_Def; Result.V := Object_Value '(Of_Type => TYPE_TIME, Time_Value => Duration_Operation (Left.Type_Def.To_Duration (Left.V), Right.Type_Def.To_Duration (Right.V))); end return; end if; if Right.V.Of_Type = TYPE_TIME then return Result : Object do Result.Type_Def := Right.Type_Def; Result.V := Object_Value '(Of_Type => TYPE_TIME, Time_Value => Duration_Operation (Left.Type_Def.To_Duration (Left.V), Right.Type_Def.To_Duration (Right.V))); end return; end if; declare T : constant Data_Type := Get_Arithmetic_Type (Left, Right); begin case T is when TYPE_INTEGER => return To_Object (Int_Operation (Left.Type_Def.To_Long_Long (Left.V), Right.Type_Def.To_Long_Long (Right.V))); when TYPE_FLOAT => return To_Object (Float_Operation (Left.Type_Def.To_Long_Float (Left.V), Right.Type_Def.To_Long_Float (Right.V))); when others => return Left; end case; end; end Arith; -- Arithmetic operations on objects function "+" (Left, Right : Object) return Object is function Operation is new Arith (Int_Operation => "+", Duration_Operation => "+", Float_Operation => "+"); begin return Operation (Left, Right); end "+"; function "-" (Left, Right : Object) return Object is function Operation is new Arith (Int_Operation => "-", Duration_Operation => "-", Float_Operation => "-"); begin return Operation (Left, Right); end "-"; function "-" (Left : Object) return Object is begin case Left.V.Of_Type is when TYPE_INTEGER => return To_Object (-Left.Type_Def.To_Long_Long (Left.V)); when TYPE_TIME => return To_Object (-Left.Type_Def.To_Duration (Left.V)); when TYPE_FLOAT => return To_Object (-(Left.Type_Def.To_Long_Float (Left.V))); when others => return Left; end case; end "-"; function "*" (Left, Right : Object) return Object is function Operation is new Arith (Int_Operation => "*", Duration_Operation => "+", Float_Operation => "*"); begin return Operation (Left, Right); end "*"; function "/" (Left, Right : Object) return Object is function Operation is new Arith (Int_Operation => "/", Duration_Operation => "-", Float_Operation => "/"); begin return Operation (Left, Right); end "/"; function "mod" (Left, Right : Object) return Object is function "mod" (Left, Right : Long_Long_Float) return Long_Long_Float; function "mod" (Left, Right : Long_Long_Float) return Long_Long_Float is L : constant Long_Long_Integer := Long_Long_Integer (Left); R : constant Long_Long_Integer := Long_Long_Integer (Right); begin return Long_Long_Float (L mod R); end "mod"; function Operation is new Arith (Int_Operation => "mod", Duration_Operation => "-", Float_Operation => "mod"); begin return Operation (Left, Right); end "mod"; function "&" (Left, Right : Object) return Object is T : constant Data_Type := Get_Compose_Type (Left, Right); begin case T is when TYPE_BOOLEAN => return To_Object (To_Boolean (Left) and To_Boolean (Right)); when others => return To_Object (To_String (Left) & To_String (Right)); end case; end "&"; overriding procedure Adjust (Obj : in out Object) is begin case Obj.V.Of_Type is when TYPE_BEAN => if Obj.V.Proxy /= null then Util.Concurrent.Counters.Increment (Obj.V.Proxy.Ref_Counter); end if; when TYPE_ARRAY => if Obj.V.Array_Proxy /= null then Util.Concurrent.Counters.Increment (Obj.V.Array_Proxy.Ref_Counter); end if; when TYPE_STRING => if Obj.V.String_Proxy /= null then Util.Concurrent.Counters.Increment (Obj.V.String_Proxy.Ref_Counter); end if; when TYPE_WIDE_STRING => if Obj.V.Wide_Proxy /= null then Util.Concurrent.Counters.Increment (Obj.V.Wide_Proxy.Ref_Counter); end if; when others => null; end case; end Adjust; procedure Free is new Ada.Unchecked_Deallocation (Object => Basic.Readonly_Bean'Class, Name => Basic.Readonly_Bean_Access); procedure Free is new Ada.Unchecked_Deallocation (Object => Array_Proxy, Name => Array_Proxy_Access); procedure Free is new Ada.Unchecked_Deallocation (Object => Proxy'Class, Name => Bean_Proxy_Access); procedure Free is new Ada.Unchecked_Deallocation (Object => String_Proxy, Name => String_Proxy_Access); procedure Free is new Ada.Unchecked_Deallocation (Object => Wide_String_Proxy, Name => Wide_String_Proxy_Access); overriding procedure Finalize (Obj : in out Object) is Release : Boolean; begin case Obj.V.Of_Type is when TYPE_STRING => if Obj.V.String_Proxy /= null then Util.Concurrent.Counters.Decrement (Obj.V.String_Proxy.Ref_Counter, Release); if Release then Free (Obj.V.String_Proxy); else Obj.V.String_Proxy := null; end if; end if; when TYPE_WIDE_STRING => if Obj.V.Wide_Proxy /= null then Util.Concurrent.Counters.Decrement (Obj.V.Wide_Proxy.Ref_Counter, Release); if Release then Free (Obj.V.Wide_Proxy); else Obj.V.Wide_Proxy := null; end if; end if; when TYPE_BEAN => if Obj.V.Proxy /= null then Util.Concurrent.Counters.Decrement (Obj.V.Proxy.Ref_Counter, Release); if Release then Obj.V.Proxy.all.Release; Free (Obj.V.Proxy); else Obj.V.Proxy := null; end if; end if; when TYPE_ARRAY => if Obj.V.Array_Proxy /= null then Util.Concurrent.Counters.Decrement (Obj.V.Array_Proxy.Ref_Counter, Release); if Release then Free (Obj.V.Array_Proxy); else Obj.V.Array_Proxy := null; end if; end if; when others => null; end case; end Finalize; -- ------------------------------ -- Release the object pointed to by the proxy (if necessary). -- ------------------------------ overriding procedure Release (P : in out Bean_Proxy) is begin if P.Storage = DYNAMIC and P.Bean /= null then declare Bean : Basic.Readonly_Bean_Access := P.Bean.all'Access; begin P.Bean := null; Free (Bean); end; end if; end Release; end Util.Beans.Objects;
hergin/ada2fuml
Ada
195
adb
package body Globals_Example3 is function Unrelated (The_I : Globals_Example1.Itype) return Globals_Example1.Itype is begin return 5; end Unrelated; end Globals_Example3;
Letractively/ada-ado
Ada
24,989
adb
----------------------------------------------------------------------- -- ADO Objects -- Database objects -- Copyright (C) 2009, 2010, 2011, 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 Ada.Strings.Unbounded.Hash; with Ada.Unchecked_Deallocation; with ADO.Sessions.Factory; package body ADO.Objects is use type ADO.Schemas.Class_Mapping_Access; -- ------------------------------ -- Compute the hash of the object key. -- ------------------------------ function Hash (Key : Object_Key) return Ada.Containers.Hash_Type is use Ada.Containers; Result : Ada.Containers.Hash_Type; begin case Key.Of_Type is when KEY_INTEGER => if Key.Id < 0 then Result := Hash_Type (-Key.Id); else Result := Hash_Type (Key.Id); end if; when KEY_STRING => Result := Ada.Strings.Unbounded.Hash (Key.Str); end case; -- Merge with the class mapping hash so that two key values of different -- tables will result in a different hash. Result := Result xor ADO.Schemas.Hash (Key.Of_Class); return Result; end Hash; -- ------------------------------ -- Compare whether the two objects pointed to by Left and Right have the same -- object key. The object key is identical if the object key type, the class -- mapping and the key value are identical. -- ------------------------------ function Equivalent_Elements (Left, Right : Object_Key) return Boolean is use Ada.Strings.Unbounded; begin if Left.Of_Type /= Right.Of_Type then return False; end if; if Left.Of_Class /= Right.Of_Class then return False; end if; case Left.Of_Type is when KEY_INTEGER => return Left.Id = Right.Id; when KEY_STRING => return Left.Str = Right.Str; end case; end Equivalent_Elements; -- ------------------------------ -- Get the key value -- ------------------------------ function Get_Value (Key : Object_Key) return Identifier is begin return Key.Id; end Get_Value; -- ------------------------------ -- Get the key value -- ------------------------------ function Get_Value (Key : Object_Key) return Ada.Strings.Unbounded.Unbounded_String is begin return Key.Str; end Get_Value; -- ------------------------------ -- Set the key value -- ------------------------------ procedure Set_Value (Key : in out Object_Key; Value : in Identifier) is begin case Key.Of_Type is when KEY_INTEGER => Key.Id := Value; when KEY_STRING => Key.Str := Ada.Strings.Unbounded.To_Unbounded_String (Identifier'Image (Value)); end case; end Set_Value; -- ------------------------------ -- Set the key value -- ------------------------------ procedure Set_Value (Key : in out Object_Key; Value : in String) is begin case Key.Of_Type is when KEY_INTEGER => Key.Id := Identifier'Value (Value); when KEY_STRING => Key.Str := Ada.Strings.Unbounded.To_Unbounded_String (Value); end case; end Set_Value; -- ------------------------------ -- Get the key as a string -- ------------------------------ function To_String (Key : Object_Key) return String is begin case Key.Of_Type is when KEY_INTEGER => return Identifier'Image (Key.Id); when KEY_STRING => return Ada.Strings.Unbounded.To_String (Key.Str); end case; end To_String; -- ------------------------------ -- Return the key value in a bean object. -- ------------------------------ function To_Object (Key : Object_Key) return Util.Beans.Objects.Object is begin case Key.Of_Type is when KEY_INTEGER => return Util.Beans.Objects.To_Object (Long_Long_Integer (Key.Id)); when KEY_STRING => return Util.Beans.Objects.To_Object (Key.Str); end case; end To_Object; -- ------------------------------ -- Increment the reference counter when an object is copied -- ------------------------------ overriding procedure Adjust (Object : in out Object_Ref) is begin if Object.Object /= null then Util.Concurrent.Counters.Increment (Object.Object.Counter); end if; end Adjust; -- ------------------------------ -- Decrement the reference counter and release the object record. -- ------------------------------ overriding procedure Finalize (Object : in out Object_Ref) is Is_Zero : Boolean; begin if Object.Object /= null then Util.Concurrent.Counters.Decrement (Object.Object.Counter, Is_Zero); if Is_Zero then Destroy (Object.Object); Object.Object := null; end if; end if; end Finalize; -- ------------------------------ -- Mark the field identified by <b>Field</b> as modified. -- ------------------------------ procedure Set_Field (Object : in out Object_Ref'Class; Field : in Positive) is begin if Object.Object = null then Object.Allocate; Object.Object.Is_Loaded := True; elsif not Object.Object.Is_Loaded then Object.Lazy_Load; end if; Object.Object.Modified (Field) := True; end Set_Field; -- ------------------------------ -- Prepare the object to be modified. If the reference is empty, an object record -- instance is allocated by calling <b>Allocate</b>. -- ------------------------------ procedure Prepare_Modify (Object : in out Object_Ref'Class; Result : out Object_Record_Access) is begin if Object.Object = null then Object.Allocate; Object.Object.Is_Loaded := True; elsif not Object.Object.Is_Loaded then Object.Lazy_Load; end if; Result := Object.Object; end Prepare_Modify; -- ------------------------------ -- Check whether this object is initialized or not. -- ------------------------------ function Is_Null (Object : in Object_Ref'Class) return Boolean is begin return Object.Object = null; end Is_Null; -- ------------------------------ -- Check whether this object is saved in the database. -- Returns True if the object was saved in the database. -- ------------------------------ function Is_Inserted (Object : in Object_Ref'Class) return Boolean is begin if Object.Object = null then return False; else return Object.Object.Is_Created; end if; end Is_Inserted; -- ------------------------------ -- Check whether this object is loaded from the database. -- ------------------------------ function Is_Loaded (Object : in Object_Ref'Class) return Boolean is begin if Object.Object = null then return False; else return Object.Object.Is_Loaded; end if; end Is_Loaded; -- ------------------------------ -- Load the object from the database if it was not already loaded. -- For a lazy association, the <b>Object_Record</b> is allocated and holds the primary key. -- The <b>Is_Loaded</b> boolean is cleared thus indicating the other values are not loaded. -- This procedure makes sure these values are loaded by invoking <b>Load</b> if necessary. -- Raises SESSION_EXPIRED if the session associated with the object is closed. -- ------------------------------ procedure Lazy_Load (Ref : in Object_Ref'Class) is begin if Ref.Object = null then raise NULL_ERROR; elsif not Ref.Object.Is_Loaded then if Ref.Object.Session = null then raise SESSION_EXPIRED; end if; if Ref.Object.Session.Session = null then raise SESSION_EXPIRED; end if; declare S : ADO.Sessions.Session := ADO.Sessions.Factory.Get_Session (Ref.Object.Session.Session.all'Access); begin Ref.Object.Load (S); end; end if; end Lazy_Load; -- ------------------------------ -- Internal method to get the object record instance and make sure it is fully loaded. -- If the object was not yet loaded, calls <b>Lazy_Load</b> to get the values from the -- database. Raises SESSION_EXPIRED if the session associated with the object is closed. -- ------------------------------ function Get_Load_Object (Ref : in Object_Ref'Class) return Object_Record_Access is begin Ref.Lazy_Load; return Ref.Object; end Get_Load_Object; -- ------------------------------ -- Internal method to get the object record instance. -- ------------------------------ function Get_Object (Ref : in Object_Ref'Class) return Object_Record_Access is begin return Ref.Object; end Get_Object; -- ------------------------------ -- Get the object key -- ------------------------------ function Get_Key (Ref : in Object_Ref'Class) return Object_Key is begin return Ref.Object.Key; end Get_Key; -- ------------------------------ -- Set the object key. -- ------------------------------ procedure Set_Key_Value (Ref : in out Object_Ref'Class; Value : in Identifier; Session : in ADO.Sessions.Session'Class) is begin if Ref.Object = null then Ref.Allocate; end if; Ref.Object.Is_Created := True; Ref.Object.Set_Key_Value (Value); Ref.Object.Session := Session.Get_Session_Proxy; Util.Concurrent.Counters.Increment (Ref.Object.Session.Counter); end Set_Key_Value; -- ------------------------------ -- Set the object key. -- ------------------------------ procedure Set_Key_Value (Ref : in out Object_Ref'Class; Value : in Ada.Strings.Unbounded.Unbounded_String; Session : in ADO.Sessions.Session'Class) is begin if Ref.Object = null then Ref.Allocate; end if; Ref.Object.Is_Created := True; Ref.Object.Set_Key_Value (Value); Ref.Object.Session := Session.Get_Session_Proxy; Util.Concurrent.Counters.Increment (Ref.Object.Session.Counter); end Set_Key_Value; -- ------------------------------ -- Check if the two objects are the same database objects. -- The comparison is only made on the primary key. -- Returns true if the two objects have the same primary key. -- ------------------------------ function "=" (Left : Object_Ref; Right : Object_Ref) return Boolean is begin -- Same target object if Left.Object = Right.Object then return True; end if; -- One of the target object is null if Left.Object = null or Right.Object = null then return False; end if; return Left.Object.Key = Right.Object.Key; end "="; procedure Set_Object (Ref : in out Object_Ref'Class; Object : in Object_Record_Access) is Is_Zero : Boolean; begin if Ref.Object /= null and Ref.Object /= Object then Util.Concurrent.Counters.Decrement (Ref.Object.Counter, Is_Zero); if Is_Zero then Destroy (Ref.Object); end if; end if; Ref.Object := Object; end Set_Object; procedure Set_Object (Ref : in out Object_Ref'Class; Object : in Object_Record_Access; Session : in ADO.Sessions.Session'Class) is begin if Object /= null and then Object.Session = null then Object.Session := Session.Get_Session_Proxy; Util.Concurrent.Counters.Increment (Object.Session.Counter); end if; Ref.Set_Object (Object); end Set_Object; -- ------------------------------ -- Get the object key -- ------------------------------ function Get_Key (Ref : in Object_Record'Class) return Object_Key is begin return Ref.Key; end Get_Key; -- ------------------------------ -- Set the object key -- ------------------------------ procedure Set_Key (Ref : in out Object_Record'Class; Key : in Object_Key) is begin Ref.Key := Key; end Set_Key; -- ------------------------------ -- Get the object key value as an identifier -- ------------------------------ function Get_Key_Value (Ref : in Object_Record'Class) return Identifier is begin return Ref.Key.Id; end Get_Key_Value; function Get_Key_Value (Ref : in Object_Record'Class) return Ada.Strings.Unbounded.Unbounded_String is begin return Ref.Key.Str; end Get_Key_Value; procedure Set_Key_Value (Ref : in out Object_Record'Class; Value : in Identifier) is begin Set_Value (Ref.Key, Value); end Set_Key_Value; procedure Set_Key_Value (Ref : in out Object_Record'Class; Value : in Ada.Strings.Unbounded.Unbounded_String) is begin Ref.Key.Str := Value; end Set_Key_Value; procedure Set_Key_Value (Ref : in out Object_Record'Class; Value : in String) is begin Ref.Key.Str := Ada.Strings.Unbounded.To_Unbounded_String (Value); end Set_Key_Value; -- ------------------------------ -- Get the table name associated with the object record. -- ------------------------------ function Get_Table_Name (Ref : in Object_Record'Class) return Util.Strings.Name_Access is begin if Ref.Key.Of_Class = null then return null; else return Ref.Key.Of_Class.Table; end if; end Get_Table_Name; -- ------------------------------ -- Check if this is a new object. -- Returns True if an insert is necessary to persist this object. -- ------------------------------ function Is_Created (Ref : in Object_Record'Class) return Boolean is begin return Ref.Is_Created; end Is_Created; -- ------------------------------ -- Mark the object as created in the database. -- ------------------------------ procedure Set_Created (Ref : in out Object_Record'Class) is begin Ref.Is_Created := True; Ref.Is_Loaded := True; Ref.Modified := (others => False); end Set_Created; -- ------------------------------ -- Check if the field at position <b>Field</b> was modified. -- ------------------------------ function Is_Modified (Ref : in Object_Record'Class; Field : in Positive) return Boolean is begin return Ref.Modified (Field); end Is_Modified; -- ------------------------------ -- Clear the modification flag associated with the field at -- position <b>Field</b>. -- ------------------------------ procedure Clear_Modified (Ref : in out Object_Record'Class; Field : in Positive) is begin Ref.Modified (Field) := False; end Clear_Modified; -- ------------------------------ -- Release the session proxy, deleting the instance if it is no longer used. -- ------------------------------ procedure Release_Proxy (Proxy : in out Session_Proxy_Access) is procedure Free is new Ada.Unchecked_Deallocation (Object => Session_Proxy, Name => Session_Proxy_Access); Is_Zero : Boolean; begin if Proxy /= null then Util.Concurrent.Counters.Decrement (Proxy.Counter, Is_Zero); if Is_Zero then Free (Proxy); end if; Proxy := null; end if; end Release_Proxy; -- ------------------------------ -- Release the object. -- ------------------------------ overriding procedure Finalize (Object : in out Object_Record) is begin Release_Proxy (Object.Session); end Finalize; -- ------------------------------ -- Copy the source object record into the target. -- ------------------------------ procedure Copy (To : in out Object_Record; From : in Object_Record'Class) is begin To.Session := From.Session; To.Is_Created := From.Is_Created; To.Is_Loaded := From.Is_Loaded; To.Modified := From.Modified; To.Key := From.Key; end Copy; function Create_Session_Proxy (S : access ADO.Sessions.Session_Record) return Session_Proxy_Access is Result : constant Session_Proxy_Access := new Session_Proxy; begin Result.Session := S; return Result; end Create_Session_Proxy; -- ------------------------------ -- Set the object field to the new value in <b>Into</b>. If the new value is identical, -- the operation does nothing. Otherwise, the new value <b>Value</b> is copied -- to <b>Into</b> and the field identified by <b>Field</b> is marked as modified on -- the object. -- ------------------------------ procedure Set_Field_Unbounded_String (Object : in out Object_Record'Class; Field : in Positive; Into : in out Ada.Strings.Unbounded.Unbounded_String; Value : in Ada.Strings.Unbounded.Unbounded_String) is use Ada.Strings.Unbounded; begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Unbounded_String; procedure Set_Field_String (Object : in out Object_Record'Class; Field : in Positive; Into : in out Ada.Strings.Unbounded.Unbounded_String; Value : in String) is use Ada.Strings.Unbounded; begin if Into /= Value then Ada.Strings.Unbounded.Set_Unbounded_String (Into, Value); Object.Modified (Field) := True; end if; end Set_Field_String; procedure Set_Field_Time (Object : in out Object_Record'Class; Field : in Positive; Into : in out Ada.Calendar.Time; Value : in Ada.Calendar.Time) is use Ada.Calendar; begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Time; procedure Set_Field_Time (Object : in out Object_Record'Class; Field : in Positive; Into : in out ADO.Nullable_Time; Value : in ADO.Nullable_Time) is use Ada.Calendar; begin if Into.Is_Null then if not Value.Is_Null then Into := Value; Object.Modified (Field) := True; end if; elsif Value.Is_Null then Into.Is_Null := True; Object.Modified (Field) := True; elsif Into.Value /= Value.Value then Into.Value := Value.Value; Object.Modified (Field) := True; end if; end Set_Field_Time; procedure Set_Field_Integer (Object : in out Object_Record'Class; Field : in Positive; Into : in out Integer; Value : in Integer) is begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Integer; procedure Set_Field_Natural (Object : in out Object_Record'Class; Field : in Positive; Into : in out Natural; Value : in Natural) is begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Natural; procedure Set_Field_Positive (Object : in out Object_Record'Class; Field : in Positive; Into : in out Positive; Value : in Positive) is begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Positive; procedure Set_Field_Boolean (Object : in out Object_Record'Class; Field : in Positive; Into : in out Boolean; Value : in Boolean) is begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Boolean; procedure Set_Field_Object (Object : in out Object_Record'Class; Field : in Positive; Into : in out Object_Ref'Class; Value : in Object_Ref'Class) is begin if Into.Object /= Value.Object then Set_Object (Into, Value.Object); if Into.Object /= null then Util.Concurrent.Counters.Increment (Into.Object.Counter); end if; Object.Modified (Field) := True; end if; end Set_Field_Object; procedure Set_Field_Identifier (Object : in out Object_Record'Class; Field : in Positive; Into : in out ADO.Identifier; Value : in ADO.Identifier) is begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Identifier; procedure Set_Field_Entity_Type (Object : in out Object_Record'Class; Field : in Positive; Into : in out ADO.Entity_Type; Value : in ADO.Entity_Type) is begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Entity_Type; procedure Set_Field_Blob (Object : in out Object_Record'Class; Field : in Positive; Into : in out ADO.Blob_Ref; Value : in ADO.Blob_Ref) is begin if Value.Value /= Into.Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Blob; procedure Set_Field_Key_Value (Object : in out Object_Record'Class; Field : in Positive; Value : in ADO.Identifier) is begin if Object.Get_Key_Value /= Value then Set_Key_Value (Object, Value); Object.Modified (Field) := True; end if; end Set_Field_Key_Value; procedure Set_Field_Key_Value (Object : in out Object_Record'Class; Field : in Positive; Value : in String) is use Ada.Strings.Unbounded; begin if Object.Key.Str /= Value then Set_Key_Value (Object, Value); Object.Modified (Field) := True; end if; end Set_Field_Key_Value; procedure Set_Field_Key_Value (Object : in out Object_Record'Class; Field : in Positive; Value : in Ada.Strings.Unbounded.Unbounded_String) is use Ada.Strings.Unbounded; begin if Object.Key.Str /= Value then Set_Key_Value (Object, Value); Object.Modified (Field) := True; end if; end Set_Field_Key_Value; procedure Set_Field_Operation (Object : in out Object_Record'Class; Field : in Positive; Into : in out T; Value : in T) is begin if Into /= Value then Into := Value; Object.Modified (Field) := True; end if; end Set_Field_Operation; end ADO.Objects;
damaki/dw1000-rssi-tester
Ada
4,678
adb
------------------------------------------------------------------------------- -- Copyright (c) 2017 Daniel King -- -- 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.Real_Time; use Ada.Real_Time; with Configurations; with DecaDriver.Core; use DecaDriver.Core; with DecaDriver.Rx; with DW1000.Driver; use DW1000.Driver; with EVB1000.LCD; with EVB1000.LED; with Packet_Receiver; procedure Receiver is Packets_Per_Second : constant array (DW1000.Driver.Data_Rates) of Natural := (Data_Rate_110k => 64, Data_Rate_850k => 200, Data_Rate_6M8 => 250); Current_Config : DecaDriver.Core.Configuration_Type; New_Config : DecaDriver.Core.Configuration_Type; Next_Update_Time : Ada.Real_Time.Time; procedure Update_LCD is Channel_Number_Str : constant array (Positive range 1 .. 7) of Character := (1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7'); PRF_Str : constant array (PRF_Type) of String (1 .. 5) := (PRF_16MHz => "16MHz", PRF_64MHz => "64MHz"); Data_Rate_Str : constant array (Data_Rates) of String (1 .. 4) := (Data_Rate_110k => "110K", Data_Rate_850k => "850K", Data_Rate_6M8 => "6.8M"); Line_1 : String := ("Ch" & Channel_Number_Str (Positive (Current_Config.Channel)) & ' ' & PRF_Str (Current_Config.PRF) & ' ' & Data_Rate_Str (Current_Config.Data_Rate)); Average_RSSI : Float; Nb_Packets : Natural; Data_Rate : DW1000.Driver.Data_Rates; Was_Config_Changed : Boolean; PLR : Natural; begin Packet_Receiver.Packets_Info.Reset (Average_RSSI, Nb_Packets, Data_Rate, Was_Config_Changed); if Nb_Packets = 0 or Was_Config_Changed then EVB1000.LCD.Driver.Put (Text_1 => Line_1, Text_2 => "---% ---- dBm"); else PLR := (Nb_Packets * 100) / Packets_Per_Second (Data_Rate); EVB1000.LCD.Driver.Put (Text_1 => Line_1, Text_2 => (Natural'Image (PLR) & "% " & Integer'Image (Integer (Average_RSSI - 0.5)) & " dBm")); end if; end Update_LCD; begin Configurations.Get_Switches_Config (Current_Config); DecaDriver.Core.Driver.Initialize (Load_Antenna_Delay => True, Load_XTAL_Trim => True, Load_UCode_From_ROM => True); DecaDriver.Core.Driver.Configure (Current_Config); DecaDriver.Core.Driver.Configure_LEDs (Tx_LED_Enable => False, Rx_LED_Enable => True, Rx_OK_LED_Enable => False, SFD_LED_Enable => False, Test_Flash => False); DecaDriver.Rx.Receiver.Set_FCS_Check_Enabled (True); DecaDriver.Rx.Receiver.Start_Rx_Immediate; Next_Update_Time := Ada.Real_Time.Clock; loop Update_LCD; Configurations.Get_Switches_Config (New_Config); if New_Config /= Current_Config then -- Configuration switches have changed. Apply new configuration. Current_Config := New_Config; DecaDriver.Core.Driver.Force_Tx_Rx_Off; DecaDriver.Core.Driver.Configure (New_Config); DecaDriver.Rx.Receiver.Start_Rx_Immediate; Packet_Receiver.Packets_Info.Config_Changed; end if; Next_Update_Time := Next_Update_Time + Seconds (1); delay until Next_Update_Time; EVB1000.LED.Toggle_LED (1); end loop; end Receiver;
reznikmm/matreshka
Ada
4,059
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_Table_Background_Attributes; package Matreshka.ODF_Table.Table_Background_Attributes is type Table_Table_Background_Attribute_Node is new Matreshka.ODF_Table.Abstract_Table_Attribute_Node and ODF.DOM.Table_Table_Background_Attributes.ODF_Table_Table_Background_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Table_Table_Background_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Table_Table_Background_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Table.Table_Background_Attributes;
reznikmm/matreshka
Ada
4,932
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.UML.Input_Pins.Collections is pragma Preelaborate; package UML_Input_Pin_Collections is new AMF.Generic_Collections (UML_Input_Pin, UML_Input_Pin_Access); type Set_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Set with null record; Empty_Set_Of_UML_Input_Pin : constant Set_Of_UML_Input_Pin; type Ordered_Set_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UML_Input_Pin : constant Ordered_Set_Of_UML_Input_Pin; type Bag_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Bag with null record; Empty_Bag_Of_UML_Input_Pin : constant Bag_Of_UML_Input_Pin; type Sequence_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Sequence with null record; Empty_Sequence_Of_UML_Input_Pin : constant Sequence_Of_UML_Input_Pin; private Empty_Set_Of_UML_Input_Pin : constant Set_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Set with null record); Empty_Ordered_Set_Of_UML_Input_Pin : constant Ordered_Set_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Ordered_Set with null record); Empty_Bag_Of_UML_Input_Pin : constant Bag_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Bag with null record); Empty_Sequence_Of_UML_Input_Pin : constant Sequence_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Sequence with null record); end AMF.UML.Input_Pins.Collections;
sparre/Command-Line-Parser-Generator
Ada
563
adb
-- Copyright: JSA Research & Innovation <[email protected]> -- License: Beer Ware pragma License (Unrestricted); with Ada.Characters.Conversions, Ada.Strings.Hash_Case_Insensitive; function Wide_Unbounded_Hash_Case_Insensitive (Key : in Ada.Strings.Wide_Unbounded.Unbounded_Wide_String) return Ada.Containers.Hash_Type is begin return Ada.Strings.Hash_Case_Insensitive (Key => Ada.Characters.Conversions.To_String (Ada.Strings.Wide_Unbounded.To_Wide_String (Key))); end Wide_Unbounded_Hash_Case_Insensitive;
AdaCore/gpr
Ada
12,506
ads
-- -- Copyright (C) 2014-2022, AdaCore -- SPDX-License-Identifier: Apache-2.0 -- -- This package provides a standardized array type (starting at index 0) along -- with a host of functional primitives to manipulate instances of this -- array. Functional transformations are a more natural way to express some -- transformations (filters for example), and, thanks to Ada's secondary stack -- based arrays, can be much faster than the dynamic vector counterpart. -- -- For example, given the following imperative code:: -- -- Input : Vector; -- Output : Vector; -- -- for El of Input loop -- if Predicate (El) then -- Output.Append (El); -- end if; -- end loop; -- -- You could do the same thing in a functional way with this module, like so:: -- -- Input : Array_Type; -- Output : Array_Type := Filter (Input, Predicate'Access) -- -- The module generally provides two ways to use a higher order primitive: -- -- 1. The first is by using the dynamic version of the primitive, that takes -- an access to the subprogram(s) it is going to need. For filter, it will -- be the Filter primitive. -- -- 2. The second is to use the generic version of the primitive, that will -- take the subprograms as generic parameters. Those versions end with the -- _Gen suffix. For filter, it will be Filter_Gen. Those versions are -- faster, because the front-end is able to inline the parameter -- subprograms inside the call. generic type Element_Type is private; type Index_Type is range <>; type Array_Type is array (Index_Type range <>) of Element_Type; with function "=" (L, R : Element_Type) return Boolean is <>; package Gpr_Parser_Support.Array_Utils is subtype Extended_Index is Index_Type'Base; Empty_Array : constant Array_Type (Index_Type'Succ (Index_Type'First) .. Index_Type'First) := (others => <>); -- Constant for the empty array type Option_Type (Has_Element : Boolean) is record case Has_Element is when True => Element : Element_Type; when False => null; end case; end record; -- Basic option type, that can either contain an element or nothing function Create (El : Element_Type) return Option_Type; -- Creates an instance of an option type, containing El None : constant Option_Type := (Has_Element => False); -- Constant for the empty Option type function Reverse_Array (In_Array : Array_Type) return Array_Type; --------- -- Map -- --------- generic type Out_Type is private; type Out_Array_Type is array (Index_Type range <>) of Out_Type; with function Transform (In_Element : Element_Type) return Out_Type; function Map_Gen (In_Array : Array_Type) return Out_Array_Type; -- Applies Transform on every element of In_Array, returning an array from -- all the transformed elements. -- This version takes a formal Transform parameter, and is meant for the -- cases where the transformed values have a different type from the input -- values. generic type Out_Type is private; type Out_Array_Type is array (Index_Type range <>) of Out_Type; function Map (In_Array : Array_Type; Transform : access function (El : Element_Type) return Out_Type) return Out_Array_Type; -- Applies Transform on every element of In_Array, returning an array from -- all the transformed elements. -- This version takes an access Transform parameter, and is meant for the -- cases where the transformed values have a different type from the input -- values. generic with function Transform (In_Element : Element_Type) return Element_Type; function Id_Map_Gen (In_Array : Array_Type) return Array_Type; -- Applies Transform on every element of In_Array, returning an array from -- all the transformed elements. -- This version takes a formal Transform parameter, and is meant for the -- cases where the transformed values have the same type as the input -- values. function Id_Map (In_Array : Array_Type; Transform : access function (El : Element_Type) return Element_Type) return Array_Type; -- Applies Transform on every element of In_Array, returning an array from -- all the transformed elements. -- This version takes an access Transform parameter, and is meant for the -- cases where the transformed values have the same type as the input -- values. ------------ -- Filter -- ------------ generic with function Predicate (In_Element : Element_Type) return Boolean; function Filter_Gen (In_Array : Array_Type) return Array_Type; -- Returns a new array that contains every element in In_Array for which -- Predicate returns true. -- This version takes a formal Predicate parameter. function Filter (In_Array : Array_Type; Pred : access function (E : Element_Type) return Boolean) return Array_Type; -- Returns a new array that contains every element in In_Array for which -- Predicate returns true. -- This version takes an access Predicate parameter. --------------- -- Partition -- --------------- generic with function Predicate (E : Element_Type) return Boolean; procedure Partition_Gen (In_Array : in out Array_Type; Last_Satisfied : out Extended_Index); -- Swap elements in In_Array and set Last_Satisfied so that upon return, -- all elements in the slice:: -- -- In_Array ('First .. Last_Satisfied) -- -- do satisfy the given Predicate and all the others don't. procedure Partition (In_Array : in out Array_Type; Predicate : access function (E : Element_Type) return Boolean; Last_Satisfied : out Extended_Index); -- Swap elements in In_Array and set Last_Satisfied so that upon return, -- all elements in the slice:: -- -- In_Array ('First .. Last_Satisfied) -- -- do satisfy the given Predicate and all the others don't. generic with function "=" (L, R : Element_Type) return Boolean; function Unique_Gen (In_Array : Array_Type) return Array_Type; -- Returns a new array that contains every unique element in In_Array for -- which Predicate returns true. -- This version takes a formal "=" function in case you need to redefine -- equality for Element_Type. function Unique (In_Array : Array_Type) return Array_Type; -- Returns a new array that contains every unique element in In_Array for -- which Predicate returns true. function Contains (In_Array : Array_Type; El : Element_Type) return Boolean; -- Returns True if In_Array contains El generic with function Predicate (In_Element : Element_Type) return Boolean; function Find_Gen (In_Array : Array_Type; Rev : Boolean := False) return Option_Type; -- Return the first element in In_Array for which Predicate returns True. -- If Rev is True, the search will be done from the end of the array -- to the start. -- This version takes predicate as formal subprogram parameter, and returns -- an option type for the element. function Find (In_Array : Array_Type; Predicate : access function (El : Element_Type) return Boolean; Rev : Boolean := False) return Option_Type; -- Return the first element in In_Array for which Predicate returns True. -- If Rev is True, the search will be done from the end of the array -- to the start. -- This version takes predicate as an access subprogram parameter, and -- returns an option type for the element. function Find (In_Array : Array_Type; Predicate : access function (El : Element_Type) return Boolean; Rev : Boolean := False; Ret : out Element_Type) return Boolean; -- Return the first element in In_Array for which Predicate returns True. -- If Rev is True, the search will be done from the end of the array -- to the start. -- This version takes predicate as an access subprogram parameter, and -- returns the found element as an out parameter. generic with function Predicate (In_Element : Element_Type) return Boolean; function Find_Gen_Or (In_Array : Array_Type; Val_If_Not_Found : Element_Type; Rev : Boolean := False) return Element_Type; -- Return the first element in In_Array for which Predicate returns True. -- If Rev is True, the search will be done from the end of the array -- to the start. -- This version takes predicate as a formal subprogram parameter, and -- returns Val_If_Not_Found if no element is found. function Find (In_Array : Array_Type; Predicate : access function (El : Element_Type) return Boolean; Val_If_Not_Found : Element_Type; Rev : Boolean := False) return Element_Type; -- Return the first element in In_Array for which Predicate returns True. -- If Rev is True, the search will be done from the end of the array -- to the start. -- This version takes predicate as an access subprogram parameter, and -- returns Val_If_Not_Found if no element is found. -------------- -- Flat_Map -- -------------- generic type F_Type is private; type Fn_Ret_Array_Type is array (Index_Type range <>) of F_Type; function Flat_Map (In_Array : Array_Type; Transform : access function (El : Element_Type) return Fn_Ret_Array_Type) return Fn_Ret_Array_Type; -- Given a transform function, that from an element of the array, returns a -- new array, this function applies the transform function to every element -- in the array, and returns the concatenation of every resulting array. -- This version takes the Transform function as an access parameter, and -- is generic in the element type of the arrays returned by the transform -- function. function Id_Flat_Map (In_Array : Array_Type; Transform : access function (El : Element_Type) return Array_Type) return Array_Type; -- Given a transform function, that from an element of the array, returns a -- new array, this function applies the transform function to every element -- in the array, and returns the concatenation of every resulting array. -- This version takes the Transform function as an access parameter, and -- is for the special case in which the type of the returned arrays is the -- same as the type of the In_Array. generic type F_Type is private; type Fun_Ret_Array_Type is array (Index_Type range <>) of F_Type; with function Transform (In_Element : Element_Type) return Fun_Ret_Array_Type; function Flat_Map_Gen (In_Array : Array_Type) return Fun_Ret_Array_Type; -- Given a transform function, that from an element of the array, returns a -- new array, this function applies the transform function to every element -- in the array, and returns the concatenation of every resulting array. -- This version takes the Transform function as a formal parameter, and -- is generic in the element type of the arrays returned by the transform -- function. generic with function Transform (In_Element : Element_Type) return Array_Type; function Id_Flat_Map_Gen (In_Array : Array_Type) return Array_Type; -- Given a transform function, that from an element of the array, returns a -- new array, this function applies the transform function to every element -- in the array, and returns the concatenation of every resulting array. -- This version takes the Transform function as a formal parameter, and -- is for the special case in which the type of the returned arrays is the -- same as the type of the In_Array. generic type Other_Index_Type is (<>); type Other_Array_Type is array (Other_Index_Type range <>) of Element_Type; with function "+" (L, R : Other_Index_Type) return Other_Index_Type is <>; function Copy (In_Array : Array_Type) return Other_Array_Type; -- Given an array type Other_Array_Type, of compatible element type but -- dissimilar index type, and an array of type Array_Type, return a new -- array of type Other_Array_Type. private type Bool_Array is array (Index_Type range <>) of Boolean; end Gpr_Parser_Support.Array_Utils;
reznikmm/matreshka
Ada
4,251
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Web API Definition -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015-2016, 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 WebAPI.DOM.Events; with WebAPI.HTML.Windows; package WebAPI.UI_Events is pragma Preelaborate; type UI_Event is limited interface and WebAPI.DOM.Events.Event; not overriding function Get_View (Self : not null access constant UI_Event) return WebAPI.HTML.Windows.Window_Access is abstract with Import => True, Convention => JavaScript_Property_Getter, Link_Name => "view"; -- The view attribute identifies the Window from which the event was -- generated. not overriding function Get_Detail (Self : not null access constant UI_Event) return WebAPI.DOM_Long is abstract with Import => True, Convention => JavaScript_Property_Getter, Link_Name => "detail"; -- Specifies some detail information about the Event, depending on the type -- of event. end WebAPI.UI_Events;
pok-kernel/pok
Ada
1,759
ads
-- POK header -- -- The following file is a part of the POK project. Any modification should -- be made according to the POK licence. You CANNOT use this file or a part -- of a file for your own project. -- -- For more information on the POK licence, please see our LICENCE FILE -- -- Please follow the coding guidelines described in doc/CODING_GUIDELINES -- -- Copyright (c) 2007-2022 POK team -- --------------------------------------------------------------------------- -- -- -- MODULE_SCHEDULES constant and type definitions and management services -- -- -- -- --------------------------------------------------------------------------- package APEX.Module_Schedules is type Schedule_Id_Type is private; Null_Schedule_Id : constant Schedule_Id_Type; subtype Schedule_Name_Type is Name_Type; type Schedule_Status_Type is record Time_Of_Last_Schedule_Switch : System_Time_Type; Current_Schedule : Schedule_Id_Type; Next_Schedule : Schedule_Id_Type; end record; procedure Set_Module_Schedule (Schedule_Id : in Schedule_Id_Type; Return_Code : out Return_Code_Type); procedure Get_Module_Schedule_Status (Schedule_Status : out Schedule_Status_Type; Return_Code : out Return_Code_Type); procedure Get_Module_Schedule_Id (Schedule_Name : in Schedule_Name_Type; Schedule_Id : out Schedule_Id_Type; Return_Code : out Return_Code_Type); private Type Schedule_Id_Type is new APEX_Integer; Null_Schedule_Id : constant Schedule_Id_Type := 0; pragma Convention (C, Schedule_Status_Type); end APEX.Module_Schedules;
reznikmm/matreshka
Ada
3,993
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.Smil_FadeColor_Attributes; package Matreshka.ODF_Smil.FadeColor_Attributes is type Smil_FadeColor_Attribute_Node is new Matreshka.ODF_Smil.Abstract_Smil_Attribute_Node and ODF.DOM.Smil_FadeColor_Attributes.ODF_Smil_FadeColor_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Smil_FadeColor_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Smil_FadeColor_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Smil.FadeColor_Attributes;
AaronC98/PlaneSystem
Ada
10,522
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 is the API to handle session data for each client connected with Ada.Calendar; private with AWS.Config; package AWS.Session is use Ada; type Id is private; type Value_Kind is (Int, Str, Real, Bool, User); No_Session : constant Id; function Create return Id with Post => Create'Result /= No_Session; -- Create a new uniq Session Id function Creation_Stamp (SID : Id) return Calendar.Time; -- Returns the creation date of this session function Private_Key (SID : Id) return String; -- Return the private key for this session procedure Delete (SID : Id) with Post => not Exist (SID); -- Delete session, does nothing if SID does not exist. -- In most cases, the client browser will still send the cookie identifying -- the session on its next request. In such a case, the function -- AWS.Status.Timed_Out will return True, same as when the session was -- deleted automatically by AWS when it expired. -- The recommended practice is therefore to call -- AWS.Response.Set.Clear_Session when you send a response to the customer -- after deleting the session, so that the cookie is not sent again. function Delete_If_Empty (SID : Id) return Boolean; -- Delete session only if there is no key/value pairs. -- Returns True if session deleted. -- Need to delete not used just created session to avoid too many empty -- session creation. function Image (SID : Id) return String with Inline; -- Return ID image function Value (SID : String) return Id with Inline; -- Build an ID from a String, returns No_Session if SID is not recongnized -- as an AWS session ID. function Exist (SID : Id) return Boolean; -- Returns True if SID exist procedure Touch (SID : Id); -- Update to current time the timestamp associated with SID. Does nothing -- if SID does not exist. procedure Set (SID : Id; Key : String; Value : String); -- Set key/value pair for the SID procedure Set (SID : Id; Key : String; Value : Integer); -- Set key/value pair for the SID procedure Set (SID : Id; Key : String; Value : Float); -- Set key/value pair for the SID procedure Set (SID : Id; Key : String; Value : Boolean); -- Set key/value pair for the SID function Get (SID : Id; Key : String) return String with Inline => True, Post => (not Exist (SID, Key) and then Get'Result'Length = 0) or else Exist (SID, Key); -- Returns the Value for Key in the session SID or the emptry string if -- key does not exist. function Get (SID : Id; Key : String) return Integer with Inline => True, Post => (not Exist (SID, Key) and then Get'Result = 0) or else Exist (SID, Key); -- Returns the Value for Key in the session SID or the integer value 0 if -- key does not exist or is not an integer. function Get (SID : Id; Key : String) return Float with Inline => True, Post => (not Exist (SID, Key) and then Get'Result = 0.0) or else Exist (SID, Key); -- Returns the Value for Key in the session SID or the float value 0.0 if -- key does not exist or is not a float. function Get (SID : Id; Key : String) return Boolean with Inline => True, Post => (not Exist (SID, Key) and then Get'Result = False) or else Exist (SID, Key); -- Returns the Value for Key in the session SID or the boolean False if -- key does not exist or is not a boolean. generic type Data is private; Null_Data : Data; package Generic_Data is procedure Set (SID : Id; Key : String; Value : Data); -- Set key/value pair for the SID function Get (SID : Id; Key : String) return Data with Inline; -- Returns the Value for Key in the session SID or Null_Data if -- key does not exist. end Generic_Data; procedure Remove (SID : Id; Key : String) with Post => not Exist (SID, Key); -- Removes Key from the specified session function Exist (SID : Id; Key : String) return Boolean; -- Returns True if Key exist in session SID function Server_Count return Natural; -- Returns number of servers with sessions support function Length return Natural; -- Returns number of sessions function Length (SID : Id) return Natural; -- Returns number of key/value pairs in session SID procedure Clear with Post => Length = 0; -- Removes all sessions data --------------- -- Iterators -- --------------- generic with procedure Action (N : Positive; SID : Id; Time_Stamp : Ada.Calendar.Time; Quit : in out Boolean); procedure For_Every_Session; -- Iterator which call Action for every active session. N is the SID -- order. Time_Stamp is the time when SID was updated for the last -- time. Quit is set to False by default, it is possible to control the -- iterator termination by setting its value to True. Note that in the -- Action procedure it is possible to use routines that read session's -- data (Get, Exist) but any routines which modify the data will block -- (i.e. Touch, Set, Remove, Delete will dead lock). generic with procedure Action (N : Positive; Key, Value : String; Kind : Value_Kind; Quit : in out Boolean); procedure For_Every_Session_Data (SID : Id); -- Iterator which returns all the key/value pair defined for session SID. -- Quit is set to False by default, it is possible to control the iterator -- termination by setting its value to True. Note that in the Action -- procedure it is possible to use routines that read session's data (Get, -- Exist) but any routines which modify the data will block (i.e. Touch, -- Set, Remove, Delete will dead lock). -------------- -- Lifetime -- -------------- procedure Set_Lifetime (Seconds : Duration); -- Set the lifetime for session data. At the point a session is deleted, -- reusing the session ID makes AWS.Status.Session_Timed_Out return True. function Get_Lifetime return Duration; -- Get current session lifetime for session data function Has_Expired (SID : Id) return Boolean; -- Returns true if SID should be considered as expired (ie there hasn't -- been any transaction on it since Get_Lifetime seconds. Such a session -- should be deleted. Calling this function is mostly internal to AWS, and -- sessions are deleted automatically when they expire. ---------------------- -- Session Callback -- ---------------------- type Callback is access procedure (SID : Id); -- Callback procedure called when a sesssion is deleted from the server procedure Set_Callback (Callback : Session.Callback); -- Set the callback procedure to call when a session is deleted from the -- server. If Callback is Null the session's callback will be removed. ---------------- -- Session IO -- ---------------- procedure Save (File_Name : String); -- Save all sessions data into File_Name procedure Load (File_Name : String); -- Restore all sessions data from File_Name private type Id is new String (1 .. Config.Session_Id_Length); No_Session : constant Id := (others => ' '); task type Cleaner with Priority => Config.Session_Cleaner_Priority is entry Stop; entry Force; end Cleaner; -- Call Database.Clean every Session_Lifetime seconds type Cleaner_Access is access Cleaner; Cleaner_Task : Cleaner_Access; --------------------- -- Cleaner_Control -- --------------------- protected Cleaner_Control is procedure Start (Check_Interval : Duration; Lifetime : Duration); -- Launch the cleaner task the first time and does nothing after procedure Stop (Need_Release : out Boolean); -- Stop the cleaner task when there is no more server using it. Release -- is set to True if the Cleaner_Task can be released. function Server_Count return Natural; -- Returns number of servers with sessions support private S_Count : Natural := 0; end Cleaner_Control; end AWS.Session;
reznikmm/matreshka
Ada
4,623
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_Text.Section_Name_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Text_Section_Name_Attribute_Node is begin return Self : Text_Section_Name_Attribute_Node do Matreshka.ODF_Text.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Text_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Text_Section_Name_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Section_Name_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Text_URI, Matreshka.ODF_String_Constants.Section_Name_Attribute, Text_Section_Name_Attribute_Node'Tag); end Matreshka.ODF_Text.Section_Name_Attributes;
sungyeon/drake
Ada
1,018
ads
pragma License (Unrestricted); -- Ada 2012 with Ada.Characters.Conversions; with Ada.Strings.UTF_Encoding.Generic_Strings; package Ada.Strings.UTF_Encoding.Wide_Wide_Strings is new Strings.UTF_Encoding.Generic_Strings ( Wide_Wide_Character, Wide_Wide_String, Expanding_From_8 => Characters.Conversions.Expanding_From_UTF_8_To_Wide_Wide_String, Expanding_From_16 => Characters.Conversions.Expanding_From_UTF_16_To_Wide_Wide_String, Expanding_From_32 => Characters.Conversions.Expanding_From_UTF_32_To_Wide_Wide_String, Expanding_To_8 => Characters.Conversions.Expanding_From_Wide_Wide_String_To_UTF_8, Expanding_To_16 => Characters.Conversions.Expanding_From_Wide_Wide_String_To_UTF_16, Expanding_To_32 => Characters.Conversions.Expanding_From_Wide_Wide_String_To_UTF_32, Get => Characters.Conversions.Get, Put => Characters.Conversions.Put); pragma Pure (Ada.Strings.UTF_Encoding.Wide_Wide_Strings);
reznikmm/matreshka
Ada
3,764
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.Style_Text_Overline_Width_Attributes is pragma Preelaborate; type ODF_Style_Text_Overline_Width_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Style_Text_Overline_Width_Attribute_Access is access all ODF_Style_Text_Overline_Width_Attribute'Class with Storage_Size => 0; end ODF.DOM.Style_Text_Overline_Width_Attributes;
AdaCore/training_material
Ada
85
adb
select T.Receive_Message ("1"); else Put_Line ("No message sent"); end select;
AdaCore/libadalang
Ada
49
ads
package Pkg is procedure P1 is null; end Pkg;
reznikmm/matreshka
Ada
3,719
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.Style_Line_Style_Attributes is pragma Preelaborate; type ODF_Style_Line_Style_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Style_Line_Style_Attribute_Access is access all ODF_Style_Line_Style_Attribute'Class with Storage_Size => 0; end ODF.DOM.Style_Line_Style_Attributes;
reznikmm/matreshka
Ada
179,377
adb
------------------------------------------------------------------------------ -- -- -- 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.Internals.Elements; with AMF.Internals.Extents; with AMF.Internals.Helpers; with AMF.Internals.Links; with AMF.Internals.Listener_Registry; with AMF.Internals.Tables.UML_Constructors; with AMF.Internals.Tables.UML_Metamodel; with AMF.UML.Holders.Aggregation_Kinds; with AMF.UML.Holders.Call_Concurrency_Kinds; with AMF.UML.Holders.Connector_Kinds; with AMF.UML.Holders.Expansion_Kinds; with AMF.UML.Holders.Interaction_Operator_Kinds; with AMF.UML.Holders.Message_Kinds; with AMF.UML.Holders.Message_Sorts; with AMF.UML.Holders.Object_Node_Ordering_Kinds; with AMF.UML.Holders.Parameter_Direction_Kinds; with AMF.UML.Holders.Parameter_Effect_Kinds; with AMF.UML.Holders.Pseudostate_Kinds; with AMF.UML.Holders.Transition_Kinds; with AMF.UML.Holders.Visibility_Kinds; package body AMF.Internals.Factories.UML_Factories is None_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("none"); Shared_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("shared"); Composite_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("composite"); Sequential_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("sequential"); Guarded_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("guarded"); Concurrent_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("concurrent"); Assembly_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("assembly"); Delegation_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("delegation"); Parallel_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("parallel"); Iterative_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("iterative"); Stream_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("stream"); Seq_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("seq"); Alt_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("alt"); Opt_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("opt"); Break_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("break"); Par_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("par"); Strict_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("strict"); Loop_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("loop"); Critical_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("critical"); Neg_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("neg"); Assert_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("assert"); Ignore_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("ignore"); Consider_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("consider"); Complete_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("complete"); Lost_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("lost"); Found_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("found"); Unknown_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("unknown"); Synch_Call_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("synchCall"); Asynch_Call_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("asynchCall"); Asynch_Signal_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("asynchSignal"); Create_Message_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("createMessage"); Delete_Message_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("deleteMessage"); Reply_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("reply"); Unordered_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("unordered"); Ordered_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("ordered"); LIFO_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("LIFO"); FIFO_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("FIFO"); In_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("in"); Inout_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("inout"); Out_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("out"); Return_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("return"); Create_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("create"); Read_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("read"); Update_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("update"); Delete_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("delete"); Initial_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("initial"); Deep_History_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("deepHistory"); Shallow_History_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("shallowHistory"); Join_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("join"); Fork_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("fork"); Junction_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("junction"); Choice_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("choice"); Entry_Point_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("entryPoint"); Exit_Point_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("exitPoint"); Terminate_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("terminate"); Internal_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("internal"); Local_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("local"); External_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("external"); Public_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("public"); Private_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("private"); Protected_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("protected"); Package_Img : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("package"); ----------------- -- Constructor -- ----------------- function Constructor (Extent : AMF.Internals.AMF_Extent) return not null AMF.Factories.Factory_Access is begin return new UML_Factory'(Extent => Extent); end Constructor; ----------------------- -- Convert_To_String -- ----------------------- overriding function Convert_To_String (Self : not null access UML_Factory; Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class; Value : League.Holders.Holder) return League.Strings.Universal_String is pragma Unreferenced (Self); DT : constant AMF.Internals.CMOF_Element := AMF.Internals.Elements.Element_Base'Class (Data_Type.all).Element; begin if DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Aggregation_Kind then declare Item : constant AMF.UML.UML_Aggregation_Kind := AMF.UML.Holders.Aggregation_Kinds.Element (Value); begin case Item is when AMF.UML.None => return None_Img; when AMF.UML.Shared => return Shared_Img; when AMF.UML.Composite => return Composite_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Concurrency_Kind then declare Item : constant AMF.UML.UML_Call_Concurrency_Kind := AMF.UML.Holders.Call_Concurrency_Kinds.Element (Value); begin case Item is when AMF.UML.Sequential => return Sequential_Img; when AMF.UML.Guarded => return Guarded_Img; when AMF.UML.Concurrent => return Concurrent_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Connector_Kind then declare Item : constant AMF.UML.UML_Connector_Kind := AMF.UML.Holders.Connector_Kinds.Element (Value); begin case Item is when AMF.UML.Assembly => return Assembly_Img; when AMF.UML.Delegation => return Delegation_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Expansion_Kind then declare Item : constant AMF.UML.UML_Expansion_Kind := AMF.UML.Holders.Expansion_Kinds.Element (Value); begin case Item is when AMF.UML.Parallel => return Parallel_Img; when AMF.UML.Iterative => return Iterative_Img; when AMF.UML.Stream => return Stream_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Operator_Kind then declare Item : constant AMF.UML.UML_Interaction_Operator_Kind := AMF.UML.Holders.Interaction_Operator_Kinds.Element (Value); begin case Item is when AMF.UML.Seq_Operator => return Seq_Img; when AMF.UML.Alt_Operator => return Alt_Img; when AMF.UML.Opt_Operator => return Opt_Img; when AMF.UML.Break_Operator => return Break_Img; when AMF.UML.Par_Operator => return Par_Img; when AMF.UML.Strict_Operator => return Strict_Img; when AMF.UML.Loop_Operator => return Loop_Img; when AMF.UML.Critical_Operator => return Critical_Img; when AMF.UML.Neg_Operator => return Neg_Img; when AMF.UML.Assert_Operator => return Assert_Img; when AMF.UML.Ignore_Operator => return Ignore_Img; when AMF.UML.Consider_Operator => return Consider_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Message_Kind then declare Item : constant AMF.UML.UML_Message_Kind := AMF.UML.Holders.Message_Kinds.Element (Value); begin case Item is when AMF.UML.Complete => return Complete_Img; when AMF.UML.Lost => return Lost_Img; when AMF.UML.Found => return Found_Img; when AMF.UML.Unknown => return Unknown_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Message_Sort then declare Item : constant AMF.UML.UML_Message_Sort := AMF.UML.Holders.Message_Sorts.Element (Value); begin case Item is when AMF.UML.Synch_Call => return Synch_Call_Img; when AMF.UML.Asynch_Call => return Asynch_Call_Img; when AMF.UML.Asynch_Signal => return Asynch_Signal_Img; when AMF.UML.Create_Message => return Create_Message_Img; when AMF.UML.Delete_Message => return Delete_Message_Img; when AMF.UML.Reply => return Reply_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Object_Node_Ordering_Kind then declare Item : constant AMF.UML.UML_Object_Node_Ordering_Kind := AMF.UML.Holders.Object_Node_Ordering_Kinds.Element (Value); begin case Item is when AMF.UML.Unordered => return Unordered_Img; when AMF.UML.Ordered => return Ordered_Img; when AMF.UML.LIFO => return LIFO_Img; when AMF.UML.FIFO => return FIFO_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter_Direction_Kind then declare Item : constant AMF.UML.UML_Parameter_Direction_Kind := AMF.UML.Holders.Parameter_Direction_Kinds.Element (Value); begin case Item is when AMF.UML.In_Parameter => return In_Img; when AMF.UML.In_Out_Parameter => return Inout_Img; when AMF.UML.Out_Parameter => return Out_Img; when AMF.UML.Return_Parameter => return Return_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter_Effect_Kind then declare Item : constant AMF.UML.UML_Parameter_Effect_Kind := AMF.UML.Holders.Parameter_Effect_Kinds.Element (Value); begin case Item is when AMF.UML.Create => return Create_Img; when AMF.UML.Read => return Read_Img; when AMF.UML.Update => return Update_Img; when AMF.UML.Delete => return Delete_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Pseudostate_Kind then declare Item : constant AMF.UML.UML_Pseudostate_Kind := AMF.UML.Holders.Pseudostate_Kinds.Element (Value); begin case Item is when AMF.UML.Initial_Pseudostate => return Initial_Img; when AMF.UML.Deep_History_Pseudostate => return Deep_History_Img; when AMF.UML.Shallow_History_Pseudostate => return Shallow_History_Img; when AMF.UML.Join_Pseudostate => return Join_Img; when AMF.UML.Fork_Pseudostate => return Fork_Img; when AMF.UML.Junction_Pseudostate => return Junction_Img; when AMF.UML.Choice_Pseudostate => return Choice_Img; when AMF.UML.Entry_Point_Pseudostate => return Entry_Point_Img; when AMF.UML.Exit_Point_Pseudostate => return Exit_Point_Img; when AMF.UML.Terminate_Pseudostate => return Terminate_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Transition_Kind then declare Item : constant AMF.UML.UML_Transition_Kind := AMF.UML.Holders.Transition_Kinds.Element (Value); begin case Item is when AMF.UML.Internal => return Internal_Img; when AMF.UML.Local => return Local_Img; when AMF.UML.External => return External_Img; end case; end; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Visibility_Kind then declare Item : constant AMF.UML.UML_Visibility_Kind := AMF.UML.Holders.Visibility_Kinds.Element (Value); begin case Item is when AMF.UML.Public_Visibility => return Public_Img; when AMF.UML.Private_Visibility => return Private_Img; when AMF.UML.Protected_Visibility => return Protected_Img; when AMF.UML.Package_Visibility => return Package_Img; end case; end; else raise Program_Error; end if; end Convert_To_String; ------------ -- Create -- ------------ overriding function Create (Self : not null access UML_Factory; Meta_Class : not null access AMF.CMOF.Classes.CMOF_Class'Class) return not null AMF.Elements.Element_Access is MC : constant AMF.Internals.CMOF_Element := AMF.Internals.Elements.Element_Base'Class (Meta_Class.all).Element; Element : AMF.Internals.AMF_Element; begin if MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Abstraction then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Abstraction; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Accept_Call_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Accept_Call_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Accept_Event_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Accept_Event_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Action_Execution_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Action_Execution_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Action_Input_Pin then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Action_Input_Pin; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Activity; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity_Final_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Activity_Final_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity_Parameter_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Activity_Parameter_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity_Partition then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Activity_Partition; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Actor then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Actor; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Add_Structural_Feature_Value_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Add_Structural_Feature_Value_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Add_Variable_Value_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Add_Variable_Value_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Any_Receive_Event then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Any_Receive_Event; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Artifact then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Artifact; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Association then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Association; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Association_Class then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Association_Class; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Behavior_Execution_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Behavior_Execution_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Broadcast_Signal_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Broadcast_Signal_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Behavior_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Call_Behavior_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Event then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Call_Event; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Operation_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Call_Operation_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Central_Buffer_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Central_Buffer_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Change_Event then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Change_Event; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Class then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Class; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Classifier_Template_Parameter then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Classifier_Template_Parameter; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Clause then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Clause; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Clear_Association_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Clear_Association_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Clear_Structural_Feature_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Clear_Structural_Feature_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Clear_Variable_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Clear_Variable_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Collaboration then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Collaboration; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Collaboration_Use then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Collaboration_Use; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Combined_Fragment then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Combined_Fragment; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Comment then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Comment; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Communication_Path then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Communication_Path; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Component then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Component; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Component_Realization then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Component_Realization; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Conditional_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Conditional_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Connectable_Element_Template_Parameter then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Connectable_Element_Template_Parameter; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Connection_Point_Reference then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Connection_Point_Reference; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Connector then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Connector; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Connector_End then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Connector_End; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Consider_Ignore_Fragment then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Consider_Ignore_Fragment; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Constraint then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Constraint; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Continuation then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Continuation; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Control_Flow then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Control_Flow; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Create_Link_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Create_Link_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Create_Link_Object_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Create_Link_Object_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Create_Object_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Create_Object_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Data_Store_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Data_Store_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Data_Type then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Data_Type; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Decision_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Decision_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Dependency then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Dependency; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Deployment then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Deployment; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Deployment_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Deployment_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Destroy_Link_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Destroy_Link_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Destroy_Object_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Destroy_Object_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Destruction_Occurrence_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Destruction_Occurrence_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Device then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Device; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Duration; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration_Constraint then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Duration_Constraint; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration_Interval then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Duration_Interval; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration_Observation then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Duration_Observation; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Element_Import then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Element_Import; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Enumeration then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Enumeration; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Enumeration_Literal then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Enumeration_Literal; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Exception_Handler then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Exception_Handler; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Execution_Environment then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Execution_Environment; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Execution_Occurrence_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Execution_Occurrence_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Expansion_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Expansion_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Expansion_Region then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Expansion_Region; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Expression then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Expression; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Extend then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Extend; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Extension then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Extension; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Extension_End then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Extension_End; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Extension_Point then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Extension_Point; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Final_State then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Final_State; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Flow_Final_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Flow_Final_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Fork_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Fork_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Function_Behavior then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Function_Behavior; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Gate then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Gate; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_General_Ordering then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_General_Ordering; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Generalization then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Generalization; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Generalization_Set then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Generalization_Set; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Image then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Image; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Include then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Include; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Information_Flow then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Information_Flow; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Information_Item then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Information_Item; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Initial_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Initial_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Input_Pin then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Input_Pin; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Instance_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Instance_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Instance_Value then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Instance_Value; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interaction; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Constraint then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interaction_Constraint; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Operand then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interaction_Operand; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Use then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interaction_Use; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interface then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interface; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interface_Realization then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interface_Realization; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interruptible_Activity_Region then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interruptible_Activity_Region; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interval then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interval; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interval_Constraint then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Interval_Constraint; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Join_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Join_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Lifeline then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Lifeline; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Link_End_Creation_Data then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Link_End_Creation_Data; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Link_End_Data then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Link_End_Data; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Link_End_Destruction_Data then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Link_End_Destruction_Data; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Boolean then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Literal_Boolean; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Integer then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Literal_Integer; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Null then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Literal_Null; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Real then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Literal_Real; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_String then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Literal_String; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Unlimited_Natural then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Literal_Unlimited_Natural; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Loop_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Loop_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Manifestation then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Manifestation; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Merge_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Merge_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Message then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Message; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Message_Occurrence_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Message_Occurrence_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Model then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Model; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Object_Flow then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Object_Flow; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Occurrence_Specification then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Occurrence_Specification; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Opaque_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Opaque_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Opaque_Behavior then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Opaque_Behavior; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Opaque_Expression then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Opaque_Expression; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Operation then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Operation; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Operation_Template_Parameter then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Operation_Template_Parameter; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Output_Pin then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Output_Pin; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Package then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Package; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Package_Import then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Package_Import; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Package_Merge then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Package_Merge; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Parameter; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter_Set then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Parameter_Set; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Part_Decomposition then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Part_Decomposition; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Port then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Port; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Primitive_Type then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Primitive_Type; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Profile then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Profile; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Profile_Application then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Profile_Application; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Property then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Property; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Protocol_Conformance then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Protocol_Conformance; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Protocol_State_Machine then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Protocol_State_Machine; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Protocol_Transition then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Protocol_Transition; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Pseudostate then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Pseudostate; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Qualifier_Value then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Qualifier_Value; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Raise_Exception_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Raise_Exception_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Extent_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Extent_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Is_Classified_Object_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Is_Classified_Object_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Link_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Link_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Link_Object_End_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Link_Object_End_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Link_Object_End_Qualifier_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Link_Object_End_Qualifier_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Self_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Self_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Structural_Feature_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Structural_Feature_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Variable_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Read_Variable_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Realization then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Realization; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Reception then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Reception; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Reclassify_Object_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Reclassify_Object_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Redefinable_Template_Signature then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Redefinable_Template_Signature; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Reduce_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Reduce_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Region then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Region; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Remove_Structural_Feature_Value_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Remove_Structural_Feature_Value_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Remove_Variable_Value_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Remove_Variable_Value_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Reply_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Reply_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Send_Object_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Send_Object_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Send_Signal_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Send_Signal_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Sequence_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Sequence_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Signal then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Signal; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Signal_Event then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Signal_Event; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Slot then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Slot; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Start_Classifier_Behavior_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Start_Classifier_Behavior_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Start_Object_Behavior_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Start_Object_Behavior_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_State then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_State; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_State_Invariant then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_State_Invariant; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_State_Machine then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_State_Machine; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Stereotype then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Stereotype; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_String_Expression then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_String_Expression; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Structured_Activity_Node then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Structured_Activity_Node; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Substitution then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Substitution; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Binding then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Template_Binding; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Parameter then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Template_Parameter; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Parameter_Substitution then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Template_Parameter_Substitution; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Signature then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Template_Signature; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Test_Identity_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Test_Identity_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Constraint then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Time_Constraint; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Event then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Time_Event; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Expression then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Time_Expression; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Interval then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Time_Interval; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Observation then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Time_Observation; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Transition then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Transition; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Trigger then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Trigger; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Unmarshall_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Unmarshall_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Usage then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Usage; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Use_Case then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Use_Case; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Value_Pin then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Value_Pin; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Value_Specification_Action then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Value_Specification_Action; elsif MC = AMF.Internals.Tables.UML_Metamodel.MC_UML_Variable then Element := AMF.Internals.Tables.UML_Constructors.Create_UML_Variable; else raise Program_Error; end if; AMF.Internals.Extents.Internal_Append (Self.Extent, Element); AMF.Internals.Listener_Registry.Notify_Instance_Create (AMF.Internals.Helpers.To_Element (Element)); return AMF.Internals.Helpers.To_Element (Element); end Create; ------------------------ -- Create_From_String -- ------------------------ overriding function Create_From_String (Self : not null access UML_Factory; Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class; Image : League.Strings.Universal_String) return League.Holders.Holder is pragma Unreferenced (Self); use type League.Strings.Universal_String; DT : constant AMF.Internals.CMOF_Element := AMF.Internals.Elements.Element_Base'Class (Data_Type.all).Element; begin if DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Aggregation_Kind then if Image = None_Img then return AMF.UML.Holders.Aggregation_Kinds.To_Holder (AMF.UML.None); elsif Image = Shared_Img then return AMF.UML.Holders.Aggregation_Kinds.To_Holder (AMF.UML.Shared); elsif Image = Composite_Img then return AMF.UML.Holders.Aggregation_Kinds.To_Holder (AMF.UML.Composite); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Concurrency_Kind then if Image = Sequential_Img then return AMF.UML.Holders.Call_Concurrency_Kinds.To_Holder (AMF.UML.Sequential); elsif Image = Guarded_Img then return AMF.UML.Holders.Call_Concurrency_Kinds.To_Holder (AMF.UML.Guarded); elsif Image = Concurrent_Img then return AMF.UML.Holders.Call_Concurrency_Kinds.To_Holder (AMF.UML.Concurrent); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Connector_Kind then if Image = Assembly_Img then return AMF.UML.Holders.Connector_Kinds.To_Holder (AMF.UML.Assembly); elsif Image = Delegation_Img then return AMF.UML.Holders.Connector_Kinds.To_Holder (AMF.UML.Delegation); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Expansion_Kind then if Image = Parallel_Img then return AMF.UML.Holders.Expansion_Kinds.To_Holder (AMF.UML.Parallel); elsif Image = Iterative_Img then return AMF.UML.Holders.Expansion_Kinds.To_Holder (AMF.UML.Iterative); elsif Image = Stream_Img then return AMF.UML.Holders.Expansion_Kinds.To_Holder (AMF.UML.Stream); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Operator_Kind then if Image = Seq_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Seq_Operator); elsif Image = Alt_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Alt_Operator); elsif Image = Opt_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Opt_Operator); elsif Image = Break_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Break_Operator); elsif Image = Par_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Par_Operator); elsif Image = Strict_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Strict_Operator); elsif Image = Loop_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Loop_Operator); elsif Image = Critical_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Critical_Operator); elsif Image = Neg_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Neg_Operator); elsif Image = Assert_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Assert_Operator); elsif Image = Ignore_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Ignore_Operator); elsif Image = Consider_Img then return AMF.UML.Holders.Interaction_Operator_Kinds.To_Holder (AMF.UML.Consider_Operator); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Message_Kind then if Image = Complete_Img then return AMF.UML.Holders.Message_Kinds.To_Holder (AMF.UML.Complete); elsif Image = Lost_Img then return AMF.UML.Holders.Message_Kinds.To_Holder (AMF.UML.Lost); elsif Image = Found_Img then return AMF.UML.Holders.Message_Kinds.To_Holder (AMF.UML.Found); elsif Image = Unknown_Img then return AMF.UML.Holders.Message_Kinds.To_Holder (AMF.UML.Unknown); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Message_Sort then if Image = Synch_Call_Img then return AMF.UML.Holders.Message_Sorts.To_Holder (AMF.UML.Synch_Call); elsif Image = Asynch_Call_Img then return AMF.UML.Holders.Message_Sorts.To_Holder (AMF.UML.Asynch_Call); elsif Image = Asynch_Signal_Img then return AMF.UML.Holders.Message_Sorts.To_Holder (AMF.UML.Asynch_Signal); elsif Image = Create_Message_Img then return AMF.UML.Holders.Message_Sorts.To_Holder (AMF.UML.Create_Message); elsif Image = Delete_Message_Img then return AMF.UML.Holders.Message_Sorts.To_Holder (AMF.UML.Delete_Message); elsif Image = Reply_Img then return AMF.UML.Holders.Message_Sorts.To_Holder (AMF.UML.Reply); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Object_Node_Ordering_Kind then if Image = Unordered_Img then return AMF.UML.Holders.Object_Node_Ordering_Kinds.To_Holder (AMF.UML.Unordered); elsif Image = Ordered_Img then return AMF.UML.Holders.Object_Node_Ordering_Kinds.To_Holder (AMF.UML.Ordered); elsif Image = LIFO_Img then return AMF.UML.Holders.Object_Node_Ordering_Kinds.To_Holder (AMF.UML.LIFO); elsif Image = FIFO_Img then return AMF.UML.Holders.Object_Node_Ordering_Kinds.To_Holder (AMF.UML.FIFO); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter_Direction_Kind then if Image = In_Img then return AMF.UML.Holders.Parameter_Direction_Kinds.To_Holder (AMF.UML.In_Parameter); elsif Image = Inout_Img then return AMF.UML.Holders.Parameter_Direction_Kinds.To_Holder (AMF.UML.In_Out_Parameter); elsif Image = Out_Img then return AMF.UML.Holders.Parameter_Direction_Kinds.To_Holder (AMF.UML.Out_Parameter); elsif Image = Return_Img then return AMF.UML.Holders.Parameter_Direction_Kinds.To_Holder (AMF.UML.Return_Parameter); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter_Effect_Kind then if Image = Create_Img then return AMF.UML.Holders.Parameter_Effect_Kinds.To_Holder (AMF.UML.Create); elsif Image = Read_Img then return AMF.UML.Holders.Parameter_Effect_Kinds.To_Holder (AMF.UML.Read); elsif Image = Update_Img then return AMF.UML.Holders.Parameter_Effect_Kinds.To_Holder (AMF.UML.Update); elsif Image = Delete_Img then return AMF.UML.Holders.Parameter_Effect_Kinds.To_Holder (AMF.UML.Delete); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Pseudostate_Kind then if Image = Initial_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Initial_Pseudostate); elsif Image = Deep_History_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Deep_History_Pseudostate); elsif Image = Shallow_History_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Shallow_History_Pseudostate); elsif Image = Join_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Join_Pseudostate); elsif Image = Fork_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Fork_Pseudostate); elsif Image = Junction_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Junction_Pseudostate); elsif Image = Choice_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Choice_Pseudostate); elsif Image = Entry_Point_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Entry_Point_Pseudostate); elsif Image = Exit_Point_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Exit_Point_Pseudostate); elsif Image = Terminate_Img then return AMF.UML.Holders.Pseudostate_Kinds.To_Holder (AMF.UML.Terminate_Pseudostate); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Transition_Kind then if Image = Internal_Img then return AMF.UML.Holders.Transition_Kinds.To_Holder (AMF.UML.Internal); elsif Image = Local_Img then return AMF.UML.Holders.Transition_Kinds.To_Holder (AMF.UML.Local); elsif Image = External_Img then return AMF.UML.Holders.Transition_Kinds.To_Holder (AMF.UML.External); else raise Constraint_Error; end if; elsif DT = AMF.Internals.Tables.UML_Metamodel.MC_UML_Visibility_Kind then if Image = Public_Img then return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.UML.Public_Visibility); elsif Image = Private_Img then return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.UML.Private_Visibility); elsif Image = Protected_Img then return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.UML.Protected_Visibility); elsif Image = Package_Img then return AMF.UML.Holders.Visibility_Kinds.To_Holder (AMF.UML.Package_Visibility); else raise Constraint_Error; end if; else raise Program_Error; end if; end Create_From_String; ----------------- -- Create_Link -- ----------------- overriding function Create_Link (Self : not null access UML_Factory; Association : not null access AMF.CMOF.Associations.CMOF_Association'Class; First_Element : not null AMF.Elements.Element_Access; Second_Element : not null AMF.Elements.Element_Access) return not null AMF.Links.Link_Access is pragma Unreferenced (Self); begin return AMF.Internals.Links.Proxy (AMF.Internals.Links.Create_Link (AMF.Internals.Elements.Element_Base'Class (Association.all).Element, AMF.Internals.Helpers.To_Element (First_Element), AMF.Internals.Helpers.To_Element (Second_Element))); end Create_Link; ----------------- -- Get_Package -- ----------------- overriding function Get_Package (Self : not null access constant UML_Factory) return AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package is pragma Unreferenced (Self); begin return Result : AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package do Result.Add (Get_Package); end return; end Get_Package; ----------------- -- Get_Package -- ----------------- function Get_Package return not null AMF.CMOF.Packages.CMOF_Package_Access is begin return AMF.CMOF.Packages.CMOF_Package_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MM_UML_UML)); end Get_Package; ------------------------ -- Create_Abstraction -- ------------------------ overriding function Create_Abstraction (Self : not null access UML_Factory) return AMF.UML.Abstractions.UML_Abstraction_Access is begin return AMF.UML.Abstractions.UML_Abstraction_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Abstraction)))); end Create_Abstraction; ------------------------------- -- Create_Accept_Call_Action -- ------------------------------- overriding function Create_Accept_Call_Action (Self : not null access UML_Factory) return AMF.UML.Accept_Call_Actions.UML_Accept_Call_Action_Access is begin return AMF.UML.Accept_Call_Actions.UML_Accept_Call_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Accept_Call_Action)))); end Create_Accept_Call_Action; -------------------------------- -- Create_Accept_Event_Action -- -------------------------------- overriding function Create_Accept_Event_Action (Self : not null access UML_Factory) return AMF.UML.Accept_Event_Actions.UML_Accept_Event_Action_Access is begin return AMF.UML.Accept_Event_Actions.UML_Accept_Event_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Accept_Event_Action)))); end Create_Accept_Event_Action; ------------------------------------------- -- Create_Action_Execution_Specification -- ------------------------------------------- overriding function Create_Action_Execution_Specification (Self : not null access UML_Factory) return AMF.UML.Action_Execution_Specifications.UML_Action_Execution_Specification_Access is begin return AMF.UML.Action_Execution_Specifications.UML_Action_Execution_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Action_Execution_Specification)))); end Create_Action_Execution_Specification; ----------------------------- -- Create_Action_Input_Pin -- ----------------------------- overriding function Create_Action_Input_Pin (Self : not null access UML_Factory) return AMF.UML.Action_Input_Pins.UML_Action_Input_Pin_Access is begin return AMF.UML.Action_Input_Pins.UML_Action_Input_Pin_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Action_Input_Pin)))); end Create_Action_Input_Pin; --------------------- -- Create_Activity -- --------------------- overriding function Create_Activity (Self : not null access UML_Factory) return AMF.UML.Activities.UML_Activity_Access is begin return AMF.UML.Activities.UML_Activity_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity)))); end Create_Activity; -------------------------------- -- Create_Activity_Final_Node -- -------------------------------- overriding function Create_Activity_Final_Node (Self : not null access UML_Factory) return AMF.UML.Activity_Final_Nodes.UML_Activity_Final_Node_Access is begin return AMF.UML.Activity_Final_Nodes.UML_Activity_Final_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity_Final_Node)))); end Create_Activity_Final_Node; ------------------------------------ -- Create_Activity_Parameter_Node -- ------------------------------------ overriding function Create_Activity_Parameter_Node (Self : not null access UML_Factory) return AMF.UML.Activity_Parameter_Nodes.UML_Activity_Parameter_Node_Access is begin return AMF.UML.Activity_Parameter_Nodes.UML_Activity_Parameter_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity_Parameter_Node)))); end Create_Activity_Parameter_Node; ------------------------------- -- Create_Activity_Partition -- ------------------------------- overriding function Create_Activity_Partition (Self : not null access UML_Factory) return AMF.UML.Activity_Partitions.UML_Activity_Partition_Access is begin return AMF.UML.Activity_Partitions.UML_Activity_Partition_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Activity_Partition)))); end Create_Activity_Partition; ------------------ -- Create_Actor -- ------------------ overriding function Create_Actor (Self : not null access UML_Factory) return AMF.UML.Actors.UML_Actor_Access is begin return AMF.UML.Actors.UML_Actor_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Actor)))); end Create_Actor; ------------------------------------------------ -- Create_Add_Structural_Feature_Value_Action -- ------------------------------------------------ overriding function Create_Add_Structural_Feature_Value_Action (Self : not null access UML_Factory) return AMF.UML.Add_Structural_Feature_Value_Actions.UML_Add_Structural_Feature_Value_Action_Access is begin return AMF.UML.Add_Structural_Feature_Value_Actions.UML_Add_Structural_Feature_Value_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Add_Structural_Feature_Value_Action)))); end Create_Add_Structural_Feature_Value_Action; -------------------------------------- -- Create_Add_Variable_Value_Action -- -------------------------------------- overriding function Create_Add_Variable_Value_Action (Self : not null access UML_Factory) return AMF.UML.Add_Variable_Value_Actions.UML_Add_Variable_Value_Action_Access is begin return AMF.UML.Add_Variable_Value_Actions.UML_Add_Variable_Value_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Add_Variable_Value_Action)))); end Create_Add_Variable_Value_Action; ------------------------------ -- Create_Any_Receive_Event -- ------------------------------ overriding function Create_Any_Receive_Event (Self : not null access UML_Factory) return AMF.UML.Any_Receive_Events.UML_Any_Receive_Event_Access is begin return AMF.UML.Any_Receive_Events.UML_Any_Receive_Event_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Any_Receive_Event)))); end Create_Any_Receive_Event; --------------------- -- Create_Artifact -- --------------------- overriding function Create_Artifact (Self : not null access UML_Factory) return AMF.UML.Artifacts.UML_Artifact_Access is begin return AMF.UML.Artifacts.UML_Artifact_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Artifact)))); end Create_Artifact; ------------------------ -- Create_Association -- ------------------------ overriding function Create_Association (Self : not null access UML_Factory) return AMF.UML.Associations.UML_Association_Access is begin return AMF.UML.Associations.UML_Association_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Association)))); end Create_Association; ------------------------------ -- Create_Association_Class -- ------------------------------ overriding function Create_Association_Class (Self : not null access UML_Factory) return AMF.UML.Association_Classes.UML_Association_Class_Access is begin return AMF.UML.Association_Classes.UML_Association_Class_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Association_Class)))); end Create_Association_Class; --------------------------------------------- -- Create_Behavior_Execution_Specification -- --------------------------------------------- overriding function Create_Behavior_Execution_Specification (Self : not null access UML_Factory) return AMF.UML.Behavior_Execution_Specifications.UML_Behavior_Execution_Specification_Access is begin return AMF.UML.Behavior_Execution_Specifications.UML_Behavior_Execution_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Behavior_Execution_Specification)))); end Create_Behavior_Execution_Specification; ------------------------------------ -- Create_Broadcast_Signal_Action -- ------------------------------------ overriding function Create_Broadcast_Signal_Action (Self : not null access UML_Factory) return AMF.UML.Broadcast_Signal_Actions.UML_Broadcast_Signal_Action_Access is begin return AMF.UML.Broadcast_Signal_Actions.UML_Broadcast_Signal_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Broadcast_Signal_Action)))); end Create_Broadcast_Signal_Action; --------------------------------- -- Create_Call_Behavior_Action -- --------------------------------- overriding function Create_Call_Behavior_Action (Self : not null access UML_Factory) return AMF.UML.Call_Behavior_Actions.UML_Call_Behavior_Action_Access is begin return AMF.UML.Call_Behavior_Actions.UML_Call_Behavior_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Behavior_Action)))); end Create_Call_Behavior_Action; ----------------------- -- Create_Call_Event -- ----------------------- overriding function Create_Call_Event (Self : not null access UML_Factory) return AMF.UML.Call_Events.UML_Call_Event_Access is begin return AMF.UML.Call_Events.UML_Call_Event_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Event)))); end Create_Call_Event; ---------------------------------- -- Create_Call_Operation_Action -- ---------------------------------- overriding function Create_Call_Operation_Action (Self : not null access UML_Factory) return AMF.UML.Call_Operation_Actions.UML_Call_Operation_Action_Access is begin return AMF.UML.Call_Operation_Actions.UML_Call_Operation_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Call_Operation_Action)))); end Create_Call_Operation_Action; -------------------------------- -- Create_Central_Buffer_Node -- -------------------------------- overriding function Create_Central_Buffer_Node (Self : not null access UML_Factory) return AMF.UML.Central_Buffer_Nodes.UML_Central_Buffer_Node_Access is begin return AMF.UML.Central_Buffer_Nodes.UML_Central_Buffer_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Central_Buffer_Node)))); end Create_Central_Buffer_Node; ------------------------- -- Create_Change_Event -- ------------------------- overriding function Create_Change_Event (Self : not null access UML_Factory) return AMF.UML.Change_Events.UML_Change_Event_Access is begin return AMF.UML.Change_Events.UML_Change_Event_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Change_Event)))); end Create_Change_Event; ------------------ -- Create_Class -- ------------------ overriding function Create_Class (Self : not null access UML_Factory) return AMF.UML.Classes.UML_Class_Access is begin return AMF.UML.Classes.UML_Class_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Class)))); end Create_Class; ------------------------------------------ -- Create_Classifier_Template_Parameter -- ------------------------------------------ overriding function Create_Classifier_Template_Parameter (Self : not null access UML_Factory) return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access is begin return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Classifier_Template_Parameter)))); end Create_Classifier_Template_Parameter; ------------------- -- Create_Clause -- ------------------- overriding function Create_Clause (Self : not null access UML_Factory) return AMF.UML.Clauses.UML_Clause_Access is begin return AMF.UML.Clauses.UML_Clause_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Clause)))); end Create_Clause; ------------------------------------- -- Create_Clear_Association_Action -- ------------------------------------- overriding function Create_Clear_Association_Action (Self : not null access UML_Factory) return AMF.UML.Clear_Association_Actions.UML_Clear_Association_Action_Access is begin return AMF.UML.Clear_Association_Actions.UML_Clear_Association_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Clear_Association_Action)))); end Create_Clear_Association_Action; -------------------------------------------- -- Create_Clear_Structural_Feature_Action -- -------------------------------------------- overriding function Create_Clear_Structural_Feature_Action (Self : not null access UML_Factory) return AMF.UML.Clear_Structural_Feature_Actions.UML_Clear_Structural_Feature_Action_Access is begin return AMF.UML.Clear_Structural_Feature_Actions.UML_Clear_Structural_Feature_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Clear_Structural_Feature_Action)))); end Create_Clear_Structural_Feature_Action; ---------------------------------- -- Create_Clear_Variable_Action -- ---------------------------------- overriding function Create_Clear_Variable_Action (Self : not null access UML_Factory) return AMF.UML.Clear_Variable_Actions.UML_Clear_Variable_Action_Access is begin return AMF.UML.Clear_Variable_Actions.UML_Clear_Variable_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Clear_Variable_Action)))); end Create_Clear_Variable_Action; -------------------------- -- Create_Collaboration -- -------------------------- overriding function Create_Collaboration (Self : not null access UML_Factory) return AMF.UML.Collaborations.UML_Collaboration_Access is begin return AMF.UML.Collaborations.UML_Collaboration_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Collaboration)))); end Create_Collaboration; ------------------------------ -- Create_Collaboration_Use -- ------------------------------ overriding function Create_Collaboration_Use (Self : not null access UML_Factory) return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access is begin return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Collaboration_Use)))); end Create_Collaboration_Use; ------------------------------ -- Create_Combined_Fragment -- ------------------------------ overriding function Create_Combined_Fragment (Self : not null access UML_Factory) return AMF.UML.Combined_Fragments.UML_Combined_Fragment_Access is begin return AMF.UML.Combined_Fragments.UML_Combined_Fragment_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Combined_Fragment)))); end Create_Combined_Fragment; -------------------- -- Create_Comment -- -------------------- overriding function Create_Comment (Self : not null access UML_Factory) return AMF.UML.Comments.UML_Comment_Access is begin return AMF.UML.Comments.UML_Comment_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Comment)))); end Create_Comment; ------------------------------- -- Create_Communication_Path -- ------------------------------- overriding function Create_Communication_Path (Self : not null access UML_Factory) return AMF.UML.Communication_Paths.UML_Communication_Path_Access is begin return AMF.UML.Communication_Paths.UML_Communication_Path_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Communication_Path)))); end Create_Communication_Path; ---------------------- -- Create_Component -- ---------------------- overriding function Create_Component (Self : not null access UML_Factory) return AMF.UML.Components.UML_Component_Access is begin return AMF.UML.Components.UML_Component_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Component)))); end Create_Component; ---------------------------------- -- Create_Component_Realization -- ---------------------------------- overriding function Create_Component_Realization (Self : not null access UML_Factory) return AMF.UML.Component_Realizations.UML_Component_Realization_Access is begin return AMF.UML.Component_Realizations.UML_Component_Realization_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Component_Realization)))); end Create_Component_Realization; ----------------------------- -- Create_Conditional_Node -- ----------------------------- overriding function Create_Conditional_Node (Self : not null access UML_Factory) return AMF.UML.Conditional_Nodes.UML_Conditional_Node_Access is begin return AMF.UML.Conditional_Nodes.UML_Conditional_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Conditional_Node)))); end Create_Conditional_Node; --------------------------------------------------- -- Create_Connectable_Element_Template_Parameter -- --------------------------------------------------- overriding function Create_Connectable_Element_Template_Parameter (Self : not null access UML_Factory) return AMF.UML.Connectable_Element_Template_Parameters.UML_Connectable_Element_Template_Parameter_Access is begin return AMF.UML.Connectable_Element_Template_Parameters.UML_Connectable_Element_Template_Parameter_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Connectable_Element_Template_Parameter)))); end Create_Connectable_Element_Template_Parameter; --------------------------------------- -- Create_Connection_Point_Reference -- --------------------------------------- overriding function Create_Connection_Point_Reference (Self : not null access UML_Factory) return AMF.UML.Connection_Point_References.UML_Connection_Point_Reference_Access is begin return AMF.UML.Connection_Point_References.UML_Connection_Point_Reference_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Connection_Point_Reference)))); end Create_Connection_Point_Reference; ---------------------- -- Create_Connector -- ---------------------- overriding function Create_Connector (Self : not null access UML_Factory) return AMF.UML.Connectors.UML_Connector_Access is begin return AMF.UML.Connectors.UML_Connector_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Connector)))); end Create_Connector; -------------------------- -- Create_Connector_End -- -------------------------- overriding function Create_Connector_End (Self : not null access UML_Factory) return AMF.UML.Connector_Ends.UML_Connector_End_Access is begin return AMF.UML.Connector_Ends.UML_Connector_End_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Connector_End)))); end Create_Connector_End; ------------------------------------- -- Create_Consider_Ignore_Fragment -- ------------------------------------- overriding function Create_Consider_Ignore_Fragment (Self : not null access UML_Factory) return AMF.UML.Consider_Ignore_Fragments.UML_Consider_Ignore_Fragment_Access is begin return AMF.UML.Consider_Ignore_Fragments.UML_Consider_Ignore_Fragment_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Consider_Ignore_Fragment)))); end Create_Consider_Ignore_Fragment; ----------------------- -- Create_Constraint -- ----------------------- overriding function Create_Constraint (Self : not null access UML_Factory) return AMF.UML.Constraints.UML_Constraint_Access is begin return AMF.UML.Constraints.UML_Constraint_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Constraint)))); end Create_Constraint; ------------------------- -- Create_Continuation -- ------------------------- overriding function Create_Continuation (Self : not null access UML_Factory) return AMF.UML.Continuations.UML_Continuation_Access is begin return AMF.UML.Continuations.UML_Continuation_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Continuation)))); end Create_Continuation; ------------------------- -- Create_Control_Flow -- ------------------------- overriding function Create_Control_Flow (Self : not null access UML_Factory) return AMF.UML.Control_Flows.UML_Control_Flow_Access is begin return AMF.UML.Control_Flows.UML_Control_Flow_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Control_Flow)))); end Create_Control_Flow; ------------------------------- -- Create_Create_Link_Action -- ------------------------------- overriding function Create_Create_Link_Action (Self : not null access UML_Factory) return AMF.UML.Create_Link_Actions.UML_Create_Link_Action_Access is begin return AMF.UML.Create_Link_Actions.UML_Create_Link_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Create_Link_Action)))); end Create_Create_Link_Action; -------------------------------------- -- Create_Create_Link_Object_Action -- -------------------------------------- overriding function Create_Create_Link_Object_Action (Self : not null access UML_Factory) return AMF.UML.Create_Link_Object_Actions.UML_Create_Link_Object_Action_Access is begin return AMF.UML.Create_Link_Object_Actions.UML_Create_Link_Object_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Create_Link_Object_Action)))); end Create_Create_Link_Object_Action; --------------------------------- -- Create_Create_Object_Action -- --------------------------------- overriding function Create_Create_Object_Action (Self : not null access UML_Factory) return AMF.UML.Create_Object_Actions.UML_Create_Object_Action_Access is begin return AMF.UML.Create_Object_Actions.UML_Create_Object_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Create_Object_Action)))); end Create_Create_Object_Action; ---------------------------- -- Create_Data_Store_Node -- ---------------------------- overriding function Create_Data_Store_Node (Self : not null access UML_Factory) return AMF.UML.Data_Store_Nodes.UML_Data_Store_Node_Access is begin return AMF.UML.Data_Store_Nodes.UML_Data_Store_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Data_Store_Node)))); end Create_Data_Store_Node; ---------------------- -- Create_Data_Type -- ---------------------- overriding function Create_Data_Type (Self : not null access UML_Factory) return AMF.UML.Data_Types.UML_Data_Type_Access is begin return AMF.UML.Data_Types.UML_Data_Type_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Data_Type)))); end Create_Data_Type; -------------------------- -- Create_Decision_Node -- -------------------------- overriding function Create_Decision_Node (Self : not null access UML_Factory) return AMF.UML.Decision_Nodes.UML_Decision_Node_Access is begin return AMF.UML.Decision_Nodes.UML_Decision_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Decision_Node)))); end Create_Decision_Node; ----------------------- -- Create_Dependency -- ----------------------- overriding function Create_Dependency (Self : not null access UML_Factory) return AMF.UML.Dependencies.UML_Dependency_Access is begin return AMF.UML.Dependencies.UML_Dependency_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Dependency)))); end Create_Dependency; ----------------------- -- Create_Deployment -- ----------------------- overriding function Create_Deployment (Self : not null access UML_Factory) return AMF.UML.Deployments.UML_Deployment_Access is begin return AMF.UML.Deployments.UML_Deployment_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Deployment)))); end Create_Deployment; ------------------------------------- -- Create_Deployment_Specification -- ------------------------------------- overriding function Create_Deployment_Specification (Self : not null access UML_Factory) return AMF.UML.Deployment_Specifications.UML_Deployment_Specification_Access is begin return AMF.UML.Deployment_Specifications.UML_Deployment_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Deployment_Specification)))); end Create_Deployment_Specification; -------------------------------- -- Create_Destroy_Link_Action -- -------------------------------- overriding function Create_Destroy_Link_Action (Self : not null access UML_Factory) return AMF.UML.Destroy_Link_Actions.UML_Destroy_Link_Action_Access is begin return AMF.UML.Destroy_Link_Actions.UML_Destroy_Link_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Destroy_Link_Action)))); end Create_Destroy_Link_Action; ---------------------------------- -- Create_Destroy_Object_Action -- ---------------------------------- overriding function Create_Destroy_Object_Action (Self : not null access UML_Factory) return AMF.UML.Destroy_Object_Actions.UML_Destroy_Object_Action_Access is begin return AMF.UML.Destroy_Object_Actions.UML_Destroy_Object_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Destroy_Object_Action)))); end Create_Destroy_Object_Action; ------------------------------------------------- -- Create_Destruction_Occurrence_Specification -- ------------------------------------------------- overriding function Create_Destruction_Occurrence_Specification (Self : not null access UML_Factory) return AMF.UML.Destruction_Occurrence_Specifications.UML_Destruction_Occurrence_Specification_Access is begin return AMF.UML.Destruction_Occurrence_Specifications.UML_Destruction_Occurrence_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Destruction_Occurrence_Specification)))); end Create_Destruction_Occurrence_Specification; ------------------- -- Create_Device -- ------------------- overriding function Create_Device (Self : not null access UML_Factory) return AMF.UML.Devices.UML_Device_Access is begin return AMF.UML.Devices.UML_Device_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Device)))); end Create_Device; --------------------- -- Create_Duration -- --------------------- overriding function Create_Duration (Self : not null access UML_Factory) return AMF.UML.Durations.UML_Duration_Access is begin return AMF.UML.Durations.UML_Duration_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration)))); end Create_Duration; -------------------------------- -- Create_Duration_Constraint -- -------------------------------- overriding function Create_Duration_Constraint (Self : not null access UML_Factory) return AMF.UML.Duration_Constraints.UML_Duration_Constraint_Access is begin return AMF.UML.Duration_Constraints.UML_Duration_Constraint_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration_Constraint)))); end Create_Duration_Constraint; ------------------------------ -- Create_Duration_Interval -- ------------------------------ overriding function Create_Duration_Interval (Self : not null access UML_Factory) return AMF.UML.Duration_Intervals.UML_Duration_Interval_Access is begin return AMF.UML.Duration_Intervals.UML_Duration_Interval_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration_Interval)))); end Create_Duration_Interval; --------------------------------- -- Create_Duration_Observation -- --------------------------------- overriding function Create_Duration_Observation (Self : not null access UML_Factory) return AMF.UML.Duration_Observations.UML_Duration_Observation_Access is begin return AMF.UML.Duration_Observations.UML_Duration_Observation_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Duration_Observation)))); end Create_Duration_Observation; --------------------------- -- Create_Element_Import -- --------------------------- overriding function Create_Element_Import (Self : not null access UML_Factory) return AMF.UML.Element_Imports.UML_Element_Import_Access is begin return AMF.UML.Element_Imports.UML_Element_Import_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Element_Import)))); end Create_Element_Import; ------------------------ -- Create_Enumeration -- ------------------------ overriding function Create_Enumeration (Self : not null access UML_Factory) return AMF.UML.Enumerations.UML_Enumeration_Access is begin return AMF.UML.Enumerations.UML_Enumeration_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Enumeration)))); end Create_Enumeration; -------------------------------- -- Create_Enumeration_Literal -- -------------------------------- overriding function Create_Enumeration_Literal (Self : not null access UML_Factory) return AMF.UML.Enumeration_Literals.UML_Enumeration_Literal_Access is begin return AMF.UML.Enumeration_Literals.UML_Enumeration_Literal_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Enumeration_Literal)))); end Create_Enumeration_Literal; ------------------------------ -- Create_Exception_Handler -- ------------------------------ overriding function Create_Exception_Handler (Self : not null access UML_Factory) return AMF.UML.Exception_Handlers.UML_Exception_Handler_Access is begin return AMF.UML.Exception_Handlers.UML_Exception_Handler_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Exception_Handler)))); end Create_Exception_Handler; ---------------------------------- -- Create_Execution_Environment -- ---------------------------------- overriding function Create_Execution_Environment (Self : not null access UML_Factory) return AMF.UML.Execution_Environments.UML_Execution_Environment_Access is begin return AMF.UML.Execution_Environments.UML_Execution_Environment_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Execution_Environment)))); end Create_Execution_Environment; ----------------------------------------------- -- Create_Execution_Occurrence_Specification -- ----------------------------------------------- overriding function Create_Execution_Occurrence_Specification (Self : not null access UML_Factory) return AMF.UML.Execution_Occurrence_Specifications.UML_Execution_Occurrence_Specification_Access is begin return AMF.UML.Execution_Occurrence_Specifications.UML_Execution_Occurrence_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Execution_Occurrence_Specification)))); end Create_Execution_Occurrence_Specification; --------------------------- -- Create_Expansion_Node -- --------------------------- overriding function Create_Expansion_Node (Self : not null access UML_Factory) return AMF.UML.Expansion_Nodes.UML_Expansion_Node_Access is begin return AMF.UML.Expansion_Nodes.UML_Expansion_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Expansion_Node)))); end Create_Expansion_Node; ----------------------------- -- Create_Expansion_Region -- ----------------------------- overriding function Create_Expansion_Region (Self : not null access UML_Factory) return AMF.UML.Expansion_Regions.UML_Expansion_Region_Access is begin return AMF.UML.Expansion_Regions.UML_Expansion_Region_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Expansion_Region)))); end Create_Expansion_Region; ----------------------- -- Create_Expression -- ----------------------- overriding function Create_Expression (Self : not null access UML_Factory) return AMF.UML.Expressions.UML_Expression_Access is begin return AMF.UML.Expressions.UML_Expression_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Expression)))); end Create_Expression; ------------------- -- Create_Extend -- ------------------- overriding function Create_Extend (Self : not null access UML_Factory) return AMF.UML.Extends.UML_Extend_Access is begin return AMF.UML.Extends.UML_Extend_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Extend)))); end Create_Extend; ---------------------- -- Create_Extension -- ---------------------- overriding function Create_Extension (Self : not null access UML_Factory) return AMF.UML.Extensions.UML_Extension_Access is begin return AMF.UML.Extensions.UML_Extension_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Extension)))); end Create_Extension; -------------------------- -- Create_Extension_End -- -------------------------- overriding function Create_Extension_End (Self : not null access UML_Factory) return AMF.UML.Extension_Ends.UML_Extension_End_Access is begin return AMF.UML.Extension_Ends.UML_Extension_End_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Extension_End)))); end Create_Extension_End; ---------------------------- -- Create_Extension_Point -- ---------------------------- overriding function Create_Extension_Point (Self : not null access UML_Factory) return AMF.UML.Extension_Points.UML_Extension_Point_Access is begin return AMF.UML.Extension_Points.UML_Extension_Point_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Extension_Point)))); end Create_Extension_Point; ------------------------ -- Create_Final_State -- ------------------------ overriding function Create_Final_State (Self : not null access UML_Factory) return AMF.UML.Final_States.UML_Final_State_Access is begin return AMF.UML.Final_States.UML_Final_State_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Final_State)))); end Create_Final_State; ---------------------------- -- Create_Flow_Final_Node -- ---------------------------- overriding function Create_Flow_Final_Node (Self : not null access UML_Factory) return AMF.UML.Flow_Final_Nodes.UML_Flow_Final_Node_Access is begin return AMF.UML.Flow_Final_Nodes.UML_Flow_Final_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Flow_Final_Node)))); end Create_Flow_Final_Node; ---------------------- -- Create_Fork_Node -- ---------------------- overriding function Create_Fork_Node (Self : not null access UML_Factory) return AMF.UML.Fork_Nodes.UML_Fork_Node_Access is begin return AMF.UML.Fork_Nodes.UML_Fork_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Fork_Node)))); end Create_Fork_Node; ------------------------------ -- Create_Function_Behavior -- ------------------------------ overriding function Create_Function_Behavior (Self : not null access UML_Factory) return AMF.UML.Function_Behaviors.UML_Function_Behavior_Access is begin return AMF.UML.Function_Behaviors.UML_Function_Behavior_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Function_Behavior)))); end Create_Function_Behavior; ----------------- -- Create_Gate -- ----------------- overriding function Create_Gate (Self : not null access UML_Factory) return AMF.UML.Gates.UML_Gate_Access is begin return AMF.UML.Gates.UML_Gate_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Gate)))); end Create_Gate; ----------------------------- -- Create_General_Ordering -- ----------------------------- overriding function Create_General_Ordering (Self : not null access UML_Factory) return AMF.UML.General_Orderings.UML_General_Ordering_Access is begin return AMF.UML.General_Orderings.UML_General_Ordering_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_General_Ordering)))); end Create_General_Ordering; --------------------------- -- Create_Generalization -- --------------------------- overriding function Create_Generalization (Self : not null access UML_Factory) return AMF.UML.Generalizations.UML_Generalization_Access is begin return AMF.UML.Generalizations.UML_Generalization_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Generalization)))); end Create_Generalization; ------------------------------- -- Create_Generalization_Set -- ------------------------------- overriding function Create_Generalization_Set (Self : not null access UML_Factory) return AMF.UML.Generalization_Sets.UML_Generalization_Set_Access is begin return AMF.UML.Generalization_Sets.UML_Generalization_Set_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Generalization_Set)))); end Create_Generalization_Set; ------------------ -- Create_Image -- ------------------ overriding function Create_Image (Self : not null access UML_Factory) return AMF.UML.Images.UML_Image_Access is begin return AMF.UML.Images.UML_Image_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Image)))); end Create_Image; -------------------- -- Create_Include -- -------------------- overriding function Create_Include (Self : not null access UML_Factory) return AMF.UML.Includes.UML_Include_Access is begin return AMF.UML.Includes.UML_Include_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Include)))); end Create_Include; ----------------------------- -- Create_Information_Flow -- ----------------------------- overriding function Create_Information_Flow (Self : not null access UML_Factory) return AMF.UML.Information_Flows.UML_Information_Flow_Access is begin return AMF.UML.Information_Flows.UML_Information_Flow_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Information_Flow)))); end Create_Information_Flow; ----------------------------- -- Create_Information_Item -- ----------------------------- overriding function Create_Information_Item (Self : not null access UML_Factory) return AMF.UML.Information_Items.UML_Information_Item_Access is begin return AMF.UML.Information_Items.UML_Information_Item_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Information_Item)))); end Create_Information_Item; ------------------------- -- Create_Initial_Node -- ------------------------- overriding function Create_Initial_Node (Self : not null access UML_Factory) return AMF.UML.Initial_Nodes.UML_Initial_Node_Access is begin return AMF.UML.Initial_Nodes.UML_Initial_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Initial_Node)))); end Create_Initial_Node; ---------------------- -- Create_Input_Pin -- ---------------------- overriding function Create_Input_Pin (Self : not null access UML_Factory) return AMF.UML.Input_Pins.UML_Input_Pin_Access is begin return AMF.UML.Input_Pins.UML_Input_Pin_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Input_Pin)))); end Create_Input_Pin; ----------------------------------- -- Create_Instance_Specification -- ----------------------------------- overriding function Create_Instance_Specification (Self : not null access UML_Factory) return AMF.UML.Instance_Specifications.UML_Instance_Specification_Access is begin return AMF.UML.Instance_Specifications.UML_Instance_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Instance_Specification)))); end Create_Instance_Specification; --------------------------- -- Create_Instance_Value -- --------------------------- overriding function Create_Instance_Value (Self : not null access UML_Factory) return AMF.UML.Instance_Values.UML_Instance_Value_Access is begin return AMF.UML.Instance_Values.UML_Instance_Value_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Instance_Value)))); end Create_Instance_Value; ------------------------ -- Create_Interaction -- ------------------------ overriding function Create_Interaction (Self : not null access UML_Factory) return AMF.UML.Interactions.UML_Interaction_Access is begin return AMF.UML.Interactions.UML_Interaction_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction)))); end Create_Interaction; ----------------------------------- -- Create_Interaction_Constraint -- ----------------------------------- overriding function Create_Interaction_Constraint (Self : not null access UML_Factory) return AMF.UML.Interaction_Constraints.UML_Interaction_Constraint_Access is begin return AMF.UML.Interaction_Constraints.UML_Interaction_Constraint_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Constraint)))); end Create_Interaction_Constraint; -------------------------------- -- Create_Interaction_Operand -- -------------------------------- overriding function Create_Interaction_Operand (Self : not null access UML_Factory) return AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access is begin return AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Operand)))); end Create_Interaction_Operand; ---------------------------- -- Create_Interaction_Use -- ---------------------------- overriding function Create_Interaction_Use (Self : not null access UML_Factory) return AMF.UML.Interaction_Uses.UML_Interaction_Use_Access is begin return AMF.UML.Interaction_Uses.UML_Interaction_Use_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interaction_Use)))); end Create_Interaction_Use; ---------------------- -- Create_Interface -- ---------------------- overriding function Create_Interface (Self : not null access UML_Factory) return AMF.UML.Interfaces.UML_Interface_Access is begin return AMF.UML.Interfaces.UML_Interface_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interface)))); end Create_Interface; ---------------------------------- -- Create_Interface_Realization -- ---------------------------------- overriding function Create_Interface_Realization (Self : not null access UML_Factory) return AMF.UML.Interface_Realizations.UML_Interface_Realization_Access is begin return AMF.UML.Interface_Realizations.UML_Interface_Realization_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interface_Realization)))); end Create_Interface_Realization; ------------------------------------------ -- Create_Interruptible_Activity_Region -- ------------------------------------------ overriding function Create_Interruptible_Activity_Region (Self : not null access UML_Factory) return AMF.UML.Interruptible_Activity_Regions.UML_Interruptible_Activity_Region_Access is begin return AMF.UML.Interruptible_Activity_Regions.UML_Interruptible_Activity_Region_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interruptible_Activity_Region)))); end Create_Interruptible_Activity_Region; --------------------- -- Create_Interval -- --------------------- overriding function Create_Interval (Self : not null access UML_Factory) return AMF.UML.Intervals.UML_Interval_Access is begin return AMF.UML.Intervals.UML_Interval_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interval)))); end Create_Interval; -------------------------------- -- Create_Interval_Constraint -- -------------------------------- overriding function Create_Interval_Constraint (Self : not null access UML_Factory) return AMF.UML.Interval_Constraints.UML_Interval_Constraint_Access is begin return AMF.UML.Interval_Constraints.UML_Interval_Constraint_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Interval_Constraint)))); end Create_Interval_Constraint; ---------------------- -- Create_Join_Node -- ---------------------- overriding function Create_Join_Node (Self : not null access UML_Factory) return AMF.UML.Join_Nodes.UML_Join_Node_Access is begin return AMF.UML.Join_Nodes.UML_Join_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Join_Node)))); end Create_Join_Node; --------------------- -- Create_Lifeline -- --------------------- overriding function Create_Lifeline (Self : not null access UML_Factory) return AMF.UML.Lifelines.UML_Lifeline_Access is begin return AMF.UML.Lifelines.UML_Lifeline_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Lifeline)))); end Create_Lifeline; ----------------------------------- -- Create_Link_End_Creation_Data -- ----------------------------------- overriding function Create_Link_End_Creation_Data (Self : not null access UML_Factory) return AMF.UML.Link_End_Creation_Datas.UML_Link_End_Creation_Data_Access is begin return AMF.UML.Link_End_Creation_Datas.UML_Link_End_Creation_Data_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Link_End_Creation_Data)))); end Create_Link_End_Creation_Data; -------------------------- -- Create_Link_End_Data -- -------------------------- overriding function Create_Link_End_Data (Self : not null access UML_Factory) return AMF.UML.Link_End_Datas.UML_Link_End_Data_Access is begin return AMF.UML.Link_End_Datas.UML_Link_End_Data_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Link_End_Data)))); end Create_Link_End_Data; -------------------------------------- -- Create_Link_End_Destruction_Data -- -------------------------------------- overriding function Create_Link_End_Destruction_Data (Self : not null access UML_Factory) return AMF.UML.Link_End_Destruction_Datas.UML_Link_End_Destruction_Data_Access is begin return AMF.UML.Link_End_Destruction_Datas.UML_Link_End_Destruction_Data_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Link_End_Destruction_Data)))); end Create_Link_End_Destruction_Data; ---------------------------- -- Create_Literal_Boolean -- ---------------------------- overriding function Create_Literal_Boolean (Self : not null access UML_Factory) return AMF.UML.Literal_Booleans.UML_Literal_Boolean_Access is begin return AMF.UML.Literal_Booleans.UML_Literal_Boolean_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Boolean)))); end Create_Literal_Boolean; ---------------------------- -- Create_Literal_Integer -- ---------------------------- overriding function Create_Literal_Integer (Self : not null access UML_Factory) return AMF.UML.Literal_Integers.UML_Literal_Integer_Access is begin return AMF.UML.Literal_Integers.UML_Literal_Integer_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Integer)))); end Create_Literal_Integer; ------------------------- -- Create_Literal_Null -- ------------------------- overriding function Create_Literal_Null (Self : not null access UML_Factory) return AMF.UML.Literal_Nulls.UML_Literal_Null_Access is begin return AMF.UML.Literal_Nulls.UML_Literal_Null_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Null)))); end Create_Literal_Null; ------------------------- -- Create_Literal_Real -- ------------------------- overriding function Create_Literal_Real (Self : not null access UML_Factory) return AMF.UML.Literal_Reals.UML_Literal_Real_Access is begin return AMF.UML.Literal_Reals.UML_Literal_Real_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Real)))); end Create_Literal_Real; --------------------------- -- Create_Literal_String -- --------------------------- overriding function Create_Literal_String (Self : not null access UML_Factory) return AMF.UML.Literal_Strings.UML_Literal_String_Access is begin return AMF.UML.Literal_Strings.UML_Literal_String_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_String)))); end Create_Literal_String; -------------------------------------- -- Create_Literal_Unlimited_Natural -- -------------------------------------- overriding function Create_Literal_Unlimited_Natural (Self : not null access UML_Factory) return AMF.UML.Literal_Unlimited_Naturals.UML_Literal_Unlimited_Natural_Access is begin return AMF.UML.Literal_Unlimited_Naturals.UML_Literal_Unlimited_Natural_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Literal_Unlimited_Natural)))); end Create_Literal_Unlimited_Natural; ---------------------- -- Create_Loop_Node -- ---------------------- overriding function Create_Loop_Node (Self : not null access UML_Factory) return AMF.UML.Loop_Nodes.UML_Loop_Node_Access is begin return AMF.UML.Loop_Nodes.UML_Loop_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Loop_Node)))); end Create_Loop_Node; -------------------------- -- Create_Manifestation -- -------------------------- overriding function Create_Manifestation (Self : not null access UML_Factory) return AMF.UML.Manifestations.UML_Manifestation_Access is begin return AMF.UML.Manifestations.UML_Manifestation_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Manifestation)))); end Create_Manifestation; ----------------------- -- Create_Merge_Node -- ----------------------- overriding function Create_Merge_Node (Self : not null access UML_Factory) return AMF.UML.Merge_Nodes.UML_Merge_Node_Access is begin return AMF.UML.Merge_Nodes.UML_Merge_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Merge_Node)))); end Create_Merge_Node; -------------------- -- Create_Message -- -------------------- overriding function Create_Message (Self : not null access UML_Factory) return AMF.UML.Messages.UML_Message_Access is begin return AMF.UML.Messages.UML_Message_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Message)))); end Create_Message; --------------------------------------------- -- Create_Message_Occurrence_Specification -- --------------------------------------------- overriding function Create_Message_Occurrence_Specification (Self : not null access UML_Factory) return AMF.UML.Message_Occurrence_Specifications.UML_Message_Occurrence_Specification_Access is begin return AMF.UML.Message_Occurrence_Specifications.UML_Message_Occurrence_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Message_Occurrence_Specification)))); end Create_Message_Occurrence_Specification; ------------------ -- Create_Model -- ------------------ overriding function Create_Model (Self : not null access UML_Factory) return AMF.UML.Models.UML_Model_Access is begin return AMF.UML.Models.UML_Model_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Model)))); end Create_Model; ----------------- -- Create_Node -- ----------------- overriding function Create_Node (Self : not null access UML_Factory) return AMF.UML.Nodes.UML_Node_Access is begin return AMF.UML.Nodes.UML_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Node)))); end Create_Node; ------------------------ -- Create_Object_Flow -- ------------------------ overriding function Create_Object_Flow (Self : not null access UML_Factory) return AMF.UML.Object_Flows.UML_Object_Flow_Access is begin return AMF.UML.Object_Flows.UML_Object_Flow_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Object_Flow)))); end Create_Object_Flow; ------------------------------------- -- Create_Occurrence_Specification -- ------------------------------------- overriding function Create_Occurrence_Specification (Self : not null access UML_Factory) return AMF.UML.Occurrence_Specifications.UML_Occurrence_Specification_Access is begin return AMF.UML.Occurrence_Specifications.UML_Occurrence_Specification_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Occurrence_Specification)))); end Create_Occurrence_Specification; -------------------------- -- Create_Opaque_Action -- -------------------------- overriding function Create_Opaque_Action (Self : not null access UML_Factory) return AMF.UML.Opaque_Actions.UML_Opaque_Action_Access is begin return AMF.UML.Opaque_Actions.UML_Opaque_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Opaque_Action)))); end Create_Opaque_Action; ---------------------------- -- Create_Opaque_Behavior -- ---------------------------- overriding function Create_Opaque_Behavior (Self : not null access UML_Factory) return AMF.UML.Opaque_Behaviors.UML_Opaque_Behavior_Access is begin return AMF.UML.Opaque_Behaviors.UML_Opaque_Behavior_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Opaque_Behavior)))); end Create_Opaque_Behavior; ------------------------------ -- Create_Opaque_Expression -- ------------------------------ overriding function Create_Opaque_Expression (Self : not null access UML_Factory) return AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access is begin return AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Opaque_Expression)))); end Create_Opaque_Expression; ---------------------- -- Create_Operation -- ---------------------- overriding function Create_Operation (Self : not null access UML_Factory) return AMF.UML.Operations.UML_Operation_Access is begin return AMF.UML.Operations.UML_Operation_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Operation)))); end Create_Operation; ----------------------------------------- -- Create_Operation_Template_Parameter -- ----------------------------------------- overriding function Create_Operation_Template_Parameter (Self : not null access UML_Factory) return AMF.UML.Operation_Template_Parameters.UML_Operation_Template_Parameter_Access is begin return AMF.UML.Operation_Template_Parameters.UML_Operation_Template_Parameter_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Operation_Template_Parameter)))); end Create_Operation_Template_Parameter; ----------------------- -- Create_Output_Pin -- ----------------------- overriding function Create_Output_Pin (Self : not null access UML_Factory) return AMF.UML.Output_Pins.UML_Output_Pin_Access is begin return AMF.UML.Output_Pins.UML_Output_Pin_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Output_Pin)))); end Create_Output_Pin; -------------------- -- Create_Package -- -------------------- overriding function Create_Package (Self : not null access UML_Factory) return AMF.UML.Packages.UML_Package_Access is begin return AMF.UML.Packages.UML_Package_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Package)))); end Create_Package; --------------------------- -- Create_Package_Import -- --------------------------- overriding function Create_Package_Import (Self : not null access UML_Factory) return AMF.UML.Package_Imports.UML_Package_Import_Access is begin return AMF.UML.Package_Imports.UML_Package_Import_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Package_Import)))); end Create_Package_Import; -------------------------- -- Create_Package_Merge -- -------------------------- overriding function Create_Package_Merge (Self : not null access UML_Factory) return AMF.UML.Package_Merges.UML_Package_Merge_Access is begin return AMF.UML.Package_Merges.UML_Package_Merge_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Package_Merge)))); end Create_Package_Merge; ---------------------- -- Create_Parameter -- ---------------------- overriding function Create_Parameter (Self : not null access UML_Factory) return AMF.UML.Parameters.UML_Parameter_Access is begin return AMF.UML.Parameters.UML_Parameter_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter)))); end Create_Parameter; -------------------------- -- Create_Parameter_Set -- -------------------------- overriding function Create_Parameter_Set (Self : not null access UML_Factory) return AMF.UML.Parameter_Sets.UML_Parameter_Set_Access is begin return AMF.UML.Parameter_Sets.UML_Parameter_Set_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Parameter_Set)))); end Create_Parameter_Set; ------------------------------- -- Create_Part_Decomposition -- ------------------------------- overriding function Create_Part_Decomposition (Self : not null access UML_Factory) return AMF.UML.Part_Decompositions.UML_Part_Decomposition_Access is begin return AMF.UML.Part_Decompositions.UML_Part_Decomposition_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Part_Decomposition)))); end Create_Part_Decomposition; ----------------- -- Create_Port -- ----------------- overriding function Create_Port (Self : not null access UML_Factory) return AMF.UML.Ports.UML_Port_Access is begin return AMF.UML.Ports.UML_Port_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Port)))); end Create_Port; --------------------------- -- Create_Primitive_Type -- --------------------------- overriding function Create_Primitive_Type (Self : not null access UML_Factory) return AMF.UML.Primitive_Types.UML_Primitive_Type_Access is begin return AMF.UML.Primitive_Types.UML_Primitive_Type_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Primitive_Type)))); end Create_Primitive_Type; -------------------- -- Create_Profile -- -------------------- overriding function Create_Profile (Self : not null access UML_Factory) return AMF.UML.Profiles.UML_Profile_Access is begin return AMF.UML.Profiles.UML_Profile_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Profile)))); end Create_Profile; -------------------------------- -- Create_Profile_Application -- -------------------------------- overriding function Create_Profile_Application (Self : not null access UML_Factory) return AMF.UML.Profile_Applications.UML_Profile_Application_Access is begin return AMF.UML.Profile_Applications.UML_Profile_Application_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Profile_Application)))); end Create_Profile_Application; --------------------- -- Create_Property -- --------------------- overriding function Create_Property (Self : not null access UML_Factory) return AMF.UML.Properties.UML_Property_Access is begin return AMF.UML.Properties.UML_Property_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Property)))); end Create_Property; --------------------------------- -- Create_Protocol_Conformance -- --------------------------------- overriding function Create_Protocol_Conformance (Self : not null access UML_Factory) return AMF.UML.Protocol_Conformances.UML_Protocol_Conformance_Access is begin return AMF.UML.Protocol_Conformances.UML_Protocol_Conformance_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Protocol_Conformance)))); end Create_Protocol_Conformance; ----------------------------------- -- Create_Protocol_State_Machine -- ----------------------------------- overriding function Create_Protocol_State_Machine (Self : not null access UML_Factory) return AMF.UML.Protocol_State_Machines.UML_Protocol_State_Machine_Access is begin return AMF.UML.Protocol_State_Machines.UML_Protocol_State_Machine_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Protocol_State_Machine)))); end Create_Protocol_State_Machine; -------------------------------- -- Create_Protocol_Transition -- -------------------------------- overriding function Create_Protocol_Transition (Self : not null access UML_Factory) return AMF.UML.Protocol_Transitions.UML_Protocol_Transition_Access is begin return AMF.UML.Protocol_Transitions.UML_Protocol_Transition_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Protocol_Transition)))); end Create_Protocol_Transition; ------------------------ -- Create_Pseudostate -- ------------------------ overriding function Create_Pseudostate (Self : not null access UML_Factory) return AMF.UML.Pseudostates.UML_Pseudostate_Access is begin return AMF.UML.Pseudostates.UML_Pseudostate_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Pseudostate)))); end Create_Pseudostate; ---------------------------- -- Create_Qualifier_Value -- ---------------------------- overriding function Create_Qualifier_Value (Self : not null access UML_Factory) return AMF.UML.Qualifier_Values.UML_Qualifier_Value_Access is begin return AMF.UML.Qualifier_Values.UML_Qualifier_Value_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Qualifier_Value)))); end Create_Qualifier_Value; ----------------------------------- -- Create_Raise_Exception_Action -- ----------------------------------- overriding function Create_Raise_Exception_Action (Self : not null access UML_Factory) return AMF.UML.Raise_Exception_Actions.UML_Raise_Exception_Action_Access is begin return AMF.UML.Raise_Exception_Actions.UML_Raise_Exception_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Raise_Exception_Action)))); end Create_Raise_Exception_Action; ------------------------------- -- Create_Read_Extent_Action -- ------------------------------- overriding function Create_Read_Extent_Action (Self : not null access UML_Factory) return AMF.UML.Read_Extent_Actions.UML_Read_Extent_Action_Access is begin return AMF.UML.Read_Extent_Actions.UML_Read_Extent_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Extent_Action)))); end Create_Read_Extent_Action; --------------------------------------------- -- Create_Read_Is_Classified_Object_Action -- --------------------------------------------- overriding function Create_Read_Is_Classified_Object_Action (Self : not null access UML_Factory) return AMF.UML.Read_Is_Classified_Object_Actions.UML_Read_Is_Classified_Object_Action_Access is begin return AMF.UML.Read_Is_Classified_Object_Actions.UML_Read_Is_Classified_Object_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Is_Classified_Object_Action)))); end Create_Read_Is_Classified_Object_Action; ----------------------------- -- Create_Read_Link_Action -- ----------------------------- overriding function Create_Read_Link_Action (Self : not null access UML_Factory) return AMF.UML.Read_Link_Actions.UML_Read_Link_Action_Access is begin return AMF.UML.Read_Link_Actions.UML_Read_Link_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Link_Action)))); end Create_Read_Link_Action; ---------------------------------------- -- Create_Read_Link_Object_End_Action -- ---------------------------------------- overriding function Create_Read_Link_Object_End_Action (Self : not null access UML_Factory) return AMF.UML.Read_Link_Object_End_Actions.UML_Read_Link_Object_End_Action_Access is begin return AMF.UML.Read_Link_Object_End_Actions.UML_Read_Link_Object_End_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Link_Object_End_Action)))); end Create_Read_Link_Object_End_Action; -------------------------------------------------- -- Create_Read_Link_Object_End_Qualifier_Action -- -------------------------------------------------- overriding function Create_Read_Link_Object_End_Qualifier_Action (Self : not null access UML_Factory) return AMF.UML.Read_Link_Object_End_Qualifier_Actions.UML_Read_Link_Object_End_Qualifier_Action_Access is begin return AMF.UML.Read_Link_Object_End_Qualifier_Actions.UML_Read_Link_Object_End_Qualifier_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Link_Object_End_Qualifier_Action)))); end Create_Read_Link_Object_End_Qualifier_Action; ----------------------------- -- Create_Read_Self_Action -- ----------------------------- overriding function Create_Read_Self_Action (Self : not null access UML_Factory) return AMF.UML.Read_Self_Actions.UML_Read_Self_Action_Access is begin return AMF.UML.Read_Self_Actions.UML_Read_Self_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Self_Action)))); end Create_Read_Self_Action; ------------------------------------------- -- Create_Read_Structural_Feature_Action -- ------------------------------------------- overriding function Create_Read_Structural_Feature_Action (Self : not null access UML_Factory) return AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access is begin return AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Structural_Feature_Action)))); end Create_Read_Structural_Feature_Action; --------------------------------- -- Create_Read_Variable_Action -- --------------------------------- overriding function Create_Read_Variable_Action (Self : not null access UML_Factory) return AMF.UML.Read_Variable_Actions.UML_Read_Variable_Action_Access is begin return AMF.UML.Read_Variable_Actions.UML_Read_Variable_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Read_Variable_Action)))); end Create_Read_Variable_Action; ------------------------ -- Create_Realization -- ------------------------ overriding function Create_Realization (Self : not null access UML_Factory) return AMF.UML.Realizations.UML_Realization_Access is begin return AMF.UML.Realizations.UML_Realization_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Realization)))); end Create_Realization; ---------------------- -- Create_Reception -- ---------------------- overriding function Create_Reception (Self : not null access UML_Factory) return AMF.UML.Receptions.UML_Reception_Access is begin return AMF.UML.Receptions.UML_Reception_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Reception)))); end Create_Reception; ------------------------------------- -- Create_Reclassify_Object_Action -- ------------------------------------- overriding function Create_Reclassify_Object_Action (Self : not null access UML_Factory) return AMF.UML.Reclassify_Object_Actions.UML_Reclassify_Object_Action_Access is begin return AMF.UML.Reclassify_Object_Actions.UML_Reclassify_Object_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Reclassify_Object_Action)))); end Create_Reclassify_Object_Action; ------------------------------------------- -- Create_Redefinable_Template_Signature -- ------------------------------------------- overriding function Create_Redefinable_Template_Signature (Self : not null access UML_Factory) return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access is begin return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Redefinable_Template_Signature)))); end Create_Redefinable_Template_Signature; -------------------------- -- Create_Reduce_Action -- -------------------------- overriding function Create_Reduce_Action (Self : not null access UML_Factory) return AMF.UML.Reduce_Actions.UML_Reduce_Action_Access is begin return AMF.UML.Reduce_Actions.UML_Reduce_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Reduce_Action)))); end Create_Reduce_Action; ------------------- -- Create_Region -- ------------------- overriding function Create_Region (Self : not null access UML_Factory) return AMF.UML.Regions.UML_Region_Access is begin return AMF.UML.Regions.UML_Region_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Region)))); end Create_Region; --------------------------------------------------- -- Create_Remove_Structural_Feature_Value_Action -- --------------------------------------------------- overriding function Create_Remove_Structural_Feature_Value_Action (Self : not null access UML_Factory) return AMF.UML.Remove_Structural_Feature_Value_Actions.UML_Remove_Structural_Feature_Value_Action_Access is begin return AMF.UML.Remove_Structural_Feature_Value_Actions.UML_Remove_Structural_Feature_Value_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Remove_Structural_Feature_Value_Action)))); end Create_Remove_Structural_Feature_Value_Action; ----------------------------------------- -- Create_Remove_Variable_Value_Action -- ----------------------------------------- overriding function Create_Remove_Variable_Value_Action (Self : not null access UML_Factory) return AMF.UML.Remove_Variable_Value_Actions.UML_Remove_Variable_Value_Action_Access is begin return AMF.UML.Remove_Variable_Value_Actions.UML_Remove_Variable_Value_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Remove_Variable_Value_Action)))); end Create_Remove_Variable_Value_Action; ------------------------- -- Create_Reply_Action -- ------------------------- overriding function Create_Reply_Action (Self : not null access UML_Factory) return AMF.UML.Reply_Actions.UML_Reply_Action_Access is begin return AMF.UML.Reply_Actions.UML_Reply_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Reply_Action)))); end Create_Reply_Action; ------------------------------- -- Create_Send_Object_Action -- ------------------------------- overriding function Create_Send_Object_Action (Self : not null access UML_Factory) return AMF.UML.Send_Object_Actions.UML_Send_Object_Action_Access is begin return AMF.UML.Send_Object_Actions.UML_Send_Object_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Send_Object_Action)))); end Create_Send_Object_Action; ------------------------------- -- Create_Send_Signal_Action -- ------------------------------- overriding function Create_Send_Signal_Action (Self : not null access UML_Factory) return AMF.UML.Send_Signal_Actions.UML_Send_Signal_Action_Access is begin return AMF.UML.Send_Signal_Actions.UML_Send_Signal_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Send_Signal_Action)))); end Create_Send_Signal_Action; -------------------------- -- Create_Sequence_Node -- -------------------------- overriding function Create_Sequence_Node (Self : not null access UML_Factory) return AMF.UML.Sequence_Nodes.UML_Sequence_Node_Access is begin return AMF.UML.Sequence_Nodes.UML_Sequence_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Sequence_Node)))); end Create_Sequence_Node; ------------------- -- Create_Signal -- ------------------- overriding function Create_Signal (Self : not null access UML_Factory) return AMF.UML.Signals.UML_Signal_Access is begin return AMF.UML.Signals.UML_Signal_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Signal)))); end Create_Signal; ------------------------- -- Create_Signal_Event -- ------------------------- overriding function Create_Signal_Event (Self : not null access UML_Factory) return AMF.UML.Signal_Events.UML_Signal_Event_Access is begin return AMF.UML.Signal_Events.UML_Signal_Event_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Signal_Event)))); end Create_Signal_Event; ----------------- -- Create_Slot -- ----------------- overriding function Create_Slot (Self : not null access UML_Factory) return AMF.UML.Slots.UML_Slot_Access is begin return AMF.UML.Slots.UML_Slot_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Slot)))); end Create_Slot; --------------------------------------------- -- Create_Start_Classifier_Behavior_Action -- --------------------------------------------- overriding function Create_Start_Classifier_Behavior_Action (Self : not null access UML_Factory) return AMF.UML.Start_Classifier_Behavior_Actions.UML_Start_Classifier_Behavior_Action_Access is begin return AMF.UML.Start_Classifier_Behavior_Actions.UML_Start_Classifier_Behavior_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Start_Classifier_Behavior_Action)))); end Create_Start_Classifier_Behavior_Action; ----------------------------------------- -- Create_Start_Object_Behavior_Action -- ----------------------------------------- overriding function Create_Start_Object_Behavior_Action (Self : not null access UML_Factory) return AMF.UML.Start_Object_Behavior_Actions.UML_Start_Object_Behavior_Action_Access is begin return AMF.UML.Start_Object_Behavior_Actions.UML_Start_Object_Behavior_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Start_Object_Behavior_Action)))); end Create_Start_Object_Behavior_Action; ------------------ -- Create_State -- ------------------ overriding function Create_State (Self : not null access UML_Factory) return AMF.UML.States.UML_State_Access is begin return AMF.UML.States.UML_State_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_State)))); end Create_State; ---------------------------- -- Create_State_Invariant -- ---------------------------- overriding function Create_State_Invariant (Self : not null access UML_Factory) return AMF.UML.State_Invariants.UML_State_Invariant_Access is begin return AMF.UML.State_Invariants.UML_State_Invariant_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_State_Invariant)))); end Create_State_Invariant; -------------------------- -- Create_State_Machine -- -------------------------- overriding function Create_State_Machine (Self : not null access UML_Factory) return AMF.UML.State_Machines.UML_State_Machine_Access is begin return AMF.UML.State_Machines.UML_State_Machine_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_State_Machine)))); end Create_State_Machine; ----------------------- -- Create_Stereotype -- ----------------------- overriding function Create_Stereotype (Self : not null access UML_Factory) return AMF.UML.Stereotypes.UML_Stereotype_Access is begin return AMF.UML.Stereotypes.UML_Stereotype_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Stereotype)))); end Create_Stereotype; ------------------------------ -- Create_String_Expression -- ------------------------------ overriding function Create_String_Expression (Self : not null access UML_Factory) return AMF.UML.String_Expressions.UML_String_Expression_Access is begin return AMF.UML.String_Expressions.UML_String_Expression_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_String_Expression)))); end Create_String_Expression; ------------------------------------- -- Create_Structured_Activity_Node -- ------------------------------------- overriding function Create_Structured_Activity_Node (Self : not null access UML_Factory) return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access is begin return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Structured_Activity_Node)))); end Create_Structured_Activity_Node; ------------------------- -- Create_Substitution -- ------------------------- overriding function Create_Substitution (Self : not null access UML_Factory) return AMF.UML.Substitutions.UML_Substitution_Access is begin return AMF.UML.Substitutions.UML_Substitution_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Substitution)))); end Create_Substitution; ----------------------------- -- Create_Template_Binding -- ----------------------------- overriding function Create_Template_Binding (Self : not null access UML_Factory) return AMF.UML.Template_Bindings.UML_Template_Binding_Access is begin return AMF.UML.Template_Bindings.UML_Template_Binding_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Binding)))); end Create_Template_Binding; ------------------------------- -- Create_Template_Parameter -- ------------------------------- overriding function Create_Template_Parameter (Self : not null access UML_Factory) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Parameter)))); end Create_Template_Parameter; -------------------------------------------- -- Create_Template_Parameter_Substitution -- -------------------------------------------- overriding function Create_Template_Parameter_Substitution (Self : not null access UML_Factory) return AMF.UML.Template_Parameter_Substitutions.UML_Template_Parameter_Substitution_Access is begin return AMF.UML.Template_Parameter_Substitutions.UML_Template_Parameter_Substitution_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Parameter_Substitution)))); end Create_Template_Parameter_Substitution; ------------------------------- -- Create_Template_Signature -- ------------------------------- overriding function Create_Template_Signature (Self : not null access UML_Factory) return AMF.UML.Template_Signatures.UML_Template_Signature_Access is begin return AMF.UML.Template_Signatures.UML_Template_Signature_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Template_Signature)))); end Create_Template_Signature; --------------------------------- -- Create_Test_Identity_Action -- --------------------------------- overriding function Create_Test_Identity_Action (Self : not null access UML_Factory) return AMF.UML.Test_Identity_Actions.UML_Test_Identity_Action_Access is begin return AMF.UML.Test_Identity_Actions.UML_Test_Identity_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Test_Identity_Action)))); end Create_Test_Identity_Action; ---------------------------- -- Create_Time_Constraint -- ---------------------------- overriding function Create_Time_Constraint (Self : not null access UML_Factory) return AMF.UML.Time_Constraints.UML_Time_Constraint_Access is begin return AMF.UML.Time_Constraints.UML_Time_Constraint_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Constraint)))); end Create_Time_Constraint; ----------------------- -- Create_Time_Event -- ----------------------- overriding function Create_Time_Event (Self : not null access UML_Factory) return AMF.UML.Time_Events.UML_Time_Event_Access is begin return AMF.UML.Time_Events.UML_Time_Event_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Event)))); end Create_Time_Event; ---------------------------- -- Create_Time_Expression -- ---------------------------- overriding function Create_Time_Expression (Self : not null access UML_Factory) return AMF.UML.Time_Expressions.UML_Time_Expression_Access is begin return AMF.UML.Time_Expressions.UML_Time_Expression_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Expression)))); end Create_Time_Expression; -------------------------- -- Create_Time_Interval -- -------------------------- overriding function Create_Time_Interval (Self : not null access UML_Factory) return AMF.UML.Time_Intervals.UML_Time_Interval_Access is begin return AMF.UML.Time_Intervals.UML_Time_Interval_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Interval)))); end Create_Time_Interval; ----------------------------- -- Create_Time_Observation -- ----------------------------- overriding function Create_Time_Observation (Self : not null access UML_Factory) return AMF.UML.Time_Observations.UML_Time_Observation_Access is begin return AMF.UML.Time_Observations.UML_Time_Observation_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Time_Observation)))); end Create_Time_Observation; ----------------------- -- Create_Transition -- ----------------------- overriding function Create_Transition (Self : not null access UML_Factory) return AMF.UML.Transitions.UML_Transition_Access is begin return AMF.UML.Transitions.UML_Transition_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Transition)))); end Create_Transition; -------------------- -- Create_Trigger -- -------------------- overriding function Create_Trigger (Self : not null access UML_Factory) return AMF.UML.Triggers.UML_Trigger_Access is begin return AMF.UML.Triggers.UML_Trigger_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Trigger)))); end Create_Trigger; ------------------------------ -- Create_Unmarshall_Action -- ------------------------------ overriding function Create_Unmarshall_Action (Self : not null access UML_Factory) return AMF.UML.Unmarshall_Actions.UML_Unmarshall_Action_Access is begin return AMF.UML.Unmarshall_Actions.UML_Unmarshall_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Unmarshall_Action)))); end Create_Unmarshall_Action; ------------------ -- Create_Usage -- ------------------ overriding function Create_Usage (Self : not null access UML_Factory) return AMF.UML.Usages.UML_Usage_Access is begin return AMF.UML.Usages.UML_Usage_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Usage)))); end Create_Usage; --------------------- -- Create_Use_Case -- --------------------- overriding function Create_Use_Case (Self : not null access UML_Factory) return AMF.UML.Use_Cases.UML_Use_Case_Access is begin return AMF.UML.Use_Cases.UML_Use_Case_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Use_Case)))); end Create_Use_Case; ---------------------- -- Create_Value_Pin -- ---------------------- overriding function Create_Value_Pin (Self : not null access UML_Factory) return AMF.UML.Value_Pins.UML_Value_Pin_Access is begin return AMF.UML.Value_Pins.UML_Value_Pin_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Value_Pin)))); end Create_Value_Pin; --------------------------------------- -- Create_Value_Specification_Action -- --------------------------------------- overriding function Create_Value_Specification_Action (Self : not null access UML_Factory) return AMF.UML.Value_Specification_Actions.UML_Value_Specification_Action_Access is begin return AMF.UML.Value_Specification_Actions.UML_Value_Specification_Action_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Value_Specification_Action)))); end Create_Value_Specification_Action; --------------------- -- Create_Variable -- --------------------- overriding function Create_Variable (Self : not null access UML_Factory) return AMF.UML.Variables.UML_Variable_Access is begin return AMF.UML.Variables.UML_Variable_Access (Self.Create (AMF.CMOF.Classes.CMOF_Class_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Metamodel.MC_UML_Variable)))); end Create_Variable; end AMF.Internals.Factories.UML_Factories;
reznikmm/matreshka
Ada
4,521
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2009-2011, 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 generic package allows to store value of arbitrary decimal type in -- the Holder. ------------------------------------------------------------------------------ generic type Num is delta <> digits <>; package League.Holders.Decimals.Generic_Decimals is pragma Preelaborate; Value_Tag : constant Tag; function Element (Self : Holder) return Num; -- Returns internal value. procedure Replace_Element (Self : in out Holder; To : Num); -- Set value. Tag of the value must be set before this call. function To_Holder (Item : Num) return Holder; -- Creates new Value from specified value. private type Decimal_Container is new Abstract_Decimal_Container with record Value : Num; end record; overriding function Constructor (Is_Empty : not null access Boolean) return Decimal_Container; overriding function Get (Self : not null access constant Decimal_Container) return Universal_Decimal; overriding procedure Set (Self : not null access Decimal_Container; To : Universal_Decimal); Value_Tag : constant Tag := Tag (Decimal_Container'Tag); end League.Holders.Decimals.Generic_Decimals;
charlie5/cBound
Ada
1,753
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_glx_use_x_font_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; minor_opcode : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; context_tag : aliased xcb.xcb_glx_context_tag_t; font : aliased xcb.xcb_font_t; first : aliased Interfaces.Unsigned_32; count : aliased Interfaces.Unsigned_32; list_base : aliased Interfaces.Unsigned_32; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_glx_use_x_font_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_use_x_font_request_t.Item, Element_Array => xcb.xcb_glx_use_x_font_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_glx_use_x_font_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_use_x_font_request_t.Pointer, Element_Array => xcb.xcb_glx_use_x_font_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_use_x_font_request_t;
DrenfongWong/tkm-rpc
Ada
11,521
ads
with Interfaces.C.Strings; with Tkmrpc.Types; with Tkmrpc.Results; package Tkmrpc.Clients.Ike is procedure Init (Result : out Results.Result_Type; Address : Interfaces.C.Strings.chars_ptr); pragma Export (C, Init, "ike_init"); pragma Export_Valued_Procedure (Init); -- Initialize IKE client with given address. procedure Tkm_Version (Result : out Results.Result_Type; Version : out Types.Version_Type); pragma Export (C, Tkm_Version, "ike_tkm_version"); pragma Export_Valued_Procedure (Tkm_Version); -- Returns the version of TKM. procedure Tkm_Limits (Result : out Results.Result_Type; Max_Active_Requests : out Types.Active_Requests_Type; Nc_Contexts : out Types.Nc_Id_Type; Dh_Contexts : out Types.Dh_Id_Type; Cc_Contexts : out Types.Cc_Id_Type; Ae_Contexts : out Types.Ae_Id_Type; Isa_Contexts : out Types.Isa_Id_Type; Esa_Contexts : out Types.Esa_Id_Type); pragma Export (C, Tkm_Limits, "ike_tkm_limits"); pragma Export_Valued_Procedure (Tkm_Limits); -- Returns limits of fixed length of TKM IKE. procedure Tkm_Reset (Result : out Results.Result_Type); pragma Export (C, Tkm_Reset, "ike_tkm_reset"); pragma Export_Valued_Procedure (Tkm_Reset); -- Reset the TKM - IKE interface to a known initial state. procedure Nc_Reset (Result : out Results.Result_Type; Nc_Id : Types.Nc_Id_Type); pragma Export (C, Nc_Reset, "ike_nc_reset"); pragma Export_Valued_Procedure (Nc_Reset, Mechanism => (Nc_Id => Value)); -- Reset a NC context. procedure Nc_Create (Result : out Results.Result_Type; Nc_Id : Types.Nc_Id_Type; Nonce_Length : Types.Nonce_Length_Type; Nonce : out Types.Nonce_Type); pragma Export (C, Nc_Create, "ike_nc_create"); pragma Export_Valued_Procedure (Nc_Create, Mechanism => (Nc_Id => Value, Nonce_Length => Value)); -- Create a nonce. procedure Dh_Reset (Result : out Results.Result_Type; Dh_Id : Types.Dh_Id_Type); pragma Export (C, Dh_Reset, "ike_dh_reset"); pragma Export_Valued_Procedure (Dh_Reset, Mechanism => (Dh_Id => Value)); -- Reset a DH context. procedure Dh_Create (Result : out Results.Result_Type; Dh_Id : Types.Dh_Id_Type; Dha_Id : Types.Dha_Id_Type; Pubvalue : out Types.Dh_Pubvalue_Type); pragma Export (C, Dh_Create, "ike_dh_create"); pragma Export_Valued_Procedure (Dh_Create, Mechanism => (Dh_Id => Value, Dha_Id => Value)); -- Create a DH secret and return its public value. procedure Dh_Generate_Key (Result : out Results.Result_Type; Dh_Id : Types.Dh_Id_Type; Pubvalue : Types.Dh_Pubvalue_Type); pragma Export (C, Dh_Generate_Key, "ike_dh_generate_key"); pragma Export_Valued_Procedure (Dh_Generate_Key, Mechanism => (Dh_Id => Value, Pubvalue => Value)); -- Generate a DH shared secret. procedure Cc_Reset (Result : out Results.Result_Type; Cc_Id : Types.Cc_Id_Type); pragma Export (C, Cc_Reset, "ike_cc_reset"); pragma Export_Valued_Procedure (Cc_Reset, Mechanism => (Cc_Id => Value)); -- Reset a CC context. procedure Cc_Set_User_Certificate (Result : out Results.Result_Type; Cc_Id : Types.Cc_Id_Type; Ri_Id : Types.Ri_Id_Type; Autha_Id : Types.Autha_Id_Type; Certificate : Types.Certificate_Type); pragma Export (C, Cc_Set_User_Certificate, "ike_cc_set_user_certificate"); pragma Export_Valued_Procedure (Cc_Set_User_Certificate, Mechanism => (Cc_Id => Value, Ri_Id => Value, Autha_Id => Value, Certificate => Value)); -- Initiates a certificate chain starting from the user certificate. procedure Cc_Add_Certificate (Result : out Results.Result_Type; Cc_Id : Types.Cc_Id_Type; Autha_Id : Types.Autha_Id_Type; Certificate : Types.Certificate_Type); pragma Export (C, Cc_Add_Certificate, "ike_cc_add_certificate"); pragma Export_Valued_Procedure (Cc_Add_Certificate, Mechanism => (Cc_Id => Value, Autha_Id => Value, Certificate => Value)); -- Add a certificate to a certificate chain. procedure Cc_Check_Ca (Result : out Results.Result_Type; Cc_Id : Types.Cc_Id_Type; Ca_Id : Types.Ca_Id_Type); pragma Export (C, Cc_Check_Ca, "ike_cc_check_ca"); pragma Export_Valued_Procedure (Cc_Check_Ca, Mechanism => (Cc_Id => Value, Ca_Id => Value)); -- Checks if a cc is based on a trusted CA procedure Ae_Reset (Result : out Results.Result_Type; Ae_Id : Types.Ae_Id_Type); pragma Export (C, Ae_Reset, "ike_ae_reset"); pragma Export_Valued_Procedure (Ae_Reset, Mechanism => (Ae_Id => Value)); -- Reset an AE context. procedure Isa_Reset (Result : out Results.Result_Type; Isa_Id : Types.Isa_Id_Type); pragma Export (C, Isa_Reset, "ike_isa_reset"); pragma Export_Valued_Procedure (Isa_Reset, Mechanism => (Isa_Id => Value)); -- Reset an ISA context. procedure Isa_Create (Result : out Results.Result_Type; Isa_Id : Types.Isa_Id_Type; Ae_Id : Types.Ae_Id_Type; Ia_Id : Types.Ia_Id_Type; Dh_Id : Types.Dh_Id_Type; Nc_Loc_Id : Types.Nc_Id_Type; Nonce_Rem : Types.Nonce_Type; Initiator : Types.Init_Type; Spi_Loc : Types.Ike_Spi_Type; Spi_Rem : Types.Ike_Spi_Type; Sk_Ai : out Types.Key_Type; Sk_Ar : out Types.Key_Type; Sk_Ei : out Types.Key_Type; Sk_Er : out Types.Key_Type); pragma Export (C, Isa_Create, "ike_isa_create"); pragma Export_Valued_Procedure (Isa_Create, Mechanism => (Isa_Id => Value, Ae_Id => Value, Ia_Id => Value, Dh_Id => Value, Nc_Loc_Id => Value, Nonce_Rem => Value, Initiator => Value, Spi_Loc => Value, Spi_Rem => Value)); -- Create an IKE SA context. procedure Isa_Sign (Result : out Results.Result_Type; Isa_Id : Types.Isa_Id_Type; Lc_Id : Types.Lc_Id_Type; Init_Message : Types.Init_Message_Type; Signature : out Types.Signature_Type); pragma Export (C, Isa_Sign, "ike_isa_sign"); pragma Export_Valued_Procedure (Isa_Sign, Mechanism => (Isa_Id => Value, Lc_Id => Value, Init_Message => Value)); -- Provide authentication to the remote endpoint. procedure Isa_Auth (Result : out Results.Result_Type; Isa_Id : Types.Isa_Id_Type; Cc_Id : Types.Cc_Id_Type; Init_Message : Types.Init_Message_Type; Signature : Types.Signature_Type); pragma Export (C, Isa_Auth, "ike_isa_auth"); pragma Export_Valued_Procedure (Isa_Auth, Mechanism => (Isa_Id => Value, Cc_Id => Value, Init_Message => Value, Signature => Value)); -- Authenticate the remote endpoint. procedure Isa_Create_Child (Result : out Results.Result_Type; Isa_Id : Types.Isa_Id_Type; Parent_Isa_Id : Types.Isa_Id_Type; Ia_Id : Types.Ia_Id_Type; Dh_Id : Types.Dh_Id_Type; Nc_Loc_Id : Types.Nc_Id_Type; Nonce_Rem : Types.Nonce_Type; Initiator : Types.Init_Type; Spi_Loc : Types.Ike_Spi_Type; Spi_Rem : Types.Ike_Spi_Type; Sk_Ai : out Types.Key_Type; Sk_Ar : out Types.Key_Type; Sk_Ei : out Types.Key_Type; Sk_Er : out Types.Key_Type); pragma Export (C, Isa_Create_Child, "ike_isa_create_child"); pragma Export_Valued_Procedure (Isa_Create_Child, Mechanism => (Isa_Id => Value, Parent_Isa_Id => Value, Ia_Id => Value, Dh_Id => Value, Nc_Loc_Id => Value, Nonce_Rem => Value, Initiator => Value, Spi_Loc => Value, Spi_Rem => Value)); -- Derive an IKE SA context from an existing SA. procedure Isa_Skip_Create_First (Result : out Results.Result_Type; Isa_Id : Types.Isa_Id_Type); pragma Export (C, Isa_Skip_Create_First, "ike_isa_skip_create_first"); pragma Export_Valued_Procedure (Isa_Skip_Create_First, Mechanism => (Isa_Id => Value)); -- Don't create a first child. procedure Esa_Reset (Result : out Results.Result_Type; Esa_Id : Types.Esa_Id_Type); pragma Export (C, Esa_Reset, "ike_esa_reset"); pragma Export_Valued_Procedure (Esa_Reset, Mechanism => (Esa_Id => Value)); -- Reset an ESA context. procedure Esa_Create (Result : out Results.Result_Type; Esa_Id : Types.Esa_Id_Type; Isa_Id : Types.Isa_Id_Type; Sp_Id : Types.Sp_Id_Type; Ea_Id : Types.Ea_Id_Type; Dh_Id : Types.Dh_Id_Type; Nc_Loc_Id : Types.Nc_Id_Type; Nonce_Rem : Types.Nonce_Type; Initiator : Types.Init_Type; Esp_Spi_Loc : Types.Esp_Spi_Type; Esp_Spi_Rem : Types.Esp_Spi_Type); pragma Export (C, Esa_Create, "ike_esa_create"); pragma Export_Valued_Procedure (Esa_Create, Mechanism => (Esa_Id => Value, Isa_Id => Value, Sp_Id => Value, Ea_Id => Value, Dh_Id => Value, Nc_Loc_Id => Value, Nonce_Rem => Value, Initiator => Value, Esp_Spi_Loc => Value, Esp_Spi_Rem => Value)); -- Creates an ESP SA. procedure Esa_Create_No_Pfs (Result : out Results.Result_Type; Esa_Id : Types.Esa_Id_Type; Isa_Id : Types.Isa_Id_Type; Sp_Id : Types.Sp_Id_Type; Ea_Id : Types.Ea_Id_Type; Nc_Loc_Id : Types.Nc_Id_Type; Nonce_Rem : Types.Nonce_Type; Initiator : Types.Init_Type; Esp_Spi_Loc : Types.Esp_Spi_Type; Esp_Spi_Rem : Types.Esp_Spi_Type); pragma Export (C, Esa_Create_No_Pfs, "ike_esa_create_no_pfs"); pragma Export_Valued_Procedure (Esa_Create_No_Pfs, Mechanism => (Esa_Id => Value, Isa_Id => Value, Sp_Id => Value, Ea_Id => Value, Nc_Loc_Id => Value, Nonce_Rem => Value, Initiator => Value, Esp_Spi_Loc => Value, Esp_Spi_Rem => Value)); -- Creates an ESP SA without PFS. procedure Esa_Create_First (Result : out Results.Result_Type; Esa_Id : Types.Esa_Id_Type; Isa_Id : Types.Isa_Id_Type; Sp_Id : Types.Sp_Id_Type; Ea_Id : Types.Ea_Id_Type; Esp_Spi_Loc : Types.Esp_Spi_Type; Esp_Spi_Rem : Types.Esp_Spi_Type); pragma Export (C, Esa_Create_First, "ike_esa_create_first"); pragma Export_Valued_Procedure (Esa_Create_First, Mechanism => (Esa_Id => Value, Isa_Id => Value, Sp_Id => Value, Ea_Id => Value, Esp_Spi_Loc => Value, Esp_Spi_Rem => Value)); -- Creates the first ESP SA for an AE. procedure Esa_Select (Result : out Results.Result_Type; Esa_Id : Types.Esa_Id_Type); pragma Export (C, Esa_Select, "ike_esa_select"); pragma Export_Valued_Procedure (Esa_Select, Mechanism => (Esa_Id => Value)); -- Selects an ESA context for outgoing traffic. end Tkmrpc.Clients.Ike;
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.Style_Leader_Type_Attributes is pragma Preelaborate; type ODF_Style_Leader_Type_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Style_Leader_Type_Attribute_Access is access all ODF_Style_Leader_Type_Attribute'Class with Storage_Size => 0; end ODF.DOM.Style_Leader_Type_Attributes;
MinimSecure/unum-sdk
Ada
798
ads
-- Copyright 2012-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 System; package Pck is procedure Do_Nothing (A : System.Address); end Pck;
tum-ei-rcs/StratoX
Ada
13,281
ads
-- This spec has been automatically generated from STM32F427x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with System; with HAL; package STM32_SVD.I2C is pragma Preelaborate; --------------- -- Registers -- --------------- ------------------ -- CR1_Register -- ------------------ -- Control register 1 type CR1_Register is record -- Peripheral enable PE : Boolean := False; -- SMBus mode SMBUS : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- SMBus type SMBTYPE : Boolean := False; -- ARP enable ENARP : Boolean := False; -- PEC enable ENPEC : Boolean := False; -- General call enable ENGC : Boolean := False; -- Clock stretching disable (Slave mode) NOSTRETCH : Boolean := False; -- Start generation START : Boolean := False; -- Stop generation STOP : Boolean := False; -- Acknowledge enable ACK : Boolean := False; -- Acknowledge/PEC Position (for data reception) POS : Boolean := False; -- Packet error checking PEC : Boolean := False; -- SMBus alert ALERT : Boolean := False; -- unspecified Reserved_14_14 : HAL.Bit := 16#0#; -- Software reset SWRST : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register use record PE at 0 range 0 .. 0; SMBUS at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; SMBTYPE at 0 range 3 .. 3; ENARP at 0 range 4 .. 4; ENPEC at 0 range 5 .. 5; ENGC at 0 range 6 .. 6; NOSTRETCH at 0 range 7 .. 7; START at 0 range 8 .. 8; STOP at 0 range 9 .. 9; ACK at 0 range 10 .. 10; POS at 0 range 11 .. 11; PEC at 0 range 12 .. 12; ALERT at 0 range 13 .. 13; Reserved_14_14 at 0 range 14 .. 14; SWRST at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------ -- CR2_Register -- ------------------ subtype CR2_FREQ_Field is HAL.UInt6; -- Control register 2 type CR2_Register is record -- Peripheral clock frequency FREQ : CR2_FREQ_Field := 16#0#; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- Error interrupt enable ITERREN : Boolean := False; -- Event interrupt enable ITEVTEN : Boolean := False; -- Buffer interrupt enable ITBUFEN : Boolean := False; -- DMA requests enable DMAEN : Boolean := False; -- DMA last transfer LAST : Boolean := False; -- unspecified Reserved_13_31 : HAL.UInt19 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register use record FREQ at 0 range 0 .. 5; Reserved_6_7 at 0 range 6 .. 7; ITERREN at 0 range 8 .. 8; ITEVTEN at 0 range 9 .. 9; ITBUFEN at 0 range 10 .. 10; DMAEN at 0 range 11 .. 11; LAST at 0 range 12 .. 12; Reserved_13_31 at 0 range 13 .. 31; end record; ------------------- -- OAR1_Register -- ------------------- subtype OAR1_ADD7_Field is HAL.UInt7; subtype OAR1_ADD10_Field is HAL.UInt2; -- Own address register 1 type OAR1_Register is record -- Interface address ADD0 : Boolean := False; -- Interface address ADD7 : OAR1_ADD7_Field := 16#0#; -- Interface address ADD10 : OAR1_ADD10_Field := 16#0#; -- unspecified Reserved_10_14 : HAL.UInt5 := 16#0#; -- Addressing mode (slave mode) ADDMODE : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OAR1_Register use record ADD0 at 0 range 0 .. 0; ADD7 at 0 range 1 .. 7; ADD10 at 0 range 8 .. 9; Reserved_10_14 at 0 range 10 .. 14; ADDMODE at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------- -- OAR2_Register -- ------------------- subtype OAR2_ADD2_Field is HAL.UInt7; -- Own address register 2 type OAR2_Register is record -- Dual addressing mode enable ENDUAL : Boolean := False; -- Interface address ADD2 : OAR2_ADD2_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OAR2_Register use record ENDUAL at 0 range 0 .. 0; ADD2 at 0 range 1 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ----------------- -- DR_Register -- ----------------- subtype DR_DR_Field is HAL.Byte; -- Data register type DR_Register is record -- 8-bit data register DR : DR_DR_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 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 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------ -- SR1_Register -- ------------------ -- Status register 1 type SR1_Register is record -- Read-only. Start bit (Master mode) SB : Boolean := False; -- Read-only. Address sent (master mode)/matched (slave mode) ADDR : Boolean := False; -- Read-only. Byte transfer finished BTF : Boolean := False; -- Read-only. 10-bit header sent (Master mode) ADD10 : Boolean := False; -- Read-only. Stop detection (slave mode) STOPF : Boolean := False; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- Read-only. Data register not empty (receivers) RxNE : Boolean := False; -- Read-only. Data register empty (transmitters) TxE : Boolean := False; -- Bus error BERR : Boolean := False; -- Arbitration lost (master mode) ARLO : Boolean := False; -- Acknowledge failure AF : Boolean := False; -- Overrun/Underrun OVR : Boolean := False; -- PEC Error in reception PECERR : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- Timeout or Tlow error TIMEOUT : Boolean := False; -- SMBus alert SMBALERT : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR1_Register use record SB at 0 range 0 .. 0; ADDR at 0 range 1 .. 1; BTF at 0 range 2 .. 2; ADD10 at 0 range 3 .. 3; STOPF at 0 range 4 .. 4; Reserved_5_5 at 0 range 5 .. 5; RxNE at 0 range 6 .. 6; TxE at 0 range 7 .. 7; BERR at 0 range 8 .. 8; ARLO at 0 range 9 .. 9; AF at 0 range 10 .. 10; OVR at 0 range 11 .. 11; PECERR at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; TIMEOUT at 0 range 14 .. 14; SMBALERT at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------ -- SR2_Register -- ------------------ subtype SR2_PEC_Field is HAL.Byte; -- Status register 2 type SR2_Register is record -- Read-only. Master/slave MSL : Boolean; -- Read-only. Bus busy BUSY : Boolean; -- Read-only. Transmitter/receiver TRA : Boolean; -- unspecified Reserved_3_3 : HAL.Bit; -- Read-only. General call address (Slave mode) GENCALL : Boolean; -- Read-only. SMBus device default address (Slave mode) SMBDEFAULT : Boolean; -- Read-only. SMBus host header (Slave mode) SMBHOST : Boolean; -- Read-only. Dual flag (Slave mode) DUALF : Boolean; -- Read-only. acket error checking register PEC : SR2_PEC_Field; -- unspecified Reserved_16_31 : HAL.Short; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR2_Register use record MSL at 0 range 0 .. 0; BUSY at 0 range 1 .. 1; TRA at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; GENCALL at 0 range 4 .. 4; SMBDEFAULT at 0 range 5 .. 5; SMBHOST at 0 range 6 .. 6; DUALF at 0 range 7 .. 7; PEC at 0 range 8 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------ -- CCR_Register -- ------------------ subtype CCR_CCR_Field is HAL.UInt12; -- Clock control register type CCR_Register is record -- Clock control register in Fast/Standard mode (Master mode) CCR : CCR_CCR_Field := 16#0#; -- unspecified Reserved_12_13 : HAL.UInt2 := 16#0#; -- Fast mode duty cycle DUTY : Boolean := False; -- I2C master mode selection F_S : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record CCR at 0 range 0 .. 11; Reserved_12_13 at 0 range 12 .. 13; DUTY at 0 range 14 .. 14; F_S at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- TRISE_Register -- -------------------- subtype TRISE_TRISE_Field is HAL.UInt6; -- TRISE register type TRISE_Register is record -- Maximum rise time in Fast/Standard mode (Master mode) TRISE : TRISE_TRISE_Field := 16#2#; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TRISE_Register use record TRISE at 0 range 0 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; ------------------- -- FLTR_Register -- ------------------- subtype FLTR_DNF_Field is HAL.UInt4; -- I2C FLTR register type FLTR_Register is record -- Digital noise filter DNF : FLTR_DNF_Field := 16#0#; -- Analog noise filter OFF ANOFF : Boolean := False; -- unspecified Reserved_5_31 : HAL.UInt27 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for FLTR_Register use record DNF at 0 range 0 .. 3; ANOFF at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Inter-integrated circuit type I2C_Peripheral is record -- Control register 1 CR1 : CR1_Register; -- Control register 2 CR2 : CR2_Register; -- Own address register 1 OAR1 : OAR1_Register; -- Own address register 2 OAR2 : OAR2_Register; -- Data register DR : DR_Register; -- Status register 1 SR1 : SR1_Register; -- Status register 2 SR2 : SR2_Register; -- Clock control register CCR : CCR_Register; -- TRISE register TRISE : TRISE_Register; -- I2C FLTR register FLTR : FLTR_Register; end record with Volatile; for I2C_Peripheral use record CR1 at 0 range 0 .. 31; CR2 at 4 range 0 .. 31; OAR1 at 8 range 0 .. 31; OAR2 at 12 range 0 .. 31; DR at 16 range 0 .. 31; SR1 at 20 range 0 .. 31; SR2 at 24 range 0 .. 31; CCR at 28 range 0 .. 31; TRISE at 32 range 0 .. 31; FLTR at 36 range 0 .. 31; end record; -- Inter-integrated circuit I2C1_Periph : aliased I2C_Peripheral with Import, Address => I2C1_Base; -- Inter-integrated circuit I2C2_Periph : aliased I2C_Peripheral with Import, Address => I2C2_Base; -- Inter-integrated circuit I2C3_Periph : aliased I2C_Peripheral with Import, Address => I2C3_Base; end STM32_SVD.I2C;
AdaCore/libadalang
Ada
104
ads
with Foo.Gen; package Bar is package Inst is new Foo.Gen (Integer); pragma Test (Inst); end Bar;
zhmu/ananas
Ada
932
adb
-- { dg-do run { target i?86-*-* x86_64-*-* alpha*-*-* ia64-*-* } } -- { dg-options "-O2" } with Ada.Characters.Handling; use Ada.Characters.Handling; with Interfaces; use Interfaces; with Ada.Unchecked_Conversion; procedure Opt47 is subtype String4 is String (1 .. 4); function To_String4 is new Ada.Unchecked_Conversion (Unsigned_32, String4); type Arr is array (Integer range <>) of Unsigned_32; Leaf : Arr (1 .. 4) := (1349478766, 1948272498, 1702436946, 1702061409); Value : Unsigned_32; Result : String (1 .. 32); Last : Integer := 0; begin for I in 1 .. 4 loop Value := Leaf (I); for J in reverse String4'Range loop if Is_Graphic (To_String4 (Value)(J)) then Last := Last + 1; Result (Last) := To_String4 (Value)(J); end if; end loop; end loop; if Result (1) /= 'P' then raise Program_Error; end if; end;
reznikmm/matreshka
Ada
3,993
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.Form_Step_Size_Attributes; package Matreshka.ODF_Form.Step_Size_Attributes is type Form_Step_Size_Attribute_Node is new Matreshka.ODF_Form.Abstract_Form_Attribute_Node and ODF.DOM.Form_Step_Size_Attributes.ODF_Form_Step_Size_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Form_Step_Size_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Form_Step_Size_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Form.Step_Size_Attributes;
ZinebZaad/ENSEEIHT
Ada
1,890
adb
with Ada.Text_IO; use Ada.Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; package body Module_IO is procedure Lire(Fichier: in Unbounded_String; PagesNum: out Integer; Liens: out LC_Integer_Integer.T_LC) is File: Ada.Text_IO.File_Type; From, To: Integer; begin LC_Integer_Integer.Initialiser(Liens); Open(File, In_File, To_String(Fichier) & ".net"); Get(File, PagesNum); while not End_Of_File(File) loop Get(File, From); Get(File, To); LC_Integer_Integer.Ajouter(Liens, From, To); end loop; Close(File); end Lire; procedure Ecrire(Fichier: in Unbounded_String; PagesNum: in Integer; MaxIterations: in Integer; Alpha: in T_Digits; Rangs: in Vecteur_Poids.T_Vecteur) is RangFile: Ada.Text_IO.File_Type; PoidFile: Ada.Text_IO.File_Type; procedure Ecrire_Poids_Header is begin Put(PoidFile, PagesNum, 1); Put(PoidFile, " "); Put(PoidFile, Float(Alpha), Fore=>1, Aft=>10); Put(PoidFile, " "); Put(PoidFile, MaxIterations, 1); New_Line(PoidFile); end Ecrire_Poids_Header; procedure Ecrire_Rank (Rank: in T_Rank) is begin Put(RangFile, Rank.Rang, 1); Put(PoidFile, Float(Rank.Poid), Fore=>1, Aft=>10); New_Line(RangFile); New_Line(PoidFile); end Ecrire_Rank; procedure Ecrire_Tout is new Vecteur_Poids.Pour_Chaque(Ecrire_Rank); begin Create(RangFile, Out_File, To_String (Fichier) & ".ord"); Create(PoidFile, Out_File, To_String (Fichier) & ".p"); Ecrire_Poids_Header; Ecrire_Tout(Rangs); Close(RangFile); Close(PoidFile); end Ecrire; end Module_IO;
reznikmm/matreshka
Ada
3,679
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.Text_Description_Elements is pragma Preelaborate; type ODF_Text_Description is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Text_Description_Access is access all ODF_Text_Description'Class with Storage_Size => 0; end ODF.DOM.Text_Description_Elements;
reznikmm/matreshka
Ada
3,655
ads
------------------------------------------------------------------------------ -- -- -- 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 XML.DOM.Attributes; package ODF.DOM.Attributes.Style.Writing_Mode is type ODF_Style_Writing_Mode is new XML.DOM.Attributes.DOM_Attribute with private; private type ODF_Style_Writing_Mode is new XML.DOM.Attributes.DOM_Attribute with null record; end ODF.DOM.Attributes.Style.Writing_Mode;
dshadrin/AProxy
Ada
4,931
adb
------------------------------------------------------------------------------ -- -- -- File: -- -- formatted_output-enumeration_output.adb -- -- -- -- Description: -- -- Formatted_Output.Enumeration_Output generic package body -- -- -- -- Author: -- -- Eugene Nonko, [email protected] -- -- -- -- Revision history: -- -- 27/01/99 - original -- -- 16/03/99 - added support for justification characters -- -- -- ------------------------------------------------------------------------------ with Ada.Text_IO, Ada.Characters.Handling, Ada.Strings, Ada.Strings.Fixed, Ada.Strings.Unbounded; use Ada.Text_IO, Ada.Characters.Handling, Ada.Strings, Ada.Strings.Fixed, Ada.Strings.Unbounded; package body Formatted_Output.Enumeration_Output is package Item_Type_IO is new Enumeration_IO (Item_Type); use Item_Type_IO; type Style_Type is (Capitalized, Upper_Case, Lower_Case); function Format (Value : Item_Type; Initial_Width : Integer; Justification : Alignment; Style : Style_Type) return String is Img : String (1 .. Maximal_Item_Length); Width, Real_Width : Integer; Past_Last : Integer := 1; begin -- Format case Style is when Capitalized => Put (Img, Value, Set => Type_Set'(Lower_Case)); Img (1) := To_Upper (Img (1)); when Lower_Case => Put (Img, Value, Set => Type_Set'(Lower_Case)); when Upper_Case => Put (Img, Value, Set => Type_Set'(Upper_Case)); end case; while Img (Past_Last) /= ' ' loop Past_Last := Past_Last + 1; end loop; Real_Width := Past_Last - 1; if Initial_Width < Real_Width then Width := Real_Width; else Width := Initial_Width; end if; declare S : String (1 .. Width); begin Move (Img (Past_Last - Real_Width .. Past_Last - 1), S, Justify => Justification, Pad => Filler); return S; end; end Format; function "&" (Fmt : Format_Type; Value : Item_Type) return Format_Type is Command_Start : constant Integer := Scan_To_Percent_Sign (Fmt); Width : Integer := 0; Digit_Occured, Justification_Changed : Boolean := False; Justification : Alignment := Right; Fmt_Copy : Unbounded_String; begin -- "&" if Command_Start /= 0 then Fmt_Copy := Unbounded_String (Fmt); for I in Command_Start + 1 .. Length (Fmt_Copy) loop case Element (Fmt_Copy, I) is when 'c' => Replace_Slice (Fmt_Copy, Command_Start, I, Format (Value, Width, Justification, Capitalized)); return Format_Type (Fmt_Copy); when 'u' => Replace_Slice (Fmt_Copy, Command_Start, I, Format (Value, Width, Justification, Upper_Case)); return Format_Type (Fmt_Copy); when 'l' => Replace_Slice (Fmt_Copy, Command_Start, I, Format (Value, Width, Justification, Lower_Case)); return Format_Type (Fmt_Copy); when '-' | '+' | '*' => if Justification_Changed or else Digit_Occured then raise Format_Error; end if; Justification_Changed := True; case Element (Fmt_Copy, I) is when '-' => Justification := Left; when '+' => Justification := Right; when '*' => Justification := Center; when others => null; end case; when '0' .. '9' => Width := Width * 10 + Character'Pos (Element (Fmt_Copy, I)) - Character'Pos ('0'); when others => raise Format_Error; end case; end loop; end if; raise Format_Error; end "&"; end Formatted_Output.Enumeration_Output;
darkestkhan/cbap
Ada
3,469
adb
pragma License (GPL); ------------------------------------------------------------------------------ -- EMAIL: <[email protected]> -- -- License: GNU GPLv3 or any later as published by Free Software Foundation -- -- (see COPYING file) -- -- -- -- Copyright © 2015 darkestkhan -- ------------------------------------------------------------------------------ -- 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 Ada.Command_Line; with Ada.Text_IO; with CBAP; procedure CBAP_Variable_Detection is --------------------------------------------------------------------------- Error_Count: Natural := 0; --------------------------------------------------------------------------- procedure Case_Insensitive (Variable: in String) is begin if Variable /= "TruE" then Ada.Text_IO.Put_Line ( Ada.Text_IO.Standard_Error, "Failed at Case_Insensitive" ); Ada.Text_IO.Put_Line (Variable); Error_Count := Error_Count + 1; end if; end Case_Insensitive; --------------------------------------------------------------------------- procedure Case_Sensitive (Variable: in String) is begin if Variable /= "true" then Ada.Text_IO.Put_Line ( Ada.Text_IO.Standard_Error, "Failed at Case_Sensitive" ); Error_Count := Error_Count + 1; end if; end Case_Sensitive; --------------------------------------------------------------------------- procedure Edge_Case (Variable: in String) is begin if Variable /= "" then Ada.Text_IO.Put_Line ( Ada.Text_IO.Standard_Error, "Failed at Edge_Case" ); Error_Count := Error_Count + 1; end if; end Edge_Case; --------------------------------------------------------------------------- begin CBAP.Register ( Case_Insensitive'Unrestricted_Access, "insensitive", CBAP.Variable, Case_Sensitive => False ); CBAP.Register ( Case_Sensitive'Unrestricted_Access, "SENSITIVE", CBAP.Variable ); CBAP.Register ( Edge_Case'Unrestricted_Access, "edge", CBAP.Variable ); CBAP.Process_Arguments; if Error_Count /= 0 then Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); else Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Success); end if; end CBAP_Variable_Detection;
zhmu/ananas
Ada
369
ads
with Ada.Finalization; use Ada.Finalization; package Controlled5_Pkg is type Root is tagged private; type Inner is new Ada.Finalization.Controlled with null record; type T_Root_Class is access all Root'Class; function Dummy (I : Integer) return Root'Class; private type Root is tagged record F2 : Inner; end record; end Controlled5_Pkg;
jrcarter/Ada_GUI
Ada
14,788
adb
-- Ada_GUI implementation based on Gnoga. Adapted 2021 -- -- -- GNOGA - The GNU Omnificent GUI for Ada -- -- -- -- G N O G A . T Y P E S . C O L O R S -- -- -- -- B o d y -- -- -- -- -- -- Copyright (C) 2015 Pascal Pignard -- -- -- -- 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. -- -- -- -- 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/>. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- For more information please go to http://www.gnoga.com -- ------------------------------------------------------------------------------ with Ada.Exceptions; package body Ada_GUI.Gnoga.Colors is -- Based on CSS extended color keywords -- http://dev.w3.org/csswg/css-color-3/ §4.3 type CSS_Color_Enumeration is (aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, grey, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen); type Color_Array_Type is array (Color_Enumeration) of Gnoga.RGBA_Type; RGBA_Colors : constant Color_Array_Type := ((240, 248, 255, 1.0), -- Alice_Blue (250, 235, 215, 1.0), -- Antique_White (0, 255, 255, 1.0), -- Aqua (127, 255, 212, 1.0), -- Aquamarine (240, 255, 255, 1.0), -- Azure (245, 245, 220, 1.0), -- Beige (255, 228, 196, 1.0), -- Bisque (0, 0, 0, 1.0), -- Black (255, 235, 205, 1.0), -- Blanched_Almond (0, 0, 255, 1.0), -- Blue (138, 43, 226, 1.0), -- Blue_Violet (165, 42, 42, 1.0), -- Brown (222, 184, 135, 1.0), -- Burly_Wood (95, 158, 160, 1.0), -- Cadet_Blue (127, 255, 0, 1.0), -- Chartreuse (210, 105, 30, 1.0), -- Chocolate (255, 127, 80, 1.0), -- Coral (100, 149, 237, 1.0), -- Cornflower_Blue (255, 248, 220, 1.0), -- Cornsilk (220, 20, 60, 1.0), -- Crimson (0, 255, 255, 1.0), -- Cyan (0, 0, 139, 1.0), -- Dark_Blue (0, 139, 139, 1.0), -- Dark_Cyan (184, 134, 11, 1.0), -- Dark_Golden_Rod (169, 169, 169, 1.0), -- Dark_Gray (0, 100, 0, 1.0), -- Dark_Green (169, 169, 169, 1.0), -- Dark_Grey (189, 183, 107, 1.0), -- Dark_Khaki (139, 0, 139, 1.0), -- Dark_Magenta (85, 107, 47, 1.0), -- Dark_Olive_Green (255, 140, 0, 1.0), -- Dark_Orange (153, 50, 204, 1.0), -- Dark_Orchid (139, 0, 0, 1.0), -- Dark_Red (233, 150, 122, 1.0), -- Dark_Salmon (143, 188, 143, 1.0), -- Dark_Sea_Green (72, 61, 139, 1.0), -- Dark_Slate_Blue (47, 79, 79, 1.0), -- Dark_Slate_Gray (47, 79, 79, 1.0), -- Dark_Slate_Grey (0, 206, 209, 1.0), -- Dark_Turquoise (148, 0, 211, 1.0), -- Dark_Violet (255, 20, 147, 1.0), -- DeepPink (0, 191, 255, 1.0), -- Deep_Sky_Blue (105, 105, 105, 1.0), -- Dim_Gray (105, 105, 105, 1.0), -- Dim_Grey (30, 144, 255, 1.0), -- Dodger_Blue (178, 34, 34, 1.0), -- Fire_Brick (255, 250, 240, 1.0), -- Floral_White (34, 139, 34, 1.0), -- Forest_Green (255, 0, 255, 1.0), -- Fuchsia (220, 220, 220, 1.0), -- Gainsboro (248, 248, 255, 1.0), -- Ghost_White (255, 215, 0, 1.0), -- Gold_Deep_Sky_Blue (218, 165, 32, 1.0), -- Golden_Rod (128, 128, 128, 1.0), -- Gray (0, 128, 0, 1.0), -- Green (173, 255, 47, 1.0), -- Green_Yellow (128, 128, 128, 1.0), -- Grey (240, 255, 240, 1.0), -- Honey_Dew (255, 105, 180, 1.0), -- Hot_Pink (205, 92, 92, 1.0), -- Indian_Red (75, 0, 130, 1.0), -- Indigo (255, 255, 240, 1.0), -- Ivory (240, 230, 140, 1.0), -- Khaki (230, 230, 250, 1.0), -- Lavender (255, 240, 245, 1.0), -- Lavender_Blush (124, 252, 0, 1.0), -- Lawn_Green (255, 250, 205, 1.0), -- Lemon_Chiffon (173, 216, 230, 1.0), -- Light_Blue (240, 128, 128, 1.0), -- Light_Coral (224, 255, 255, 1.0), -- Light_Cyan (250, 250, 210, 1.0), -- Light_Golden_Rod_Yellow (211, 211, 211, 1.0), -- Light_Gray (144, 238, 144, 1.0), -- Light_Green (211, 211, 211, 1.0), -- Light_Grey (255, 182, 193, 1.0), -- Light_Pink (255, 160, 122, 1.0), -- Light_Salmon (32, 178, 170, 1.0), -- Light_Sea_Green (135, 206, 250, 1.0), -- Light_Sky_Blue (119, 136, 153, 1.0), -- Light_Slate_Gray (119, 136, 153, 1.0), -- Light_Slate_Grey (176, 196, 222, 1.0), -- Light_Steel_Blue (255, 255, 224, 1.0), -- Light_Yellow (0, 255, 0, 1.0), -- Lime (50, 205, 50, 1.0), -- Lime_Green (250, 240, 230, 1.0), -- Linen (255, 0, 255, 1.0), -- Magenta (128, 0, 0, 1.0), -- Maroon (102, 205, 170, 1.0), -- Medium_Aqua_Marine (0, 0, 205, 1.0), -- Medium_Blue (186, 85, 211, 1.0), -- Medium_Orchid (147, 112, 219, 1.0), -- Medium_Purple (60, 179, 113, 1.0), -- Medium_Sea_Green (123, 104, 238, 1.0), -- Medium_Slate_Blue (0, 250, 154, 1.0), -- Medium_Spring_Green (72, 209, 204, 1.0), -- Medium_Turquoise (199, 21, 133, 1.0), -- Medium_Violet_Red (25, 25, 112, 1.0), -- Midnight_Blue (245, 255, 250, 1.0), -- Mint_Cream (255, 228, 225, 1.0), -- Misty_Rose (255, 228, 181, 1.0), -- Moccasin (255, 222, 173, 1.0), -- Navajo_White (0, 0, 128, 1.0), -- Navy (253, 245, 230, 1.0), -- Old_Lace (128, 128, 0, 1.0), -- Olive (107, 142, 35, 1.0), -- Olive_Drab (255, 165, 0, 1.0), -- Orange (255, 69, 0, 1.0), -- Orange_Red (218, 112, 214, 1.0), -- Orchid (238, 232, 170, 1.0), -- Pale_Golden_Rod (152, 251, 152, 1.0), -- Pale_Green (175, 238, 238, 1.0), -- Pale_Turquoise (219, 112, 147, 1.0), -- Pale_Violet_Red (255, 239, 213, 1.0), -- Papaya_Whip (255, 218, 185, 1.0), -- Peach_Puff (205, 133, 63, 1.0), -- Peru (255, 192, 203, 1.0), -- Pink (221, 160, 221, 1.0), -- Plum (176, 224, 230, 1.0), -- Powder_Blue (128, 0, 128, 1.0), -- Purple (255, 0, 0, 1.0), -- Red (188, 143, 143, 1.0), -- Rosy_Brown (65, 105, 225, 1.0), -- Royal_Blue (139, 69, 19, 1.0), -- Saddle_Brown (250, 128, 114, 1.0), -- Salmon (244, 164, 96, 1.0), -- Sandy_Brown (46, 139, 87, 1.0), -- Sea_Green (255, 245, 238, 1.0), -- Sea_Shell (160, 82, 45, 1.0), -- Sienna (192, 192, 192, 1.0), -- Silver (135, 206, 235, 1.0), -- Sky_Blue (106, 90, 205, 1.0), -- Slate_Blue (112, 128, 144, 1.0), -- Slate_Gray (112, 128, 144, 1.0), -- Slate_Grey (255, 250, 250, 1.0), -- Snow (0, 255, 127, 1.0), -- Spring_Green (70, 130, 180, 1.0), -- Steel_Blue (210, 180, 140, 1.0), -- Tan (0, 128, 128, 1.0), -- Teal (216, 191, 216, 1.0), -- Thistle (255, 99, 71, 1.0), -- Tomato (64, 224, 208, 1.0), -- Turquoise (238, 130, 238, 1.0), -- Violet (245, 222, 179, 1.0), -- Wheat (255, 255, 255, 1.0), -- White (245, 245, 245, 1.0), -- White_Smoke (255, 255, 0, 1.0), -- Yellow (154, 205, 50, 1.0)); -- Yellow_Green --------------- -- To_String -- --------------- function To_String (Value : Color_Enumeration) return String is begin return CSS_Color_Enumeration'Image (CSS_Color_Enumeration'Val (Color_Enumeration'Pos (Value))); end To_String; ------------- -- To_RGBA -- ------------- function To_RGBA (Value : Color_Enumeration) return Gnoga.RGBA_Type is begin return RGBA_Colors (Value); end To_RGBA; -------------------------- -- To_Color_Enumeration -- -------------------------- function To_Color_Enumeration (Value : Gnoga.RGBA_Type) return Color_Enumeration is begin for C in RGBA_Colors'Range loop if Value = RGBA_Colors (C) then return C; end if; end loop; raise Color_Error; end To_Color_Enumeration; -------------------------- -- To_Color_Enumeration -- -------------------------- function To_Color_Enumeration (Value : String) return Color_Enumeration is begin return Color_Enumeration'Val (CSS_Color_Enumeration'Pos (CSS_Color_Enumeration'Value (Value))); exception when E : Constraint_Error => Log ("Error converting to Color_Enumeration from " & Value); Log (Ada.Exceptions.Exception_Information (E)); raise Color_Error; end To_Color_Enumeration; end Ada_GUI.Gnoga.Colors;
persan/advent-of-code-2020
Ada
57
ads
package Adventofcode.Day_25 is end Adventofcode.Day_25;
godunko/adawebpack
Ada
2,817
ads
------------------------------------------------------------------------------ -- -- -- AdaWebPack -- -- -- ------------------------------------------------------------------------------ -- Copyright © 2020, Vadim Godunko -- -- All rights reserved. -- -- -- -- 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. -- ------------------------------------------------------------------------------ package Web.DOM is pragma Pure; end Web.DOM;
zhmu/ananas
Ada
3,027
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . C O M M U N I C A T I O N -- -- -- -- B o d y -- -- -- -- Copyright (C) 2001-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. -- -- -- ------------------------------------------------------------------------------ package body System.Communication is subtype SEO is Ada.Streams.Stream_Element_Offset; ---------------- -- Last_Index -- ---------------- function Last_Index (First : Ada.Streams.Stream_Element_Offset; Count : CRTL.size_t) return Ada.Streams.Stream_Element_Offset is use type Ada.Streams.Stream_Element_Offset; use type System.CRTL.size_t; begin if First = SEO'First and then Count = 0 then raise Constraint_Error with "last index out of range (no element transferred)"; else return First + SEO (Count) - 1; end if; end Last_Index; end System.Communication;
AdaCore/libadalang
Ada
43
ads
with Test; package Renaming renames Test;
AdaCore/libadalang
Ada
70,323
adb
------------------------------------------------------------------------------ -- G P S -- -- -- -- Copyright (C) 2001-2017, AdaCore -- -- -- -- This 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. This software is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- -- TABILITY 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 this software; see file -- -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- -- of the license. -- ------------------------------------------------------------------------------ with Ada.Containers.Vectors; with Ada.Strings; use Ada.Strings; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with GNATCOLL.Projects; use GNATCOLL.Projects; with GNATCOLL.Scripts; use GNATCOLL.Scripts; with GNATCOLL.VFS; use GNATCOLL.VFS; with GNATCOLL.VFS.GtkAda; use GNATCOLL.VFS.GtkAda; with Gdk.Event; use Gdk.Event; with Glib; use Glib; with Glib.Convert; with Glib.Main; use Glib.Main; with Glib.Object; use Glib.Object; with Glib.Values; use Glib.Values; with Gtk.Box; use Gtk.Box; with Gtk.Check_Menu_Item; use Gtk.Check_Menu_Item; with Gtk.Enums; use Gtk.Enums; with Gtk.Handlers; with Gtk.Menu; use Gtk.Menu; with Gtk.Scrolled_Window; use Gtk.Scrolled_Window; with Gtk.Toolbar; use Gtk.Toolbar; with Gtk.Tree_Selection; use Gtk.Tree_Selection; with Gtkada.File_Selector; with Gtkada.Handlers; use Gtkada.Handlers; with Gtkada.MDI; use Gtkada.MDI; with Basic_Types; use Basic_Types; with Commands.Interactive; use Commands.Interactive; with Default_Preferences; use Default_Preferences; with Generic_Views; with GPS.Editors; use GPS.Editors; with GPS.Editors.GtkAda; use GPS.Editors.GtkAda; with GPS.Intl; use GPS.Intl; with GPS.Kernel.Actions; use GPS.Kernel.Actions; with GPS.Kernel.Contexts; use GPS.Kernel.Contexts; with GPS.Kernel.Hooks; use GPS.Kernel.Hooks; with GPS.Kernel.MDI; use GPS.Kernel.MDI; with GPS.Kernel.Messages; use GPS.Kernel.Messages; with GPS.Kernel.Messages.Tools_Output; use GPS.Kernel.Messages.Tools_Output; with GPS.Kernel.Modules; use GPS.Kernel.Modules; with GPS.Kernel.Modules.UI; use GPS.Kernel.Modules.UI; with GPS.Kernel.Preferences; use GPS.Kernel.Preferences; with GPS.Kernel.Scripts; use GPS.Kernel.Scripts; with GPS.Kernel.Style_Manager; use GPS.Kernel.Style_Manager; with GPS.Location_View.Listener; use GPS.Location_View.Listener; with GPS.Search; use GPS.Search; with GPS.Tree_View; use GPS.Tree_View; with GPS.Tree_View.Locations; use GPS.Tree_View.Locations; with GUI_Utils; use GUI_Utils; with Histories; use Histories; package body GPS.Location_View is Sort_By_Subcategory : Boolean_Preference; Auto_Jump_To_First : Boolean_Preference; Locations_Wrap : Boolean_Preference; Auto_Close : Boolean_Preference; Sort_Files_Alphabetical : Boolean_Preference; Locations_View_Name : constant String := "Locations"; Locations_Message_Flags : constant GPS.Kernel.Messages.Message_Flags := (GPS.Kernel.Messages.Editor_Side => False, GPS.Kernel.Messages.Editor_Line => False, GPS.Kernel.Messages.Locations => True); type Locations_Child_Record is new GPS_MDI_Child_Record with null record; overriding function Build_Context (Self : not null access Locations_Child_Record; Event : Gdk.Event.Gdk_Event := null) return Selection_Context; type Expansion_Request is record Category : Ada.Strings.Unbounded.Unbounded_String; File : GNATCOLL.VFS.Virtual_File; Goto_First : Boolean; end record; package Expansion_Request_Vectors is new Ada.Containers.Vectors (Positive, Expansion_Request); type Location_View_Record is new Generic_Views.View_Record with record View : GPS_Locations_Tree_View; -- Idle handlers Idle_Expand_Handler : Glib.Main.G_Source_Id := Glib.Main.No_Source_Id; Requests : Expansion_Request_Vectors.Vector; -- Expansion requests. -- Message listener Listener : GPS.Kernel.Messages.Listener_Access; end record; overriding procedure Create_Toolbar (View : not null access Location_View_Record; Toolbar : not null access Gtk.Toolbar.Gtk_Toolbar_Record'Class); overriding procedure Create_Menu (View : not null access Location_View_Record; Menu : not null access Gtk.Menu.Gtk_Menu_Record'Class); overriding procedure Filter_Changed (Self : not null access Location_View_Record; Pattern : in out Search_Pattern_Access); function Initialize (Self : access Location_View_Record'Class) return Gtk_Widget; -- Creates the locations view, and returns the focus widget package Location_Views is new Generic_Views.Simple_Views (Module_Name => "Location_View_Record", View_Name => Locations_View_Name, Formal_View_Record => Location_View_Record, Formal_MDI_Child => Locations_Child_Record, Reuse_If_Exist => True, Initialize => Initialize, Local_Toolbar => True, Local_Config => True, Areas => Gtkada.MDI.Sides_Only, Group => Group_Consoles); use Location_Views; subtype Location_View is Location_Views.View_Access; package View_Idle is new Glib.Main.Generic_Sources (Location_View); type On_Location_Changed is new File_Location_Hooks_Function with null record; overriding procedure Execute (Self : On_Location_Changed; Kernel : not null access Kernel_Handle_Record'Class; File : Virtual_File; Line, Column : Integer; Project : Project_Type); -- Called whenever the location in the current editor has changed, so that -- we can highlight the corresponding line in the locations window function Idle_Expand (Self : Location_View) return Boolean; -- Idle callback used to expand nodes of category and its first or defined -- file; select first message and the open first location if requested. procedure Free (List : in out Gtk_Tree_Path_List.Glist); -- Calling Path_Free on each item in list, -- and then freeing the list itself. function Is_Parent_Selected (Selection : Gtk.Tree_Selection.Gtk_Tree_Selection; Path : Gtk_Tree_Path; Depth : Gint := 0) return Boolean; -- Check whether the one of parents is selected. Parent node well be -- checked if Depth is 0 or depth of node less or equal Depth. package Select_Function_With_View is new Set_Select_Function_User_Data (Location_View); function Selection_Function (Selection : not null access Gtk_Tree_Selection_Record'Class; Model : Gtk.Tree_Model.Gtk_Tree_Model; Path : Gtk.Tree_Model.Gtk_Tree_Path; Path_Currently_Selected : Boolean; View : Location_View) return Boolean; -- Prevents unselect messages when action clicked ------------- -- Actions -- ------------- type Clear_Locations_Command is new Interactive_Command with null record; overriding function Execute (Self : access Clear_Locations_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type; -- Removes all messages type Remove_Selection_Command is new Interactive_Command with null record; overriding function Execute (Self : access Remove_Selection_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type; -- Removes selected message type Export_Command is new Interactive_Command with null record; overriding function Execute (Self : access Export_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type; -- Export selection to a text file type Toggle_Sort_By_Subcategory_Command is new Interactive_Command with null record; overriding function Execute (Self : access Toggle_Sort_By_Subcategory_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type; -- Changes sort order in locations view. type Expand_Category_Command is new Interactive_Command with null record; overriding function Execute (Self : access Expand_Category_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type; -- Expand all files within the current category type Collapse_All_Files_Command is new Interactive_Command with null record; overriding function Execute (Self : access Collapse_All_Files_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type; -- Collapse all files -------------- -- Messages -- -------------- type View_Manager (Kernel : not null access Kernel_Handle_Record'Class) is new Abstract_Listener with null record; type View_Manager_Access is access all View_Manager'Class; overriding procedure Message_Added (Self : not null access View_Manager; Message : not null access Abstract_Message'Class); overriding procedure Category_Added (Self : not null access View_Manager; Category : Ada.Strings.Unbounded.Unbounded_String; Allow_Auto_Jump_To_First : Boolean); -- Monitoring messages. -- ??? Can this be done simply by monitoring the model instead ? We are at -- at a low-level anyway here --------------------- -- Local constants -- --------------------- Output_Cst : aliased constant String := "output"; Category_Cst : aliased constant String := "category"; Regexp_Cst : aliased constant String := "regexp"; File_Index_Cst : aliased constant String := "file_index"; Line_Index_Cst : aliased constant String := "line_index"; Col_Index_Cst : aliased constant String := "column_index"; Msg_Index_Cst : aliased constant String := "msg_index"; Style_Index_Cst : aliased constant String := "style_index"; Warning_Index_Cst : aliased constant String := "warning_index"; File_Cst : aliased constant String := "file"; Line_Cst : aliased constant String := "line"; Column_Cst : aliased constant String := "column"; Message_Cst : aliased constant String := "message"; Highlight_Cst : aliased constant String := "highlight"; Length_Cst : aliased constant String := "length"; Highlight_Cat_Cst : aliased constant String := "highlight_category"; Style_Cat_Cst : aliased constant String := "style_category"; Warning_Cat_Cst : aliased constant String := "warning_category"; Look_Sec_Cst : aliased constant String := "look_for_secondary"; Hint_Cst : aliased constant String := "hint"; Parse_Location_Parameters : constant Cst_Argument_List := (1 => Output_Cst'Access, 2 => Category_Cst'Access, 3 => Regexp_Cst'Access, 4 => File_Index_Cst'Access, 5 => Line_Index_Cst'Access, 6 => Col_Index_Cst'Access, 7 => Msg_Index_Cst'Access, 8 => Style_Index_Cst'Access, 9 => Warning_Index_Cst'Access, 10 => Highlight_Cat_Cst'Access, 11 => Style_Cat_Cst'Access, 12 => Warning_Cat_Cst'Access); Remove_Category_Parameters : constant Cst_Argument_List := (1 => Category_Cst'Access); Locations_Add_Parameters : constant Cst_Argument_List := (1 => Category_Cst'Access, 2 => File_Cst'Access, 3 => Line_Cst'Access, 4 => Column_Cst'Access, 5 => Message_Cst'Access, 6 => Highlight_Cst'Access, 7 => Length_Cst'Access, 8 => Look_Sec_Cst'Access); Set_Sorting_Hint_Parameters : constant Cst_Argument_List := (1 => Category_Cst'Access, 2 => Hint_Cst'Access); ----------------------- -- Local subprograms -- ----------------------- procedure On_Action_Clicked (Self : access Location_View_Record'Class; Path : Gtk_Tree_Path; Iter : Gtk_Tree_Iter); -- Activate corresponding command if any procedure On_Location_Clicked (Self : access Location_View_Record'Class; Path : Gtk_Tree_Path; Iter : Gtk_Tree_Iter); -- Opens editor, moves text cursor to the location of the message and -- raises editor's window when specified node is a message node. procedure On_Location_Selection_Changed (Object : access Glib.Object.GObject_Record'Class); -- Handle change of selections for tree view. procedure On_Row_Deleted (Self : access Location_View_Record'Class); -- Called when a row has been delete in the model procedure On_Destroy (View : access Gtk_Widget_Record'Class); -- Callback for the "destroy" signal procedure Default_Command_Handler (Data : in out Callback_Data'Class; Command : String); -- Interactive shell command handler procedure On_Change_Sort (Self : access Location_View_Record'Class); -- Callback for the activation of the sort contextual menu item type On_Pref_Changed is new Preferences_Hooks_Function with null record; overriding procedure Execute (Self : On_Pref_Changed; Kernel : not null access Kernel_Handle_Record'Class; Pref : Preference); -- Called when the preferences have changed procedure Goto_Location (Self : access Location_View_Record'Class); -- Goto the selected location in the Location_View package Location_View_Callbacks is new Gtk.Handlers.Callback (Location_View_Record); procedure Export_Messages (Out_File : Ada.Text_IO.File_Type; Container : not null GPS.Kernel.Messages_Container_Access; Category : Ada.Strings.Unbounded.Unbounded_String; File : GNATCOLL.VFS.Virtual_File); -- Exports messages of the specified category and file into text file. -------------------- -- Category_Added -- -------------------- overriding procedure Category_Added (Self : not null access View_Manager; Category : Ada.Strings.Unbounded.Unbounded_String; Allow_Auto_Jump_To_First : Boolean) is Auto : constant Boolean := Allow_Auto_Jump_To_First and then Auto_Jump_To_First.Get_Pref; begin Expand_Category (Location_View_Access (Location_Views.Get_Or_Create_View (Self.Kernel, Focus => Auto)), Ada.Strings.Unbounded.To_String (Category), Auto); end Category_Added; ------------------- -- Message_Added -- ------------------- overriding procedure Message_Added (Self : not null access View_Manager; Message : not null access Abstract_Message'Class) is pragma Unreferenced (Message); begin Location_Views.Child_From_View (Location_Views.Get_Or_Create_View (Self.Kernel, Focus => False)) .Highlight_Child; end Message_Added; --------------------- -- Expand_Category -- --------------------- procedure Expand_Category (Self : Location_View_Access; Category : String; Goto_First : Boolean) is Loc : constant Location_View := Location_View (Self); begin Loc.View.Get_Selection.Unselect_All; Loc.Requests.Prepend ((Ada.Strings.Unbounded.To_Unbounded_String (Category), GNATCOLL.VFS.No_File, Goto_First)); if Loc.Idle_Expand_Handler = No_Source_Id then Loc.Idle_Expand_Handler := View_Idle.Idle_Add (Idle_Expand'Access, Loc); end if; end Expand_Category; ----------------- -- Expand_File -- ----------------- procedure Expand_File (Self : Location_View_Access; Category : String; File : GNATCOLL.VFS.Virtual_File; Goto_First : Boolean) is Loc : constant Location_View := Location_View (Self); begin Loc.View.Get_Selection.Unselect_All; Loc.Requests.Prepend ((Ada.Strings.Unbounded.To_Unbounded_String (Category), File, Goto_First)); if Loc.Idle_Expand_Handler = No_Source_Id then Loc.Idle_Expand_Handler := View_Idle.Idle_Add (Idle_Expand'Access, Loc); end if; end Expand_File; ----------------- -- Expand_File -- ----------------- procedure Expand_File (Self : Location_View_Access; Category : String; File : GNATCOLL.VFS.Virtual_File) is begin Expand_File (Self, Category, File, Auto_Jump_To_First.Get_Pref); end Expand_File; --------------------- -- Export_Messages -- --------------------- procedure Export_Messages (Out_File : Ada.Text_IO.File_Type; Container : not null GPS.Kernel.Messages_Container_Access; Category : Ada.Strings.Unbounded.Unbounded_String; File : GNATCOLL.VFS.Virtual_File) is Messages : constant GPS.Kernel.Messages.Message_Array := Container.Get_Messages (Category, File); begin for K in Messages'Range loop Ada.Text_IO.Put_Line (Out_File, String (Messages (K).Get_File.Base_Name) & ':' & Trim (Integer'Image (Messages (K).Get_Line), Both) & ':' & Trim (Basic_Types.Visible_Column_Type'Image (Messages (K).Get_Column), Both) & ": " & To_String (Messages (K).Get_Text)); end loop; end Export_Messages; ----------------- -- Idle_Expand -- ----------------- function Idle_Expand (Self : Location_View) return Boolean is Model : constant Gtk_Tree_Model := Self.View.Get_Model; Iter : Gtk_Tree_Iter; Path : Gtk_Tree_Path; Dummy : Boolean; pragma Warnings (Off, Dummy); begin Requests : while not Self.Requests.Is_Empty loop Iter := Get_Iter_First (Model); while Iter /= Null_Iter loop exit Requests when Get_String (Model, Iter, -Category_Column) = Self.Requests.First_Element.Category; Next (Model, Iter); end loop; Self.Requests.Delete_First; end loop Requests; if Iter /= Null_Iter then -- Raise Locations window declare Child : constant MDI_Child := Find_MDI_Child_By_Tag (Get_MDI (Self.Kernel), Location_View_Record'Tag); begin if Child /= null then Raise_Child (Child, Give_Focus => False); end if; end; -- Expand category node Path := Get_Path (Model, Iter); Dummy := Self.View.Expand_Row (Path, False); -- Expand file node Iter := Children (Model, Iter); while Iter /= Null_Iter loop exit when GNATCOLL.VFS.GtkAda.Get_File (Model, Iter, -File_Column) = Self.Requests.First_Element.File; Next (Model, Iter); end loop; if Iter /= Null_Iter then Gtk.Tree_Model.Path_Free (Path); Path := Get_Path (Model, Iter); else Down (Path); end if; Dummy := Self.View.Expand_Row (Path, False); Self.View.Scroll_To_Cell (Path, null, False, 0.0, 0.0); -- Select first message and make it visible Down (Path); Self.View.Get_Selection.Select_Path (Path); Self.View.Scroll_To_Cell (Path, null, False, 0.0, 0.0); Path_Free (Path); if Self.Requests.First_Element.Goto_First then -- If go to location operation is requested, when go to the -- location of the selected message (it is first message) Self.Goto_Location; end if; end if; Self.Idle_Expand_Handler := No_Source_Id; Self.Requests.Clear; return False; end Idle_Expand; ------------------- -- Goto_Location -- ------------------- procedure Goto_Location (Self : access Location_View_Record'Class) is Iter : Gtk_Tree_Iter; Model : Gtk_Tree_Model; Path : Gtk_Tree_Path; Success : Boolean := True; List : Gtk_Tree_Path_List.Glist; use type Gtk_Tree_Path_List.Glist; begin if Self.View.Get_Selection.Count_Selected_Rows /= 1 then return; end if; Self.View.Get_Selection.Get_Selected_Rows (Model, List); if Model = Null_Gtk_Tree_Model or else List = Gtk_Tree_Path_List.Null_List then Free (List); return; end if; Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (List)); while Success and then Get_Depth (Path) < 3 loop Success := Expand_Row (Self.View, Path, False); Down (Path); Self.View.Get_Selection.Select_Path (Path); end loop; Iter := Get_Iter (Model, Path); if Iter /= Null_Iter then On_Location_Clicked (Self, Path, Iter); end if; Free (List); end Goto_Location; ------------- -- Execute -- ------------- overriding function Execute (Self : access Expand_Category_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type is pragma Unreferenced (Self); K : constant Kernel_Handle := Get_Kernel (Context.Context); V : constant Location_View := Location_Views.Retrieve_View (K); List : Gtk_Tree_Path_List.Glist; Model : Gtk_Tree_Model; Path : Gtk_Tree_Path; Dummy : Boolean; pragma Unreferenced (Dummy); use type Gtk_Tree_Path_List.Glist; begin if V /= null then V.View.Get_Selection.Get_Selected_Rows (Model, List); if Model /= Null_Gtk_Tree_Model and then List /= Gtk_Tree_Path_List.Null_List then Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (Gtk_Tree_Path_List.First (List))); while Path.Get_Depth > 1 and then Path.Up loop null; end loop; Dummy := V.View.Expand_Row (Path, True); end if; Free (List); end if; return Commands.Success; end Execute; ------------- -- Execute -- ------------- overriding function Execute (Self : access Collapse_All_Files_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type is pragma Unreferenced (Self); K : constant Kernel_Handle := Get_Kernel (Context.Context); V : constant Location_View := Location_Views.Retrieve_View (K); Model : Gtk_Tree_Model; Path : Gtk_Tree_Path; List : Gtk_Tree_Path_List.Glist; use type Gtk_Tree_Path_List.Glist; begin -- When Locations view doesn't have focus it just clear selection on -- collapse all action. Selection is moved to category row to workaround -- this. if V /= null then V.View.Get_Selection.Get_Selected_Rows (Model, List); if Model /= Null_Gtk_Tree_Model and then List /= Gtk_Tree_Path_List.Null_List then Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (Gtk_Tree_Path_List.First (List))); while Path.Get_Depth > 1 and then Path.Up loop null; end loop; V.View.Get_Selection.Select_Path (Path); end if; Free (List); V.View.Collapse_All; end if; return Commands.Success; end Execute; --------------- -- Next_Item -- --------------- procedure Next_Item (Self : Location_View_Access; Backwards : Boolean := False) is Loc : constant Location_View := Location_View (Self); Path : Gtk_Tree_Path; File_Path : Gtk_Tree_Path; Category_Path : Gtk_Tree_Path; Model : Gtk_Tree_Model; Success : Boolean; List : Gtk_Tree_Path_List.Glist; Ignore : Boolean; pragma Unreferenced (Ignore); use type Gtk_Tree_Path_List.Glist; begin Loc.View.Get_Selection.Get_Selected_Rows (Model, List); if Model = Null_Gtk_Tree_Model or else List = Gtk_Tree_Path_List.Null_List then Free (List); return; end if; Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (List)); -- First handle the case where the selected item is not a node if Path.Get_Depth < 3 then Success := True; while Success and then Path.Get_Depth < 3 loop Success := Loc.View.Expand_Row (Path, False); Path.Down; Loc.View.Get_Selection.Unselect_All; Loc.View.Get_Selection.Select_Path (Path); end loop; if not Backwards then -- We have found the first iter, our job is done. Free (List); return; end if; end if; if Path.Get_Depth < 3 then Free (List); return; end if; File_Path := Path.Copy; Ignore := File_Path.Up; Category_Path := File_Path.Copy; Success := Category_Path.Up; if Backwards then Success := Path.Prev; else Path.Next; end if; if not Success or else Get_Iter (Model, Path) = Null_Iter then if Backwards then Success := File_Path.Prev; else File_Path.Next; end if; if not Success or else Get_Iter (Model, File_Path) = Null_Iter then if Locations_Wrap.Get_Pref then File_Path := Category_Path.Copy; File_Path.Down; if Backwards then while Get_Iter (Model, File_Path) /= Null_Iter loop File_Path.Next; end loop; Ignore := File_Path.Prev; end if; else Path_Free (File_Path); Free (List); Path_Free (Category_Path); return; end if; end if; Ignore := Loc.View.Expand_Row (File_Path, False); Path := File_Path.Copy; Path.Down; if Backwards then while Get_Iter (Model, Path) /= Null_Iter loop Path.Next; end loop; Ignore := Path.Prev; end if; end if; Loc.View.Get_Selection.Unselect_All; Loc.View.Get_Selection.Select_Path (Path); Loc.View.Scroll_To_Cell (Path, null, False, 0.1, 0.1); Goto_Location (Loc); Path_Free (File_Path); Free (List); Path_Free (Category_Path); end Next_Item; ---------------- -- On_Destroy -- ---------------- procedure On_Destroy (View : access Gtk_Widget_Record'Class) is V : constant Location_View := Location_View (View); begin -- Disconnect the listener Unregister (V.Kernel, Locations_Listener_Access (V.Listener)); if not Locations_Save_In_Desktop.Get_Pref then Get_Messages_Container (V.Kernel).Remove_All_Messages ((Editor_Side => False, Editor_Line => False, GPS.Kernel.Messages.Locations => True)); end if; if V.Idle_Expand_Handler /= No_Source_Id then Glib.Main.Remove (V.Idle_Expand_Handler); V.Idle_Expand_Handler := No_Source_Id; end if; end On_Destroy; ------------------- -- Build_Context -- ------------------- overriding function Build_Context (Self : not null access Locations_Child_Record; Event : Gdk.Event.Gdk_Event := null) return Selection_Context is Context : Selection_Context := GPS_MDI_Child_Record (Self.all).Build_Context (Event); Explorer : constant Location_View := Location_View (GPS_MDI_Child (Self).Get_Actual_Widget); Path : Gtk_Tree_Path; Iter : Gtk_Tree_Iter; Model : Gtk_Tree_Model; List : Gtk_Tree_Path_List.Glist; N_Selected : Natural; use type Gtk_Tree_Path_List.Glist; begin Iter := Find_Iter_For_Event (Explorer.View, Event); N_Selected := Natural (Explorer.View.Get_Selection.Count_Selected_Rows); if Iter = Null_Iter or else N_Selected = 0 then return Context; end if; Explorer.View.Get_Selection.Get_Selected_Rows (Model, List); if Model = Null_Gtk_Tree_Model or else List = Gtk_Tree_Path_List.Null_List then Free (List); return Context; end if; if N_Selected = 1 then -- Single selection declare Message : Message_Access; begin Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (List)); if Path.Get_Depth >= 3 then Message := Get_Message (Model, Get_Iter (Model, Path), -Message_Column); Set_Messages_Information (Context, (1 => Message)); Set_File_Information (Context, Files => (1 => Message.Get_File), Line => Message.Get_Line, Column => Message.Get_Column); end if; end; else declare G_Iter : Gtk_Tree_Path_List.Glist; Messages : GPS.Kernel.Messages.Message_Array (1 .. N_Selected); Messages_Index : Natural := 0; File : GNATCOLL.VFS.Virtual_File := GNATCOLL.VFS.No_File; Only_Messages : Boolean := True; begin G_Iter := Gtk_Tree_Path_List.First (List); while G_Iter /= Gtk_Tree_Path_List.Null_List loop Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (G_Iter)); if Path.Get_Depth >= 3 then Messages_Index := Messages_Index + 1; Messages (Messages_Index) := Get_Message (Model, Get_Iter (Model, Path), -Message_Column); if Messages_Index = 1 then -- Store first message's file File := Messages (1).Get_File; elsif Only_Messages then -- Is this message belong to first message's file if File /= GNATCOLL.VFS.No_File and then File /= Messages (Messages_Index).Get_File then File := GNATCOLL.VFS.No_File; end if; end if; else -- Not message Only_Messages := False; end if; G_Iter := Gtk_Tree_Path_List.Next (G_Iter); end loop; if Messages_Index /= 0 then -- Message(s) selected Set_Messages_Information (Context, Messages (1 .. Messages_Index)); if Only_Messages and then File /= GNATCOLL.VFS.No_File then -- Messages belong to one file Set_File_Information (Context, Files => (1 => File), Line => Messages (1).Get_Line, Column => Messages (1).Get_Column); end if; end if; end; end if; Free (List); return Context; end Build_Context; ------------- -- Execute -- ------------- overriding function Execute (Self : access Toggle_Sort_By_Subcategory_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type is pragma Unreferenced (Self); K : constant Kernel_Handle := Get_Kernel (Context.Context); begin Set_Pref (Sort_By_Subcategory, K.Get_Preferences, not Sort_By_Subcategory.Get_Pref); return Commands.Success; end Execute; -------------------- -- On_Change_Sort -- -------------------- procedure On_Change_Sort (Self : access Location_View_Record'Class) is Msg_Order : Messages_Sort_Order; File_Order : File_Sort_Order; begin if Sort_By_Subcategory.Get_Pref then Msg_Order := By_Weight; else Msg_Order := By_Location; end if; if Sort_Files_Alphabetical.Get_Pref then File_Order := Alphabetical; else File_Order := Category_Default_Sort; end if; Self.View.Set_Order (File_Order, Msg_Order); end On_Change_Sort; ------------- -- Execute -- ------------- overriding procedure Execute (Self : On_Location_Changed; Kernel : not null access Kernel_Handle_Record'Class; File : Virtual_File; Line, Column : Integer; Project : Project_Type) is pragma Unreferenced (Self, Column, Project); Locations : constant Location_View := Location_Views.Get_Or_Create_View (Kernel, Focus => False); Category_Iter : Gtk_Tree_Iter; File_Iter : Gtk_Tree_Iter; Message_Iter : Gtk_Tree_Iter; Iter : Gtk_Tree_Iter; Model : Gtk_Tree_Model; Path : Gtk_Tree_Path; List, Cursor : Gtk_Tree_Path_List.Glist; use type Gtk_Tree_Path_List.Glist; begin -- Check current selection: if it is on the same line as the new -- location, do not change the selection. Otherwise, there is no easy -- way for a user to click on a secondary location found in the same -- error message. Locations.View.Get_Selection.Get_Selected_Rows (Model, List); if Model = Null_Gtk_Tree_Model then return; end if; if List /= Gtk_Tree_Path_List.Null_List then Cursor := Gtk_Tree_Path_List.First (List); while Cursor /= Gtk_Tree_Path_List.Null_List loop Iter := Get_Iter (Model, Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (Cursor))); if Iter /= Null_Iter and then Get_File (Model, Iter, -File_Column) = File and then Integer (Get_Int (Model, Iter, -Line_Column)) = Line then Free (List); return; end if; Cursor := Gtk_Tree_Path_List.Next (Cursor); end loop; Free (List); end if; -- Highlight the location. Use the same category as the current -- selection, since otherwise the user that has both "Builder results" -- and "search" would automatically be moved to the builder when -- traversing all search results. if Iter = Null_Iter then -- There is no selected node, look for "Builder results" category. Category_Iter := Get_Iter_First (Model); while Category_Iter /= Null_Iter loop exit when Get_String (Model, Category_Iter, -Category_Column) = "Builder results"; Next (Model, Category_Iter); end loop; -- Otherwise try to use first visible category. if Category_Iter = Null_Iter then Category_Iter := Get_Iter_First (Model); end if; else -- Unwind to category node. while Iter /= Null_Iter loop Category_Iter := Iter; Iter := Parent (Model, Iter); end loop; end if; if Category_Iter /= Null_Iter then -- Look for file node File_Iter := Children (Model, Category_Iter); while File_Iter /= Null_Iter loop exit when Get_File (Model, File_Iter, -File_Column) = File; Next (Model, File_Iter); end loop; if File_Iter /= Null_Iter then -- Look for message node Message_Iter := Children (Model, File_Iter); while Message_Iter /= Null_Iter loop exit when Integer (Get_Int (Model, Message_Iter, -Line_Column)) = Line; Next (Model, Message_Iter); end loop; if Message_Iter /= Null_Iter then Path := Get_Path (Model, Message_Iter); Expand_To_Path (Locations.View, Path); Locations.View.Get_Selection.Unselect_All; Locations.View.Get_Selection.Select_Iter (Message_Iter); Locations.View.Scroll_To_Cell (Path, null, False, 0.1, 0.1); Path_Free (Path); -- Notify about change of selected message Message_Selected_Hook.Run (Locations.Kernel, Get_Message (Model, Message_Iter, -Message_Column)); end if; end if; end if; end Execute; ---------------- -- Initialize -- ---------------- function Initialize (Self : access Location_View_Record'Class) return Gtk_Widget is M : Gtk_Tree_Model; Scrolled : Gtk_Scrolled_Window; begin Initialize_Vbox (Self, Homogeneous => False); Gtk_New (Scrolled); Scrolled.Set_Policy (Policy_Automatic, Policy_Automatic); Self.Pack_Start (Scrolled, Expand => True, Fill => True); -- Initialize the listener Self.Listener := Listener_Access (Register (Self.Kernel)); -- Initialize the tree view M := Get_Model (Locations_Listener_Access (Self.Listener)); Gtk_New (Self.View, M); Scrolled.Add (Self.View); Location_View_Callbacks.Object_Connect (Gtk.Tree_Model."-" (M), Signal_Row_Deleted, Location_View_Callbacks.To_Marshaller (On_Row_Deleted'Access), Location_View (Self), True); Self.View.Get_Selection.Set_Mode (Selection_Multiple); Select_Function_With_View.Set_Select_Function (Self.View.Get_Selection, Selection_Function'Access, Self); Self.View.Set_Name ("Locations Tree"); Set_Font_And_Colors (Self.View, Fixed_Font => True); Widget_Callback.Connect (Self, Signal_Destroy, On_Destroy'Access); Location_View_Callbacks.Object_Connect (Self.View, Signal_Action_Clicked, Location_View_Callbacks.To_Marshaller (On_Action_Clicked'Access), Self); Location_View_Callbacks.Object_Connect (Self.View, Signal_Location_Clicked, Location_View_Callbacks.To_Marshaller (On_Location_Clicked'Access), Self); Self.View.Get_Selection.On_Changed (On_Location_Selection_Changed'Access, Self, After => True); Setup_Contextual_Menu (Self.Kernel, Event_On_Widget => Self.View); Preferences_Changed_Hook.Add (new On_Pref_Changed, Watch => Self); Set_Font_And_Colors (Self.View, Fixed_Font => True); Location_Changed_Hook.Add (new On_Location_Changed, Watch => Self); -- Apply the current "sort by subcategory" setting On_Change_Sort (Self); return Gtk_Widget (Self.View); end Initialize; ------------------------ -- Is_Parent_Selected -- ------------------------ function Is_Parent_Selected (Selection : Gtk.Tree_Selection.Gtk_Tree_Selection; Path : Gtk_Tree_Path; Depth : Gint := 0) return Boolean is begin while Path.Up loop if (Depth = 0 or else Path.Get_Depth <= Depth) and then Selection.Path_Is_Selected (Path) then return True; end if; end loop; return False; end Is_Parent_Selected; ----------------------- -- On_Action_Clicked -- ----------------------- procedure On_Action_Clicked (Self : access Location_View_Record'Class; Path : Gtk_Tree_Path; Iter : Gtk_Tree_Iter) is use type Commands.Command_Access; Value : GValue; Action : GPS.Kernel.Messages.Action_Item; Ignore : Commands.Command_Return_Type; pragma Unreferenced (Ignore); Context : Selection_Context; begin if Self.View.Get_Selection.Count_Selected_Rows = 1 then On_Location_Clicked (Self, Path, Iter); end if; Get_Value (Self.View.Get_Model, Iter, -Action_Command_Column, Value); Action := To_Action_Item (Get_Address (Value)); if Action /= null and then Action.Associated_Command /= null then Context := Location_Views.Child_From_View (Self).Build_Context; Self.Kernel.Context_Changed (Context); Ignore := Action.Associated_Command.Execute; Self.Kernel.Refresh_Context; end if; Unset (Value); end On_Action_Clicked; ----------------------------------- -- On_Location_Selection_Changed -- ----------------------------------- procedure On_Location_Selection_Changed (Object : access Glib.Object.GObject_Record'Class) is Self : Location_View_Record'Class renames Location_View_Record'Class (Object.all); begin Self.Kernel.Refresh_Context; end On_Location_Selection_Changed; ------------------------- -- On_Location_Clicked -- ------------------------- procedure On_Location_Clicked (Self : access Location_View_Record'Class; Path : Gtk_Tree_Path; Iter : Gtk_Tree_Iter) is pragma Unreferenced (Path); begin declare Mark : constant Editor_Mark'Class := Get_Mark (Gtk.Tree_Model."-" (Self.View.Get_Model), Iter, -Node_Mark_Column); Message : constant Message_Access := Get_Message (Self.View.Get_Model, Iter, -Message_Column); File : constant Virtual_File := Get_File (Gtk.Tree_Model."-" (Self.View.Get_Model), Iter, -File_Column); begin -- Notify about change of selected message if Message /= null then Message_Selected_Hook.Run (Self.Kernel, Message); end if; if Mark /= Nil_Editor_Mark and then File /= No_File and then File.Is_Regular_File then declare Location : constant Editor_Location'Class := Mark.Location (True); begin Location.Buffer.Current_View.Cursor_Goto (Location, Self.View.Get_Selection.Count_Selected_Rows < 2); end; -- ??? The following causes a simple-click on a file line to -- open the editor. This is not what we want, we want to do this -- on a double click only. -- elsif File /= No_File then -- GPS.Editors.GtkAda.Get_MDI_Child -- (Self.Kernel.Get_Buffer_Factory.Get -- (File).Current_View).Raise_Child; end if; end; end On_Location_Clicked; --------------------------------- -- Get_Or_Create_Location_View -- --------------------------------- function Get_Or_Create_Location_View (Kernel : access Kernel_Handle_Record'Class) return Location_View_Access is begin return Location_View_Access (Location_Views.Get_Or_Create_View (Kernel)); end Get_Or_Create_Location_View; ------------- -- Execute -- ------------- overriding procedure Execute (Self : On_Pref_Changed; Kernel : not null access Kernel_Handle_Record'Class; Pref : Preference) is pragma Unreferenced (Self); View : constant Location_View := Location_Views.Retrieve_View (Kernel); begin if View /= null then Set_Font_And_Colors (View.View, Fixed_Font => True, Pref => Pref); if Pref = null or else Pref = Preference (Sort_By_Subcategory) or else Pref = Preference (Sort_Files_Alphabetical) then On_Change_Sort (View); end if; -- Nothing to do for Auto_Jump_To_First -- Nothing to do for Locations_Wrap -- Nothing to do for Auto_Close end if; end Execute; -------------------- -- Create_Toolbar -- -------------------- overriding procedure Create_Toolbar (View : not null access Location_View_Record; Toolbar : not null access Gtk.Toolbar.Gtk_Toolbar_Record'Class) is use Generic_Views; begin View.Build_Filter (Toolbar => Toolbar, Hist_Prefix => "locations", Tooltip => -"The text pattern or regular expression", Placeholder => -"filter", Options => Has_Regexp or Has_Negate or Has_Whole_Word or Has_Fuzzy); end Create_Toolbar; ----------------- -- Create_Menu -- ----------------- overriding procedure Create_Menu (View : not null access Location_View_Record; Menu : not null access Gtk.Menu.Gtk_Menu_Record'Class) is K : constant Kernel_Handle := View.Kernel; begin Append_Menu (Menu, K, Sort_By_Subcategory); -- On_Change_Sort'Access Append_Menu (Menu, K, Sort_Files_Alphabetical); -- On_Change_Sort'Access Append_Menu (Menu, K, Auto_Jump_To_First); -- On_Change_Sort'Access Append_Menu (Menu, K, Locations_Wrap); Append_Menu (Menu, K, Auto_Close); Append_Menu (Menu, K, Locations_Save_In_Desktop); Append_Menu (Menu, K, Preserve_Messages); end Create_Menu; ---------------------------- -- Raise_Locations_Window -- ---------------------------- procedure Raise_Locations_Window (Self : not null access Kernel_Handle_Record'Class; Give_Focus : Boolean := True; Create_If_Needed : Boolean := False) is L : constant GPS.Location_View.Location_View_Access := (if Create_If_Needed then GPS.Location_View.Get_Or_Create_Location_View (Self) else null); pragma Unreferenced (L); -- Create Locations view when necessary C : constant MDI_Child := Get_MDI (Self).Find_MDI_Child_By_Name (Locations_View_Name); begin if C /= null then C.Raise_Child (Give_Focus => Give_Focus); end if; end Raise_Locations_Window; --------------------- -- Register_Module -- --------------------- procedure Register_Module (Kernel : access GPS.Kernel.Kernel_Handle_Record'Class) is Manager : constant View_Manager_Access := new View_Manager (Kernel); begin Location_Views.Register_Module (Kernel); Sort_By_Subcategory := Kernel.Get_Preferences.Create_Invisible_Pref ("locations-sort-by-subcategory", False, Label => -"Sort by subcategory", Doc => -( "Sort messages by their subcategory (error vs warning messages for" & " instance). This also impacts the default sort order for files")); Auto_Jump_To_First := Kernel.Get_Preferences.Create_Invisible_Pref ("locations-auto-jump-to-first", True, Label => -"Jump to first location", Doc => -("Jump to the first location" & " when entries are added to the Location window (error" & " messages, find results, ...)")); Locations_Wrap := Kernel.Get_Preferences.Create_Invisible_Pref ("locations-wrap", True, Label => -"Wrap around on next/previous", Doc => -("Wrap around to the beginning when reaching the end of " & " the category when using the Next Tag and Previous" & "Tag actions.")); Auto_Close := Kernel.Get_Preferences.Create_Invisible_Pref ("locations-auto-close", False, Label => -"Auto close Locations", Doc => -"Close automatically Locations when it becomes empty."); Sort_Files_Alphabetical := Kernel.Get_Preferences.Create_Invisible_Pref ("locations-sort-Files-alphabetical", False, Label => -"Sort files alphabetically", Doc => -("Force sorting of files alphabetically, and ignore the default" & " sort order (which depends on the category)")); Register_Action (Kernel, "locations remove selection", new Remove_Selection_Command, -"Remove the selected category, file or message", Icon_Name => "gps-remove-symbolic", Category => -"Locations"); Register_Action (Kernel, "locations clear", new Clear_Locations_Command, -"Remove all the messages", Icon_Name => "gps-clear-symbolic", Category => -"Locations"); Register_Action (Kernel, "locations export to text file", new Export_Command, -"Export the selected category or file to a text file", Icon_Name => "gps-save-symbolic", Category => -"Locations"); Register_Action (Kernel, "locations toggle sort by subcategory", new Toggle_Sort_By_Subcategory_Command, -("Changes the sort order in the locations window. When active," & " this will group all error messages together, and then" & " warning messages"), Category => -"Locations"); Register_Action (Kernel, "locations expand files in category", new Expand_Category_Command, -"Expand all files in the current category", Icon_Name => "gps-expand-all-symbolic", Category => -"Locations"); Register_Action (Kernel, "locations collapse all files", new Collapse_All_Files_Command, -"Collapse all files in the locations view", Icon_Name => "gps-collapse-all-symbolic", Category => -"Locations"); Get_Messages_Container (Kernel).Register_Listener (Listener_Access (Manager), (Editor_Side => False, Editor_Line => False, GPS.Kernel.Messages.Locations => True)); end Register_Module; ----------------------- -- Register_Commands -- ----------------------- procedure Register_Commands (Kernel : access Kernel_Handle_Record'Class) is Locations_Class : constant Class_Type := New_Class (Kernel, "Locations"); begin Register_Command (Kernel, "parse", Minimum_Args => 2, Maximum_Args => Parse_Location_Parameters'Length, Class => Locations_Class, Static_Method => True, Handler => Default_Command_Handler'Access); Register_Command (Kernel, "add", Minimum_Args => Locations_Add_Parameters'Length - 3, Maximum_Args => Locations_Add_Parameters'Length, Class => Locations_Class, Static_Method => True, Handler => Default_Command_Handler'Access); Register_Command (Kernel, "remove_category", Minimum_Args => 1, Maximum_Args => 1, Class => Locations_Class, Static_Method => True, Handler => Default_Command_Handler'Access); Register_Command (Kernel, "list_categories", Class => Locations_Class, Static_Method => True, Handler => Default_Command_Handler'Access); Register_Command (Kernel, "list_locations", Class => Locations_Class, Minimum_Args => 2, Maximum_Args => 2, Static_Method => True, Handler => Default_Command_Handler'Access); Register_Command (Kernel => Kernel, Command => "set_sort_order_hint", Minimum_Args => 2, Maximum_Args => 2, Handler => Default_Command_Handler'Access, Class => Locations_Class, Static_Method => True); Register_Command (Kernel, "dump", Minimum_Args => 1, Maximum_Args => 1, Class => Locations_Class, Static_Method => True, Handler => Default_Command_Handler'Access); end Register_Commands; ----------------------------- -- Default_Command_Handler -- ----------------------------- procedure Default_Command_Handler (Data : in out Callback_Data'Class; Command : String) is begin if Command = "parse" then Name_Parameters (Data, Parse_Location_Parameters); declare Highlight_Category : constant String := Nth_Arg (Data, 10, "Builder results"); Style_Category : constant String := Nth_Arg (Data, 11, "Style errors"); Warning_Category : constant String := Nth_Arg (Data, 12, "Builder warnings"); begin Parse_File_Locations_Unknown_Encoding (Get_Kernel (Data), Highlight => Highlight_Category /= "" or else Style_Category /= "" or else Warning_Category /= "", Text => Nth_Arg (Data, 1), Category => Nth_Arg (Data, 2), Highlight_Category => Highlight_Category, Style_Category => Style_Category, Warning_Category => Warning_Category, File_Location_Regexp => Nth_Arg (Data, 3, ""), File_Index_In_Regexp => Nth_Arg (Data, 4, -1), Line_Index_In_Regexp => Nth_Arg (Data, 5, -1), Col_Index_In_Regexp => Nth_Arg (Data, 6, -1), Msg_Index_In_Regexp => Nth_Arg (Data, 7, -1), Style_Index_In_Regexp => Nth_Arg (Data, 8, -1), Warning_Index_In_Regexp => Nth_Arg (Data, 9, -1)); end; elsif Command = "remove_category" then Name_Parameters (Data, Remove_Category_Parameters); Get_Messages_Container (Get_Kernel (Data)).Remove_Category (Nth_Arg (Data, 1), Locations_Message_Flags); elsif Command = "list_categories" then declare Categories : constant Unbounded_String_Array := Get_Messages_Container (Get_Kernel (Data)).Get_Categories; begin Set_Return_Value_As_List (Data); for J in Categories'Range loop Set_Return_Value (Data, To_String (Categories (J))); end loop; end; elsif Command = "list_locations" then declare Script : constant Scripting_Language := Get_Script (Data); Category : constant Unbounded_String := To_Unbounded_String (String'(Nth_Arg (Data, 1))); File : constant GNATCOLL.VFS.Virtual_File := Create (Nth_Arg (Data, 2), Get_Kernel (Data), Use_Source_Path => True); Messages : constant Message_Array := Get_Messages_Container (Get_Kernel (Data)).Get_Messages (Category, File); begin Set_Return_Value_As_List (Data); for J in Messages'Range loop Set_Return_Value (Data, Create_File_Location (Script => Script, File => Create_File (Script, File), Line => Messages (J).Get_Line, Column => Messages (J).Get_Column)); Set_Return_Value (Data, To_String (Messages (J).Get_Text)); end loop; end; elsif Command = "add" then Name_Parameters (Data, Locations_Add_Parameters); declare File : constant Virtual_File := Get_Data (Nth_Arg (Data, 2, Get_File_Class (Get_Kernel (Data)))); Ignore : Message_Access; pragma Unreferenced (Ignore); begin if File.Is_Absolute_Path then Ignore := GPS.Kernel.Messages.Tools_Output.Add_Tool_Message (Get_Messages_Container (Get_Kernel (Data)), Glib.Convert.Escape_Text (Nth_Arg (Data, 1)), File, Nth_Arg (Data, 3), Visible_Column_Type (Nth_Arg (Data, 4, Default => 1)), Nth_Arg (Data, 5), 0, Get_Style_Manager (Get_Kernel (Data)).Get (Nth_Arg (Data, 6, ""), Allow_Null => True), Highlight_Length (Nth_Arg (Data, 7, Integer (Highlight_Whole_Line))), Nth_Arg (Data, 8, False), Show_In_Locations => True); end if; end; elsif Command = "set_sort_order_hint" then Name_Parameters (Data, Set_Sorting_Hint_Parameters); Get_Messages_Container (Get_Kernel (Data)).Set_Sort_Order_Hint (Nth_Arg (Data, 1), Sort_Order_Hint'Value (Nth_Arg (Data, 2))); elsif Command = "dump" then Name_Parameters (Data, Locations_Add_Parameters); Get_Messages_Container (Get_Kernel (Data)).Save (Create (Nth_Arg (Data, 1)), (Editor_Side => False, Editor_Line => False, Messages.Locations => True), True); end if; end Default_Command_Handler; -------------------- -- Filter_Changed -- -------------------- overriding procedure Filter_Changed (Self : not null access Location_View_Record; Pattern : in out Search_Pattern_Access) is begin Self.View.Get_Filter_Model.Set_Pattern (Pattern); end Filter_Changed; ---------- -- Free -- ---------- procedure Free (List : in out Gtk_Tree_Path_List.Glist) is Iter : Gtk_Tree_Path_List.Glist; Path : Gtk_Tree_Path; use type Gtk_Tree_Path_List.Glist; begin if List = Gtk_Tree_Path_List.Null_List then return; end if; Iter := Gtk_Tree_Path_List.First (List); while Iter /= Gtk_Tree_Path_List.Null_List loop Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (Iter)); Path_Free (Path); Iter := Gtk_Tree_Path_List.Next (Iter); end loop; Gtk_Tree_Path_List.Free (List); end Free; -------------------- -- On_Row_Deleted -- -------------------- procedure On_Row_Deleted (Self : access Location_View_Record'Class) is begin if Auto_Close.Get_Pref and then Get_Iter_First (Self.View.Get_Model) = Null_Iter then Location_Views.Close (Self.Kernel); end if; end On_Row_Deleted; ------------- -- Execute -- ------------- overriding function Execute (Self : access Clear_Locations_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type is pragma Unreferenced (Self); View : constant Location_View := Location_Views.Retrieve_View (Get_Kernel (Context.Context)); Container : Messages_Container_Access; begin if View /= null then Container := Get_Messages_Container (View.Kernel); Container.Remove_All_Messages ((Editor_Side => False, Editor_Line => False, GPS.Kernel.Messages.Locations => True)); end if; return Commands.Success; end Execute; ------------- -- Execute -- ------------- overriding function Execute (Self : access Remove_Selection_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type is pragma Unreferenced (Self); View : constant Location_View := Location_Views.Retrieve_View (Get_Kernel (Context.Context)); Selection : Gtk.Tree_Selection.Gtk_Tree_Selection; Path : Gtk_Tree_Path; Iter : Gtk_Tree_Iter; Model : Gtk_Tree_Model; Message : Message_Access; List : Gtk_Tree_Path_List.Glist; G_Iter : Gtk_Tree_Path_List.Glist; procedure Get_Path_And_Iter; ----------------------- -- Get_Path_And_Iter -- ----------------------- procedure Get_Path_And_Iter is begin Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (G_Iter)); Iter := Get_Iter (Model, Path); end Get_Path_And_Iter; use type Gtk_Tree_Path_List.Glist; begin if View = null then return Commands.Failure; end if; Selection := View.View.Get_Selection; Selection.Get_Selected_Rows (Model, List); if Model = Null_Gtk_Tree_Model or else List = Gtk_Tree_Path_List.Null_List then Free (List); return Commands.Failure; end if; G_Iter := Gtk_Tree_Path_List.First (List); while G_Iter /= Gtk_Tree_Path_List.Null_List loop Get_Path_And_Iter; if Iter /= Null_Iter then if Path.Get_Depth = 1 then Get_Messages_Container (View.Kernel).Remove_Category (Get_String (Model, Iter, -Category_Column), Locations_Message_Flags); elsif Path.Get_Depth = 2 then if not Is_Parent_Selected (Selection, Path) then Get_Messages_Container (View.Kernel).Remove_File (Get_String (Model, Iter, -Category_Column), Get_File (Model, Iter, -File_Column), Locations_Message_Flags); end if; elsif Path.Get_Depth >= 3 then if not Is_Parent_Selected (Selection, Path, 2) then Message := Get_Message (Model, Iter, -Message_Column); Message.Remove; end if; end if; end if; Path_Free (Path); G_Iter := Gtk_Tree_Path_List.Next (G_Iter); end loop; Gtk_Tree_Path_List.Free (List); -- We just selected a new row, Next (Model, Iter); if Iter /= Null_Iter then Path := Get_Path (Model, Iter); if Path /= Null_Gtk_Tree_Path then View.View.Location_Clicked (Path, Iter); Path_Free (Path); end if; end if; return Commands.Success; end Execute; ------------- -- Execute -- ------------- overriding function Execute (Self : access Export_Command; Context : Commands.Interactive.Interactive_Command_Context) return Commands.Command_Return_Type is pragma Unreferenced (Self); use type Gtk_Tree_Path_List.Glist; View : constant Location_View := Location_Views.Retrieve_View (Get_Kernel (Context.Context)); Path : Gtk_Tree_Path; Model : Gtk_Tree_Model; Export_File : GNATCOLL.VFS.Virtual_File; Container : constant not null GPS.Kernel.Messages_Container_Access := View.Kernel.Get_Messages_Container; List : Gtk_Tree_Path_List.Glist; G_Iter : Gtk_Tree_Path_List.Glist; File : Ada.Text_IO.File_Type; Result : Commands.Command_Return_Type := Commands.Success; Have_Selection : Boolean := False; procedure Export (Path : Gtk_Tree_Path); -- Export Path to file ------------ -- Export -- ------------ procedure Export (Path : Gtk_Tree_Path) is Iter : constant Gtk_Tree_Iter := Get_Iter (Model, Path); begin if Path.Get_Depth = 1 then declare Category : constant Unbounded_String := To_Unbounded_String (Get_String (Model, Iter, -Category_Column)); Files : constant Virtual_File_Array := Container.Get_Files (Category); begin for J in Files'Range loop Export_Messages (File, Container, Category, Files (J)); end loop; end; elsif Path.Get_Depth = 2 then -- Prevent duplicates if not Is_Parent_Selected (View.View.Get_Selection, Path) then declare Category : constant Unbounded_String := To_Unbounded_String (Get_String (Model, Iter, -Category_Column)); F : constant Virtual_File := GNATCOLL.VFS.GtkAda.Get_File (Model, Iter, -File_Column); begin Export_Messages (File, Container, Category, F); end; end if; elsif Path.Get_Depth >= 3 then null; -- Nothing to do end if; end Export; Iter : Gtk_Tree_Iter; begin if View = null then return Commands.Failure; end if; View.View.Get_Selection.Get_Selected_Rows (Model, List); if Model /= Null_Gtk_Tree_Model and then List /= Gtk_Tree_Path_List.Null_List then -- Have selected elements G_Iter := Gtk_Tree_Path_List.First (List); while G_Iter /= Gtk_Tree_Path_List.Null_List loop Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (G_Iter)); if Path.Get_Depth in 1 .. 2 then Have_Selection := True; exit; end if; G_Iter := Gtk_Tree_Path_List.Next (G_Iter); end loop; if Have_Selection then -- Valid elements are selected Export_File := Gtkada.File_Selector.Select_File; if Export_File /= No_File then -- User selected file, exporting Create (File, Out_File, String (Export_File.Full_Name.all)); G_Iter := Gtk_Tree_Path_List.First (List); while G_Iter /= Gtk_Tree_Path_List.Null_List loop Path := Gtk_Tree_Path (Gtk_Tree_Path_List.Get_Data (G_Iter)); Export (Path); G_Iter := Gtk_Tree_Path_List.Next (G_Iter); end loop; Ada.Text_IO.Close (File); end if; else -- Have no valid elements View.Kernel.Messages_Window.Insert (-"The selected rows in the Locations view cannot be exported, " & "please select files and/or categories.", Mode => Error); Result := Commands.Failure; end if; else -- Processing all messages if View.View.Get_Model /= Null_Gtk_Tree_Model then Iter := Get_Iter_First (View.View.Get_Model); end if; if Iter /= Null_Iter then Export_File := Gtkada.File_Selector.Select_File; if Export_File /= No_File then -- User selected file, exporting Create (File, Out_File, String (Export_File.Full_Name.all)); while Iter /= Null_Iter loop Export (Get_Path (Model, Iter)); Next (Model, Iter); end loop; Ada.Text_IO.Close (File); end if; else -- Locations is empty View.Kernel.Messages_Window.Insert (-"The Locations view has no rows to export", Mode => Error); Result := Commands.Failure; end if; end if; Free (List); return Result; end Execute; ------------------------ -- Selection_Function -- ------------------------ function Selection_Function (Selection : not null access Gtk_Tree_Selection_Record'Class; Model : Gtk.Tree_Model.Gtk_Tree_Model; Path : Gtk.Tree_Model.Gtk_Tree_Path; Path_Currently_Selected : Boolean; View : Location_View) return Boolean is pragma Unreferenced (Selection); pragma Unreferenced (Model); pragma Unreferenced (Path); begin if Path_Currently_Selected then return not View.View.Get_Multiple_Action; else return True; end if; end Selection_Function; end GPS.Location_View;
sungyeon/drake
Ada
297
ads
pragma License (Unrestricted); -- extended unit with Ada.Strings.Generic_Bounded.Generic_Functions; with Ada.Strings.Wide_Functions; package Ada.Strings.Bounded_Wide_Strings.Functions is new Generic_Functions (Wide_Functions); pragma Preelaborate (Ada.Strings.Bounded_Wide_Strings.Functions);
zrmyers/VulkanAda
Ada
25,874
ads
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2020 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. -------------------------------------------------------------------------------- with Vulkan.Math.GenIType; with Vulkan.Math.GenUType; -- Uses use Vulkan.Math.GenUType; use Vulkan.Math.GenIType; -------------------------------------------------------------------------------- --< @group Vulkan Math Functions -------------------------------------------------------------------------------- --< @summary --< This package provides GLSL Integer Built-in functions. --< --< @description --< All common functions operate component-wise. -------------------------------------------------------------------------------- package Vulkan.Math.Integers is pragma Preelaborate; pragma Pure; ---------------------------------------------------------------------------- --< @summary --< Adds two unsigned integers modulo 32, returning the result and a carry. --< --< @description --< Adds two unsigned integers modulo 32. If the result is greater than or --< equal 2^32 the carry is 1. Otherwise the carry is 0. --< --< @param x --< One of the addition operands. --< --< @param y --< One of the addition operands. --< --< @param carry --< The carry value from the addition operation. --< --< @return --< The result of x + y modulo 32. ---------------------------------------------------------------------------- function Unsigned_Add_Carry(x, y : in Vkm_Uint; carry : out Vkm_Uint) return Vkm_Uint; ---------------------------------------------------------------------------- --< @summary --< Adds two unsigned integers modulo 32, returning the result and a carry. --< --< @description --< Applies Unsigned_Add_Carry() component-wise on three Vkm_GenUType vectors, --< returning the result of addition as a Vkm_GenUType vector. ---------------------------------------------------------------------------- function Unsigned_Add_Carry is new GUT.Apply_Func_IV_IV_OV_RV(Unsigned_Add_Carry); ---------------------------------------------------------------------------- --< @summary --< Subtracts two unsigned integers modulo 32, returning the result and a borrow. --< --< @description --< Subtracts two unsigned integers modulo 32. If x is less than y, the result --< is 2^32 plus the difference and a borrow of 1; Otherwise, the result is --< the difference and a borrow of 0. --< --< @param x --< The left subtraction operand. --< --< @param y --< The right subtraction operand. --< --< @param borrow --< The borrow value from the subtraction operation. --< --< @return --< The result of x - y modulo 32. ---------------------------------------------------------------------------- function Unsigned_Sub_Borrow(x, y : in Vkm_Uint; borrow : out Vkm_Uint) return Vkm_Uint; ---------------------------------------------------------------------------- --< @summary --< Subtracts two unsigned integers modulo 32, returning the result and a borrow. --< --< @description --< Applies Unsigned_Sub_Borrow() component-wise on three Vkm_GenUType vectors, --< returning the result of addition as a Vkm_GenUType vector. ---------------------------------------------------------------------------- function Unsigned_Sub_Borrow is new GUT.Apply_Func_IV_IV_OV_RV(Unsigned_Sub_Borrow); ---------------------------------------------------------------------------- --< @summary --< This operation performs extended multiplication of two 32-bit unsigned --< integers. --< --< @description --< Multiplies two 32-bit unsigned integers returning two 32-bit unsigned --< integers representing the most significant and least significant 32 bits --< of the result of multiplication. --< --< @param x --< The left subtraction operand. --< --< @param y --< The right subtraction operand. --< --< @param msb --< The 32 most significant bits of the resulting 64-bit unsigned integer. --< --< @param lsb --< The 32 least significant bits of the resulting 64-bit unsigned integer. ---------------------------------------------------------------------------- procedure Unsigned_Mul_Extended(x, y : in Vkm_Uint; msb, lsb : out Vkm_Uint); ---------------------------------------------------------------------------- --< @summary --< This operation performs extended multiplication of two Vkm_GenUType vectors. --< --< @description --< Applies Unsigned_Mul_Extended() component-wise on two input Vkm_GenUType --< vectors and two output Vkm_GenUType vectors. ---------------------------------------------------------------------------- procedure Unsigned_Mul_Extended is new GUT.Apply_Func_IV_IV_OV_OV(Unsigned_Mul_Extended); ---------------------------------------------------------------------------- --< @summary --< This operation performs extended multiplication of two 32-bit signed --< integers. --< --< @description --< Multiplies two 32-bit signed integers returning two 32-bit signed --< integers representing the most significant and least significant 32 bits --< of the result of multiplication. --< --< @param x --< The left subtraction operand. --< --< @param y --< The right subtraction operand. --< --< @param msb --< The 32 most significant bits of the resulting 64-bit signed integer. --< --< @param lsb --< The 32 least significant bits of the resulting 64-bit signed integer. ---------------------------------------------------------------------------- procedure Signed_Mul_Extended(x, y : in Vkm_Int; msb, lsb : out Vkm_Int); ---------------------------------------------------------------------------- --< @summary --< This operation performs extended multiplication of two 32-bit signed --< integers. --< --< @description --< Applies Unsigned_Mul_Extended() component-wise on two input Vkm_GenIType --< vectors and two output Vkm_GenIType vectors. ---------------------------------------------------------------------------- procedure Signed_Mul_Extended is new GIT.Apply_Func_IV_IV_OV_OV(Signed_Mul_Extended); ---------------------------------------------------------------------------- --< @summary --< This operation extracts a bitfield from a 32-bit signed integer. --< --< @description --< Extract bits starting from offset to the number of bits in the bitfield. --< --< Let bN = bits + offset -1. --< Let b0 = offset. --< --< In general, the bitfield is extracted from the value the value as follows: --< --< \ | MSB | Bitfield | LSB | --< bits | 31 ... bN+1 | bN bN-1 ... b1 b0 | b0-1 ... 0 | --< --< The result is formatted as follows, where N = bits -1: --< --< \ | MSB | Bitfield | --< bit | 31 ... N+1 | N N-1 ... 1 0 | --< value | bN'Val ... bN'Val | bN'Val (bN-1)'Val ... b1'Val b0'Val | --< --< @param value --< The value from which the bitfield is extracted. --< --< @param offset --< The offset into the value from which the bitfield is extracted. --< --< @param bits --< The number of bits in the bitfield. --< --< @return --< The extracted value from the bitfield. The most significant bits are set --< to the signed bit of the bitfield. ---------------------------------------------------------------------------- function Bitfield_Extract(value, offset, bits : in Vkm_Int) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation extracts a bitfield vector from a Vkm_GenIType vector. --< --< @description --< Applies Bitfield_Extract() component-wise on an input Vkm_GenIType --< vector and two Vkm_Int scalars, returning a Vkm_GenIType vector of the --< extracted bitfields. ---------------------------------------------------------------------------- function Bitfield_Extract is new GIT.Apply_Func_IV_IS_IS_RV(Bitfield_Extract); ---------------------------------------------------------------------------- --< @summary --< This operation extracts a bitfield from a 32-bit unsigned integer. --< --< @description --< Extract bits starting from offset to the number of bits in the bitfield. --< --< Let bN = bits + offset -1. --< Let b0 = offset. --< --< In general, the bitfield is extracted from the value the value as follows: --< --< \ | MSB | Bitfield | LSB | --< bits | 31 ... bN+1 | bN bN-1 ... b1 b0 | b0-1 ... 0 | --< --< The result is formatted as follows, where N = bits -1: --< --< \ | MSB | Bitfield | --< bit | 31 ... N+1 | N N-1 ... 1 0 | --< value | 0 ... 0 | bN'Val (bN-1)'Val ... b1'Val b0'Val | --< --< @param value --< The value from which the bitfield is extracted. --< --< @param offset --< The offset into the value from which the bitfield is extracted. --< --< @param bits --< The number of bits in the bitfield. --< --< @return --< The extracted value from the bitfield. The most significant bits are set --< to 0. ---------------------------------------------------------------------------- function Bitfield_Extract(value : in Vkm_Uint; offset, bits : in Vkm_Int) return Vkm_Uint; ---------------------------------------------------------------------------- --< @summary --< This operation extracts a bitfield vector from a Vkm_GenUType vector. --< --< @description --< Applies Bitfield_Extract() component-wise on an input Vkm_GenUType --< vector and two Vkm_Int scalars, returning a Vkm_GenUType vector of the --< extracted bitfields. ---------------------------------------------------------------------------- function Bitfield_Extract is new Apply_Func_IVU_ISI_ISI_RVU(Bitfield_Extract); ---------------------------------------------------------------------------- --< @summary --< This operation inserts a bitfield into a 32-bit signed integer. --< --< @description --< Insert bits starting from offset to the number of bits in the bitfield. --< --< Let bN = bits + offset -1. --< Let b0 = offset. --< --< In general, the 'bits' least significant bits of 'insert' are copied into --< base as follows: --< --< \ | MSB | Bitfield | LSB | --< bits | 31 ... bN+1 | bN bN-1 ... b1 b0 | b0-1 ... 0 | --< value | base | insert | base | --< --< @param base --< The value into which the bitfield is inserted. --< --< @param insert --< The value that is inserted into base. --< --< @param offset --< The offset into the base at which the bitfield is inserted. --< --< @param bits --< The number of bits in the bitfield. --< --< @return --< The value of base with the bitfield inserted. ---------------------------------------------------------------------------- function Bitfield_Insert(base, insert, offset, bits : in Vkm_Int) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation inserts a bitfield vector into a Vkm_GenIType vector. --< --< @description --< Applies Bitfield_Insert() component-wise on two input Vkm_GenIType --< vectors and two Vkm_Int scalars, returning a Vkm_GenIType vector of the --< base vector with inserted bitfields. ---------------------------------------------------------------------------- function Bitfield_Insert is new GIT.Apply_Func_IV_IV_IS_IS_RV(Bitfield_Insert); ---------------------------------------------------------------------------- --< @summary --< This operation inserts a bitfield into a 32-bit unsigned integer. --< --< @description --< Insert bits starting from offset to the number of bits in the bitfield. --< --< Let bN = bits + offset -1. --< Let b0 = offset. --< --< In general, the 'bits' least significant bits of 'insert' are copied into --< base as follows: --< --< \ | MSB | Bitfield | LSB | --< bits | 31 ... bN+1 | bN bN-1 ... b1 b0 | b0-1 ... 0 | --< value | base | insert | base | --< --< @param base --< The value into which the bitfield is inserted. --< --< @param insert --< The value that is inserted into base. --< --< @param offset --< The offset into the base at which the bitfield is inserted. --< --< @param bits --< The number of bits in the bitfield. --< --< @return --< The value of base with the bitfield inserted. ---------------------------------------------------------------------------- function Bitfield_Insert(base, insert : in Vkm_Uint; offset, bits : in Vkm_Int) return Vkm_Uint; ---------------------------------------------------------------------------- --< @summary --< This operation inserts a bitfield vector into a Vkm_GenUType vector. --< --< @description --< Applies Bitfield_Insert() component-wise on two input Vkm_GenUType --< vectors and two Vkm_Int scalars, returning a Vkm_GenUType vector of the --< base vector with inserted bitfields. ---------------------------------------------------------------------------- function Bitfield_Insert is new Apply_Func_IVU_IVU_ISI_ISI_RVU(Bitfield_Insert); ---------------------------------------------------------------------------- --< @summary --< This operation reverses the bits of a 32-bit signed integer. --< --< @description --< Reverse the bits of a 32-bit signed integer. --< --< Let vI be the value of bit at bit position I in the input value. --< --< bit | 31 30 ... 1 0 | --< input | v31 v30 ... v1 v0 | --< output | v0 v1 ... v30 v31 | --< --< @param value --< The value which is to be reversed. --< --< @return --< The reversed value. ---------------------------------------------------------------------------- function Bitfield_Reverse(value : in Vkm_Int) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation reverses the binary representation of the components of a --< Vkm_GenIType vector. --< --< @description --< Applies Bitfield_Reverse() component-wise on input Vkm_GenIType, --< returning a Vkm_GenIType vector of the reversed components. ---------------------------------------------------------------------------- function Bitfield_Reverse is new GIT.Apply_Func_IV_RV(Bitfield_Reverse); ---------------------------------------------------------------------------- --< @summary --< This operation reverses the bits of a 32-bit unsigned integer. --< --< @description --< Reverse the bits of a 32-bit unsigned integer. --< --< Let vI be the value of bit at bit position I in the input value. --< --< bit | 31 30 ... 1 0 | --< input | v31 v30 ... v1 v0 | --< output | v0 v1 ... v30 v31 | --< --< @param value --< The value which is to be reversed. --< --< @return --< The reversed value. ---------------------------------------------------------------------------- function Bitfield_Reverse(value : in Vkm_Uint) return Vkm_Uint; ---------------------------------------------------------------------------- --< @summary --< This operation reverses the binary representation of the components of a --< Vkm_GenUType vector. --< --< @description --< Applies Bitfield_Reverse() component-wise on input Vkm_GenUType, --< returning a Vkm_GenUType vector of the reversed components. ---------------------------------------------------------------------------- function Bitfield_Reverse is new GUT.Apply_Func_IV_RV(Bitfield_Reverse); ---------------------------------------------------------------------------- --< @summary --< This operation counts the number of 1-bits in a 32-bit signed value. --< --< @description --< Count the 1's bits of a 32-bit signed integer. --< --< @param value --< The value for which 1's bits are counted. --< --< @return --< The number of 1's in value. ---------------------------------------------------------------------------- function Bit_Count(value : in Vkm_Int) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation counts the number of 1-bits for each component of a --< Vkm_GenIType vector. --< --< @description --< Applies Bit_Count() component-wise on input Vkm_GenIType, --< returning a Vkm_GenIType vector of counts for each component. ---------------------------------------------------------------------------- function Bit_Count is new GIT.Apply_Func_IV_RV(Bit_Count); ---------------------------------------------------------------------------- --< @summary --< This operation counts the number of 1-bits in a 32-bit unsigned value. --< --< @description --< Count the 1's bits of a 32-bit unsigned integer. --< --< @param value --< The value for which 1's bits are counted. --< --< @return --< The number of 1's in value. ---------------------------------------------------------------------------- function Bit_Count(value : in Vkm_Uint) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation counts the number of 1-bits for each component of a --< Vkm_GenUType vector. --< --< @description --< Applies Bit_Count() component-wise on input Vkm_GenUType, --< returning a Vkm_GenIType vector of counts for each component. ---------------------------------------------------------------------------- function Bit_Count is new Apply_Func_IVU_RVI(Bit_Count); ---------------------------------------------------------------------------- --< @summary --< This operation finds the least significant 1-bit in the 32-bit signed --< integer. --< --< @description --< Find the least significant bit in a 32-bit signed integer with a value of 1. --< --< @param value --< The value to find the least significant 1-bit for. --< --< @return --< The bit position of the least significant 1-bit. -1 is returned if there --< are no 1-bits. ---------------------------------------------------------------------------- function Find_Lsb(value : in Vkm_Int) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation finds the least significant 1-bit for each component of a --< Vkm_GenIType vector. --< --< @description --< Applies Find_Lsb() component-wise on input Vkm_GenIType, returning a --< Vkm_GenIType vector of the bit positions for the least significant 1-bit --< in each component. ---------------------------------------------------------------------------- function Find_Lsb is new GIT.Apply_Func_IV_RV(Find_Lsb); ---------------------------------------------------------------------------- --< @summary --< This operation finds the least significant 1-bit in the 32-bit unsigned --< integer. --< --< @description --< Find the least significant bit in a 32-bit unsigned integer with a value of 1. --< --< @param value --< The value to find the least significant 1-bit for. --< --< @return --< The bit position of the least significant 1-bit. -1 is returned if there --< are no 1-bits. ---------------------------------------------------------------------------- function Find_Lsb(value : in Vkm_Uint) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation finds the least significant 1-bit for each component of a --< Vkm_GenUType vector. --< --< @description --< Applies Find_Lsb() component-wise on input Vkm_GenUType, returning a --< Vkm_GenIType vector of the bit positions for the least significant 1-bit --< in each component. ---------------------------------------------------------------------------- function Find_Lsb is new Apply_Func_IVU_RVI(Find_Lsb); ---------------------------------------------------------------------------- --< @summary --< This operation finds the most significant 0-bit in the 32-bit signed --< integer. --< --< @description --< Find the most significant bit in a 32-bit signed integer with a value of 0. --< --< @param value --< The value to find the most significant 0-bit for. --< --< @return --< The bit position of the most significant 0-bit. -1 is returned if there --< are no 0-bits. ---------------------------------------------------------------------------- function Find_Msb(value : in Vkm_Int) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation finds the most significant 0-bit for each component of a --< Vkm_GenIType vector. --< --< @description --< Applies Find_Msb() component-wise on input Vkm_GenIType, returning a --< Vkm_GenIType vector of the bit positions for the most significant 0-bit --< in each component. ---------------------------------------------------------------------------- function Find_Msb is new GIT.Apply_Func_IV_RV(Find_Msb); ---------------------------------------------------------------------------- --< @summary --< This operation finds the most significant 1-bit in the 32-bit unsigned --< integer. --< --< @description --< Find the most significant bit in a 32-bit unsigned integer with a value of 1. --< --< @param value --< The value to find the most significant 1-bit for. --< --< @return --< The bit position of the most significant 1-bit. -1 is returned if there --< are no 1-bits. ---------------------------------------------------------------------------- function Find_Msb(value : in Vkm_Uint) return Vkm_Int; ---------------------------------------------------------------------------- --< @summary --< This operation finds the most significant 1-bit for each component of a --< Vkm_GenUType vector. --< --< @description --< Applies Find_Msb() component-wise on input Vkm_GenUType, returning a --< Vkm_GenIType vector of the bit positions for the most significant 0-bit --< in each component. ---------------------------------------------------------------------------- function Find_Msb is new Apply_Func_IVU_RVI(Find_Msb); end Vulkan.Math.Integers;
ytomino/gnat4drake
Ada
262
adb
package body System.Interrupt_Management is function Reserve (Interrupt : Interrupt_ID) return Boolean is begin return Ada.Interrupts.Is_Reserved ( Ada.Interrupts.Interrupt_Id (Interrupt)); end Reserve; end System.Interrupt_Management;
AdaCore/training_material
Ada
169
ads
package Quads is Number_Of_Sides : constant Natural := 4; type Side_T is range 0 .. 1_000; type Shape_T is array (1 .. Number_Of_Sides) of Side_T; end Quads;
Fabien-Chouteau/spdx_ada
Ada
4,278
adb
with Ada.Text_IO; use Ada.Text_IO; with Ada.Command_Line; with Ada.Exceptions; with SPDX; procedure Main is Fail_Cnt : Natural := 0; Pass_Cnt : Natural := 0; procedure Test (Str : String; Expected_Error : String := ""; Allow_Custom : Boolean := False); procedure Test (Str : String; Expected_Error : String := ""; Allow_Custom : Boolean := False) is begin declare Exp : constant SPDX.Expression := SPDX.Parse (Str, Allow_Custom); Error : constant String := (if SPDX.Valid (Exp) then "" else SPDX.Error (Exp)); begin if Error /= Expected_Error then Put_Line ("FAIL: '" & Str & "'"); if Expected_Error /= "" then Put_Line (" Expected error: '" & Expected_Error & "'"); Put_Line (" but got : '" & Error & "'"); else Put_Line (" Unexpected error: '" & Error & "'"); end if; Fail_Cnt := Fail_Cnt + 1; elsif Expected_Error = "" and then Allow_Custom and then not SPDX.Has_Custom (Exp) then Put_Line ("FAIL: '" & Str & "'"); Put_Line (" Has_Custom returned False"); Fail_Cnt := Fail_Cnt + 1; else Put_Line ("PASS: '" & Str & "'"); Pass_Cnt := Pass_Cnt + 1; end if; end; exception when E : others => Put_Line ("FAIL: '" & Str & "'"); Put_Line (" With exception: '" & Ada.Exceptions.Exception_Information (E) & "'"); Fail_Cnt := Fail_Cnt + 1; end Test; begin -- Test all invalid chars for C in Character loop if C not in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '-' | '.' | '(' | ')' | '+' | ' ' | ASCII.HT then Test ("test" & C, "Invalid character at 5"); end if; end loop; Test ("", "Empty license expression at (0:0)"); Test ("test-3", "Invalid license ID: 'test-3' (1:6)"); Test ("test-3.0", "Invalid license ID: 'test-3.0' (1:8)"); Test ("MIT"); Test ("MIT+"); Test ("MIT OR MIT"); Test ("MIT AND MIT"); Test ("MIT Or MIT", "Operator must be uppercase at (5:6)"); Test ("MIT anD MIT", "Operator must be uppercase at (5:7)"); Test ("MIT WITH AND", "License exception id expected at (10:12)"); Test ("MIT WITH", "License exception id expected at (8:8)"); Test ("MIT WITH plop", "Invalid license exception ID: 'plop' (10:13)"); Test ("MIT WITH GPL-3.0-linking-exception"); Test ("(MIT)"); Test ("(MIT) AND MIT"); Test ("(MIT+) AND (MIT)"); Test ("((MIT) AND (MIT+))"); Test ("((MIT) AND (MIT+ OR MIT AND MIT AND (MIT WITH GPL-3.0-linking-exception AND MIT)))"); Test ("MIT +", "+ operator must follow and indentifier without whitespace (5:5)"); Test ("MIT AND +", "+ operator must follow and indentifier without whitespace (9:9)"); Test ("MIT+AND", "Invalid license ID: 'MIT+AND' (1:7)"); Test ("MIT AND", "Empty license expression at (7:7)"); Test ("MIT OR", "Empty license expression at (6:6)"); Test ("MIT MIT", "Unexpected token at (5:7)"); Test ("(MIT", "Missing closing parentheses ')' at (4:4)"); Test ("MIT)", "Unexpected token at (4:4)"); Test ("(MIT AND (MIT OR MIT)", "Missing closing parentheses ')' at (21:21)"); Test ("MIT AND (MIT OR MIT))", "Unexpected token at (21:21)"); Test ("custom-plop", "Invalid license ID: 'custom-plop' (1:11)", Allow_Custom => False); Test ("custom", "Invalid license ID: 'custom' (1:6)", Allow_Custom => True); Test ("custom-", "Invalid license ID: 'custom-' (1:7)", Allow_Custom => True); Test ("custom-plop", Allow_Custom => True); Test ("custom-plop+", Allow_Custom => True); Test ("custom-test:test", "Invalid character at 12", Allow_Custom => True); Test ("CuStoM-test-1.0.3", Allow_Custom => True); Test ("custom-test AND custom-plop", Allow_Custom => True); Put_Line ("PASS:" & Pass_Cnt'Img); Put_Line ("FAIL:" & Fail_Cnt'Img); if Fail_Cnt /= 0 then Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); end if; end Main;
Fabien-Chouteau/samd51-hal
Ada
20,729
ads
pragma Style_Checks (Off); -- This spec has been automatically generated from ATSAMD51G19A.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package SAM_SVD.PAC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype PAC_WRCTRL_PERID_Field is HAL.UInt16; -- Peripheral access control key type WRCTRL_KEYSelect is (-- No action OFF, -- Clear protection CLR, -- Set protection SET, -- Set and lock protection SETLCK) with Size => 8; for WRCTRL_KEYSelect use (OFF => 0, CLR => 1, SET => 2, SETLCK => 3); -- Write control type PAC_WRCTRL_Register is record -- Peripheral identifier PERID : PAC_WRCTRL_PERID_Field := 16#0#; -- Peripheral access control key KEY : WRCTRL_KEYSelect := SAM_SVD.PAC.OFF; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_WRCTRL_Register use record PERID at 0 range 0 .. 15; KEY at 0 range 16 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Event control type PAC_EVCTRL_Register is record -- Peripheral acess error event output ERREO : Boolean := False; -- unspecified Reserved_1_7 : HAL.UInt7 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for PAC_EVCTRL_Register use record ERREO at 0 range 0 .. 0; Reserved_1_7 at 0 range 1 .. 7; end record; -- Interrupt enable clear type PAC_INTENCLR_Register is record -- Peripheral access error interrupt disable ERR : Boolean := False; -- unspecified Reserved_1_7 : HAL.UInt7 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for PAC_INTENCLR_Register use record ERR at 0 range 0 .. 0; Reserved_1_7 at 0 range 1 .. 7; end record; -- Interrupt enable set type PAC_INTENSET_Register is record -- Peripheral access error interrupt enable ERR : Boolean := False; -- unspecified Reserved_1_7 : HAL.UInt7 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for PAC_INTENSET_Register use record ERR at 0 range 0 .. 0; Reserved_1_7 at 0 range 1 .. 7; end record; -- Bridge interrupt flag status type PAC_INTFLAGAHB_Register is record -- FLASH FLASH : Boolean := False; -- FLASH_ALT FLASH_ALT : Boolean := False; -- SEEPROM SEEPROM : Boolean := False; -- RAMCM4S RAMCM4S : Boolean := False; -- RAMPPPDSU RAMPPPDSU : Boolean := False; -- RAMDMAWR RAMDMAWR : Boolean := False; -- RAMDMACICM RAMDMACICM : Boolean := False; -- HPB0 HPB0 : Boolean := False; -- HPB1 HPB1 : Boolean := False; -- HPB2 HPB2 : Boolean := False; -- HPB3 HPB3 : Boolean := False; -- PUKCC PUKCC : Boolean := False; -- SDHC0 SDHC0 : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- QSPI QSPI : Boolean := False; -- BKUPRAM BKUPRAM : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_INTFLAGAHB_Register use record FLASH at 0 range 0 .. 0; FLASH_ALT at 0 range 1 .. 1; SEEPROM at 0 range 2 .. 2; RAMCM4S at 0 range 3 .. 3; RAMPPPDSU at 0 range 4 .. 4; RAMDMAWR at 0 range 5 .. 5; RAMDMACICM at 0 range 6 .. 6; HPB0 at 0 range 7 .. 7; HPB1 at 0 range 8 .. 8; HPB2 at 0 range 9 .. 9; HPB3 at 0 range 10 .. 10; PUKCC at 0 range 11 .. 11; SDHC0 at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; QSPI at 0 range 14 .. 14; BKUPRAM at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- Peripheral interrupt flag status - Bridge A type PAC_INTFLAGA_Register is record -- PAC PAC : Boolean := False; -- PM PM : Boolean := False; -- MCLK MCLK : Boolean := False; -- RSTC RSTC : Boolean := False; -- OSCCTRL OSCCTRL : Boolean := False; -- OSC32KCTRL OSC32KCTRL : Boolean := False; -- SUPC SUPC : Boolean := False; -- GCLK GCLK : Boolean := False; -- WDT WDT : Boolean := False; -- RTC RTC : Boolean := False; -- EIC EIC : Boolean := False; -- FREQM FREQM : Boolean := False; -- SERCOM0 SERCOM0 : Boolean := False; -- SERCOM1 SERCOM1 : Boolean := False; -- TC0 TC0 : Boolean := False; -- TC1 TC1 : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_INTFLAGA_Register use record PAC at 0 range 0 .. 0; PM at 0 range 1 .. 1; MCLK at 0 range 2 .. 2; RSTC at 0 range 3 .. 3; OSCCTRL at 0 range 4 .. 4; OSC32KCTRL at 0 range 5 .. 5; SUPC at 0 range 6 .. 6; GCLK at 0 range 7 .. 7; WDT at 0 range 8 .. 8; RTC at 0 range 9 .. 9; EIC at 0 range 10 .. 10; FREQM at 0 range 11 .. 11; SERCOM0 at 0 range 12 .. 12; SERCOM1 at 0 range 13 .. 13; TC0 at 0 range 14 .. 14; TC1 at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- Peripheral interrupt flag status - Bridge B type PAC_INTFLAGB_Register is record -- USB USB : Boolean := False; -- DSU DSU : Boolean := False; -- NVMCTRL NVMCTRL : Boolean := False; -- CMCC CMCC : Boolean := False; -- PORT PORT : Boolean := False; -- DMAC DMAC : Boolean := False; -- HMATRIX HMATRIX : Boolean := False; -- EVSYS EVSYS : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- SERCOM2 SERCOM2 : Boolean := False; -- SERCOM3 SERCOM3 : Boolean := False; -- TCC0 TCC0 : Boolean := False; -- TCC1 TCC1 : Boolean := False; -- TC2 TC2 : Boolean := False; -- TC3 TC3 : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- RAMECC RAMECC : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_INTFLAGB_Register use record USB at 0 range 0 .. 0; DSU at 0 range 1 .. 1; NVMCTRL at 0 range 2 .. 2; CMCC at 0 range 3 .. 3; PORT at 0 range 4 .. 4; DMAC at 0 range 5 .. 5; HMATRIX at 0 range 6 .. 6; EVSYS at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; SERCOM2 at 0 range 9 .. 9; SERCOM3 at 0 range 10 .. 10; TCC0 at 0 range 11 .. 11; TCC1 at 0 range 12 .. 12; TC2 at 0 range 13 .. 13; TC3 at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; RAMECC at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- Peripheral interrupt flag status - Bridge C type PAC_INTFLAGC_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- TCC2 TCC2 : Boolean := False; -- unspecified Reserved_4_6 : HAL.UInt3 := 16#0#; -- PDEC PDEC : Boolean := False; -- AC AC : Boolean := False; -- AES AES : Boolean := False; -- TRNG TRNG : Boolean := False; -- ICM ICM : Boolean := False; -- PUKCC PUKCC : Boolean := False; -- QSPI QSPI : Boolean := False; -- CCL CCL : Boolean := False; -- unspecified Reserved_15_31 : HAL.UInt17 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_INTFLAGC_Register use record Reserved_0_2 at 0 range 0 .. 2; TCC2 at 0 range 3 .. 3; Reserved_4_6 at 0 range 4 .. 6; PDEC at 0 range 7 .. 7; AC at 0 range 8 .. 8; AES at 0 range 9 .. 9; TRNG at 0 range 10 .. 10; ICM at 0 range 11 .. 11; PUKCC at 0 range 12 .. 12; QSPI at 0 range 13 .. 13; CCL at 0 range 14 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; -- Peripheral interrupt flag status - Bridge D type PAC_INTFLAGD_Register is record -- SERCOM4 SERCOM4 : Boolean := False; -- SERCOM5 SERCOM5 : Boolean := False; -- unspecified Reserved_2_6 : HAL.UInt5 := 16#0#; -- ADC0 ADC0 : Boolean := False; -- ADC1 ADC1 : Boolean := False; -- DAC DAC : Boolean := False; -- unspecified Reserved_10_10 : HAL.Bit := 16#0#; -- PCC PCC : Boolean := False; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_INTFLAGD_Register use record SERCOM4 at 0 range 0 .. 0; SERCOM5 at 0 range 1 .. 1; Reserved_2_6 at 0 range 2 .. 6; ADC0 at 0 range 7 .. 7; ADC1 at 0 range 8 .. 8; DAC at 0 range 9 .. 9; Reserved_10_10 at 0 range 10 .. 10; PCC at 0 range 11 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; -- Peripheral write protection status - Bridge A type PAC_STATUSA_Register is record -- Read-only. PAC APB Protect Enable PAC : Boolean; -- Read-only. PM APB Protect Enable PM : Boolean; -- Read-only. MCLK APB Protect Enable MCLK : Boolean; -- Read-only. RSTC APB Protect Enable RSTC : Boolean; -- Read-only. OSCCTRL APB Protect Enable OSCCTRL : Boolean; -- Read-only. OSC32KCTRL APB Protect Enable OSC32KCTRL : Boolean; -- Read-only. SUPC APB Protect Enable SUPC : Boolean; -- Read-only. GCLK APB Protect Enable GCLK : Boolean; -- Read-only. WDT APB Protect Enable WDT : Boolean; -- Read-only. RTC APB Protect Enable RTC : Boolean; -- Read-only. EIC APB Protect Enable EIC : Boolean; -- Read-only. FREQM APB Protect Enable FREQM : Boolean; -- Read-only. SERCOM0 APB Protect Enable SERCOM0 : Boolean; -- Read-only. SERCOM1 APB Protect Enable SERCOM1 : Boolean; -- Read-only. TC0 APB Protect Enable TC0 : Boolean; -- Read-only. TC1 APB Protect Enable TC1 : Boolean; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_STATUSA_Register use record PAC at 0 range 0 .. 0; PM at 0 range 1 .. 1; MCLK at 0 range 2 .. 2; RSTC at 0 range 3 .. 3; OSCCTRL at 0 range 4 .. 4; OSC32KCTRL at 0 range 5 .. 5; SUPC at 0 range 6 .. 6; GCLK at 0 range 7 .. 7; WDT at 0 range 8 .. 8; RTC at 0 range 9 .. 9; EIC at 0 range 10 .. 10; FREQM at 0 range 11 .. 11; SERCOM0 at 0 range 12 .. 12; SERCOM1 at 0 range 13 .. 13; TC0 at 0 range 14 .. 14; TC1 at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- Peripheral write protection status - Bridge B type PAC_STATUSB_Register is record -- Read-only. USB APB Protect Enable USB : Boolean; -- Read-only. DSU APB Protect Enable DSU : Boolean; -- Read-only. NVMCTRL APB Protect Enable NVMCTRL : Boolean; -- Read-only. CMCC APB Protect Enable CMCC : Boolean; -- Read-only. PORT APB Protect Enable PORT : Boolean; -- Read-only. DMAC APB Protect Enable DMAC : Boolean; -- Read-only. HMATRIX APB Protect Enable HMATRIX : Boolean; -- Read-only. EVSYS APB Protect Enable EVSYS : Boolean; -- unspecified Reserved_8_8 : HAL.Bit; -- Read-only. SERCOM2 APB Protect Enable SERCOM2 : Boolean; -- Read-only. SERCOM3 APB Protect Enable SERCOM3 : Boolean; -- Read-only. TCC0 APB Protect Enable TCC0 : Boolean; -- Read-only. TCC1 APB Protect Enable TCC1 : Boolean; -- Read-only. TC2 APB Protect Enable TC2 : Boolean; -- Read-only. TC3 APB Protect Enable TC3 : Boolean; -- unspecified Reserved_15_15 : HAL.Bit; -- Read-only. RAMECC APB Protect Enable RAMECC : Boolean; -- unspecified Reserved_17_31 : HAL.UInt15; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_STATUSB_Register use record USB at 0 range 0 .. 0; DSU at 0 range 1 .. 1; NVMCTRL at 0 range 2 .. 2; CMCC at 0 range 3 .. 3; PORT at 0 range 4 .. 4; DMAC at 0 range 5 .. 5; HMATRIX at 0 range 6 .. 6; EVSYS at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; SERCOM2 at 0 range 9 .. 9; SERCOM3 at 0 range 10 .. 10; TCC0 at 0 range 11 .. 11; TCC1 at 0 range 12 .. 12; TC2 at 0 range 13 .. 13; TC3 at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; RAMECC at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- Peripheral write protection status - Bridge C type PAC_STATUSC_Register is record -- unspecified Reserved_0_2 : HAL.UInt3; -- Read-only. TCC2 APB Protect Enable TCC2 : Boolean; -- unspecified Reserved_4_6 : HAL.UInt3; -- Read-only. PDEC APB Protect Enable PDEC : Boolean; -- Read-only. AC APB Protect Enable AC : Boolean; -- Read-only. AES APB Protect Enable AES : Boolean; -- Read-only. TRNG APB Protect Enable TRNG : Boolean; -- Read-only. ICM APB Protect Enable ICM : Boolean; -- Read-only. PUKCC APB Protect Enable PUKCC : Boolean; -- Read-only. QSPI APB Protect Enable QSPI : Boolean; -- Read-only. CCL APB Protect Enable CCL : Boolean; -- unspecified Reserved_15_31 : HAL.UInt17; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_STATUSC_Register use record Reserved_0_2 at 0 range 0 .. 2; TCC2 at 0 range 3 .. 3; Reserved_4_6 at 0 range 4 .. 6; PDEC at 0 range 7 .. 7; AC at 0 range 8 .. 8; AES at 0 range 9 .. 9; TRNG at 0 range 10 .. 10; ICM at 0 range 11 .. 11; PUKCC at 0 range 12 .. 12; QSPI at 0 range 13 .. 13; CCL at 0 range 14 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; -- Peripheral write protection status - Bridge D type PAC_STATUSD_Register is record -- Read-only. SERCOM4 APB Protect Enable SERCOM4 : Boolean; -- Read-only. SERCOM5 APB Protect Enable SERCOM5 : Boolean; -- unspecified Reserved_2_6 : HAL.UInt5; -- Read-only. ADC0 APB Protect Enable ADC0 : Boolean; -- Read-only. ADC1 APB Protect Enable ADC1 : Boolean; -- Read-only. DAC APB Protect Enable DAC : Boolean; -- unspecified Reserved_10_10 : HAL.Bit; -- Read-only. PCC APB Protect Enable PCC : Boolean; -- unspecified Reserved_12_31 : HAL.UInt20; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PAC_STATUSD_Register use record SERCOM4 at 0 range 0 .. 0; SERCOM5 at 0 range 1 .. 1; Reserved_2_6 at 0 range 2 .. 6; ADC0 at 0 range 7 .. 7; ADC1 at 0 range 8 .. 8; DAC at 0 range 9 .. 9; Reserved_10_10 at 0 range 10 .. 10; PCC at 0 range 11 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Peripheral Access Controller type PAC_Peripheral is record -- Write control WRCTRL : aliased PAC_WRCTRL_Register; -- Event control EVCTRL : aliased PAC_EVCTRL_Register; -- Interrupt enable clear INTENCLR : aliased PAC_INTENCLR_Register; -- Interrupt enable set INTENSET : aliased PAC_INTENSET_Register; -- Bridge interrupt flag status INTFLAGAHB : aliased PAC_INTFLAGAHB_Register; -- Peripheral interrupt flag status - Bridge A INTFLAGA : aliased PAC_INTFLAGA_Register; -- Peripheral interrupt flag status - Bridge B INTFLAGB : aliased PAC_INTFLAGB_Register; -- Peripheral interrupt flag status - Bridge C INTFLAGC : aliased PAC_INTFLAGC_Register; -- Peripheral interrupt flag status - Bridge D INTFLAGD : aliased PAC_INTFLAGD_Register; -- Peripheral write protection status - Bridge A STATUSA : aliased PAC_STATUSA_Register; -- Peripheral write protection status - Bridge B STATUSB : aliased PAC_STATUSB_Register; -- Peripheral write protection status - Bridge C STATUSC : aliased PAC_STATUSC_Register; -- Peripheral write protection status - Bridge D STATUSD : aliased PAC_STATUSD_Register; end record with Volatile; for PAC_Peripheral use record WRCTRL at 16#0# range 0 .. 31; EVCTRL at 16#4# range 0 .. 7; INTENCLR at 16#8# range 0 .. 7; INTENSET at 16#9# range 0 .. 7; INTFLAGAHB at 16#10# range 0 .. 31; INTFLAGA at 16#14# range 0 .. 31; INTFLAGB at 16#18# range 0 .. 31; INTFLAGC at 16#1C# range 0 .. 31; INTFLAGD at 16#20# range 0 .. 31; STATUSA at 16#34# range 0 .. 31; STATUSB at 16#38# range 0 .. 31; STATUSC at 16#3C# range 0 .. 31; STATUSD at 16#40# range 0 .. 31; end record; -- Peripheral Access Controller PAC_Periph : aliased PAC_Peripheral with Import, Address => PAC_Base; end SAM_SVD.PAC;
DrenfongWong/tkm-rpc
Ada
47
ads
package Tkmrpc.Clients is end Tkmrpc.Clients;
reznikmm/markdown
Ada
391
ads
-- SPDX-FileCopyrightText: 2020 Max Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- private package Markdown.Inline_Parsers.Code_Spans is procedure Find (Text : Plain_Texts.Plain_Text; Cursor : Position; State : in out Optional_Inline_State); end Markdown.Inline_Parsers.Code_Spans;
dilawar/ahir
Ada
296
ads
-- RUN: %llvmgcc -c %s package Init_Size is type T (B : Boolean := False) is record case B is when False => I : Integer; when True => J : Long_Long_Integer; -- Bigger than I end case; end record; A_T : constant T := (False, 0); end;
tum-ei-rcs/StratoX
Ada
6,969
ads
-- This spec has been automatically generated from STM32F429x.svd pragma Ada_2012; with System; -- STM32F427xx package STM32_SVD is pragma Preelaborate; pragma No_Elaboration_Code_All; -------------------- -- Base addresses -- -------------------- RNG_Base : constant System.Address := System'To_Address (16#50060800#); DCMI_Base : constant System.Address := System'To_Address (16#50050000#); FMC_Base : constant System.Address := System'To_Address (16#A0000000#); DBG_Base : constant System.Address := System'To_Address (16#E0042000#); DMA2_Base : constant System.Address := System'To_Address (16#40026400#); DMA1_Base : constant System.Address := System'To_Address (16#40026000#); RCC_Base : constant System.Address := System'To_Address (16#40023800#); GPIOK_Base : constant System.Address := System'To_Address (16#40022800#); GPIOJ_Base : constant System.Address := System'To_Address (16#40022400#); GPIOI_Base : constant System.Address := System'To_Address (16#40022000#); GPIOH_Base : constant System.Address := System'To_Address (16#40021C00#); GPIOG_Base : constant System.Address := System'To_Address (16#40021800#); GPIOF_Base : constant System.Address := System'To_Address (16#40021400#); GPIOE_Base : constant System.Address := System'To_Address (16#40021000#); GPIOD_Base : constant System.Address := System'To_Address (16#40020C00#); GPIOC_Base : constant System.Address := System'To_Address (16#40020800#); GPIOB_Base : constant System.Address := System'To_Address (16#40020400#); GPIOA_Base : constant System.Address := System'To_Address (16#40020000#); SYSCFG_Base : constant System.Address := System'To_Address (16#40013800#); SPI1_Base : constant System.Address := System'To_Address (16#40013000#); SPI2_Base : constant System.Address := System'To_Address (16#40003800#); SPI3_Base : constant System.Address := System'To_Address (16#40003C00#); I2S2ext_Base : constant System.Address := System'To_Address (16#40003400#); I2S3ext_Base : constant System.Address := System'To_Address (16#40004000#); SPI4_Base : constant System.Address := System'To_Address (16#40013400#); SPI5_Base : constant System.Address := System'To_Address (16#40015000#); SPI6_Base : constant System.Address := System'To_Address (16#40015400#); SDIO_Base : constant System.Address := System'To_Address (16#40012C00#); ADC1_Base : constant System.Address := System'To_Address (16#40012000#); ADC2_Base : constant System.Address := System'To_Address (16#40012100#); ADC3_Base : constant System.Address := System'To_Address (16#40012200#); USART6_Base : constant System.Address := System'To_Address (16#40011400#); USART1_Base : constant System.Address := System'To_Address (16#40011000#); USART2_Base : constant System.Address := System'To_Address (16#40004400#); USART3_Base : constant System.Address := System'To_Address (16#40004800#); UART7_Base : constant System.Address := System'To_Address (16#40007800#); UART8_Base : constant System.Address := System'To_Address (16#40007C00#); DAC_Base : constant System.Address := System'To_Address (16#40007400#); PWR_Base : constant System.Address := System'To_Address (16#40007000#); I2C3_Base : constant System.Address := System'To_Address (16#40005C00#); I2C2_Base : constant System.Address := System'To_Address (16#40005800#); I2C1_Base : constant System.Address := System'To_Address (16#40005400#); IWDG_Base : constant System.Address := System'To_Address (16#40003000#); WWDG_Base : constant System.Address := System'To_Address (16#40002C00#); RTC_Base : constant System.Address := System'To_Address (16#40002800#); UART4_Base : constant System.Address := System'To_Address (16#40004C00#); UART5_Base : constant System.Address := System'To_Address (16#40005000#); C_ADC_Base : constant System.Address := System'To_Address (16#40012300#); TIM1_Base : constant System.Address := System'To_Address (16#40010000#); TIM8_Base : constant System.Address := System'To_Address (16#40010400#); TIM2_Base : constant System.Address := System'To_Address (16#40000000#); TIM3_Base : constant System.Address := System'To_Address (16#40000400#); TIM4_Base : constant System.Address := System'To_Address (16#40000800#); TIM5_Base : constant System.Address := System'To_Address (16#40000C00#); TIM9_Base : constant System.Address := System'To_Address (16#40014000#); TIM12_Base : constant System.Address := System'To_Address (16#40001800#); TIM10_Base : constant System.Address := System'To_Address (16#40014400#); TIM13_Base : constant System.Address := System'To_Address (16#40001C00#); TIM14_Base : constant System.Address := System'To_Address (16#40002000#); TIM11_Base : constant System.Address := System'To_Address (16#40014800#); TIM6_Base : constant System.Address := System'To_Address (16#40001000#); TIM7_Base : constant System.Address := System'To_Address (16#40001400#); Ethernet_MAC_Base : constant System.Address := System'To_Address (16#40028000#); Ethernet_MMC_Base : constant System.Address := System'To_Address (16#40028100#); Ethernet_PTP_Base : constant System.Address := System'To_Address (16#40028700#); Ethernet_DMA_Base : constant System.Address := System'To_Address (16#40029000#); CRC_Base : constant System.Address := System'To_Address (16#40023000#); OTG_FS_GLOBAL_Base : constant System.Address := System'To_Address (16#50000000#); OTG_FS_HOST_Base : constant System.Address := System'To_Address (16#50000400#); OTG_FS_DEVICE_Base : constant System.Address := System'To_Address (16#50000800#); OTG_FS_PWRCLK_Base : constant System.Address := System'To_Address (16#50000E00#); CAN1_Base : constant System.Address := System'To_Address (16#40006400#); CAN2_Base : constant System.Address := System'To_Address (16#40006800#); NVIC_Base : constant System.Address := System'To_Address (16#E000E000#); FLASH_Base : constant System.Address := System'To_Address (16#40023C00#); EXTI_Base : constant System.Address := System'To_Address (16#40013C00#); OTG_HS_GLOBAL_Base : constant System.Address := System'To_Address (16#40040000#); OTG_HS_HOST_Base : constant System.Address := System'To_Address (16#40040400#); OTG_HS_DEVICE_Base : constant System.Address := System'To_Address (16#40040800#); OTG_HS_PWRCLK_Base : constant System.Address := System'To_Address (16#40040E00#); LTDC_Base : constant System.Address := System'To_Address (16#40016800#); SAI_Base : constant System.Address := System'To_Address (16#40015800#); DMA2D_Base : constant System.Address := System'To_Address (16#4002B000#); end STM32_SVD;
reznikmm/matreshka
Ada
4,766
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015-2018, 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 League.Strings; with Servlet.HTTP_Sessions; package Spikedog.HTTP_Session_Managers is pragma Preelaborate; type HTTP_Session_Manager is limited interface; type HTTP_Session_Manager_Access is access all HTTP_Session_Manager'Class; not overriding function Is_Session_Identifier_Valid (Self : HTTP_Session_Manager; Identifier : League.Strings.Universal_String) return Boolean is abstract; -- Returns True when given session identifier is valid (it can be processed -- by session manager, but not necessary points to any active session). not overriding function Get_Session (Self : in out HTTP_Session_Manager; Identifier : League.Strings.Universal_String) return access Servlet.HTTP_Sessions.HTTP_Session'Class is abstract; -- Returns session this specified identifier, or null when session with -- given identifier is not known. When session is found its last access -- time attribute is updated to current time. not overriding function New_Session (Self : in out HTTP_Session_Manager) return access Servlet.HTTP_Sessions.HTTP_Session'Class is abstract; not overriding procedure Change_Session_Id (Self : in out HTTP_Session_Manager; Session : not null access Servlet.HTTP_Sessions.HTTP_Session'Class) is abstract; -- Changes session identifier for given session. end Spikedog.HTTP_Session_Managers;
AdaCore/libadalang
Ada
258
adb
pragma Config (Display_Slocs => True); function Foo (C : Content) return Integer is procedure Helper (C : Content) is C_I : Integer := C.I; pragma Test_Statement; begin null; end Helper; begin Helper (C); return 1; end Foo;
micahwelf/FLTK-Ada
Ada
869
ads
package FLTK.Widgets.Buttons.Light.Check is type Check_Button is new Light_Button with private; type Check_Button_Reference (Data : not null access Check_Button'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Check_Button; end Forge; procedure Draw (This : in out Check_Button); function Handle (This : in out Check_Button; Event : in Event_Kind) return Event_Outcome; private type Check_Button is new Light_Button with null record; overriding procedure Finalize (This : in out Check_Button); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Buttons.Light.Check;
sungyeon/drake
Ada
1,702
adb
package body System.Formatting.Address is pragma Suppress (All_Checks); subtype Word_Unsigned is Long_Long_Integer_Types.Word_Unsigned; subtype Long_Long_Unsigned is Long_Long_Integer_Types.Long_Long_Unsigned; -- implementation procedure Image ( Value : System.Address; Item : out Address_String; Set : Type_Set := Upper_Case) is Use_Longest : constant Boolean := Standard'Address_Size > Standard'Word_Size; Last : Natural; -- ignore Error : Boolean; -- ignore begin if Use_Longest then Image ( Long_Long_Unsigned (Value), Item, Last, Base => 16, Set => Set, Width => Address_String'Length, Error => Error); else Image ( Word_Unsigned (Value), Item, Last, Base => 16, Set => Set, Width => Address_String'Length, Error => Error); end if; end Image; procedure Value ( Item : Address_String; Result : out System.Address; Error : out Boolean) is Use_Longest : constant Boolean := Standard'Address_Size > Standard'Word_Size; Last : Natural; begin if Use_Longest then Value ( Item, Last, Long_Long_Unsigned (Result), Base => 16, Error => Error); else Value ( Item, Last, Word_Unsigned (Result), Base => 16, Error => Error); end if; Error := Error or else Last /= Item'Last; end Value; end System.Formatting.Address;
MinimSecure/unum-sdk
Ada
834
adb
-- Copyright 2018-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/>. package body Pck is procedure Do_Nothing (A : System.Address) is begin null; end Do_Nothing; end Pck;
zhmu/ananas
Ada
350
adb
package body Thin_Pointer2_Pkg is type SB is access constant String; function Inner (S : SB) return Character is begin if S /= null and then S'Length > 0 then return S (S'First); end if; return '*'; end; function F return Character is begin return Inner (SB (S)); end; end Thin_Pointer2_Pkg;
reznikmm/matreshka
Ada
5,850
adb
------------------------------------------------------------------------------ -- -- -- 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$ ------------------------------------------------------------------------------ with AMF.Internals.Factories.DC_Datatypes; with AMF.Internals.Factories.DC_Factories; with AMF.Internals.Factories.DG_Factories; with AMF.Internals.Factories.DI_Factories; with AMF.Internals.Factories.DD_Module_Factory; with AMF.Internals.Tables.DC_Metamodel.Links; with AMF.Internals.Tables.DC_Metamodel.Objects; with AMF.Internals.Tables.DC_Metamodel.Properties; with AMF.Internals.Tables.DD_Element_Table; with AMF.Internals.Tables.DG_Metamodel.Links; with AMF.Internals.Tables.DG_Metamodel.Objects; with AMF.Internals.Tables.DG_Metamodel.Properties; with AMF.Internals.Tables.DI_Metamodel.Links; with AMF.Internals.Tables.DI_Metamodel.Objects; with AMF.Internals.Tables.DI_Metamodel.Properties; with AMF.Internals.Modules.CMOF_Module; pragma Unreferenced (AMF.Internals.Modules.CMOF_Module); pragma Elaborate_All (AMF.Internals.Modules.CMOF_Module); -- CMOF nodule package and all its dependencies must be elaborated before -- elaboration of this package. package body AMF.Internals.Modules.DD_Module is -- Global object of factory for supported metamodel. DD_Module_Factory : aliased AMF.Internals.Factories.DD_Module_Factory.DD_Module_Factory; Module : AMF_Metamodel; begin -- Register module's factory. AMF.Internals.Factories.Register (DD_Module_Factory'Access, Module); -- Initialize metamodels. AMF.Internals.Tables.DC_Metamodel.Objects.Initialize; AMF.Internals.Tables.DG_Metamodel.Objects.Initialize; AMF.Internals.Tables.DI_Metamodel.Objects.Initialize; AMF.Internals.Tables.DC_Metamodel.Properties.Initialize; AMF.Internals.Tables.DG_Metamodel.Properties.Initialize; AMF.Internals.Tables.DI_Metamodel.Properties.Initialize; AMF.Internals.Tables.DC_Metamodel.Links.Initialize; AMF.Internals.Tables.DG_Metamodel.Links.Initialize; AMF.Internals.Tables.DI_Metamodel.Links.Initialize; -- Initialize element table of DD metamodel. AMF.Internals.Tables.DD_Element_Table.Initialize (Module); -- Register factories. AMF.Internals.Factories.Register (AMF.Internals.Factories.DC_Factories.Get_Package, AMF.Internals.Factories.DC_Factories.Constructor'Access); AMF.Internals.Factories.Register (AMF.Internals.Factories.DG_Factories.Get_Package, AMF.Internals.Factories.DG_Factories.Constructor'Access); AMF.Internals.Factories.Register (AMF.Internals.Factories.DI_Factories.Get_Package, AMF.Internals.Factories.DI_Factories.Constructor'Access); end AMF.Internals.Modules.DD_Module;
guillaume-lin/tsc
Ada
24,172
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000 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: Eugene V. Melaragno <[email protected]> 2000 -- Version Control -- $Revision: 1.1 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Interfaces.C; with System.Storage_Elements; with System.Address_To_Access_Conversions; with Ada.Text_IO; -- with Ada.Real_Time; use Ada.Real_Time; -- TODO is there a way to use Real_Time or Ada.Calendar in place of -- gettimeofday? -- Demonstrate pads. procedure ncurses2.demo_pad is type timestruct is record seconds : Integer; microseconds : Integer; end record; type myfunc is access function (w : Window) return Key_Code; function gettime return timestruct; procedure do_h_line (y : Line_Position; x : Column_Position; c : Attributed_Character; to : Column_Position); procedure do_v_line (y : Line_Position; x : Column_Position; c : Attributed_Character; to : Line_Position); function padgetch (win : Window) return Key_Code; function panner_legend (line : Line_Position) return Boolean; procedure panner_legend (line : Line_Position); procedure panner_h_cleanup (from_y : Line_Position; from_x : Column_Position; to_x : Column_Position); procedure panner_v_cleanup (from_y : Line_Position; from_x : Column_Position; to_y : Line_Position); procedure panner (pad : Window; top_xp : Column_Position; top_yp : Line_Position; portyp : Line_Position; portxp : Column_Position; pgetc : myfunc); function gettime return timestruct is retval : timestruct; use Interfaces.C; type timeval is record tv_sec : long; tv_usec : long; end record; pragma Convention (C, timeval); -- TODO function from_timeval is new Ada.Unchecked_Conversion( -- timeval_a, System.Storage_Elements.Integer_Address); -- should Interfaces.C.Pointers be used here? package myP is new System.Address_To_Access_Conversions (timeval); use myP; t : Object_Pointer := new timeval; function gettimeofday (TP : System.Storage_Elements.Integer_Address; TZP : System.Storage_Elements.Integer_Address) return int; pragma Import (C, gettimeofday, "gettimeofday"); tmp : int; begin tmp := gettimeofday (System.Storage_Elements.To_Integer (myP.To_Address (t)), System.Storage_Elements.To_Integer (myP.To_Address (null))); retval.seconds := Integer (t.tv_sec); retval.microseconds := Integer (t.tv_usec); return retval; end gettime; -- in C, The behavior of mvhline, mvvline for negative/zero length is -- unspecified, though we can rely on negative x/y values to stop the -- macro. Except Ada makes Line_Position(-1) = Natural - 1 so forget it. procedure do_h_line (y : Line_Position; x : Column_Position; c : Attributed_Character; to : Column_Position) is begin if to > x then Move_Cursor (Line => y, Column => x); Horizontal_Line (Line_Size => Natural (to - x), Line_Symbol => c); end if; end do_h_line; procedure do_v_line (y : Line_Position; x : Column_Position; c : Attributed_Character; to : Line_Position) is begin if to > y then Move_Cursor (Line => y, Column => x); Vertical_Line (Line_Size => Natural (to - y), Line_Symbol => c); end if; end do_v_line; function padgetch (win : Window) return Key_Code is c : Key_Code; c2 : Character; begin c := Getchar (win); c2 := Code_To_Char (c); case c2 is when '!' => ShellOut (False); return Key_Refresh; when Character'Val (Character'Pos ('r') mod 16#20#) => -- CTRL('r') End_Windows; Refresh; return Key_Refresh; when Character'Val (Character'Pos ('l') mod 16#20#) => -- CTRL('l') return Key_Refresh; when 'U' => return Key_Cursor_Up; when 'D' => return Key_Cursor_Down; when 'R' => return Key_Cursor_Right; when 'L' => return Key_Cursor_Left; when '+' => return Key_Insert_Line; when '-' => return Key_Delete_Line; when '>' => return Key_Insert_Char; when '<' => return Key_Delete_Char; -- when ERR=> /* FALLTHRU */ when 'q' => return (Key_Exit); when others => return (c); end case; end padgetch; show_panner_legend : Boolean := True; function panner_legend (line : Line_Position) return Boolean is legend : constant array (0 .. 3) of String (1 .. 61) := ( "Use arrow keys (or U,D,L,R) to pan, q to quit (?,t,s flags) ", "Use ! to shell-out. Toggle legend:?, timer:t, scroll mark:s.", "Use +,- (or j,k) to grow/shrink the panner vertically. ", "Use <,> (or h,l) to grow/shrink the panner horizontally. "); legendsize : constant := 4; n : Integer := legendsize - Integer (Lines - line); begin if line < Lines and n >= 0 then Move_Cursor (Line => line, Column => 0); if show_panner_legend then Add (Str => legend (n)); end if; Clear_To_End_Of_Line; return show_panner_legend; end if; return False; end panner_legend; procedure panner_legend (line : Line_Position) is tmp : Boolean; begin tmp := panner_legend (line); end panner_legend; procedure panner_h_cleanup (from_y : Line_Position; from_x : Column_Position; to_x : Column_Position) is begin if not panner_legend (from_y) then do_h_line (from_y, from_x, Blank2, to_x); end if; end panner_h_cleanup; procedure panner_v_cleanup (from_y : Line_Position; from_x : Column_Position; to_y : Line_Position) is begin if not panner_legend (from_y) then do_v_line (from_y, from_x, Blank2, to_y); end if; end panner_v_cleanup; procedure panner (pad : Window; top_xp : Column_Position; top_yp : Line_Position; portyp : Line_Position; portxp : Column_Position; pgetc : myfunc) is function f (y : Line_Position) return Line_Position; function f (x : Column_Position) return Column_Position; function greater (y1, y2 : Line_Position) return Integer; function greater (x1, x2 : Column_Position) return Integer; top_x : Column_Position := top_xp; top_y : Line_Position := top_yp; porty : Line_Position := portyp; portx : Column_Position := portxp; -- f[x] returns max[x - 1, 0] function f (y : Line_Position) return Line_Position is begin if y > 0 then return y - 1; else return y; -- 0 end if; end f; function f (x : Column_Position) return Column_Position is begin if x > 0 then return x - 1; else return x; -- 0 end if; end f; function greater (y1, y2 : Line_Position) return Integer is begin if y1 > y2 then return 1; else return 0; end if; end greater; function greater (x1, x2 : Column_Position) return Integer is begin if x1 > x2 then return 1; else return 0; end if; end greater; pymax : Line_Position; basey : Line_Position := 0; pxmax : Column_Position; basex : Column_Position := 0; c : Key_Code; scrollers : Boolean := True; before, after : timestruct; timing : Boolean := True; package floatio is new Ada.Text_IO.Float_IO (Long_Float); begin Get_Size (pad, pymax, pxmax); Allow_Scrolling (Mode => False); -- we don't want stdscr to scroll! c := Key_Refresh; loop -- During shell-out, the user may have resized the window. Adjust -- the port size of the pad to accommodate this. Ncurses -- automatically resizes all of the normal windows to fit on the -- new screen. if top_x > Columns then top_x := Columns; end if; if portx > Columns then portx := Columns; end if; if top_y > Lines then top_y := Lines; end if; if porty > Lines then porty := Lines; end if; case c is when Key_Refresh | Character'Pos ('?') => if c = Key_Refresh then Erase; else -- '?' show_panner_legend := not show_panner_legend; end if; panner_legend (Lines - 4); panner_legend (Lines - 3); panner_legend (Lines - 2); panner_legend (Lines - 1); when Character'Pos ('t') => timing := not timing; if not timing then panner_legend (Lines - 1); end if; when Character'Pos ('s') => scrollers := not scrollers; -- Move the top-left corner of the pad, keeping the -- bottom-right corner fixed. when Character'Pos ('h') => -- increase-columns: move left edge to left if top_x <= 0 then Beep; else panner_v_cleanup (top_y, top_x, porty); top_x := top_x - 1; end if; when Character'Pos ('j') => -- decrease-lines: move top-edge down if top_y >= porty then Beep; else if top_y /= 0 then panner_h_cleanup (top_y - 1, f (top_x), portx); end if; top_y := top_y + 1; end if; when Character'Pos ('k') => -- increase-lines: move top-edge up if top_y <= 0 then Beep; else top_y := top_y - 1; panner_h_cleanup (top_y, top_x, portx); end if; when Character'Pos ('l') => -- decrease-columns: move left-edge to right if top_x >= portx then Beep; else if top_x /= 0 then panner_v_cleanup (f (top_y), top_x - 1, porty); end if; top_x := top_x + 1; end if; -- Move the bottom-right corner of the pad, keeping the -- top-left corner fixed. when Key_Insert_Char => -- increase-columns: move right-edge to right if portx >= pxmax or portx >= Columns then Beep; else panner_v_cleanup (f (top_y), portx - 1, porty); portx := portx + 1; -- C had ++portx instead of portx++, weird. end if; when Key_Insert_Line => -- increase-lines: move bottom-edge down if porty >= pymax or porty >= Lines then Beep; else panner_h_cleanup (porty - 1, f (top_x), portx); porty := porty + 1; end if; when Key_Delete_Char => -- decrease-columns: move bottom edge up if portx <= top_x then Beep; else portx := portx - 1; panner_v_cleanup (f (top_y), portx, porty); end if; when Key_Delete_Line => -- decrease-lines if porty <= top_y then Beep; else porty := porty - 1; panner_h_cleanup (porty, f (top_x), portx); end if; when Key_Cursor_Left => -- pan leftwards if basex > 0 then basex := basex - 1; else Beep; end if; when Key_Cursor_Right => -- pan rightwards -- if (basex + portx - (pymax > porty) < pxmax) if (basex + portx - Column_Position (greater (pymax, porty)) < pxmax) then -- if basex + portx < pxmax or -- (pymax > porty and basex + portx - 1 < pxmax) then basex := basex + 1; else Beep; end if; when Key_Cursor_Up => -- pan upwards if basey > 0 then basey := basey - 1; else Beep; end if; when Key_Cursor_Down => -- pan downwards -- same as if (basey + porty - (pxmax > portx) < pymax) if (basey + porty - Line_Position (greater (pxmax, portx)) < pymax) then -- if (basey + porty < pymax) or -- (pxmax > portx and basey + porty - 1 < pymax) then basey := basey + 1; else Beep; end if; when Character'Pos ('H') | Key_Home | Key_Find => basey := 0; when Character'Pos ('E') | Key_End | Key_Select => basey := pymax - porty; if basey < 0 then -- basey := max(basey, 0); basey := 0; end if; when others => Beep; end case; -- more writing off the screen. -- Interestingly, the exception is not handled if -- we put a block around this. -- delcare --begin if top_y /= 0 and top_x /= 0 then Add (Line => top_y - 1, Column => top_x - 1, Ch => ACS_Map (ACS_Upper_Left_Corner)); end if; if top_x /= 0 then do_v_line (top_y, top_x - 1, ACS_Map (ACS_Vertical_Line), porty); end if; if top_y /= 0 then do_h_line (top_y - 1, top_x, ACS_Map (ACS_Horizontal_Line), portx); end if; -- exception when Curses_Exception => null; end; -- in C was ... pxmax > portx - 1 if scrollers and pxmax >= portx then declare length : Column_Position := portx - top_x - 1; lowend, highend : Column_Position; begin -- Instead of using floats, I'll use integers only. lowend := top_x + (basex * length) / pxmax; highend := top_x + ((basex + length) * length) / pxmax; do_h_line (porty - 1, top_x, ACS_Map (ACS_Horizontal_Line), lowend); if highend < portx then Switch_Character_Attribute (Attr => (Reverse_Video => True, others => False), On => True); do_h_line (porty - 1, lowend, Blank2, highend + 1); Switch_Character_Attribute (Attr => (Reverse_Video => True, others => False), On => False); do_h_line (porty - 1, highend + 1, ACS_Map (ACS_Horizontal_Line), portx); end if; end; else do_h_line (porty - 1, top_x, ACS_Map (ACS_Horizontal_Line), portx); end if; if scrollers and pymax >= porty then declare length : Line_Position := porty - top_y - 1; lowend, highend : Line_Position; begin lowend := top_y + (basey * length) / pymax; highend := top_y + ((basey + length) * length) / pymax; do_v_line (top_y, portx - 1, ACS_Map (ACS_Vertical_Line), lowend); if highend < porty then Switch_Character_Attribute (Attr => (Reverse_Video => True, others => False), On => True); do_v_line (lowend, portx - 1, Blank2, highend + 1); Switch_Character_Attribute (Attr => (Reverse_Video => True, others => False), On => False); do_v_line (highend + 1, portx - 1, ACS_Map (ACS_Vertical_Line), porty); end if; end; else do_v_line (top_y, portx - 1, ACS_Map (ACS_Vertical_Line), porty); end if; if top_y /= 0 then Add (Line => top_y - 1, Column => portx - 1, Ch => ACS_Map (ACS_Upper_Right_Corner)); end if; if top_x /= 0 then Add (Line => porty - 1, Column => top_x - 1, Ch => ACS_Map (ACS_Lower_Left_Corner)); end if; declare begin -- Here is another place where it is possible -- to write to the corner of the screen. Add (Line => porty - 1, Column => portx - 1, Ch => ACS_Map (ACS_Lower_Right_Corner)); exception when Curses_Exception => null; end; before := gettime; Refresh_Without_Update; declare -- the C version allows the panel to have a zero height -- wich raise the exception begin Refresh_Without_Update ( pad, basey, basex, top_y, top_x, porty - Line_Position (greater (pxmax, portx)) - 1, portx - Column_Position (greater (pymax, porty)) - 1); exception when Curses_Exception => null; end; Update_Screen; if timing then declare s : String (1 .. 7); elapsed : Long_Float; begin after := gettime; elapsed := (Long_Float (after.seconds - before.seconds) + Long_Float (after.microseconds - before.microseconds) / 1.0e6); Move_Cursor (Line => Lines - 1, Column => Columns - 20); floatio.Put (s, elapsed, Aft => 3, Exp => 0); Add (Str => s); Refresh; end; end if; c := pgetc (pad); exit when c = Key_Exit; end loop; Allow_Scrolling (Mode => True); end panner; Gridsize : constant := 3; Gridcount : Integer := 0; Pad_High : constant Line_Count := 200; Pad_Wide : constant Column_Count := 200; panpad : Window := New_Pad (Pad_High, Pad_Wide); begin if panpad = Null_Window then Cannot ("cannot create requested pad"); return; end if; for i in 0 .. Pad_High - 1 loop for j in 0 .. Pad_Wide - 1 loop if i mod Gridsize = 0 and j mod Gridsize = 0 then if i = 0 or j = 0 then Add (panpad, '+'); else -- depends on ASCII? Add (panpad, Ch => Character'Val (Character'Pos ('A') + Gridcount mod 26)); Gridcount := Gridcount + 1; end if; elsif i mod Gridsize = 0 then Add (panpad, '-'); elsif j mod Gridsize = 0 then Add (panpad, '|'); else declare -- handle the write to the lower right corner error begin Add (panpad, ' '); exception when Curses_Exception => null; end; end if; end loop; end loop; panner_legend (Lines - 4); panner_legend (Lines - 3); panner_legend (Lines - 2); panner_legend (Lines - 1); Set_KeyPad_Mode (panpad, True); -- Make the pad (initially) narrow enough that a trace file won't wrap. -- We'll still be able to widen it during a test, since that's required -- for testing boundaries. panner (panpad, 2, 2, Lines - 5, Columns - 15, padgetch'Access); Delete (panpad); End_Windows; -- Hmm, Erase after End_Windows Erase; end ncurses2.demo_pad;
jscparker/math_packages
Ada
1,082
ads
with mwc_constants; use mwc_constants; generic type Parent_Random_Int is mod <>; package LCG_Rand with Spark_Mode => On is pragma Pure (LCG_Rand); pragma Assert (Parent_Random_Int'Modulus > 2**63-1); pragma Assert (m0 < Parent_Random_Int'Last); pragma Assert (m1 < Parent_Random_Int'Last); subtype Valid_LCG_0_Range is Parent_Random_Int range 1 .. m0 - 1; subtype Valid_LCG_1_Range is Parent_Random_Int range 1 .. m1 - 1; procedure Get_Random_LCG_64_0 (X0 : in out Parent_Random_Int); pragma Inline (Get_Random_LCG_64_0); -- x0 = 0 gives period of 1; needs to be rejected as a seed. procedure Get_Random_LCG_64_1 (X1 : in out Parent_Random_Int); pragma Inline (Get_Random_LCG_64_1); -- x1 = 0 gives period of 1; needs to be rejected as a seed. procedure Get_Random_LCG_64_Combined (S0 : in out Parent_Random_Int; S1 : in out Parent_Random_Int; Random_x : out Parent_Random_Int); -- result -- S1 = 0 and S2 = 0 give reduced periods; need to be rejected as a seeds. end LCG_Rand;
sungyeon/drake
Ada
25,011
adb
with Ada.Exception_Identification.From_Here; with System.Storage_Elements; with System.UTF_Conversions; package body Ada.Strings.UTF_Encoding.Conversions is use Exception_Identification.From_Here; use type System.Storage_Elements.Storage_Offset; use type System.UTF_Conversions.From_Status_Type; use type System.UTF_Conversions.To_Status_Type; use type System.UTF_Conversions.UCS_4; -- binary to Wide_String, Wide_Wide_String function To_UTF_16_Wide_String (Item : System.Address; Length : Natural) return UTF_16_Wide_String; function To_UTF_16_Wide_String (Item : System.Address; Length : Natural) return UTF_16_Wide_String is pragma Assert (Length rem 2 = 0); pragma Assert (Item mod 2 = 0); -- stack may be aligned Item_All : UTF_16_Wide_String (1 .. Length / 2); for Item_All'Address use Item; begin return Item_All; end To_UTF_16_Wide_String; function To_UTF_32_Wide_Wide_String ( Item : System.Address; Length : Natural) return UTF_32_Wide_Wide_String; function To_UTF_32_Wide_Wide_String ( Item : System.Address; Length : Natural) return UTF_32_Wide_Wide_String is pragma Assert (Length rem 4 = 0); pragma Assert (Item mod 4 = 0); -- stack may be aligned Item_All : UTF_32_Wide_Wide_String (1 .. Length / 4); for Item_All'Address use Item; begin return Item_All; end To_UTF_32_Wide_Wide_String; -- binary version subprograms of System.UTF_Conversions procedure To_UTF_8 ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type) renames System.UTF_Conversions.To_UTF_8; procedure From_UTF_8 ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type) renames System.UTF_Conversions.From_UTF_8; procedure To_UTF_16BE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type); procedure To_UTF_16BE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type) is W_Result : Wide_String (1 .. System.UTF_Conversions.UTF_16_Max_Length); W_Last : Natural; begin System.UTF_Conversions.To_UTF_16 (Code, W_Result, W_Last, Status); Last := Result'First - 1; for I in 1 .. W_Last loop declare type U16 is mod 2 ** 16; E : constant U16 := Wide_Character'Pos (W_Result (I)); begin Last := Last + 1; Result (Last) := Character'Val (E / 256); Last := Last + 1; Result (Last) := Character'Val (E rem 256); end; end loop; end To_UTF_16BE; procedure From_UTF_16BE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type); procedure From_UTF_16BE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type) is begin if Data'Length < 2 then Last := Data'Last; Status := System.UTF_Conversions.Truncated; else declare Leading : constant Wide_Character := Wide_Character'Val ( Character'Pos (Data (Data'First)) * 256 + Character'Pos (Data (Data'First + 1))); Length : Natural; begin Last := Data'First + 1; System.UTF_Conversions.UTF_16_Sequence (Leading, Length, Status); if Status = System.UTF_Conversions.Success then if Length = 2 then if Data'Length < 4 then Last := Data'Last; Status := System.UTF_Conversions.Truncated; else declare Trailing : constant Wide_Character := Wide_Character'Val ( Character'Pos (Data (Data'First + 2)) * 256 + Character'Pos (Data (Data'First + 3))); W_Data : constant Wide_String ( 1 .. System.UTF_Conversions.UTF_16_Max_Length) := (Leading, Trailing); W_Last : Natural; begin Last := Data'First + 3; System.UTF_Conversions.From_UTF_16 ( W_Data, W_Last, Result, Status); end; end if; else pragma Assert (Length = 1); Result := Wide_Character'Pos (Leading); end if; end if; end; end if; end From_UTF_16BE; procedure To_UTF_16LE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type); procedure To_UTF_16LE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type) is W_Result : Wide_String (1 .. System.UTF_Conversions.UTF_16_Max_Length); W_Last : Natural; begin System.UTF_Conversions.To_UTF_16 (Code, W_Result, W_Last, Status); Last := Result'First - 1; for I in 1 .. W_Last loop declare type U16 is mod 2 ** 16; E : constant U16 := Wide_Character'Pos (W_Result (I)); begin Last := Last + 1; Result (Last) := Character'Val (E rem 256); Last := Last + 1; Result (Last) := Character'Val (E / 256); end; end loop; end To_UTF_16LE; procedure From_UTF_16LE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type); procedure From_UTF_16LE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type) is begin if Data'Length < 2 then Last := Data'Last; Status := System.UTF_Conversions.Truncated; else declare Leading : constant Wide_Character := Wide_Character'Val ( Character'Pos (Data (Data'First)) + Character'Pos (Data (Data'First + 1)) * 256); Length : Natural; begin Last := Data'First + 1; System.UTF_Conversions.UTF_16_Sequence (Leading, Length, Status); if Status = System.UTF_Conversions.Success then if Length = 2 then if Data'Length < 4 then Last := Data'Last; Status := System.UTF_Conversions.Truncated; else declare Trailing : constant Wide_Character := Wide_Character'Val ( Character'Pos (Data (Data'First + 2)) + Character'Pos (Data (Data'First + 3)) * 256); W_Data : constant Wide_String ( 1 .. System.UTF_Conversions.UTF_16_Max_Length) := (Leading, Trailing); W_Last : Natural; begin Last := Data'First + 3; System.UTF_Conversions.From_UTF_16 ( W_Data, W_Last, Result, Status); end; end if; else pragma Assert (Length = 1); Result := Wide_Character'Pos (Leading); end if; end if; end; end if; end From_UTF_16LE; procedure To_UTF_32BE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type); procedure To_UTF_32BE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type) is begin Last := Result'First; Result (Last) := Character'Val (Code / 16#1000000#); Last := Last + 1; Result (Last) := Character'Val (Code / 16#10000# rem 16#100#); Last := Last + 1; Result (Last) := Character'Val (Code / 16#100# rem 16#100#); Last := Last + 1; Result (Last) := Character'Val (Code rem 16#100#); Status := System.UTF_Conversions.Success; end To_UTF_32BE; procedure From_UTF_32BE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type); procedure From_UTF_32BE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type) is begin if Data'Length < 4 then Last := Data'Last; Status := System.UTF_Conversions.Truncated; else declare type U32 is mod 2 ** 32; -- Wide_Wide_Character'Size = 31(?) Leading : constant U32 := Character'Pos (Data (Data'First)) * 16#1000000# + Character'Pos (Data (Data'First + 1)) * 16#10000# + Character'Pos (Data (Data'First + 2)) * 16#100# + Character'Pos (Data (Data'First + 3)); Length : Natural; begin Last := Data'First + 3; if Leading > U32 (System.UTF_Conversions.UCS_4'Last) then Status := System.UTF_Conversions.Illegal_Sequence; else Result := System.UTF_Conversions.UCS_4 (Leading); System.UTF_Conversions.UTF_32_Sequence ( Wide_Wide_Character'Val (Leading), Length, Status); -- checking surrogate pair end if; end; end if; end From_UTF_32BE; procedure To_UTF_32LE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type); procedure To_UTF_32LE ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type) is begin Last := Result'First; Result (Last) := Character'Val (Code rem 16#100#); Last := Last + 1; Result (Last) := Character'Val (Code / 16#100# rem 16#100#); Last := Last + 1; Result (Last) := Character'Val (Code / 16#10000# rem 16#100#); Last := Last + 1; Result (Last) := Character'Val (Code / 16#1000000#); Status := System.UTF_Conversions.Success; end To_UTF_32LE; procedure From_UTF_32LE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type); procedure From_UTF_32LE ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type) is begin if Data'Length < 4 then Last := Data'Last; Status := System.UTF_Conversions.Truncated; else declare type U32 is mod 2 ** 32; -- Wide_Wide_Character'Size = 31(?) Leading : constant U32 := Character'Pos (Data (Data'First)) + Character'Pos (Data (Data'First + 1)) * 16#100# + Character'Pos (Data (Data'First + 2)) * 16#10000# + Character'Pos (Data (Data'First + 3)) * 16#1000000#; Length : Natural; begin Last := Data'First + 3; if Leading > U32 (System.UTF_Conversions.UCS_4'Last) then Status := System.UTF_Conversions.Illegal_Sequence; else Result := System.UTF_Conversions.UCS_4 (Leading); System.UTF_Conversions.UTF_32_Sequence ( Wide_Wide_Character'Val (Leading), Length, Status); -- checking surrogate pair end if; end; end if; end From_UTF_32LE; type To_UTF_Type is access procedure ( Code : System.UTF_Conversions.UCS_4; Result : out UTF_String; Last : out Natural; Status : out System.UTF_Conversions.To_Status_Type); pragma Favor_Top_Level (To_UTF_Type); To_UTF : constant array (Encoding_Scheme) of not null To_UTF_Type := ( UTF_8 => To_UTF_8'Access, UTF_16BE => To_UTF_16BE'Access, UTF_16LE => To_UTF_16LE'Access, UTF_32BE => To_UTF_32BE'Access, UTF_32LE => To_UTF_32LE'Access); type From_UTF_Type is access procedure ( Data : UTF_String; Last : out Natural; Result : out System.UTF_Conversions.UCS_4; Status : out System.UTF_Conversions.From_Status_Type); pragma Favor_Top_Level (From_UTF_Type); From_UTF : constant array (Encoding_Scheme) of not null From_UTF_Type := ( UTF_8 => From_UTF_8'Access, UTF_16BE => From_UTF_16BE'Access, UTF_16LE => From_UTF_16LE'Access, UTF_32BE => From_UTF_32BE'Access, UTF_32LE => From_UTF_32LE'Access); -- conversions between various encoding schemes procedure Do_Convert ( Item : UTF_String; Input_Scheme : Encoding_Scheme; Output_Scheme : Encoding_Scheme; Output_BOM : Boolean := False; Result : out UTF_String; Last : out Natural); procedure Do_Convert ( Item : UTF_String; Input_Scheme : Encoding_Scheme; Output_Scheme : Encoding_Scheme; Output_BOM : Boolean := False; Result : out UTF_String; Last : out Natural) is In_BOM : constant not null access constant UTF_String := BOM_Table (Input_Scheme); In_BOM_Length : constant Natural := In_BOM'Length; Out_BOM : constant not null access constant UTF_String := BOM_Table (Output_Scheme); Item_Last : Natural := Item'First - 1; begin declare L : constant Natural := Item_Last + In_BOM_Length; begin if L <= Item'Last and then Item (Item_Last + 1 .. L) = In_BOM.all then Item_Last := L; end if; end; Last := Result'First - 1; if Output_BOM then Last := Last + Out_BOM'Length; Result (Result'First .. Last) := Out_BOM.all; end if; while Item_Last < Item'Last loop declare Code : System.UTF_Conversions.UCS_4; From_Status : System.UTF_Conversions.From_Status_Type; To_Status : System.UTF_Conversions.To_Status_Type; begin From_UTF (Input_Scheme) ( Item (Item_Last + 1 .. Item'Last), Item_Last, Code, From_Status); case From_Status is when System.UTF_Conversions.Success | System.UTF_Conversions.Non_Shortest => -- AARM A.4.11(54.a/4), CXA4036 null; when System.UTF_Conversions.Illegal_Sequence | System.UTF_Conversions.Truncated => Raise_Exception (Encoding_Error'Identity); end case; To_UTF (Output_Scheme) ( Code, Result (Last + 1 .. Result'Last), Last, To_Status); if To_Status /= System.UTF_Conversions.Success then Raise_Exception (Encoding_Error'Identity); end if; end; end loop; end Do_Convert; -- implementation function Convert ( Item : UTF_String; Input_Scheme : Encoding_Scheme; Output_Scheme : Encoding_Scheme; Output_BOM : Boolean := False) return UTF_String is Result : UTF_String (1 .. 4 * Item'Length + 4); -- from 8 to 8 : Item'Length + 3 -- from 16 to 8 : 3 * Item'Length / 2 + 3 = 3/2 * Item'Length + 3 -- from 32 to 8 : 6 * Item'Length / 4 + 3 = 2 * Item'Length + 3 -- from 8 to 16 : (Item'Length + 1) * 2 = 2 * Item'Length + 2 -- from 16 to 16 : (Item'Length / 2 + 1) * 2 = Item'Length + 2 -- from 32 to 16 : (2 * Item'Length / 4 + 1) * 2 = Item'Length + 2 -- from 8 to 32 : (Item'Length + 1) * 4 = 4 * Item'Length + 4 (max) -- from 16 to 32 : (Item'Length / 2 + 1) * 4 = 2 * Item'Length + 4 -- from 32 to 32 : (Item'Length / 4 + 1) * 4 = Item'Length + 4 Last : Natural; begin Do_Convert ( Item, Input_Scheme, Output_Scheme, Output_BOM, Result, Last); return Result (1 .. Last); end Convert; function Convert ( Item : UTF_String; Input_Scheme : Encoding_Scheme; Output_BOM : Boolean := False) return UTF_16_Wide_String is -- from 8 to 16 : (Item'Length + 1) * 2 = 2 * Item'Length + 2 (max) -- from 16 to 16 : (Item'Length / 2 + 1) * 2 = Item'Length + 2 -- from 32 to 16 : (2 * Item'Length / 4 + 1) * 2 = Item'Length + 2 Result : aliased UTF_String (1 .. 2 * Item'Length + 2); for Result'Alignment use 16 / Standard'Storage_Unit; Last : Natural; begin Do_Convert ( Item, Input_Scheme, UTF_16_Wide_String_Scheme, Output_BOM, Result, Last); return To_UTF_16_Wide_String (Result'Address, Last); end Convert; function Convert ( Item : UTF_String; Input_Scheme : Encoding_Scheme; Output_BOM : Boolean := False) return UTF_32_Wide_Wide_String is -- from 8 to 32 : (Item'Length + 1) * 4 = 4 * Item'Length + 4 (max) -- from 16 to 32 : (Item'Length / 2 + 1) * 4 = 2 * Item'Length + 4 -- from 32 to 32 : (Item'Length / 4 + 1) * 4 = Item'Length + 4 Result : aliased UTF_String (1 .. 4 * Item'Length + 4); for Result'Alignment use 32 / Standard'Storage_Unit; Last : Natural; begin Do_Convert ( Item, Input_Scheme, UTF_32_Wide_Wide_String_Scheme, Output_BOM, Result, Last); return To_UTF_32_Wide_Wide_String (Result'Address, Last); end Convert; function Convert ( Item : UTF_8_String; Output_BOM : Boolean := False) return UTF_16_Wide_String is Result : aliased UTF_String ( 1 .. (Item'Length * System.UTF_Conversions.Expanding_From_8_To_16 + 1) * 2); for Result'Alignment use 16 / Standard'Storage_Unit; Last : Natural; begin -- it should be specialized version ? Do_Convert ( Item, UTF_8, UTF_16_Wide_String_Scheme, Output_BOM, Result, Last); return To_UTF_16_Wide_String (Result'Address, Last); end Convert; function Convert ( Item : UTF_8_String; Output_BOM : Boolean := False) return UTF_32_Wide_Wide_String is Result : aliased UTF_String ( 1 .. (Item'Length * System.UTF_Conversions.Expanding_From_8_To_32 + 1) * 4); for Result'Alignment use 32 / Standard'Storage_Unit; Last : Natural; begin -- it should be specialized version ? Do_Convert ( Item, UTF_8, UTF_32_Wide_Wide_String_Scheme, Output_BOM, Result, Last); return To_UTF_32_Wide_Wide_String (Result'Address, Last); end Convert; function Convert ( Item : UTF_16_Wide_String; Output_Scheme : Encoding_Scheme; Output_BOM : Boolean := False) return UTF_String is Item_Length : constant Natural := Item'Length; Item_As_UTF : UTF_String (1 .. Item_Length * 2); for Item_As_UTF'Address use Item'Address; -- from 16 to 8 : 3 * Item'Length + 3 -- from 16 to 16 : (Item'Length + 1) * 2 = 2 * Item'Length + 2 -- from 16 to 32 : (Item'Length + 1) * 4 = 4 * Item'Length + 4 (max) Result : UTF_String (1 .. 4 * Item_Length + 4); Last : Natural; begin Do_Convert ( Item_As_UTF, UTF_16_Wide_String_Scheme, Output_Scheme, Output_BOM, Result, Last); return Result (1 .. Last); end Convert; function Convert ( Item : UTF_16_Wide_String; Output_BOM : Boolean := False) return UTF_8_String is Item_Length : constant Natural := Item'Length; Item_As_UTF : UTF_String (1 .. Item_Length * 2); for Item_As_UTF'Address use Item'Address; Result : UTF_String ( 1 .. Item_Length * System.UTF_Conversions.Expanding_From_16_To_8 + 3); Last : Natural; begin -- it should be specialized version ? Do_Convert ( Item_As_UTF, UTF_16_Wide_String_Scheme, UTF_8, Output_BOM, Result, Last); return Result (1 .. Last); end Convert; function Convert ( Item : UTF_16_Wide_String; Output_BOM : Boolean := False) return UTF_32_Wide_Wide_String is Item_Length : constant Natural := Item'Length; Item_As_UTF : UTF_String (1 .. Item_Length * 2); for Item_As_UTF'Address use Item'Address; Result : aliased UTF_String ( 1 .. (Item_Length * System.UTF_Conversions.Expanding_From_16_To_32 + 1) * 4); for Result'Alignment use 32 / Standard'Storage_Unit; Last : Natural; begin -- it should be specialized version ? Do_Convert ( Item_As_UTF, UTF_16_Wide_String_Scheme, UTF_32_Wide_Wide_String_Scheme, Output_BOM, Result, Last); return To_UTF_32_Wide_Wide_String (Result'Address, Last); end Convert; function Convert ( Item : UTF_32_Wide_Wide_String; Output_Scheme : Encoding_Scheme; Output_BOM : Boolean := False) return UTF_String is Item_Length : constant Natural := Item'Length; Item_As_UTF : UTF_String (1 .. Item_Length * 4); for Item_As_UTF'Address use Item'Address; -- from 32 to 8 : 6 * Item'Length + 3 (max rate) -- from 32 to 16 : (2 * Item'Length + 1) * 2 = 4 * Item'Length + 2 -- from 32 to 32 : (Item'Length + 1) * 4 = 4 * Item'Length + 4 (max BOM) Result : UTF_String (1 .. 6 * Item_Length + 4); Last : Natural; begin Do_Convert ( Item_As_UTF, UTF_32_Wide_Wide_String_Scheme, Output_Scheme, Output_BOM, Result, Last); return Result (1 .. Last); end Convert; function Convert ( Item : UTF_32_Wide_Wide_String; Output_BOM : Boolean := False) return UTF_8_String is Item_Length : constant Natural := Item'Length; Item_As_UTF : UTF_String (1 .. Item_Length * 4); for Item_As_UTF'Address use Item'Address; Result : UTF_String ( 1 .. Item_Length * System.UTF_Conversions.Expanding_From_32_To_8 + 3); Last : Natural; begin -- it should be specialized version ? Do_Convert ( Item_As_UTF, UTF_32_Wide_Wide_String_Scheme, UTF_8, Output_BOM, Result, Last); return Result (1 .. Last); end Convert; function Convert ( Item : UTF_32_Wide_Wide_String; Output_BOM : Boolean := False) return UTF_16_Wide_String is Item_Length : constant Natural := Item'Length; Item_As_UTF : UTF_String (1 .. Item_Length * 4); for Item_As_UTF'Address use Item'Address; Result : aliased UTF_String ( 1 .. (Item_Length * System.UTF_Conversions.Expanding_From_32_To_16 + 1) * 2); for Result'Alignment use 16 / Standard'Storage_Unit; Last : Natural; begin -- it should be specialized version ? Do_Convert ( Item_As_UTF, UTF_32_Wide_Wide_String_Scheme, UTF_16_Wide_String_Scheme, Output_BOM, Result, Last); return To_UTF_16_Wide_String (Result'Address, Last); end Convert; end Ada.Strings.UTF_Encoding.Conversions;
AdaCore/gpr
Ada
83
adb
with U; with Ada; with Pkg; procedure Main is begin U.V; Pkg.Foo; end Main;
reznikmm/matreshka
Ada
128,675
adb
------------------------------------------------------------------------------ -- -- -- 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.CMOF; with AMF.Internals.Tables.CMOF_Attributes; with AMF.Internals.Tables.DG_String_Data_00; with AMF.Internals.Tables.DG_String_Data_01; package body AMF.Internals.Tables.DG_Metamodel.Properties is ---------------- -- Initialize -- ---------------- procedure Initialize is begin Initialize_1; Initialize_2; Initialize_3; Initialize_4; Initialize_5; Initialize_6; Initialize_7; Initialize_8; Initialize_9; Initialize_10; Initialize_11; Initialize_12; Initialize_13; Initialize_14; Initialize_15; Initialize_16; Initialize_17; Initialize_18; Initialize_19; Initialize_20; Initialize_21; Initialize_22; Initialize_23; Initialize_24; Initialize_25; Initialize_26; Initialize_27; Initialize_28; Initialize_29; Initialize_30; Initialize_31; Initialize_32; Initialize_33; Initialize_34; Initialize_35; Initialize_36; Initialize_37; Initialize_38; Initialize_39; Initialize_40; Initialize_41; Initialize_42; Initialize_43; Initialize_44; Initialize_45; Initialize_46; Initialize_47; Initialize_48; Initialize_49; Initialize_50; Initialize_51; Initialize_52; Initialize_53; Initialize_54; Initialize_55; Initialize_56; Initialize_57; Initialize_58; Initialize_59; Initialize_60; Initialize_61; Initialize_62; Initialize_63; Initialize_64; Initialize_65; Initialize_66; Initialize_67; Initialize_68; Initialize_69; Initialize_70; Initialize_71; Initialize_72; Initialize_73; Initialize_74; Initialize_75; Initialize_76; Initialize_77; Initialize_78; Initialize_79; Initialize_80; Initialize_81; Initialize_82; Initialize_83; Initialize_84; Initialize_85; Initialize_86; Initialize_87; Initialize_88; Initialize_89; Initialize_90; Initialize_91; Initialize_92; Initialize_93; Initialize_94; Initialize_95; Initialize_96; Initialize_97; Initialize_98; Initialize_99; Initialize_100; Initialize_101; Initialize_102; Initialize_103; Initialize_104; Initialize_105; Initialize_106; Initialize_107; Initialize_108; Initialize_109; Initialize_110; Initialize_111; Initialize_112; Initialize_113; Initialize_114; Initialize_115; Initialize_116; Initialize_117; Initialize_118; Initialize_119; Initialize_120; Initialize_121; Initialize_122; Initialize_123; Initialize_124; Initialize_125; Initialize_126; Initialize_127; Initialize_128; Initialize_129; Initialize_130; Initialize_131; Initialize_132; Initialize_133; Initialize_134; Initialize_135; Initialize_136; Initialize_137; Initialize_138; Initialize_139; Initialize_140; Initialize_141; Initialize_142; Initialize_143; Initialize_144; Initialize_145; Initialize_146; Initialize_147; Initialize_148; Initialize_149; Initialize_150; Initialize_151; Initialize_152; Initialize_153; Initialize_154; Initialize_155; Initialize_156; Initialize_157; Initialize_158; Initialize_159; Initialize_160; Initialize_161; Initialize_162; Initialize_163; Initialize_164; Initialize_165; Initialize_166; Initialize_167; Initialize_168; Initialize_169; Initialize_170; Initialize_171; Initialize_172; Initialize_173; Initialize_174; Initialize_175; Initialize_176; Initialize_177; Initialize_178; Initialize_179; Initialize_180; Initialize_181; Initialize_182; Initialize_183; Initialize_184; Initialize_185; Initialize_186; Initialize_187; Initialize_188; Initialize_189; Initialize_190; Initialize_191; Initialize_192; Initialize_193; Initialize_194; Initialize_195; Initialize_196; Initialize_197; Initialize_198; Initialize_199; Initialize_200; Initialize_201; Initialize_202; Initialize_203; Initialize_204; Initialize_205; Initialize_206; Initialize_207; Initialize_208; Initialize_209; Initialize_210; Initialize_211; Initialize_212; Initialize_213; Initialize_214; Initialize_215; Initialize_216; Initialize_217; Initialize_218; Initialize_219; Initialize_220; Initialize_221; Initialize_222; Initialize_223; Initialize_224; Initialize_225; Initialize_226; Initialize_227; Initialize_228; Initialize_229; Initialize_230; Initialize_231; Initialize_232; Initialize_233; Initialize_234; Initialize_235; Initialize_236; Initialize_237; Initialize_238; Initialize_239; Initialize_240; Initialize_241; Initialize_242; Initialize_243; Initialize_244; Initialize_245; Initialize_246; Initialize_247; Initialize_248; Initialize_249; Initialize_250; Initialize_251; Initialize_252; Initialize_253; Initialize_254; Initialize_255; Initialize_256; Initialize_257; Initialize_258; Initialize_259; Initialize_260; Initialize_261; Initialize_262; Initialize_263; Initialize_264; Initialize_265; Initialize_266; Initialize_267; Initialize_268; Initialize_269; Initialize_270; Initialize_271; Initialize_272; Initialize_273; Initialize_274; Initialize_275; Initialize_276; Initialize_277; Initialize_278; Initialize_279; Initialize_280; Initialize_281; Initialize_282; Initialize_283; Initialize_284; Initialize_285; Initialize_286; Initialize_287; Initialize_288; Initialize_289; Initialize_290; Initialize_291; Initialize_292; Initialize_293; Initialize_294; Initialize_295; Initialize_296; Initialize_297; Initialize_298; Initialize_299; Initialize_300; Initialize_301; Initialize_302; Initialize_303; Initialize_304; Initialize_305; Initialize_306; Initialize_307; Initialize_308; Initialize_309; Initialize_310; Initialize_311; Initialize_312; Initialize_313; Initialize_314; Initialize_315; Initialize_316; Initialize_317; Initialize_318; Initialize_319; Initialize_320; Initialize_321; Initialize_322; end Initialize; ------------------ -- Initialize_1 -- ------------------ procedure Initialize_1 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 1, AMF.Internals.Tables.DG_String_Data_01.MS_010C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 1, (Is_Empty => True)); end Initialize_1; ------------------ -- Initialize_2 -- ------------------ procedure Initialize_2 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 2, AMF.Internals.Tables.DG_String_Data_00.MS_0096'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 2, (Is_Empty => True)); end Initialize_2; ------------------ -- Initialize_3 -- ------------------ procedure Initialize_3 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 3, AMF.Internals.Tables.DG_String_Data_00.MS_0048'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 3, (Is_Empty => True)); end Initialize_3; ------------------ -- Initialize_4 -- ------------------ procedure Initialize_4 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 4, AMF.Internals.Tables.DG_String_Data_00.MS_00E5'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 4, (Is_Empty => True)); end Initialize_4; ------------------ -- Initialize_5 -- ------------------ procedure Initialize_5 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Abstract (Base + 5, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 5, AMF.Internals.Tables.DG_String_Data_00.MS_0027'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 5, (Is_Empty => True)); end Initialize_5; ------------------ -- Initialize_6 -- ------------------ procedure Initialize_6 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Abstract (Base + 6, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 6, AMF.Internals.Tables.DG_String_Data_01.MS_011F'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 6, (Is_Empty => True)); end Initialize_6; ------------------ -- Initialize_7 -- ------------------ procedure Initialize_7 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Abstract (Base + 7, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 7, AMF.Internals.Tables.DG_String_Data_00.MS_00F3'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 7, (Is_Empty => True)); end Initialize_7; ------------------ -- Initialize_8 -- ------------------ procedure Initialize_8 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 8, AMF.Internals.Tables.DG_String_Data_01.MS_0122'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 8, (Is_Empty => True)); end Initialize_8; ------------------ -- Initialize_9 -- ------------------ procedure Initialize_9 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 9, AMF.Internals.Tables.DG_String_Data_00.MS_0046'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 9, (Is_Empty => True)); end Initialize_9; ------------------- -- Initialize_10 -- ------------------- procedure Initialize_10 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 10, AMF.Internals.Tables.DG_String_Data_00.MS_0033'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 10, (Is_Empty => True)); end Initialize_10; ------------------- -- Initialize_11 -- ------------------- procedure Initialize_11 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 11, AMF.Internals.Tables.DG_String_Data_00.MS_008F'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 11, (Is_Empty => True)); end Initialize_11; ------------------- -- Initialize_12 -- ------------------- procedure Initialize_12 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 12, AMF.Internals.Tables.DG_String_Data_00.MS_00CA'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 12, (Is_Empty => True)); end Initialize_12; ------------------- -- Initialize_13 -- ------------------- procedure Initialize_13 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 13, AMF.Internals.Tables.DG_String_Data_00.MS_005F'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 13, (Is_Empty => True)); end Initialize_13; ------------------- -- Initialize_14 -- ------------------- procedure Initialize_14 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 14, AMF.Internals.Tables.DG_String_Data_00.MS_0072'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 14, (Is_Empty => True)); end Initialize_14; ------------------- -- Initialize_15 -- ------------------- procedure Initialize_15 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 15, AMF.Internals.Tables.DG_String_Data_00.MS_00D7'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 15, (Is_Empty => True)); end Initialize_15; ------------------- -- Initialize_16 -- ------------------- procedure Initialize_16 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 16, AMF.Internals.Tables.DG_String_Data_00.MS_00E2'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 16, (Is_Empty => True)); end Initialize_16; ------------------- -- Initialize_17 -- ------------------- procedure Initialize_17 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 17, AMF.Internals.Tables.DG_String_Data_00.MS_007C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 17, (Is_Empty => True)); end Initialize_17; ------------------- -- Initialize_18 -- ------------------- procedure Initialize_18 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 18, AMF.Internals.Tables.DG_String_Data_00.MS_002D'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 18, (Is_Empty => True)); end Initialize_18; ------------------- -- Initialize_19 -- ------------------- procedure Initialize_19 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 19, AMF.Internals.Tables.DG_String_Data_00.MS_0029'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 19, (Is_Empty => True)); end Initialize_19; ------------------- -- Initialize_20 -- ------------------- procedure Initialize_20 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 20, AMF.Internals.Tables.DG_String_Data_00.MS_00DE'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 20, (Is_Empty => True)); end Initialize_20; ------------------- -- Initialize_21 -- ------------------- procedure Initialize_21 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 21, AMF.Internals.Tables.DG_String_Data_00.MS_003B'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 21, (Is_Empty => True)); end Initialize_21; ------------------- -- Initialize_22 -- ------------------- procedure Initialize_22 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Composite (Base + 22, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 22, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 22, AMF.Internals.Tables.DG_String_Data_01.MS_0107'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 22, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 22, (False, AMF.CMOF.Public_Visibility)); end Initialize_22; ------------------- -- Initialize_23 -- ------------------- procedure Initialize_23 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Composite (Base + 23, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 23, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 23, AMF.Internals.Tables.DG_String_Data_00.MS_00BF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 23, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 23, (False, AMF.CMOF.Public_Visibility)); end Initialize_23; ------------------- -- Initialize_24 -- ------------------- procedure Initialize_24 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Composite (Base + 24, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 24, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 24, AMF.Internals.Tables.DG_String_Data_01.MS_0108'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 24, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 24, (False, AMF.CMOF.Public_Visibility)); end Initialize_24; ------------------- -- Initialize_25 -- ------------------- procedure Initialize_25 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Composite (Base + 25, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 25, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 25, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 25, AMF.Internals.Tables.DG_String_Data_00.MS_0056'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 25, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 25, (False, AMF.CMOF.Public_Visibility)); end Initialize_25; ------------------- -- Initialize_26 -- ------------------- procedure Initialize_26 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 26, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 26, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 26, AMF.Internals.Tables.DG_String_Data_00.MS_00A4'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 26, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 26, (False, AMF.CMOF.Public_Visibility)); end Initialize_26; ------------------- -- Initialize_27 -- ------------------- procedure Initialize_27 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Composite (Base + 27, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 27, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 27, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 27, AMF.Internals.Tables.DG_String_Data_01.MS_011D'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 27, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 27, (False, AMF.CMOF.Public_Visibility)); end Initialize_27; ------------------- -- Initialize_28 -- ------------------- procedure Initialize_28 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 28, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 28, AMF.Internals.Tables.DG_String_Data_01.MS_0117'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 28, (False, AMF.CMOF.Public_Visibility)); end Initialize_28; ------------------- -- Initialize_29 -- ------------------- procedure Initialize_29 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 29, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 29, AMF.Internals.Tables.DG_String_Data_01.MS_0114'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 29, (False, AMF.CMOF.Public_Visibility)); end Initialize_29; ------------------- -- Initialize_30 -- ------------------- procedure Initialize_30 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 30, AMF.Internals.Tables.DG_String_Data_00.MS_00BE'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 30, (False, AMF.CMOF.Public_Visibility)); end Initialize_30; ------------------- -- Initialize_31 -- ------------------- procedure Initialize_31 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 31, AMF.Internals.Tables.DG_String_Data_00.MS_00EF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 31, (False, AMF.CMOF.Public_Visibility)); end Initialize_31; ------------------- -- Initialize_32 -- ------------------- procedure Initialize_32 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 32, AMF.Internals.Tables.DG_String_Data_00.MS_0017'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 32, (False, AMF.CMOF.Public_Visibility)); end Initialize_32; ------------------- -- Initialize_33 -- ------------------- procedure Initialize_33 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 33, AMF.Internals.Tables.DG_String_Data_00.MS_00BE'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 33, (False, AMF.CMOF.Public_Visibility)); end Initialize_33; ------------------- -- Initialize_34 -- ------------------- procedure Initialize_34 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 34, AMF.Internals.Tables.DG_String_Data_00.MS_0036'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 34, (False, AMF.CMOF.Public_Visibility)); end Initialize_34; ------------------- -- Initialize_35 -- ------------------- procedure Initialize_35 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 35, AMF.Internals.Tables.DG_String_Data_00.MS_00B3'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 35, (False, AMF.CMOF.Public_Visibility)); end Initialize_35; ------------------- -- Initialize_36 -- ------------------- procedure Initialize_36 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 36, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Unique (Base + 36, False); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 36, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 36, AMF.Internals.Tables.DG_String_Data_00.MS_00A5'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 36, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 36, (False, AMF.CMOF.Public_Visibility)); end Initialize_36; ------------------- -- Initialize_37 -- ------------------- procedure Initialize_37 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 37, (False, 2)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 37, AMF.Internals.Tables.DG_String_Data_00.MS_0066'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 37, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 37, (False, AMF.CMOF.Public_Visibility)); end Initialize_37; ------------------- -- Initialize_38 -- ------------------- procedure Initialize_38 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Composite (Base + 38, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 38, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 38, AMF.Internals.Tables.DG_String_Data_00.MS_003A'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 38, (False, AMF.CMOF.Public_Visibility)); end Initialize_38; ------------------- -- Initialize_39 -- ------------------- procedure Initialize_39 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 39, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 39, AMF.Internals.Tables.DG_String_Data_00.MS_0016'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 39, (False, AMF.CMOF.Public_Visibility)); end Initialize_39; ------------------- -- Initialize_40 -- ------------------- procedure Initialize_40 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 40, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Unique (Base + 40, False); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 40, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 40, AMF.Internals.Tables.DG_String_Data_00.MS_00A5'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 40, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 40, (False, AMF.CMOF.Public_Visibility)); end Initialize_40; ------------------- -- Initialize_41 -- ------------------- procedure Initialize_41 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 41, AMF.Internals.Tables.DG_String_Data_00.MS_008E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 41, (False, AMF.CMOF.Public_Visibility)); end Initialize_41; ------------------- -- Initialize_42 -- ------------------- procedure Initialize_42 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 42, AMF.Internals.Tables.DG_String_Data_00.MS_0081'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 42, (False, AMF.CMOF.Public_Visibility)); end Initialize_42; ------------------- -- Initialize_43 -- ------------------- procedure Initialize_43 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 43, AMF.Internals.Tables.DG_String_Data_00.MS_00F4'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 43, (False, AMF.CMOF.Public_Visibility)); end Initialize_43; ------------------- -- Initialize_44 -- ------------------- procedure Initialize_44 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 44, AMF.Internals.Tables.DG_String_Data_00.MS_0023'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 44, (False, AMF.CMOF.Public_Visibility)); end Initialize_44; ------------------- -- Initialize_45 -- ------------------- procedure Initialize_45 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 45, AMF.Internals.Tables.DG_String_Data_00.MS_007B'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 45, (False, AMF.CMOF.Public_Visibility)); end Initialize_45; ------------------- -- Initialize_46 -- ------------------- procedure Initialize_46 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 46, AMF.Internals.Tables.DG_String_Data_01.MS_0121'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 46, AMF.Internals.Tables.DG_String_Data_00.MS_0006'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 46, (False, AMF.CMOF.Public_Visibility)); end Initialize_46; ------------------- -- Initialize_47 -- ------------------- procedure Initialize_47 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 47, AMF.Internals.Tables.DG_String_Data_00.MS_0037'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 47, AMF.Internals.Tables.DG_String_Data_00.MS_0025'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 47, (False, AMF.CMOF.Public_Visibility)); end Initialize_47; ------------------- -- Initialize_48 -- ------------------- procedure Initialize_48 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 48, AMF.Internals.Tables.DG_String_Data_01.MS_0121'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 48, AMF.Internals.Tables.DG_String_Data_00.MS_00A7'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 48, (False, AMF.CMOF.Public_Visibility)); end Initialize_48; ------------------- -- Initialize_49 -- ------------------- procedure Initialize_49 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 49, AMF.Internals.Tables.DG_String_Data_00.MS_0037'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 49, AMF.Internals.Tables.DG_String_Data_00.MS_0086'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 49, (False, AMF.CMOF.Public_Visibility)); end Initialize_49; ------------------- -- Initialize_50 -- ------------------- procedure Initialize_50 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 50, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 50, AMF.Internals.Tables.DG_String_Data_00.MS_00BD'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 50, (False, AMF.CMOF.Public_Visibility)); end Initialize_50; ------------------- -- Initialize_51 -- ------------------- procedure Initialize_51 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 51, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 51, AMF.Internals.Tables.DG_String_Data_00.MS_00AE'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 51, (False, AMF.CMOF.Public_Visibility)); end Initialize_51; ------------------- -- Initialize_52 -- ------------------- procedure Initialize_52 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 52, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 52, AMF.Internals.Tables.DG_String_Data_01.MS_0120'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 52, (False, AMF.CMOF.Public_Visibility)); end Initialize_52; ------------------- -- Initialize_53 -- ------------------- procedure Initialize_53 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 53, AMF.Internals.Tables.DG_String_Data_00.MS_00B3'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 53, (False, AMF.CMOF.Public_Visibility)); end Initialize_53; ------------------- -- Initialize_54 -- ------------------- procedure Initialize_54 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 54, AMF.Internals.Tables.DG_String_Data_00.MS_0067'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 54, (False, AMF.CMOF.Public_Visibility)); end Initialize_54; ------------------- -- Initialize_55 -- ------------------- procedure Initialize_55 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 55, AMF.Internals.Tables.DG_String_Data_00.MS_0079'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 55, (False, AMF.CMOF.Public_Visibility)); end Initialize_55; ------------------- -- Initialize_56 -- ------------------- procedure Initialize_56 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 56, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Unique (Base + 56, False); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 56, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 56, AMF.Internals.Tables.DG_String_Data_01.MS_010A'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 56, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 56, (False, AMF.CMOF.Public_Visibility)); end Initialize_56; ------------------- -- Initialize_57 -- ------------------- procedure Initialize_57 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 57, AMF.Internals.Tables.DG_String_Data_00.MS_008E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 57, (False, AMF.CMOF.Public_Visibility)); end Initialize_57; ------------------- -- Initialize_58 -- ------------------- procedure Initialize_58 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Composite (Base + 58, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 58, AMF.Internals.Tables.DG_String_Data_00.MS_0014'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 58, (False, AMF.CMOF.Public_Visibility)); end Initialize_58; ------------------- -- Initialize_59 -- ------------------- procedure Initialize_59 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 59, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Unique (Base + 59, False); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 59, (False, 3)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 59, AMF.Internals.Tables.DG_String_Data_00.MS_00FF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 59, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 59, (False, AMF.CMOF.Public_Visibility)); end Initialize_59; ------------------- -- Initialize_60 -- ------------------- procedure Initialize_60 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 60, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Unique (Base + 60, False); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 60, (False, 2)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 60, AMF.Internals.Tables.DG_String_Data_00.MS_00FF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 60, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 60, (False, AMF.CMOF.Public_Visibility)); end Initialize_60; ------------------- -- Initialize_61 -- ------------------- procedure Initialize_61 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 61, AMF.Internals.Tables.DG_String_Data_00.MS_0019'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 61, AMF.Internals.Tables.DG_String_Data_00.MS_000E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 61, (False, AMF.CMOF.Public_Visibility)); end Initialize_61; ------------------- -- Initialize_62 -- ------------------- procedure Initialize_62 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 62, AMF.Internals.Tables.DG_String_Data_00.MS_0019'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 62, AMF.Internals.Tables.DG_String_Data_00.MS_00B1'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 62, (False, AMF.CMOF.Public_Visibility)); end Initialize_62; ------------------- -- Initialize_63 -- ------------------- procedure Initialize_63 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 63, AMF.Internals.Tables.DG_String_Data_00.MS_0019'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 63, AMF.Internals.Tables.DG_String_Data_00.MS_00A8'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 63, (False, AMF.CMOF.Public_Visibility)); end Initialize_63; ------------------- -- Initialize_64 -- ------------------- procedure Initialize_64 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 64, AMF.Internals.Tables.DG_String_Data_00.MS_0019'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 64, AMF.Internals.Tables.DG_String_Data_00.MS_009D'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 64, (False, AMF.CMOF.Public_Visibility)); end Initialize_64; ------------------- -- Initialize_65 -- ------------------- procedure Initialize_65 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 65, AMF.Internals.Tables.DG_String_Data_00.MS_0019'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 65, AMF.Internals.Tables.DG_String_Data_00.MS_00EF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 65, (False, AMF.CMOF.Public_Visibility)); end Initialize_65; ------------------- -- Initialize_66 -- ------------------- procedure Initialize_66 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 66, AMF.Internals.Tables.DG_String_Data_00.MS_008E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 66, (False, AMF.CMOF.Public_Visibility)); end Initialize_66; ------------------- -- Initialize_67 -- ------------------- procedure Initialize_67 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 67, AMF.Internals.Tables.DG_String_Data_01.MS_0121'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 67, AMF.Internals.Tables.DG_String_Data_00.MS_0039'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 67, (False, AMF.CMOF.Public_Visibility)); end Initialize_67; ------------------- -- Initialize_68 -- ------------------- procedure Initialize_68 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 68, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 68, AMF.Internals.Tables.DG_String_Data_01.MS_010D'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 68, (False, AMF.CMOF.Public_Visibility)); end Initialize_68; ------------------- -- Initialize_69 -- ------------------- procedure Initialize_69 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 69, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 69, AMF.Internals.Tables.DG_String_Data_00.MS_0022'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 69, (False, AMF.CMOF.Public_Visibility)); end Initialize_69; ------------------- -- Initialize_70 -- ------------------- procedure Initialize_70 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 70, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 70, AMF.Internals.Tables.DG_String_Data_00.MS_0095'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 70, (False, AMF.CMOF.Public_Visibility)); end Initialize_70; ------------------- -- Initialize_71 -- ------------------- procedure Initialize_71 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 71, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 71, AMF.Internals.Tables.DG_String_Data_00.MS_00A9'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 71, (False, AMF.CMOF.Public_Visibility)); end Initialize_71; ------------------- -- Initialize_72 -- ------------------- procedure Initialize_72 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 72, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 72, AMF.Internals.Tables.DG_String_Data_00.MS_00A1'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 72, (False, AMF.CMOF.Public_Visibility)); end Initialize_72; ------------------- -- Initialize_73 -- ------------------- procedure Initialize_73 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 73, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 73, AMF.Internals.Tables.DG_String_Data_01.MS_0119'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 73, (False, AMF.CMOF.Public_Visibility)); end Initialize_73; ------------------- -- Initialize_74 -- ------------------- procedure Initialize_74 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 74, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 74, AMF.Internals.Tables.DG_String_Data_00.MS_0080'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 74, (False, AMF.CMOF.Public_Visibility)); end Initialize_74; ------------------- -- Initialize_75 -- ------------------- procedure Initialize_75 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 75, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 75, AMF.Internals.Tables.DG_String_Data_00.MS_0044'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 75, (False, AMF.CMOF.Public_Visibility)); end Initialize_75; ------------------- -- Initialize_76 -- ------------------- procedure Initialize_76 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 76, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 76, AMF.Internals.Tables.DG_String_Data_00.MS_00AF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 76, (False, AMF.CMOF.Public_Visibility)); end Initialize_76; ------------------- -- Initialize_77 -- ------------------- procedure Initialize_77 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 77, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 77, AMF.Internals.Tables.DG_String_Data_00.MS_001D'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 77, (False, AMF.CMOF.Public_Visibility)); end Initialize_77; ------------------- -- Initialize_78 -- ------------------- procedure Initialize_78 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 78, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 78, AMF.Internals.Tables.DG_String_Data_00.MS_00A2'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 78, (False, AMF.CMOF.Public_Visibility)); end Initialize_78; ------------------- -- Initialize_79 -- ------------------- procedure Initialize_79 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Ordered (Base + 79, True); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Is_Unique (Base + 79, False); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 79, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 79, AMF.Internals.Tables.DG_String_Data_01.MS_011C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 79, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 79, (False, AMF.CMOF.Public_Visibility)); end Initialize_79; ------------------- -- Initialize_80 -- ------------------- procedure Initialize_80 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 80, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 80, AMF.Internals.Tables.DG_String_Data_00.MS_0034'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 80, (False, AMF.CMOF.Public_Visibility)); end Initialize_80; ------------------- -- Initialize_81 -- ------------------- procedure Initialize_81 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 81, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 81, AMF.Internals.Tables.DG_String_Data_00.MS_006D'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 81, (False, AMF.CMOF.Public_Visibility)); end Initialize_81; ------------------- -- Initialize_82 -- ------------------- procedure Initialize_82 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 82, AMF.Internals.Tables.DG_String_Data_00.MS_00E1'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 82, (False, AMF.CMOF.Public_Visibility)); end Initialize_82; ------------------- -- Initialize_83 -- ------------------- procedure Initialize_83 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 83, AMF.Internals.Tables.DG_String_Data_00.MS_008E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 83, (False, AMF.CMOF.Public_Visibility)); end Initialize_83; ------------------- -- Initialize_84 -- ------------------- procedure Initialize_84 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 84, AMF.Internals.Tables.DG_String_Data_00.MS_00EE'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 84, (False, AMF.CMOF.Public_Visibility)); end Initialize_84; ------------------- -- Initialize_85 -- ------------------- procedure Initialize_85 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 85, AMF.Internals.Tables.DG_String_Data_00.MS_00AD'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 85, (False, AMF.CMOF.Private_Visibility)); end Initialize_85; ------------------- -- Initialize_86 -- ------------------- procedure Initialize_86 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 86, (False, AMF.CMOF.Private_Visibility)); end Initialize_86; ------------------- -- Initialize_87 -- ------------------- procedure Initialize_87 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 87, AMF.Internals.Tables.DG_String_Data_01.MS_010F'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 87, (False, AMF.CMOF.Private_Visibility)); end Initialize_87; ------------------- -- Initialize_88 -- ------------------- procedure Initialize_88 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 88, AMF.Internals.Tables.DG_String_Data_00.MS_001B'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 88, (False, AMF.CMOF.Private_Visibility)); end Initialize_88; ------------------- -- Initialize_89 -- ------------------- procedure Initialize_89 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 89, AMF.Internals.Tables.DG_String_Data_00.MS_002C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 89, (False, AMF.CMOF.Private_Visibility)); end Initialize_89; ------------------- -- Initialize_90 -- ------------------- procedure Initialize_90 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 90, AMF.Internals.Tables.DG_String_Data_00.MS_0069'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 90, (False, AMF.CMOF.Private_Visibility)); end Initialize_90; ------------------- -- Initialize_91 -- ------------------- procedure Initialize_91 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 91, AMF.Internals.Tables.DG_String_Data_00.MS_0042'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 91, (False, AMF.CMOF.Private_Visibility)); end Initialize_91; ------------------- -- Initialize_92 -- ------------------- procedure Initialize_92 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 92, AMF.Internals.Tables.DG_String_Data_01.MS_0113'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 92, (False, AMF.CMOF.Private_Visibility)); end Initialize_92; ------------------- -- Initialize_93 -- ------------------- procedure Initialize_93 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 93, AMF.Internals.Tables.DG_String_Data_00.MS_00EB'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 93, (False, AMF.CMOF.Private_Visibility)); end Initialize_93; ------------------- -- Initialize_94 -- ------------------- procedure Initialize_94 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 94, AMF.Internals.Tables.DG_String_Data_00.MS_0068'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 94, (False, AMF.CMOF.Private_Visibility)); end Initialize_94; ------------------- -- Initialize_95 -- ------------------- procedure Initialize_95 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 95, AMF.Internals.Tables.DG_String_Data_00.MS_003C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 95, (False, AMF.CMOF.Private_Visibility)); end Initialize_95; ------------------- -- Initialize_96 -- ------------------- procedure Initialize_96 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 96, AMF.Internals.Tables.DG_String_Data_00.MS_004E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 96, (False, AMF.CMOF.Private_Visibility)); end Initialize_96; ------------------- -- Initialize_97 -- ------------------- procedure Initialize_97 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 97, AMF.Internals.Tables.DG_String_Data_00.MS_0055'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 97, (False, AMF.CMOF.Private_Visibility)); end Initialize_97; ------------------- -- Initialize_98 -- ------------------- procedure Initialize_98 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 98, AMF.Internals.Tables.DG_String_Data_00.MS_00F8'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Uri (Base + 98, AMF.Internals.Tables.DG_String_Data_00.MS_00F7'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 98, (Is_Empty => True)); end Initialize_98; ------------------- -- Initialize_99 -- ------------------- procedure Initialize_99 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 99, AMF.Internals.Tables.DG_String_Data_00.MS_0007'Access); end Initialize_99; -------------------- -- Initialize_100 -- -------------------- procedure Initialize_100 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 100, AMF.CMOF.Public_Visibility); end Initialize_100; -------------------- -- Initialize_101 -- -------------------- procedure Initialize_101 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 101, AMF.Internals.Tables.DG_String_Data_01.MS_0103'Access); end Initialize_101; -------------------- -- Initialize_102 -- -------------------- procedure Initialize_102 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 102, AMF.Internals.Tables.DG_String_Data_00.MS_0011'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 102, (Is_Empty => True)); end Initialize_102; -------------------- -- Initialize_103 -- -------------------- procedure Initialize_103 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 103, AMF.Internals.Tables.DG_String_Data_00.MS_0043'Access); end Initialize_103; -------------------- -- Initialize_104 -- -------------------- procedure Initialize_104 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 104, (Is_Empty => True)); end Initialize_104; -------------------- -- Initialize_105 -- -------------------- procedure Initialize_105 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 105, AMF.Internals.Tables.DG_String_Data_01.MS_011A'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 105, (Is_Empty => True)); end Initialize_105; -------------------- -- Initialize_106 -- -------------------- procedure Initialize_106 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 106, AMF.Internals.Tables.DG_String_Data_00.MS_002A'Access); end Initialize_106; -------------------- -- Initialize_107 -- -------------------- procedure Initialize_107 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 107, (Is_Empty => True)); end Initialize_107; -------------------- -- Initialize_108 -- -------------------- procedure Initialize_108 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 108, AMF.Internals.Tables.DG_String_Data_00.MS_002B'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 108, (Is_Empty => True)); end Initialize_108; -------------------- -- Initialize_109 -- -------------------- procedure Initialize_109 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 109, AMF.Internals.Tables.DG_String_Data_00.MS_0084'Access); end Initialize_109; -------------------- -- Initialize_110 -- -------------------- procedure Initialize_110 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 110, (Is_Empty => True)); end Initialize_110; -------------------- -- Initialize_111 -- -------------------- procedure Initialize_111 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 111, AMF.Internals.Tables.DG_String_Data_00.MS_00EA'Access); end Initialize_111; -------------------- -- Initialize_112 -- -------------------- procedure Initialize_112 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 112, AMF.Internals.Tables.DG_String_Data_00.MS_003F'Access); end Initialize_112; -------------------- -- Initialize_113 -- -------------------- procedure Initialize_113 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 113, AMF.Internals.Tables.DG_String_Data_00.MS_0065'Access); end Initialize_113; -------------------- -- Initialize_114 -- -------------------- procedure Initialize_114 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 114, AMF.Internals.Tables.DG_String_Data_00.MS_00CB'Access); end Initialize_114; -------------------- -- Initialize_115 -- -------------------- procedure Initialize_115 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 115, AMF.Internals.Tables.DG_String_Data_00.MS_0060'Access); end Initialize_115; -------------------- -- Initialize_116 -- -------------------- procedure Initialize_116 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 116, AMF.Internals.Tables.DG_String_Data_00.MS_004A'Access); end Initialize_116; -------------------- -- Initialize_117 -- -------------------- procedure Initialize_117 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 117, AMF.Internals.Tables.DG_String_Data_00.MS_005A'Access); end Initialize_117; -------------------- -- Initialize_118 -- -------------------- procedure Initialize_118 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 118, AMF.Internals.Tables.DG_String_Data_00.MS_0018'Access); end Initialize_118; -------------------- -- Initialize_119 -- -------------------- procedure Initialize_119 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 119, AMF.Internals.Tables.DG_String_Data_00.MS_0070'Access); end Initialize_119; -------------------- -- Initialize_120 -- -------------------- procedure Initialize_120 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 120, AMF.Internals.Tables.DG_String_Data_00.MS_006C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 120, (Is_Empty => True)); end Initialize_120; -------------------- -- Initialize_121 -- -------------------- procedure Initialize_121 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 121, AMF.Internals.Tables.DG_String_Data_00.MS_0057'Access); end Initialize_121; -------------------- -- Initialize_122 -- -------------------- procedure Initialize_122 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 122, (Is_Empty => True)); end Initialize_122; -------------------- -- Initialize_123 -- -------------------- procedure Initialize_123 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 123, AMF.Internals.Tables.DG_String_Data_00.MS_00FC'Access); end Initialize_123; -------------------- -- Initialize_124 -- -------------------- procedure Initialize_124 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 124, AMF.Internals.Tables.DG_String_Data_01.MS_0102'Access); end Initialize_124; -------------------- -- Initialize_125 -- -------------------- procedure Initialize_125 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 125, AMF.Internals.Tables.DG_String_Data_00.MS_00C3'Access); end Initialize_125; -------------------- -- Initialize_126 -- -------------------- procedure Initialize_126 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 126, AMF.Internals.Tables.DG_String_Data_01.MS_010E'Access); end Initialize_126; -------------------- -- Initialize_127 -- -------------------- procedure Initialize_127 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 127, AMF.Internals.Tables.DG_String_Data_00.MS_0092'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 127, (Is_Empty => True)); end Initialize_127; -------------------- -- Initialize_128 -- -------------------- procedure Initialize_128 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 128, AMF.Internals.Tables.DG_String_Data_00.MS_00C0'Access); end Initialize_128; -------------------- -- Initialize_129 -- -------------------- procedure Initialize_129 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 129, AMF.Internals.Tables.DG_String_Data_00.MS_008D'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 129, (Is_Empty => True)); end Initialize_129; -------------------- -- Initialize_130 -- -------------------- procedure Initialize_130 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 130, AMF.Internals.Tables.DG_String_Data_00.MS_0020'Access); end Initialize_130; -------------------- -- Initialize_131 -- -------------------- procedure Initialize_131 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 131, (Is_Empty => True)); end Initialize_131; -------------------- -- Initialize_132 -- -------------------- procedure Initialize_132 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 132, AMF.Internals.Tables.DG_String_Data_00.MS_00F1'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 132, (Is_Empty => True)); end Initialize_132; -------------------- -- Initialize_133 -- -------------------- procedure Initialize_133 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 133, AMF.Internals.Tables.DG_String_Data_00.MS_002E'Access); end Initialize_133; -------------------- -- Initialize_134 -- -------------------- procedure Initialize_134 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 134, (Is_Empty => True)); end Initialize_134; -------------------- -- Initialize_135 -- -------------------- procedure Initialize_135 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 135, AMF.Internals.Tables.DG_String_Data_00.MS_00EC'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 135, (False, AMF.CMOF.Public_Visibility)); end Initialize_135; -------------------- -- Initialize_136 -- -------------------- procedure Initialize_136 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 136, AMF.Internals.Tables.DG_String_Data_00.MS_00BB'Access); end Initialize_136; -------------------- -- Initialize_137 -- -------------------- procedure Initialize_137 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 137, AMF.Internals.Tables.DG_String_Data_00.MS_00F9'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 137, (False, AMF.CMOF.Public_Visibility)); end Initialize_137; -------------------- -- Initialize_138 -- -------------------- procedure Initialize_138 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 138, AMF.Internals.Tables.DG_String_Data_01.MS_0123'Access); end Initialize_138; -------------------- -- Initialize_139 -- -------------------- procedure Initialize_139 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 139, AMF.Internals.Tables.DG_String_Data_00.MS_0037'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 139, AMF.Internals.Tables.DG_String_Data_00.MS_0000'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 139, (False, AMF.CMOF.Public_Visibility)); end Initialize_139; -------------------- -- Initialize_140 -- -------------------- procedure Initialize_140 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 140, AMF.Internals.Tables.DG_String_Data_00.MS_0051'Access); end Initialize_140; -------------------- -- Initialize_141 -- -------------------- procedure Initialize_141 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 141, AMF.Internals.Tables.DG_String_Data_00.MS_000A'Access); end Initialize_141; -------------------- -- Initialize_142 -- -------------------- procedure Initialize_142 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 142, AMF.Internals.Tables.DG_String_Data_00.MS_001C'Access); end Initialize_142; -------------------- -- Initialize_143 -- -------------------- procedure Initialize_143 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 143, AMF.Internals.Tables.DG_String_Data_00.MS_0082'Access); end Initialize_143; -------------------- -- Initialize_144 -- -------------------- procedure Initialize_144 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 144, AMF.Internals.Tables.DG_String_Data_00.MS_000B'Access); end Initialize_144; -------------------- -- Initialize_145 -- -------------------- procedure Initialize_145 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 145, AMF.Internals.Tables.DG_String_Data_00.MS_0050'Access); end Initialize_145; -------------------- -- Initialize_146 -- -------------------- procedure Initialize_146 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 146, AMF.Internals.Tables.DG_String_Data_00.MS_00E6'Access); end Initialize_146; -------------------- -- Initialize_147 -- -------------------- procedure Initialize_147 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 147, AMF.Internals.Tables.DG_String_Data_00.MS_00A6'Access); end Initialize_147; -------------------- -- Initialize_148 -- -------------------- procedure Initialize_148 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 148, AMF.Internals.Tables.DG_String_Data_01.MS_0115'Access); end Initialize_148; -------------------- -- Initialize_149 -- -------------------- procedure Initialize_149 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 149, AMF.Internals.Tables.DG_String_Data_00.MS_0038'Access); end Initialize_149; -------------------- -- Initialize_150 -- -------------------- procedure Initialize_150 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 150, AMF.Internals.Tables.DG_String_Data_00.MS_007D'Access); end Initialize_150; -------------------- -- Initialize_151 -- -------------------- procedure Initialize_151 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 151, AMF.Internals.Tables.DG_String_Data_00.MS_00E8'Access); end Initialize_151; -------------------- -- Initialize_152 -- -------------------- procedure Initialize_152 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 152, AMF.Internals.Tables.DG_String_Data_01.MS_0109'Access); end Initialize_152; -------------------- -- Initialize_153 -- -------------------- procedure Initialize_153 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 153, AMF.Internals.Tables.DG_String_Data_00.MS_00D2'Access); end Initialize_153; -------------------- -- Initialize_154 -- -------------------- procedure Initialize_154 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 154, AMF.Internals.Tables.DG_String_Data_00.MS_009F'Access); end Initialize_154; -------------------- -- Initialize_155 -- -------------------- procedure Initialize_155 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 155, AMF.Internals.Tables.DG_String_Data_00.MS_00AC'Access); end Initialize_155; -------------------- -- Initialize_156 -- -------------------- procedure Initialize_156 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 156, AMF.Internals.Tables.DG_String_Data_00.MS_0049'Access); end Initialize_156; -------------------- -- Initialize_157 -- -------------------- procedure Initialize_157 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 157, AMF.Internals.Tables.DG_String_Data_00.MS_0074'Access); end Initialize_157; -------------------- -- Initialize_158 -- -------------------- procedure Initialize_158 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 158, AMF.Internals.Tables.DG_String_Data_00.MS_0058'Access); end Initialize_158; -------------------- -- Initialize_159 -- -------------------- procedure Initialize_159 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 159, AMF.Internals.Tables.DG_String_Data_01.MS_0116'Access); end Initialize_159; -------------------- -- Initialize_160 -- -------------------- procedure Initialize_160 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 160, AMF.Internals.Tables.DG_String_Data_00.MS_00DC'Access); end Initialize_160; -------------------- -- Initialize_161 -- -------------------- procedure Initialize_161 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 161, AMF.Internals.Tables.DG_String_Data_00.MS_00D6'Access); end Initialize_161; -------------------- -- Initialize_162 -- -------------------- procedure Initialize_162 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 162, AMF.Internals.Tables.DG_String_Data_00.MS_00E0'Access); end Initialize_162; -------------------- -- Initialize_163 -- -------------------- procedure Initialize_163 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 163, AMF.Internals.Tables.DG_String_Data_00.MS_00B7'Access); end Initialize_163; -------------------- -- Initialize_164 -- -------------------- procedure Initialize_164 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 164, AMF.Internals.Tables.DG_String_Data_00.MS_007A'Access); end Initialize_164; -------------------- -- Initialize_165 -- -------------------- procedure Initialize_165 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 165, AMF.Internals.Tables.DG_String_Data_00.MS_00A3'Access); end Initialize_165; -------------------- -- Initialize_166 -- -------------------- procedure Initialize_166 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 166, AMF.Internals.Tables.DG_String_Data_00.MS_006A'Access); end Initialize_166; -------------------- -- Initialize_167 -- -------------------- procedure Initialize_167 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 167, AMF.Internals.Tables.DG_String_Data_00.MS_00E3'Access); end Initialize_167; -------------------- -- Initialize_168 -- -------------------- procedure Initialize_168 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 168, AMF.Internals.Tables.DG_String_Data_00.MS_00B4'Access); end Initialize_168; -------------------- -- Initialize_169 -- -------------------- procedure Initialize_169 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 169, AMF.Internals.Tables.DG_String_Data_00.MS_0077'Access); end Initialize_169; -------------------- -- Initialize_170 -- -------------------- procedure Initialize_170 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 170, AMF.Internals.Tables.DG_String_Data_00.MS_0012'Access); end Initialize_170; -------------------- -- Initialize_171 -- -------------------- procedure Initialize_171 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 171, AMF.Internals.Tables.DG_String_Data_00.MS_0028'Access); end Initialize_171; -------------------- -- Initialize_172 -- -------------------- procedure Initialize_172 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 172, AMF.Internals.Tables.DG_String_Data_00.MS_00DA'Access); end Initialize_172; -------------------- -- Initialize_173 -- -------------------- procedure Initialize_173 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 173, AMF.Internals.Tables.DG_String_Data_00.MS_0063'Access); end Initialize_173; -------------------- -- Initialize_174 -- -------------------- procedure Initialize_174 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 174, AMF.Internals.Tables.DG_String_Data_00.MS_00F2'Access); end Initialize_174; -------------------- -- Initialize_175 -- -------------------- procedure Initialize_175 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 175, AMF.Internals.Tables.DG_String_Data_00.MS_0008'Access); end Initialize_175; -------------------- -- Initialize_176 -- -------------------- procedure Initialize_176 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 176, AMF.Internals.Tables.DG_String_Data_00.MS_0004'Access); end Initialize_176; -------------------- -- Initialize_177 -- -------------------- procedure Initialize_177 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 177, AMF.Internals.Tables.DG_String_Data_00.MS_005D'Access); end Initialize_177; -------------------- -- Initialize_178 -- -------------------- procedure Initialize_178 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 178, AMF.Internals.Tables.DG_String_Data_00.MS_00BA'Access); end Initialize_178; -------------------- -- Initialize_179 -- -------------------- procedure Initialize_179 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 179, AMF.Internals.Tables.DG_String_Data_00.MS_00FB'Access); end Initialize_179; -------------------- -- Initialize_180 -- -------------------- procedure Initialize_180 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 180, AMF.Internals.Tables.DG_String_Data_00.MS_0061'Access); end Initialize_180; -------------------- -- Initialize_181 -- -------------------- procedure Initialize_181 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 181, AMF.Internals.Tables.DG_String_Data_00.MS_001F'Access); end Initialize_181; -------------------- -- Initialize_182 -- -------------------- procedure Initialize_182 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 182, AMF.Internals.Tables.DG_String_Data_00.MS_00CE'Access); end Initialize_182; -------------------- -- Initialize_183 -- -------------------- procedure Initialize_183 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 183, AMF.Internals.Tables.DG_String_Data_00.MS_005B'Access); end Initialize_183; -------------------- -- Initialize_184 -- -------------------- procedure Initialize_184 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 184, AMF.Internals.Tables.DG_String_Data_00.MS_003D'Access); end Initialize_184; -------------------- -- Initialize_185 -- -------------------- procedure Initialize_185 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 185, AMF.Internals.Tables.DG_String_Data_00.MS_0071'Access); end Initialize_185; -------------------- -- Initialize_186 -- -------------------- procedure Initialize_186 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 186, AMF.Internals.Tables.DG_String_Data_01.MS_0104'Access); end Initialize_186; -------------------- -- Initialize_187 -- -------------------- procedure Initialize_187 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 187, AMF.Internals.Tables.DG_String_Data_00.MS_00B5'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 187, (Is_Empty => True)); end Initialize_187; -------------------- -- Initialize_188 -- -------------------- procedure Initialize_188 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 188, AMF.Internals.Tables.DG_String_Data_00.MS_001A'Access); end Initialize_188; -------------------- -- Initialize_189 -- -------------------- procedure Initialize_189 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 189, AMF.Internals.Tables.DG_String_Data_00.MS_00C9'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 189, (Is_Empty => True)); end Initialize_189; -------------------- -- Initialize_190 -- -------------------- procedure Initialize_190 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 190, AMF.Internals.Tables.DG_String_Data_00.MS_008C'Access); end Initialize_190; -------------------- -- Initialize_191 -- -------------------- procedure Initialize_191 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 191, AMF.Internals.Tables.DG_String_Data_00.MS_00A0'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 191, (False, AMF.CMOF.Public_Visibility)); end Initialize_191; -------------------- -- Initialize_192 -- -------------------- procedure Initialize_192 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 192, AMF.Internals.Tables.DG_String_Data_00.MS_001E'Access); end Initialize_192; -------------------- -- Initialize_193 -- -------------------- procedure Initialize_193 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 193, AMF.Internals.Tables.DG_String_Data_00.MS_009E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 193, (False, AMF.CMOF.Public_Visibility)); end Initialize_193; -------------------- -- Initialize_194 -- -------------------- procedure Initialize_194 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 194, AMF.Internals.Tables.DG_String_Data_00.MS_00B6'Access); end Initialize_194; -------------------- -- Initialize_195 -- -------------------- procedure Initialize_195 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 195, AMF.Internals.Tables.DG_String_Data_00.MS_0088'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 195, (Is_Empty => True)); end Initialize_195; -------------------- -- Initialize_196 -- -------------------- procedure Initialize_196 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 196, AMF.Internals.Tables.DG_String_Data_00.MS_0009'Access); end Initialize_196; -------------------- -- Initialize_197 -- -------------------- procedure Initialize_197 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 197, AMF.Internals.Tables.DG_String_Data_00.MS_00C7'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 197, (Is_Empty => True)); end Initialize_197; -------------------- -- Initialize_198 -- -------------------- procedure Initialize_198 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 198, AMF.Internals.Tables.DG_String_Data_01.MS_0112'Access); end Initialize_198; -------------------- -- Initialize_199 -- -------------------- procedure Initialize_199 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 199, (Is_Empty => True)); end Initialize_199; -------------------- -- Initialize_200 -- -------------------- procedure Initialize_200 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 200, AMF.Internals.Tables.DG_String_Data_00.MS_00ED'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 200, (False, AMF.CMOF.Public_Visibility)); end Initialize_200; -------------------- -- Initialize_201 -- -------------------- procedure Initialize_201 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 201, AMF.Internals.Tables.DG_String_Data_00.MS_00FA'Access); end Initialize_201; -------------------- -- Initialize_202 -- -------------------- procedure Initialize_202 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 202, AMF.Internals.Tables.DG_String_Data_00.MS_0087'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 202, (False, AMF.CMOF.Public_Visibility)); end Initialize_202; -------------------- -- Initialize_203 -- -------------------- procedure Initialize_203 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 203, AMF.Internals.Tables.DG_String_Data_00.MS_0053'Access); end Initialize_203; -------------------- -- Initialize_204 -- -------------------- procedure Initialize_204 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 204, AMF.Internals.Tables.DG_String_Data_01.MS_0110'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 204, (Is_Empty => True)); end Initialize_204; -------------------- -- Initialize_205 -- -------------------- procedure Initialize_205 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 205, AMF.Internals.Tables.DG_String_Data_00.MS_00AB'Access); end Initialize_205; -------------------- -- Initialize_206 -- -------------------- procedure Initialize_206 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 206, AMF.Internals.Tables.DG_String_Data_01.MS_010B'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 206, (False, AMF.CMOF.Public_Visibility)); end Initialize_206; -------------------- -- Initialize_207 -- -------------------- procedure Initialize_207 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 207, AMF.Internals.Tables.DG_String_Data_00.MS_004D'Access); end Initialize_207; -------------------- -- Initialize_208 -- -------------------- procedure Initialize_208 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 208, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 208, AMF.Internals.Tables.DG_String_Data_00.MS_00BE'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 208, (False, AMF.CMOF.Public_Visibility)); end Initialize_208; -------------------- -- Initialize_209 -- -------------------- procedure Initialize_209 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 209, AMF.Internals.Tables.DG_String_Data_00.MS_0045'Access); end Initialize_209; -------------------- -- Initialize_210 -- -------------------- procedure Initialize_210 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 210, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 210, AMF.Internals.Tables.DG_String_Data_00.MS_004C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 210, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 210, (False, AMF.CMOF.Public_Visibility)); end Initialize_210; -------------------- -- Initialize_211 -- -------------------- procedure Initialize_211 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 211, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 211, AMF.Internals.Tables.DG_String_Data_00.MS_004C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 211, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 211, (False, AMF.CMOF.Public_Visibility)); end Initialize_211; -------------------- -- Initialize_212 -- -------------------- procedure Initialize_212 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 212, AMF.Internals.Tables.DG_String_Data_00.MS_0015'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 212, (Is_Empty => True)); end Initialize_212; -------------------- -- Initialize_213 -- -------------------- procedure Initialize_213 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 213, AMF.Internals.Tables.DG_String_Data_00.MS_0041'Access); end Initialize_213; -------------------- -- Initialize_214 -- -------------------- procedure Initialize_214 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 214, AMF.Internals.Tables.DG_String_Data_00.MS_00B8'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 214, (False, AMF.CMOF.Public_Visibility)); end Initialize_214; -------------------- -- Initialize_215 -- -------------------- procedure Initialize_215 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 215, AMF.Internals.Tables.DG_String_Data_00.MS_0093'Access); end Initialize_215; -------------------- -- Initialize_216 -- -------------------- procedure Initialize_216 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 216, AMF.Internals.Tables.DG_String_Data_00.MS_00F0'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 216, (False, AMF.CMOF.Public_Visibility)); end Initialize_216; -------------------- -- Initialize_217 -- -------------------- procedure Initialize_217 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 217, AMF.Internals.Tables.DG_String_Data_00.MS_0032'Access); end Initialize_217; -------------------- -- Initialize_218 -- -------------------- procedure Initialize_218 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 218, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 218, AMF.Internals.Tables.DG_String_Data_00.MS_004C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 218, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 218, (False, AMF.CMOF.Public_Visibility)); end Initialize_218; -------------------- -- Initialize_219 -- -------------------- procedure Initialize_219 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 219, AMF.Internals.Tables.DG_String_Data_00.MS_000F'Access); end Initialize_219; -------------------- -- Initialize_220 -- -------------------- procedure Initialize_220 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 220, AMF.Internals.Tables.DG_String_Data_00.MS_0078'Access); end Initialize_220; -------------------- -- Initialize_221 -- -------------------- procedure Initialize_221 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 221, AMF.Internals.Tables.DG_String_Data_00.MS_00E7'Access); end Initialize_221; -------------------- -- Initialize_222 -- -------------------- procedure Initialize_222 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 222, AMF.Internals.Tables.DG_String_Data_00.MS_0040'Access); end Initialize_222; -------------------- -- Initialize_223 -- -------------------- procedure Initialize_223 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 223, AMF.Internals.Tables.DG_String_Data_00.MS_00D8'Access); end Initialize_223; -------------------- -- Initialize_224 -- -------------------- procedure Initialize_224 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 224, AMF.Internals.Tables.DG_String_Data_00.MS_0094'Access); end Initialize_224; -------------------- -- Initialize_225 -- -------------------- procedure Initialize_225 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 225, AMF.Internals.Tables.DG_String_Data_00.MS_00C6'Access); end Initialize_225; -------------------- -- Initialize_226 -- -------------------- procedure Initialize_226 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 226, AMF.Internals.Tables.DG_String_Data_00.MS_0024'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 226, (Is_Empty => True)); end Initialize_226; -------------------- -- Initialize_227 -- -------------------- procedure Initialize_227 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 227, AMF.Internals.Tables.DG_String_Data_00.MS_00B2'Access); end Initialize_227; -------------------- -- Initialize_228 -- -------------------- procedure Initialize_228 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 228, (Is_Empty => True)); end Initialize_228; -------------------- -- Initialize_229 -- -------------------- procedure Initialize_229 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 229, AMF.Internals.Tables.DG_String_Data_01.MS_0111'Access); end Initialize_229; -------------------- -- Initialize_230 -- -------------------- procedure Initialize_230 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 230, AMF.Internals.Tables.DG_String_Data_00.MS_00BC'Access); end Initialize_230; -------------------- -- Initialize_231 -- -------------------- procedure Initialize_231 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 231, AMF.Internals.Tables.DG_String_Data_00.MS_00CC'Access); end Initialize_231; -------------------- -- Initialize_232 -- -------------------- procedure Initialize_232 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 232, AMF.Internals.Tables.DG_String_Data_00.MS_00D5'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 232, (Is_Empty => True)); end Initialize_232; -------------------- -- Initialize_233 -- -------------------- procedure Initialize_233 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 233, AMF.Internals.Tables.DG_String_Data_00.MS_006E'Access); end Initialize_233; -------------------- -- Initialize_234 -- -------------------- procedure Initialize_234 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 234, (Is_Empty => True)); end Initialize_234; -------------------- -- Initialize_235 -- -------------------- procedure Initialize_235 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 235, AMF.Internals.Tables.DG_String_Data_00.MS_0031'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 235, (Is_Empty => True)); end Initialize_235; -------------------- -- Initialize_236 -- -------------------- procedure Initialize_236 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 236, AMF.Internals.Tables.DG_String_Data_00.MS_00E4'Access); end Initialize_236; -------------------- -- Initialize_237 -- -------------------- procedure Initialize_237 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 237, (Is_Empty => True)); end Initialize_237; -------------------- -- Initialize_238 -- -------------------- procedure Initialize_238 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 238, AMF.Internals.Tables.DG_String_Data_00.MS_0035'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 238, (Is_Empty => True)); end Initialize_238; -------------------- -- Initialize_239 -- -------------------- procedure Initialize_239 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 239, AMF.Internals.Tables.DG_String_Data_00.MS_00E4'Access); end Initialize_239; -------------------- -- Initialize_240 -- -------------------- procedure Initialize_240 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 240, (Is_Empty => True)); end Initialize_240; -------------------- -- Initialize_241 -- -------------------- procedure Initialize_241 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 241, AMF.Internals.Tables.DG_String_Data_00.MS_005E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 241, (Is_Empty => True)); end Initialize_241; -------------------- -- Initialize_242 -- -------------------- procedure Initialize_242 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 242, AMF.Internals.Tables.DG_String_Data_00.MS_008A'Access); end Initialize_242; -------------------- -- Initialize_243 -- -------------------- procedure Initialize_243 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 243, (Is_Empty => True)); end Initialize_243; -------------------- -- Initialize_244 -- -------------------- procedure Initialize_244 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 244, AMF.Internals.Tables.DG_String_Data_00.MS_0076'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 244, (Is_Empty => True)); end Initialize_244; -------------------- -- Initialize_245 -- -------------------- procedure Initialize_245 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 245, AMF.Internals.Tables.DG_String_Data_00.MS_0005'Access); end Initialize_245; -------------------- -- Initialize_246 -- -------------------- procedure Initialize_246 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 246, (Is_Empty => True)); end Initialize_246; -------------------- -- Initialize_247 -- -------------------- procedure Initialize_247 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 247, AMF.Internals.Tables.DG_String_Data_01.MS_0106'Access); end Initialize_247; -------------------- -- Initialize_248 -- -------------------- procedure Initialize_248 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 248, AMF.Internals.Tables.DG_String_Data_00.MS_00C5'Access); end Initialize_248; -------------------- -- Initialize_249 -- -------------------- procedure Initialize_249 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 249, AMF.Internals.Tables.DG_String_Data_00.MS_005C'Access); end Initialize_249; -------------------- -- Initialize_250 -- -------------------- procedure Initialize_250 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 250, AMF.Internals.Tables.DG_String_Data_00.MS_00DF'Access); end Initialize_250; -------------------- -- Initialize_251 -- -------------------- procedure Initialize_251 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 251, AMF.Internals.Tables.DG_String_Data_01.MS_0105'Access); end Initialize_251; -------------------- -- Initialize_252 -- -------------------- procedure Initialize_252 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 252, AMF.Internals.Tables.DG_String_Data_00.MS_006B'Access); end Initialize_252; -------------------- -- Initialize_253 -- -------------------- procedure Initialize_253 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 253, AMF.Internals.Tables.DG_String_Data_00.MS_0030'Access); end Initialize_253; -------------------- -- Initialize_254 -- -------------------- procedure Initialize_254 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 254, AMF.Internals.Tables.DG_String_Data_00.MS_0089'Access); end Initialize_254; -------------------- -- Initialize_255 -- -------------------- procedure Initialize_255 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 255, AMF.Internals.Tables.DG_String_Data_00.MS_007E'Access); end Initialize_255; -------------------- -- Initialize_256 -- -------------------- procedure Initialize_256 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 256, AMF.Internals.Tables.DG_String_Data_00.MS_0003'Access); end Initialize_256; -------------------- -- Initialize_257 -- -------------------- procedure Initialize_257 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 257, AMF.Internals.Tables.DG_String_Data_00.MS_00B0'Access); end Initialize_257; -------------------- -- Initialize_258 -- -------------------- procedure Initialize_258 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 258, AMF.Internals.Tables.DG_String_Data_00.MS_00F6'Access); end Initialize_258; -------------------- -- Initialize_259 -- -------------------- procedure Initialize_259 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 259, AMF.Internals.Tables.DG_String_Data_00.MS_00B9'Access); end Initialize_259; -------------------- -- Initialize_260 -- -------------------- procedure Initialize_260 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 260, AMF.Internals.Tables.DG_String_Data_00.MS_0091'Access); end Initialize_260; -------------------- -- Initialize_261 -- -------------------- procedure Initialize_261 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 261, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 261, AMF.Internals.Tables.DG_String_Data_00.MS_00F5'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 261, (False, AMF.CMOF.Public_Visibility)); end Initialize_261; -------------------- -- Initialize_262 -- -------------------- procedure Initialize_262 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 262, AMF.Internals.Tables.DG_String_Data_00.MS_0021'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 262, (Is_Empty => True)); end Initialize_262; -------------------- -- Initialize_263 -- -------------------- procedure Initialize_263 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 263, AMF.Internals.Tables.DG_String_Data_00.MS_0075'Access); end Initialize_263; -------------------- -- Initialize_264 -- -------------------- procedure Initialize_264 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 264, AMF.Internals.Tables.DG_String_Data_01.MS_0101'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 264, (False, AMF.CMOF.Public_Visibility)); end Initialize_264; -------------------- -- Initialize_265 -- -------------------- procedure Initialize_265 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 265, AMF.Internals.Tables.DG_String_Data_00.MS_00D1'Access); end Initialize_265; -------------------- -- Initialize_266 -- -------------------- procedure Initialize_266 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 266, AMF.Internals.Tables.DG_String_Data_00.MS_009B'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 266, (False, AMF.CMOF.Public_Visibility)); end Initialize_266; -------------------- -- Initialize_267 -- -------------------- procedure Initialize_267 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 267, AMF.Internals.Tables.DG_String_Data_00.MS_002F'Access); end Initialize_267; -------------------- -- Initialize_268 -- -------------------- procedure Initialize_268 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 268, AMF.Internals.Tables.DG_String_Data_00.MS_00C1'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 268, (False, AMF.CMOF.Public_Visibility)); end Initialize_268; -------------------- -- Initialize_269 -- -------------------- procedure Initialize_269 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 269, AMF.Internals.Tables.DG_String_Data_00.MS_000C'Access); end Initialize_269; -------------------- -- Initialize_270 -- -------------------- procedure Initialize_270 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 270, AMF.Internals.Tables.DG_String_Data_00.MS_0002'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 270, (False, AMF.CMOF.Public_Visibility)); end Initialize_270; -------------------- -- Initialize_271 -- -------------------- procedure Initialize_271 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 271, AMF.Internals.Tables.DG_String_Data_00.MS_00DD'Access); end Initialize_271; -------------------- -- Initialize_272 -- -------------------- procedure Initialize_272 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 272, AMF.Internals.Tables.DG_String_Data_00.MS_00C8'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 272, (False, AMF.CMOF.Public_Visibility)); end Initialize_272; -------------------- -- Initialize_273 -- -------------------- procedure Initialize_273 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 273, AMF.Internals.Tables.DG_String_Data_00.MS_0010'Access); end Initialize_273; -------------------- -- Initialize_274 -- -------------------- procedure Initialize_274 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 274, AMF.Internals.Tables.DG_String_Data_01.MS_0118'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 274, (False, AMF.CMOF.Public_Visibility)); end Initialize_274; -------------------- -- Initialize_275 -- -------------------- procedure Initialize_275 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 275, AMF.Internals.Tables.DG_String_Data_00.MS_00C4'Access); end Initialize_275; -------------------- -- Initialize_276 -- -------------------- procedure Initialize_276 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 276, AMF.Internals.Tables.DG_String_Data_00.MS_00AA'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 276, (Is_Empty => True)); end Initialize_276; -------------------- -- Initialize_277 -- -------------------- procedure Initialize_277 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 277, AMF.Internals.Tables.DG_String_Data_00.MS_009A'Access); end Initialize_277; -------------------- -- Initialize_278 -- -------------------- procedure Initialize_278 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Default (Base + 278, AMF.Internals.Tables.DG_String_Data_00.MS_0090'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 278, AMF.Internals.Tables.DG_String_Data_00.MS_007F'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 278, (False, AMF.CMOF.Public_Visibility)); end Initialize_278; -------------------- -- Initialize_279 -- -------------------- procedure Initialize_279 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 279, AMF.Internals.Tables.DG_String_Data_00.MS_000D'Access); end Initialize_279; -------------------- -- Initialize_280 -- -------------------- procedure Initialize_280 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 280, AMF.Internals.Tables.DG_String_Data_00.MS_0059'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 280, (Is_Empty => True)); end Initialize_280; -------------------- -- Initialize_281 -- -------------------- procedure Initialize_281 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 281, AMF.Internals.Tables.DG_String_Data_00.MS_0054'Access); end Initialize_281; -------------------- -- Initialize_282 -- -------------------- procedure Initialize_282 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 282, AMF.Internals.Tables.DG_String_Data_00.MS_00FF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 282, (False, AMF.CMOF.Public_Visibility)); end Initialize_282; -------------------- -- Initialize_283 -- -------------------- procedure Initialize_283 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 283, AMF.Internals.Tables.DG_String_Data_00.MS_0013'Access); end Initialize_283; -------------------- -- Initialize_284 -- -------------------- procedure Initialize_284 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 284, AMF.Internals.Tables.DG_String_Data_01.MS_0100'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 284, (Is_Empty => True)); end Initialize_284; -------------------- -- Initialize_285 -- -------------------- procedure Initialize_285 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 285, AMF.Internals.Tables.DG_String_Data_00.MS_00FE'Access); end Initialize_285; -------------------- -- Initialize_286 -- -------------------- procedure Initialize_286 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 286, AMF.Internals.Tables.DG_String_Data_00.MS_00FF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 286, (False, AMF.CMOF.Public_Visibility)); end Initialize_286; -------------------- -- Initialize_287 -- -------------------- procedure Initialize_287 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 287, AMF.Internals.Tables.DG_String_Data_00.MS_003E'Access); end Initialize_287; -------------------- -- Initialize_288 -- -------------------- procedure Initialize_288 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 288, AMF.Internals.Tables.DG_String_Data_01.MS_011E'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 288, (Is_Empty => True)); end Initialize_288; -------------------- -- Initialize_289 -- -------------------- procedure Initialize_289 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 289, AMF.Internals.Tables.DG_String_Data_00.MS_006F'Access); end Initialize_289; -------------------- -- Initialize_290 -- -------------------- procedure Initialize_290 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 290, AMF.Internals.Tables.DG_String_Data_00.MS_00FF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 290, (False, AMF.CMOF.Public_Visibility)); end Initialize_290; -------------------- -- Initialize_291 -- -------------------- procedure Initialize_291 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 291, AMF.Internals.Tables.DG_String_Data_00.MS_00CF'Access); end Initialize_291; -------------------- -- Initialize_292 -- -------------------- procedure Initialize_292 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 292, AMF.Internals.Tables.DG_String_Data_00.MS_0026'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 292, (False, AMF.CMOF.Public_Visibility)); end Initialize_292; -------------------- -- Initialize_293 -- -------------------- procedure Initialize_293 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 293, AMF.Internals.Tables.DG_String_Data_00.MS_0097'Access); end Initialize_293; -------------------- -- Initialize_294 -- -------------------- procedure Initialize_294 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 294, AMF.Internals.Tables.DG_String_Data_00.MS_00C2'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 294, (False, AMF.CMOF.Public_Visibility)); end Initialize_294; -------------------- -- Initialize_295 -- -------------------- procedure Initialize_295 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 295, AMF.Internals.Tables.DG_String_Data_00.MS_00DB'Access); end Initialize_295; -------------------- -- Initialize_296 -- -------------------- procedure Initialize_296 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 296, AMF.Internals.Tables.DG_String_Data_00.MS_0085'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 296, (Is_Empty => True)); end Initialize_296; -------------------- -- Initialize_297 -- -------------------- procedure Initialize_297 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 297, AMF.Internals.Tables.DG_String_Data_00.MS_0001'Access); end Initialize_297; -------------------- -- Initialize_298 -- -------------------- procedure Initialize_298 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 298, AMF.Internals.Tables.DG_String_Data_00.MS_00FF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 298, (False, AMF.CMOF.Public_Visibility)); end Initialize_298; -------------------- -- Initialize_299 -- -------------------- procedure Initialize_299 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 299, AMF.Internals.Tables.DG_String_Data_00.MS_004B'Access); end Initialize_299; -------------------- -- Initialize_300 -- -------------------- procedure Initialize_300 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 300, AMF.Internals.Tables.DG_String_Data_00.MS_00D9'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 300, (False, AMF.CMOF.Public_Visibility)); end Initialize_300; -------------------- -- Initialize_301 -- -------------------- procedure Initialize_301 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 301, AMF.Internals.Tables.DG_String_Data_00.MS_004F'Access); end Initialize_301; -------------------- -- Initialize_302 -- -------------------- procedure Initialize_302 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 302, AMF.Internals.Tables.DG_String_Data_00.MS_00D0'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 302, (Is_Empty => True)); end Initialize_302; -------------------- -- Initialize_303 -- -------------------- procedure Initialize_303 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 303, AMF.Internals.Tables.DG_String_Data_00.MS_0064'Access); end Initialize_303; -------------------- -- Initialize_304 -- -------------------- procedure Initialize_304 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 304, AMF.Internals.Tables.DG_String_Data_00.MS_00FF'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 304, (False, AMF.CMOF.Public_Visibility)); end Initialize_304; -------------------- -- Initialize_305 -- -------------------- procedure Initialize_305 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 305, AMF.Internals.Tables.DG_String_Data_00.MS_0099'Access); end Initialize_305; -------------------- -- Initialize_306 -- -------------------- procedure Initialize_306 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 306, AMF.Internals.Tables.DG_String_Data_00.MS_0036'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 306, (False, AMF.CMOF.Public_Visibility)); end Initialize_306; -------------------- -- Initialize_307 -- -------------------- procedure Initialize_307 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 307, AMF.Internals.Tables.DG_String_Data_00.MS_0062'Access); end Initialize_307; -------------------- -- Initialize_308 -- -------------------- procedure Initialize_308 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 308, AMF.Internals.Tables.DG_String_Data_00.MS_00D4'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 308, (False, AMF.CMOF.Public_Visibility)); end Initialize_308; -------------------- -- Initialize_309 -- -------------------- procedure Initialize_309 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 309, AMF.Internals.Tables.DG_String_Data_00.MS_0073'Access); end Initialize_309; -------------------- -- Initialize_310 -- -------------------- procedure Initialize_310 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 310, AMF.Internals.Tables.DG_String_Data_00.MS_0052'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 310, (False, AMF.CMOF.Public_Visibility)); end Initialize_310; -------------------- -- Initialize_311 -- -------------------- procedure Initialize_311 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 311, AMF.Internals.Tables.DG_String_Data_00.MS_008B'Access); end Initialize_311; -------------------- -- Initialize_312 -- -------------------- procedure Initialize_312 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 312, AMF.Internals.Tables.DG_String_Data_00.MS_00FD'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 312, (False, AMF.CMOF.Public_Visibility)); end Initialize_312; -------------------- -- Initialize_313 -- -------------------- procedure Initialize_313 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 313, AMF.Internals.Tables.DG_String_Data_00.MS_0083'Access); end Initialize_313; -------------------- -- Initialize_314 -- -------------------- procedure Initialize_314 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 314, AMF.Internals.Tables.DG_String_Data_01.MS_011B'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 314, (Is_Empty => True)); end Initialize_314; -------------------- -- Initialize_315 -- -------------------- procedure Initialize_315 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Body (Base + 315, AMF.Internals.Tables.DG_String_Data_00.MS_00D3'Access); end Initialize_315; -------------------- -- Initialize_316 -- -------------------- procedure Initialize_316 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 316, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 316, AMF.Internals.Tables.DG_String_Data_00.MS_009C'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 316, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 316, (False, AMF.CMOF.Public_Visibility)); end Initialize_316; -------------------- -- Initialize_317 -- -------------------- procedure Initialize_317 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 317, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 317, AMF.Internals.Tables.DG_String_Data_00.MS_00F5'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 317, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 317, (False, AMF.CMOF.Public_Visibility)); end Initialize_317; -------------------- -- Initialize_318 -- -------------------- procedure Initialize_318 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 318, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 318, AMF.Internals.Tables.DG_String_Data_00.MS_00B3'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Upper (Base + 318, (False, (Unlimited => True))); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 318, (False, AMF.CMOF.Public_Visibility)); end Initialize_318; -------------------- -- Initialize_319 -- -------------------- procedure Initialize_319 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Lower (Base + 319, (False, 0)); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 319, AMF.Internals.Tables.DG_String_Data_00.MS_00CD'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 319, (False, AMF.CMOF.Public_Visibility)); end Initialize_319; -------------------- -- Initialize_320 -- -------------------- procedure Initialize_320 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 320, AMF.Internals.Tables.DG_String_Data_00.MS_00B3'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Visibility (Base + 320, (False, AMF.CMOF.Public_Visibility)); end Initialize_320; -------------------- -- Initialize_321 -- -------------------- procedure Initialize_321 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 321, AMF.Internals.Tables.DG_String_Data_00.MS_00E9'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Value (Base + 321, AMF.Internals.Tables.DG_String_Data_00.MS_0098'Access); end Initialize_321; -------------------- -- Initialize_322 -- -------------------- procedure Initialize_322 is begin AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Name (Base + 322, AMF.Internals.Tables.DG_String_Data_00.MS_0047'Access); AMF.Internals.Tables.CMOF_Attributes.Internal_Set_Value (Base + 322, AMF.Internals.Tables.DG_String_Data_00.MS_00F7'Access); end Initialize_322; end AMF.Internals.Tables.DG_Metamodel.Properties;
ekoeppen/MSP430_Generic_Ada_Drivers
Ada
4,417
ads
-- This spec has been automatically generated from msp430g2553.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; -- Special Function package MSP430_SVD.SPECIAL_FUNCTION is pragma Preelaborate; --------------- -- Registers -- --------------- -- Interrupt Enable 1 type IE1_Register is record -- Watchdog Interrupt Enable WDTIE : MSP430_SVD.Bit := 16#0#; -- Osc. Fault Interrupt Enable OFIE : MSP430_SVD.Bit := 16#0#; -- unspecified Reserved_2_3 : MSP430_SVD.UInt2 := 16#0#; -- NMI Interrupt Enable NMIIE : MSP430_SVD.Bit := 16#0#; -- Flash Access Violation Interrupt Enable ACCVIE : MSP430_SVD.Bit := 16#0#; -- unspecified Reserved_6_7 : MSP430_SVD.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for IE1_Register use record WDTIE at 0 range 0 .. 0; OFIE at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; NMIIE at 0 range 4 .. 4; ACCVIE at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; end record; -- Interrupt Enable 2 type IE2_Register is record -- UCA0RXIE UCA0RXIE : MSP430_SVD.Bit := 16#0#; -- UCA0TXIE UCA0TXIE : MSP430_SVD.Bit := 16#0#; -- UCB0RXIE UCB0RXIE : MSP430_SVD.Bit := 16#0#; -- UCB0TXIE UCB0TXIE : MSP430_SVD.Bit := 16#0#; -- unspecified Reserved_4_7 : MSP430_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for IE2_Register use record UCA0RXIE at 0 range 0 .. 0; UCA0TXIE at 0 range 1 .. 1; UCB0RXIE at 0 range 2 .. 2; UCB0TXIE at 0 range 3 .. 3; Reserved_4_7 at 0 range 4 .. 7; end record; -- Interrupt Flag 1 type IFG1_Register is record -- Watchdog Interrupt Flag WDTIFG : MSP430_SVD.Bit := 16#0#; -- Osc. Fault Interrupt Flag OFIFG : MSP430_SVD.Bit := 16#0#; -- Power On Interrupt Flag PORIFG : MSP430_SVD.Bit := 16#0#; -- Reset Interrupt Flag RSTIFG : MSP430_SVD.Bit := 16#0#; -- NMI Interrupt Flag NMIIFG : MSP430_SVD.Bit := 16#0#; -- unspecified Reserved_5_7 : MSP430_SVD.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for IFG1_Register use record WDTIFG at 0 range 0 .. 0; OFIFG at 0 range 1 .. 1; PORIFG at 0 range 2 .. 2; RSTIFG at 0 range 3 .. 3; NMIIFG at 0 range 4 .. 4; Reserved_5_7 at 0 range 5 .. 7; end record; -- Interrupt Flag 2 type IFG2_Register is record -- UCA0RXIFG UCA0RXIFG : MSP430_SVD.Bit := 16#0#; -- UCA0TXIFG UCA0TXIFG : MSP430_SVD.Bit := 16#0#; -- UCB0RXIFG UCB0RXIFG : MSP430_SVD.Bit := 16#0#; -- UCB0TXIFG UCB0TXIFG : MSP430_SVD.Bit := 16#0#; -- unspecified Reserved_4_7 : MSP430_SVD.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for IFG2_Register use record UCA0RXIFG at 0 range 0 .. 0; UCA0TXIFG at 0 range 1 .. 1; UCB0RXIFG at 0 range 2 .. 2; UCB0TXIFG at 0 range 3 .. 3; Reserved_4_7 at 0 range 4 .. 7; end record; ----------------- -- Peripherals -- ----------------- -- Special Function type SPECIAL_FUNCTION_Peripheral is record -- Interrupt Enable 1 IE1 : aliased IE1_Register; -- Interrupt Enable 2 IE2 : aliased IE2_Register; -- Interrupt Flag 1 IFG1 : aliased IFG1_Register; -- Interrupt Flag 2 IFG2 : aliased IFG2_Register; end record with Volatile; for SPECIAL_FUNCTION_Peripheral use record IE1 at 16#0# range 0 .. 7; IE2 at 16#1# range 0 .. 7; IFG1 at 16#2# range 0 .. 7; IFG2 at 16#3# range 0 .. 7; end record; -- Special Function SPECIAL_FUNCTION_Periph : aliased SPECIAL_FUNCTION_Peripheral with Import, Address => SPECIAL_FUNCTION_Base; end MSP430_SVD.SPECIAL_FUNCTION;
AdaCore/libadalang
Ada
125
adb
separate (Pkg) protected body T is procedure Foo is begin null; end Foo; end T; --% node.p_parent_basic_decl
FROL256/ada-ray-tracer
Ada
6,745
adb
with Ada.Numerics.Generic_Elementary_Functions; with Ada.Unchecked_Conversion; use Ada.Numerics; --use Ada.Numerics.Aux; package body Generic_Vector_Math is package Float_Functions is new Generic_Elementary_Functions (float); use Float_Functions; function BitCopyToTypeT is new Ada.Unchecked_Conversion(float, T); function ZeroT return T is begin return BitCopyToTypeT(0.0); end ZeroT; function min (a, b : T) return T is begin if a < b then return a; else return b; end if; end; function max (a, b : T) return T is begin if a >= b then return a; else return b; end if; end; function min (a, b, c : T) return T is begin if a < b and a < c then return a; elsif b < c and b < a then return b; else return c; end if; end; function max (a, b, c : T) return T is begin if a >= b and a >= c then return a; elsif b >= c and b >= a then return b; else return c; end if; end; function clamp(x,a,b : T) return T is begin return min(max(x,a),b); end clamp; function sqr(x : T) return T is begin return x*x; end sqr; function "+" (a, b : vector4) return vector4 is res : vector4; begin res.x := a.x + b.x; res.y := a.y + b.y; res.z := a.z + b.z; res.w := a.w + b.w; return res; end; function "+" (a, b : vector3) return vector3 is res : vector3; begin res.x := a.x + b.x; res.y := a.y + b.y; res.z := a.z + b.z; return res; end; function "-" (a, b : vector3) return vector3 is res : vector3; begin res.x := a.x - b.x; res.y := a.y - b.y; res.z := a.z - b.z; return res; end; function "*" (a, b : vector3) return vector3 is res : vector3; begin res.x := a.x * b.x; res.y := a.y * b.y; res.z := a.z * b.z; return res; end; function dot(a, b : vector3) return T is begin return a.x*b.x + a.y*b.y + a.z*b.z; end; function cross(a, b : vector3) return vector3 is res : vector3; begin res.x := a.y*b.z - b.y*a.z; res.y := a.z*b.x - b.z*a.x; res.z := a.x*b.y - b.x*a.y; return res; end; function min(a, b : vector3) return vector3 is res : vector3; begin res.x := min(a.x, b.x); res.y := min(a.y, b.y); res.z := min(a.z, b.z); return res; end; function max(a, b : vector3) return vector3 is begin return (max(a.x,b.x), max(a.y,b.y), max(a.z, b.z)); end; function clamp(x : vector3; a,b : T) return vector3 is begin return (clamp(x.x,a,b), clamp(x.y,a,b), clamp(x.z,a,b)); end; function clamp(x,a,b : vector3) return vector3 is begin return (clamp(x.x,a.x,b.x), clamp(x.y,a.y,b.y), clamp(x.z,a.z,b.z)); end; function "*" (a : vector3; k : T) return vector3 is begin return (k*a.x, k*a.y, k*a.z); end; function "*"(k: T; a : vector3) return vector3 is begin return (k*a.x, k*a.y, k*a.z); end; function "*"(v : vector3; m : Matrix4) return vector3 is res : vector3; begin res.x := v.x*m(0,0) + v.y*m(1,0) + v.z*m(2,0) + m(3,0); res.y := v.x*m(0,1) + v.y*m(1,1) + v.z*m(2,1) + m(3,1); res.z := v.x*m(0,2) + v.y*m(1,2) + v.z*m(2,2) + m(3,2); return res; end; function "*"(v : vector4; m : Matrix4) return vector4 is res : vector4; begin res.x := v.x*m(0,0) + v.y*m(1,0) + v.z*m(2,0) + v.w*m(3,0); res.y := v.x*m(0,1) + v.y*m(1,1) + v.z*m(2,1) + v.w*m(3,1); res.z := v.x*m(0,2) + v.y*m(1,2) + v.z*m(2,2) + v.w*m(3,2); res.w := v.x*m(0,3) + v.y*m(1,3) + v.z*m(2,3) + v.w*m(3,3); return res; end; function "*"(m : Matrix4; v : vector3) return vector3 is res : vector3; begin res.x := m(0,0)*v.x + m(0,1)*v.y + m(0,2)*v.z + m(0,3); res.y := m(1,0)*v.x + m(1,1)*v.y + m(1,2)*v.z + m(1,3); res.z := m(2,0)*v.x + m(2,1)*v.y + m(2,2)*v.z + m(2,3); return res; end; function "*"(m : Matrix4; v : vector4) return vector4 is res : vector4; begin res.x := m(0,0)*v.x + m(0,1)*v.y + m(0,2)*v.z + m(0,3)*v.w; res.y := m(1,0)*v.x + m(1,1)*v.y + m(1,2)*v.z + m(1,3)*v.w; res.z := m(2,0)*v.x + m(2,1)*v.y + m(2,2)*v.z + m(2,3)*v.w; res.w := m(3,0)*v.x + m(3,1)*v.y + m(3,2)*v.z + m(3,3)*v.w; return res; end; function GetRow(m : Matrix4; i : integer) return vector4 is res : vector4; begin res.x := m(i,0); res.y := m(i,1); res.z := m(i,2); res.w := m(i,3); return res; end GetRow; function GetCol(m : Matrix4; i : integer) return vector4 is res : vector4; begin res.x := m(0,i); res.y := m(1,i); res.z := m(2,i); res.w := m(3,i); return res; end GetCol; procedure SetRow(m : in out Matrix4; i : in integer; v : in vector4) is begin m(i,0) := v.x; m(i,1) := v.y; m(i,2) := v.z; m(i,3) := v.w; end SetRow; procedure SetCol(m : in out Matrix4; i : in integer; v : in vector4) is begin m(0,i) := v.x; m(1,i) := v.y; m(2,i) := v.z; m(3,i) := v.w; end SetCol; function "*"(m1 : Matrix4; m2 : Matrix4) return Matrix4 is m : Matrix4; begin m(0,0) := m1(0,0) * m2(0,0) + m1(0,1) * m2(1,0) + m1(0,2) * m2(2,0) + m1(0,3) * m2(3,0); m(0,1) := m1(0,0) * m2(0,1) + m1(0,1) * m2(1,1) + m1(0,2) * m2(2,1) + m1(0,3) * m2(3,1); m(0,2) := m1(0,0) * m2(0,2) + m1(0,1) * m2(1,2) + m1(0,2) * m2(2,2) + m1(0,3) * m2(3,2); m(0,3) := m1(0,0) * m2(0,3) + m1(0,1) * m2(1,3) + m1(0,2) * m2(2,3) + m1(0,3) * m2(3,3); m(1,0) := m1(1,0) * m2(0,0) + m1(1,1) * m2(1,0) + m1(1,2) * m2(2,0) + m1(1,3) * m2(3,0); m(1,1) := m1(1,0) * m2(0,1) + m1(1,1) * m2(1,1) + m1(1,2) * m2(2,1) + m1(1,3) * m2(3,1); m(1,2) := m1(1,0) * m2(0,2) + m1(1,1) * m2(1,2) + m1(1,2) * m2(2,2) + m1(1,3) * m2(3,2); m(1,3) := m1(1,0) * m2(0,3) + m1(1,1) * m2(1,3) + m1(1,2) * m2(2,3) + m1(1,3) * m2(3,3); m(2,0) := m1(2,0) * m2(0,0) + m1(2,1) * m2(1,0) + m1(2,2) * m2(2,0) + m1(2,3) * m2(3,0); m(2,1) := m1(2,0) * m2(0,1) + m1(2,1) * m2(1,1) + m1(2,2) * m2(2,1) + m1(2,3) * m2(3,1); m(2,2) := m1(2,0) * m2(0,2) + m1(2,1) * m2(1,2) + m1(2,2) * m2(2,2) + m1(2,3) * m2(3,2); m(2,3) := m1(2,0) * m2(0,3) + m1(2,1) * m2(1,3) + m1(2,2) * m2(2,3) + m1(2,3) * m2(3,3); m(3,0) := m1(3,0) * m2(0,0) + m1(3,1) * m2(1,0) + m1(3,2) * m2(2,0) + m1(3,3) * m2(3,0); m(3,1) := m1(3,0) * m2(0,1) + m1(3,1) * m2(1,1) + m1(3,2) * m2(2,1) + m1(3,3) * m2(3,1); m(3,2) := m1(3,0) * m2(0,2) + m1(3,1) * m2(1,2) + m1(3,2) * m2(2,2) + m1(3,3) * m2(3,2); m(3,3) := m1(3,0) * m2(0,3) + m1(3,1) * m2(1,3) + m1(3,2) * m2(2,3) + m1(3,3) * m2(3,3); return m; end; end Generic_Vector_Math;
sungyeon/drake
Ada
265
ads
pragma License (Unrestricted); with Ada.Containers; generic with package Bounded is new Generic_Bounded_Length (<>); function Ada.Strings.Bounded.Hash (Key : Bounded.Bounded_String) return Containers.Hash_Type; pragma Preelaborate (Ada.Strings.Bounded.Hash);
zhmu/ananas
Ada
25,241
ads
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . H A S H E D _ M A P S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-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/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; private with Ada.Containers.Hash_Tables; private with Ada.Finalization; private with Ada.Streams; private with Ada.Strings.Text_Buffers; -- The language-defined generic package Containers.Hashed_Maps provides -- private types Map and Cursor, and a set of operations for each type. A map -- container allows an arbitrary type to be used as a key to find the element -- associated with that key. A hashed map uses a hash function to organize the -- keys. -- -- A map contains pairs of keys and elements, called nodes. Map cursors -- designate nodes, but also can be thought of as designating an element (the -- element contained in the node) for consistency with the other containers. -- There exists an equivalence relation on keys, whose definition is different -- for hashed maps and ordered maps. A map never contains two or more nodes -- with equivalent keys. The length of a map is the number of nodes it -- contains. -- -- Each nonempty map has two particular nodes called the first node and the -- last node (which may be the same). Each node except for the last node has a -- successor node. If there are no other intervening operations, starting with -- the first node and repeatedly going to the successor node will visit each -- node in the map exactly once until the last node is reached. generic type Key_Type is private; type Element_Type is private; with function Hash (Key : Key_Type) return Hash_Type; -- The actual function for the generic formal function Hash is expected to -- return the same value each time it is called with a particular key -- value. For any two equivalent key values, the actual for Hash is -- expected to return the same value. If the actual for Hash behaves in -- some other manner, the behavior of this package is unspecified. Which -- subprograms of this package call Hash, and how many times they call it, -- is unspecified. with function Equivalent_Keys (Left, Right : Key_Type) return Boolean; -- The actual function for the generic formal function Equivalent_Keys on -- Key_Type values is expected to return the same value each time it is -- called with a particular pair of key values. It should define an -- equivalence relationship, that is, be reflexive, symmetric, and -- transitive. If the actual for Equivalent_Keys behaves in some other -- manner, the behavior of this package is unspecified. Which subprograms -- of this package call Equivalent_Keys, and how many times they call it, -- is unspecified. with function "=" (Left, Right : Element_Type) return Boolean is <>; -- The actual function for the generic formal function "=" on Element_Type -- values is expected to define a reflexive and symmetric relationship and -- return the same result value each time it is called with a particular -- pair of values. If it behaves in some other manner, the function "=" on -- map values returns an unspecified value. The exact arguments and number -- of calls of this generic formal function by the function "=" on map -- values are unspecified. package Ada.Containers.Hashed_Maps with SPARK_Mode => Off is pragma Annotate (CodePeer, Skip_Analysis); pragma Preelaborate; pragma Remote_Types; type Map is tagged private with Constant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type, Aggregate => (Empty => Empty, Add_Named => Insert); pragma Preelaborable_Initialization (Map); type Cursor is private; pragma Preelaborable_Initialization (Cursor); function "=" (Left, Right : Cursor) return Boolean; -- The representation of cursors includes a component used to optimize -- iteration over maps. This component may become unreliable after -- multiple map insertions, and must be excluded from cursor equality, -- so we need to provide an explicit definition for it, instead of -- using predefined equality (as implied by a questionable comment -- in the RM). Empty_Map : constant Map; -- Map objects declared without an initialization expression are -- initialized to the value Empty_Map. No_Element : constant Cursor; -- Cursor objects declared without an initialization expression are -- initialized to the value No_Element. function Empty (Capacity : Count_Type := 1000) return Map; function Has_Element (Position : Cursor) return Boolean; -- Returns True if Position designates an element, and returns False -- otherwise. package Map_Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); function "=" (Left, Right : Map) return Boolean; -- If Left and Right denote the same map object, then the function returns -- True. If Left and Right have different lengths, then the function -- returns False. Otherwise, for each key K in Left, the function returns -- False if: -- -- * a key equivalent to K is not present in Right; or -- -- * the element associated with K in Left is not equal to the -- element associated with K in Right (using the generic formal -- equality operator for elements). -- -- If the function has not returned a result after checking all of the -- keys, it returns True. Any exception raised during evaluation of key -- equivalence or element equality is propagated. function Capacity (Container : Map) return Count_Type; -- Returns the current capacity of the map. Capacity is the maximum length -- before which rehashing in guaranteed not to occur. procedure Reserve_Capacity (Container : in out Map; Capacity : Count_Type); -- Adjusts the current capacity, by allocating a new buckets array. If the -- requested capacity is less than the current capacity, then the capacity -- is contracted (to a value not less than the current length). If the -- requested capacity is greater than the current capacity, then the -- capacity is expanded (to a value not less than what is requested). In -- either case, the nodes are rehashed from the old buckets array onto the -- new buckets array (Hash is called once for each existing key in order to -- compute the new index), and then the old buckets array is deallocated. function Length (Container : Map) return Count_Type; -- Returns the number of items in the map function Is_Empty (Container : Map) return Boolean; -- Equivalent to Length (Container) = 0 procedure Clear (Container : in out Map); -- Removes all of the items from the map function Key (Position : Cursor) return Key_Type; -- Key returns the key component of the node designated by Position. -- -- If Position equals No_Element, then Constraint_Error is propagated. function Element (Position : Cursor) return Element_Type; -- Element returns the element component of the node designated -- by Position. -- -- If Position equals No_Element, then Constraint_Error is propagated. procedure Replace_Element (Container : in out Map; Position : Cursor; New_Item : Element_Type); -- Replace_Element assigns New_Item to the element of the node designated -- by Position. -- -- If Position equals No_Element, then Constraint_Error is propagated; if -- Position does not designate an element in Container, then Program_Error -- is propagated. procedure Query_Element (Position : Cursor; Process : not null access procedure (Key : Key_Type; Element : Element_Type)); -- Query_Element calls Process.all with the key and element from the node -- designated by Position as the arguments. -- -- If Position equals No_Element, then Constraint_Error is propagated. -- -- Tampering with the elements of the map that contains the element -- designated by Position is prohibited during the execution of the call on -- Process.all. Any exception raised by Process.all is propagated. procedure Update_Element (Container : in out Map; Position : Cursor; Process : not null access procedure (Key : Key_Type; Element : in out Element_Type)); -- Update_Element calls Process.all with the key and element from the node -- designated by Position as the arguments. -- -- If Position equals No_Element, then Constraint_Error is propagated; if -- Position does not designate an element in Container, then Program_Error -- is propagated. -- -- Tampering with the elements of Container is prohibited during the -- execution of the call on Process.all. Any exception raised by -- Process.all is propagated. type Constant_Reference_Type (Element : not null access constant Element_Type) is private with Implicit_Dereference => Element; type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type; pragma Inline (Constant_Reference); -- This function (combined with the Constant_Indexing and -- Implicit_Dereference aspects) provides a convenient way to gain read -- access to an individual element of a map given a cursor. -- Constant_Reference returns an object whose discriminant is an access -- value that designates the element designated by Position. -- -- If Position equals No_Element, then Constraint_Error is propagated; if -- Position does not designate an element in Container, then Program_Error -- is propagated. -- -- Tampering with the elements of Container is prohibited -- while the object returned by Constant_Reference exists and has not been -- finalized. function Reference (Container : aliased in out Map; Position : Cursor) return Reference_Type; pragma Inline (Reference); -- This function (combined with the Variable_Indexing and -- Implicit_Dereference aspects) provides a convenient way to gain read and -- write access to an individual element of a map given a cursor. -- Reference returns an object whose discriminant is an access value that -- designates the element designated by Position. -- -- If Position equals No_Element, then Constraint_Error is propagated; if -- Position does not designate an element in Container, then Program_Error -- is propagated. -- -- Tampering with the elements of Container is prohibited while the object -- returned by Reference exists and has not been finalized. function Constant_Reference (Container : aliased Map; Key : Key_Type) return Constant_Reference_Type; pragma Inline (Constant_Reference); -- Equivalent to Constant_Reference (Container, Find (Container, Key)). function Reference (Container : aliased in out Map; Key : Key_Type) return Reference_Type; pragma Inline (Reference); -- Equivalent to Reference (Container, Find (Container, Key)). procedure Assign (Target : in out Map; Source : Map); -- If Target denotes the same object as Source, the operation has no -- effect. Otherwise, the key/element pairs of Source are copied to Target -- as for an assignment_statement assigning Source to Target. function Copy (Source : Map; Capacity : Count_Type := 0) return Map; procedure Move (Target : in out Map; Source : in out Map); -- If Target denotes the same object as Source, then the operation has no -- effect. Otherwise, the operation is equivalent to Assign (Target, -- Source) followed by Clear (Source). procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Type; Position : out Cursor; Inserted : out Boolean); -- Insert checks if a node with a key equivalent to Key is already present -- in Container. If a match is found, Inserted is set to False and Position -- designates the element with the matching key. Otherwise, Insert -- allocates a new node, initializes it to Key and New_Item, and adds it to -- Container; Inserted is set to True and Position designates the -- newly-inserted node. Any exception raised during allocation is -- propagated and Container is not modified. procedure Insert (Container : in out Map; Key : Key_Type; Position : out Cursor; Inserted : out Boolean); -- Insert inserts Key into Container as per the five-parameter Insert, with -- the difference that an element initialized by default (see 3.3.1) is -- inserted. procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Type); -- Insert inserts Key and New_Item into Container as per the five-parameter -- Insert, with the difference that if a node with a key equivalent to Key -- is already in the map, then Constraint_Error is propagated. procedure Include (Container : in out Map; Key : Key_Type; New_Item : Element_Type); -- Include inserts Key and New_Item into Container as per the -- five-parameter Insert, with the difference that if a node with a key -- equivalent to Key is already in the map, then this operation assigns Key -- and New_Item to the matching node. Any exception raised during -- assignment is propagated. procedure Replace (Container : in out Map; Key : Key_Type; New_Item : Element_Type); -- Replace checks if a node with a key equivalent to Key is present in -- Container. If a match is found, Replace assigns Key and New_Item to the -- matching node; otherwise, Constraint_Error is propagated. procedure Exclude (Container : in out Map; Key : Key_Type); -- Exclude checks if a node with a key equivalent to Key is present in -- Container. If a match is found, Exclude removes the node from the map. procedure Delete (Container : in out Map; Key : Key_Type); -- Delete checks if a node with a key equivalent to Key is present in -- Container. If a match is found, Delete removes the node from the map; -- otherwise, Constraint_Error is propagated. procedure Delete (Container : in out Map; Position : in out Cursor); -- Delete removes the node designated by Position from the map. Position is -- set to No_Element on return. -- -- If Position equals No_Element, then Constraint_Error is propagated. If -- Position does not designate an element in Container, then Program_Error -- is propagated. function First (Container : Map) return Cursor; -- If Length (Container) = 0, then First returns No_Element. Otherwise, -- First returns a cursor that designates the first node in Container. function Next (Position : Cursor) return Cursor; -- Returns a cursor that designates the successor of the node designated by -- Position. If Position designates the last node, then No_Element is -- returned. If Position equals No_Element, then No_Element is returned. procedure Next (Position : in out Cursor); -- Equivalent to Position := Next (Position) function Find (Container : Map; Key : Key_Type) return Cursor; -- If Length (Container) equals 0, then Find returns No_Element. -- Otherwise, Find checks if a node with a key equivalent to Key is present -- in Container. If a match is found, a cursor designating the matching -- node is returned; otherwise, No_Element is returned. function Contains (Container : Map; Key : Key_Type) return Boolean; -- Equivalent to Find (Container, Key) /= No_Element. function Element (Container : Map; Key : Key_Type) return Element_Type; -- Equivalent to Element (Find (Container, Key)) function Equivalent_Keys (Left, Right : Cursor) return Boolean; -- Returns the result of calling Equivalent_Keys with the keys of the nodes -- designated by cursors Left and Right. function Equivalent_Keys (Left : Cursor; Right : Key_Type) return Boolean; -- Returns the result of calling Equivalent_Keys with key of the node -- designated by Left and key Right. function Equivalent_Keys (Left : Key_Type; Right : Cursor) return Boolean; -- Returns the result of calling Equivalent_Keys with key Left and the node -- designated by Right. procedure Iterate (Container : Map; Process : not null access procedure (Position : Cursor)); -- Iterate calls Process.all with a cursor that designates each node in -- Container, starting with the first node and moving the cursor according -- to the successor relation. Tampering with the cursors of Container is -- prohibited during the execution of a call on Process.all. Any exception -- raised by Process.all is propagated. function Iterate (Container : Map) return Map_Iterator_Interfaces.Forward_Iterator'Class; private pragma Inline ("="); pragma Inline (Length); pragma Inline (Is_Empty); pragma Inline (Clear); pragma Inline (Key); pragma Inline (Element); pragma Inline (Move); pragma Inline (Contains); pragma Inline (Capacity); pragma Inline (Reserve_Capacity); pragma Inline (Has_Element); pragma Inline (Equivalent_Keys); pragma Inline (Next); type Node_Type; type Node_Access is access Node_Type; type Node_Type is limited record Key : Key_Type; Element : aliased Element_Type; Next : Node_Access; end record; package HT_Types is new Hash_Tables.Generic_Hash_Table_Types (Node_Type, Node_Access); type Map is new Ada.Finalization.Controlled with record HT : HT_Types.Hash_Table_Type; end record with Put_Image => Put_Image; procedure Put_Image (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map); overriding procedure Adjust (Container : in out Map); overriding procedure Finalize (Container : in out Map); use HT_Types, HT_Types.Implementation; use Ada.Finalization; use Ada.Streams; procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Map); for Map'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Map); for Map'Read use Read; type Map_Access is access all Map; for Map_Access'Storage_Size use 0; type Cursor is record Container : Map_Access; -- Access to this cursor's container Node : Node_Access; -- Access to the node pointed to by this cursor Position : Hash_Type := Hash_Type'Last; -- Position of the node in the buckets of the container. If this is -- equal to Hash_Type'Last, then it will not be used. Position is -- not requried by the implementation, but improves the efficiency -- of various operations. -- -- However, this value must be maintained so that the predefined -- equality operation acts as required by RM A.18.4-18/2, which -- states: "The predefined "=" operator for type Cursor returns True -- if both cursors are No_Element, or designate the same element -- in the same container." end record; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Cursor); for Cursor'Read use Read; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor); for Cursor'Write use Write; subtype Reference_Control_Type is Implementation.Reference_Control_Type; -- It is necessary to rename this here, so that the compiler can find it type Constant_Reference_Type (Element : not null access constant Element_Type) is record Control : Reference_Control_Type := raise Program_Error with "uninitialized reference"; -- The RM says, "The default initialization of an object of -- type Constant_Reference_Type or Reference_Type propagates -- Program_Error." end record; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type); for Constant_Reference_Type'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type); for Constant_Reference_Type'Read use Read; type Reference_Type (Element : not null access Element_Type) is record Control : Reference_Control_Type := raise Program_Error with "uninitialized reference"; -- The RM says, "The default initialization of an object of -- type Constant_Reference_Type or Reference_Type propagates -- Program_Error." end record; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type); for Reference_Type'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type); for Reference_Type'Read use Read; -- Three operations are used to optimize in the expansion of "for ... of" -- loops: the Next(Cursor) procedure in the visible part, and the following -- Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for -- details. function Pseudo_Reference (Container : aliased Map'Class) return Reference_Control_Type; pragma Inline (Pseudo_Reference); -- Creates an object of type Reference_Control_Type pointing to the -- container, and increments the Lock. Finalization of this object will -- decrement the Lock. type Element_Access is access all Element_Type with Storage_Size => 0; function Get_Element_Access (Position : Cursor) return not null Element_Access; -- Returns a pointer to the element designated by Position. Empty_Map : constant Map := (Controlled with others => <>); No_Element : constant Cursor := (Container => null, Node => null, Position => Hash_Type'Last); type Iterator is new Limited_Controlled and Map_Iterator_Interfaces.Forward_Iterator with record Container : Map_Access; end record with Disable_Controlled => not T_Check; overriding procedure Finalize (Object : in out Iterator); overriding function First (Object : Iterator) return Cursor; overriding function Next (Object : Iterator; Position : Cursor) return Cursor; end Ada.Containers.Hashed_Maps;
guillaume-lin/tsc
Ada
8,378
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Mouse -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- 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, 1996 -- Version Control: -- $Revision: 1.18 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; use Interfaces; package body Terminal_Interface.Curses.Mouse is use type System.Bit_Order; use type Interfaces.C.int; function Has_Mouse return Boolean is function Mouse_Avail return C_Int; pragma Import (C, Mouse_Avail, "_nc_has_mouse"); begin if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then return True; else return False; end if; end Has_Mouse; function Get_Mouse return Mouse_Event is type Event_Access is access all Mouse_Event; function Getmouse (Ev : Event_Access) return C_Int; pragma Import (C, Getmouse, "getmouse"); Event : aliased Mouse_Event; begin if Getmouse (Event'Access) = Curses_Err then raise Curses_Exception; end if; return Event; end Get_Mouse; procedure Register_Reportable_Event (Button : in Mouse_Button; State : in Button_State; Mask : in out Event_Mask) is Button_Nr : constant Natural := Mouse_Button'Pos (Button); State_Nr : constant Natural := Button_State'Pos (State); begin if Button in Modifier_Keys and then State /= Pressed then raise Curses_Exception; else if Button in Real_Buttons then Mask := Mask or ((2 ** (6 * Button_Nr)) ** State_Nr); else Mask := Mask or (BUTTON_CTRL ** (Button_Nr - 4)); end if; end if; end Register_Reportable_Event; procedure Register_Reportable_Events (Button : in Mouse_Button; State : in Button_States; Mask : in out Event_Mask) is begin for S in Button_States'Range loop if State (S) then Register_Reportable_Event (Button, S, Mask); end if; end loop; end Register_Reportable_Events; function Start_Mouse (Mask : Event_Mask := All_Events) return Event_Mask is function MMask (M : Event_Mask; O : access Event_Mask) return Event_Mask; pragma Import (C, MMask, "mousemask"); R : Event_Mask; Old : aliased Event_Mask; begin R := MMask (Mask, Old'Access); return Old; end Start_Mouse; procedure End_Mouse (Mask : in Event_Mask := No_Events) is begin null; end End_Mouse; procedure Dispatch_Event (Mask : in Event_Mask; Button : out Mouse_Button; State : out Button_State); procedure Dispatch_Event (Mask : in Event_Mask; Button : out Mouse_Button; State : out Button_State) is L : Event_Mask; begin Button := Alt; -- preset to non real button; if (Mask and BUTTON1_EVENTS) /= 0 then Button := Left; elsif (Mask and BUTTON2_EVENTS) /= 0 then Button := Middle; elsif (Mask and BUTTON3_EVENTS) /= 0 then Button := Right; elsif (Mask and BUTTON4_EVENTS) /= 0 then Button := Button4; end if; if Button in Real_Buttons then L := 2 ** (6 * Mouse_Button'Pos (Button)); for I in Button_State'Range loop if (Mask and L) /= 0 then State := I; exit; end if; L := 2 * L; end loop; else State := Pressed; if (Mask and BUTTON_CTRL) /= 0 then Button := Control; elsif (Mask and BUTTON_SHIFT) /= 0 then Button := Shift; elsif (Mask and BUTTON_ALT) /= 0 then Button := Alt; end if; end if; end Dispatch_Event; procedure Get_Event (Event : in Mouse_Event; Y : out Line_Position; X : out Column_Position; Button : out Mouse_Button; State : out Button_State) is Mask : constant Event_Mask := Event.Bstate; begin X := Column_Position (Event.X); Y := Line_Position (Event.Y); Dispatch_Event (Mask, Button, State); end Get_Event; procedure Unget_Mouse (Event : in Mouse_Event) is function Ungetmouse (Ev : Mouse_Event) return C_Int; pragma Import (C, Ungetmouse, "ungetmouse"); begin if Ungetmouse (Event) = Curses_Err then raise Curses_Exception; end if; end Unget_Mouse; function Enclosed_In_Window (Win : Window := Standard_Window; Event : Mouse_Event) return Boolean is function Wenclose (Win : Window; Y : C_Int; X : C_Int) return Curses_Bool; pragma Import (C, Wenclose, "wenclose"); begin if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) = Curses_Bool_False then return False; else return True; end if; end Enclosed_In_Window; function Mouse_Interval (Msec : Natural := 200) return Natural is function Mouseinterval (Msec : C_Int) return C_Int; pragma Import (C, Mouseinterval, "mouseinterval"); begin return Natural (Mouseinterval (C_Int (Msec))); end Mouse_Interval; end Terminal_Interface.Curses.Mouse;
zhmu/ananas
Ada
3,855
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . N U M E R I C S . F L O A T _ R A N D O M -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ package body Ada.Numerics.Float_Random with SPARK_Mode => Off is package SRN renames System.Random_Numbers; use SRN; ----------- -- Image -- ----------- function Image (Of_State : State) return String is begin return Image (SRN.State (Of_State)); end Image; ------------ -- Random -- ------------ function Random (Gen : Generator) return Uniformly_Distributed is begin return Random (SRN.Generator (Gen)); end Random; ----------- -- Reset -- ----------- -- Version that works from calendar procedure Reset (Gen : Generator) is begin Reset (SRN.Generator (Gen)); end Reset; -- Version that works from given initiator value procedure Reset (Gen : Generator; Initiator : Integer) is begin Reset (SRN.Generator (Gen), Initiator); end Reset; -- Version that works from specific saved state procedure Reset (Gen : Generator; From_State : State) is begin Reset (SRN.Generator (Gen), From_State); end Reset; ---------- -- Save -- ---------- procedure Save (Gen : Generator; To_State : out State) is begin Save (SRN.Generator (Gen), To_State); end Save; ----------- -- Value -- ----------- function Value (Coded_State : String) return State is G : SRN.Generator; S : SRN.State; begin Reset (G, Coded_State); Save (G, S); return State (S); end Value; end Ada.Numerics.Float_Random;
pchapin/acrypto
Ada
1,570
ads
--------------------------------------------------------------------------- -- FILE : aco-quadruple_octet_operations.ads -- SUBJECT : Intrinsic and related operations for ACO.Quadruple_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.Quadruple_Octet_Operations is function Shift_Left(Value : ACO.Quadruple_Octet; Count : Natural) return ACO.Quadruple_Octet with Import, Convention => Intrinsic, Global => null; function Shift_Right(Value : ACO.Quadruple_Octet; Count : Natural) return ACO.Quadruple_Octet with Import, Convention => Intrinsic, Global => null, Post => Shift_Right'Result = Value / (2**Count); function Rotate_Left(Value : ACO.Quadruple_Octet; Count : Natural) return ACO.Quadruple_Octet with Import, Convention => Intrinsic, Global => null; function Rotate_Right(Value : ACO.Quadruple_Octet; Count : Natural) return ACO.Quadruple_Octet with Import, Convention => Intrinsic, Global => null; procedure Xor_Array (Accumulator : in out ACO.Quadruple_Octet_Array; Incoming : in ACO.Quadruple_Octet_Array; Success_Flag : out Boolean) with Depends => ((Accumulator, Success_Flag) => (Accumulator, Incoming)); end ACO.Quadruple_Octet_Operations;
stcarrez/ada-el
Ada
1,262
ads
----------------------------------------------------------------------- -- EL.Beans.Tests - Testsuite for EL.Beans -- 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 Util.Tests; package EL.Beans.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test Add_Parameter procedure Test_Add_Parameter (T : in out Test); -- Test the Initialize procedure with a set of expressions procedure Test_Initialize (T : in out Test); end EL.Beans.Tests;
AdaCore/Ada_Drivers_Library
Ada
2,465
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016-2020, 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 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. -- -- -- ------------------------------------------------------------------------------ package Beacon is procedure Initialize_Radio; procedure Send_Beacon_Packet; end Beacon;