repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
mimo/Tracker
Ada
131
adb
with tracker.presentation; procedure tracker.exec is app : tracker.presentation.instance; begin app.Run; end tracker.exec;
AdaCore/Ada_Drivers_Library
Ada
7,503
ads
-- This spec has been automatically generated from STM32F46_79x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; -- STM32F46_79x package STM32_SVD is pragma Preelaborate; -------------------- -- Base addresses -- -------------------- RNG_Base : constant System.Address := System'To_Address (16#50060800#); HASH_Base : constant System.Address := System'To_Address (16#50060400#); CRYP_Base : constant System.Address := System'To_Address (16#50060000#); 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#); DAC_Base : constant System.Address := System'To_Address (16#40007400#); PWR_Base : constant System.Address := System'To_Address (16#40007000#); 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#); UART7_Base : constant System.Address := System'To_Address (16#40007800#); UART8_Base : constant System.Address := System'To_Address (16#40007C00#); 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#); 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#); DSI_Base : constant System.Address := System'To_Address (16#40016C00#); QUADSPI_Base : constant System.Address := System'To_Address (16#A0001000#); end STM32_SVD;
reznikmm/matreshka
Ada
3,597
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.Utp.Defaults.Hash is new AMF.Elements.Generic_Hash (Utp_Default, Utp_Default_Access);
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_Draw.Caption_Type_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Draw_Caption_Type_Attribute_Node is begin return Self : Draw_Caption_Type_Attribute_Node do Matreshka.ODF_Draw.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Draw_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Draw_Caption_Type_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Caption_Type_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Draw_URI, Matreshka.ODF_String_Constants.Caption_Type_Attribute, Draw_Caption_Type_Attribute_Node'Tag); end Matreshka.ODF_Draw.Caption_Type_Attributes;
reznikmm/matreshka
Ada
3,627
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.OCL.Expression_In_Ocls.Hash is new AMF.Elements.Generic_Hash (OCL_Expression_In_Ocl, OCL_Expression_In_Ocl_Access);
AdaCore/training_material
Ada
150
ads
package Random_Numbers is function Random (From, To : Integer) return Integer with Post => Random'Result in From .. To; end Random_Numbers;
reznikmm/matreshka
Ada
4,639
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.Style_Override_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Text_Style_Override_Attribute_Node is begin return Self : Text_Style_Override_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_Style_Override_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Style_Override_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Text_URI, Matreshka.ODF_String_Constants.Style_Override_Attribute, Text_Style_Override_Attribute_Node'Tag); end Matreshka.ODF_Text.Style_Override_Attributes;
zerumius/Amass
Ada
1,243
ads
-- Copyright 2017 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local url = require("url") local json = require("json") name = "CertSpotter" type = "cert" function start() setratelimit(2) end function vertical(ctx, domain) local page, err = request({['url']=buildurl(domain)}) if (err ~= nil and err ~= "") then return end local resp = json.decode(page) if (resp == nil or #resp == 0) then return end for i, r in pairs(resp) do for i, name in pairs(r['dns_names']) do sendnames(ctx, name) end end end function buildurl(domain) local params = { ['domain']=domain, ['include_subdomains']="true", ['match_wildcards']="true", expand="dns_names", } return "https://api.certspotter.com/v1/issuances?" .. url.build_query_string(params) end function sendnames(ctx, content) local names = find(content, subdomainre) if names == nil then return end local found = {} for i, v in pairs(names) do if found[v] == nil then newname(ctx, v) found[v] = true end end end
zhmu/ananas
Ada
331
ads
package Opt5_Pkg is type Object is tagged private; Undefined : constant Object; function Is_Defined (Self : Object) return Boolean; private type Object is tagged null record; Undefined : constant Object := (others => <>); function Is_Defined (Self : Object) return Boolean is (Self /= Undefined); end Opt5_Pkg;
skill-lang/adaCommon
Ada
1,098
adb
-- ___ _ ___ _ _ -- -- / __| |/ (_) | | Common SKilL implementation -- -- \__ \ ' <| | | |__ implementation of builtin field types -- -- |___/_|\_\_|_|____| by: Timm Felden -- -- -- pragma Ada_2012; with Ada.Containers; with Ada.Containers.Doubly_Linked_Lists; with Ada.Containers.Hashed_Maps; with Ada.Containers.Hashed_Sets; with Ada.Containers.Vectors; with Skill.Types; with Skill.Hashes; use Skill.Hashes; with Skill.Types.Pools; with Ada.Tags; package body Skill.Field_Types.Constant_Types is pragma Warnings (Off); function Read_Box (This : access Field_Type; Input : Streams.Reader.Stream) return Types.Box is function Boxed is new Ada.Unchecked_Conversion(Types.Annotation, Types.Box); begin raise Constraint_Error with "can not read a constant!"; return Boxed(null); end Read_Box; end Skill.Field_Types.Constant_Types;
micahwelf/FLTK-Ada
Ada
1,180
ads
package FLTK.Widgets.Groups.Windows.Single is type Single_Window is new Window with private; type Single_Window_Reference (Data : not null access Single_Window'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Single_Window; function Create (W, H : in Integer; Text : in String) return Single_Window; end Forge; procedure Show (This : in out Single_Window); procedure Flush (This : in out Single_Window); procedure Draw (This : in out Single_Window); function Handle (This : in out Single_Window; Event : in Event_Kind) return Event_Outcome; private type Single_Window is new Window with null record; overriding procedure Finalize (This : in out Single_Window); pragma Inline (Show); pragma Inline (Flush); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Groups.Windows.Single;
AdaCore/gpr
Ada
1,351
ads
-- -- Copyright (C) 2020-2022, AdaCore -- SPDX-License-Identifier: Apache-2.0 -- generic type Precomputed_Symbol_Index is (<>); -- Indexes for symbols to pre-compute in each symbol table with function Precomputed_Symbol (Index : Precomputed_Symbol_Index) return Text_Type is <>; -- Return the symbol corresponding to the precomputed symbol Index package Gpr_Parser_Support.Symbols.Precomputed is type Precomputed_Symbol_Table_Record is new Symbol_Table_Record with private; type Precomputed_Symbol_Table is access all Precomputed_Symbol_Table_Record'Class; function Precomputed_Symbol (ST : Precomputed_Symbol_Table; Index : Precomputed_Symbol_Index) return Thin_Symbol with Inline; function Precomputed_Symbol (ST : Precomputed_Symbol_Table; Index : Precomputed_Symbol_Index) return Symbol_Type with Inline; -- Return the precomputed symbol corresponding to Index function Create_Symbol_Table return Precomputed_Symbol_Table; -- Allocate a new symbol table and return it private type Precomputed_Symbol_Array is array (Precomputed_Symbol_Index) of Thin_Symbol; type Precomputed_Symbol_Table_Record is new Symbol_Table_Record with record Precomputed : Precomputed_Symbol_Array; end record; end Gpr_Parser_Support.Symbols.Precomputed;
BrickBot/Bound-T-H8-300
Ada
34,619
adb
-- HRT.TPOF (body) -- -- A component of the Bound-T Worst-Case Execution Time Tool. -- ------------------------------------------------------------------------------- -- Copyright (c) 1999 .. 2015 Tidorum Ltd -- 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. -- -- 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 owner 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. -- -- Other modules (files) of this software composition should contain their -- own copyright statements, which may have different copyright and usage -- conditions. The above conditions apply to this file. ------------------------------------------------------------------------------- -- -- $Revision: 1.8 $ -- $Date: 2015/10/24 20:05:49 $ -- -- $Log: hrt-tpof.adb,v $ -- Revision 1.8 2015/10/24 20:05:49 niklas -- Moved to free licence. -- -- Revision 1.7 2007-08-14 12:36:38 niklas -- BT-CH-0072: Corrections to handling ambiguous names. -- -- Revision 1.6 2001/06/19 21:41:01 holsti -- TPO file-name suffix is now ".tpo". -- -- Revision 1.5 2001/04/12 13:22:02 ville -- NC_052 fixed -- -- Revision 1.4 2001/04/11 13:36:03 ville -- Parameter Delimiter added to Programs.Identify -- -- Revision 1.3 2001/04/04 13:27:12 ville -- Programs.Add_Root used -- -- Revision 1.2 2001/04/03 10:34:09 ville -- Missing assigment of thread definition added -- -- Revision 1.1 2001/03/14 14:51:31 ville -- HRT rework second phase: skeleton package splitted -- with Ada.Strings.Fixed; with Ada.Text_IO; with OpenToken.Text_Feeder.Text_IO; with Output; with HRT.Lexer; with Symbols; package body HRT.TPOF is TPOF_Suffix : constant String := "tpo"; -- -- Default and expected suffix of TPOF name. ESF_Suffix : constant String := "esf"; -- -- Generated suffix for ESF name. function Check_TPOF_Name (TPOF : String) return String -- -- Checks that TPOF name exists and has the correct suffix. -- Returns a string to be used as ESF name. -- is use Ada.Strings; use Ada.Strings.Fixed; Ind : Natural; -- The index of the last period in TPOF, or zero -- if there is no period. begin Ind := Index(TPOF, ".", Backward); if Ind > 0 and then TPOF(Ind+1..TPOF'Last) = TPOF_Suffix then -- The expected suffix is there. -- Replace if with the ESF suffix: return TPOF(TPOF'First..Ind) & ESF_Suffix; else -- The expected suffix is not there. Output.Warning (Text => "TPOF name does not end with '" & TPOF_Suffix & '''); -- raise TPOF_Error; TBM ? -- Add the ESF suffix: return TPOF & '.' & ESF_Suffix; end if; end Check_TPOF_Name; procedure Get_TPOF (TPOF_Name : in String; Program : in out Programs.Program_T; HRT_Struct : out HRT_Struct_T) -- using : -- name of TPO file, -- access handles to target program -- giving: -- HRT structure as defined in TPOF, -- or failure (errors in TPOF)) is Program_Locus : constant String := Output.Program_File( Output.Current_Locus); use HRT.Lexer; Analyzer : Tokenizer.Instance := Tokenizer.Initialize(Syntax); File : Ada.Text_IO.File_Type; Old_File : constant Ada.Text_IO.File_Access := Ada.Text_IO.Current_Input; -- Store current input file. Errors : Natural := 0; All_Found : Boolean := True; -- All root subprograms (threads and entries) are found from program. Prog_Comments : String_Set_T; Roots : Programs.Subprogram_Set_T; -- Collect root subprograms into set. function Token_Image return String is begin case Tokenizer.ID(Analyzer) is when Barrier_Tok => return "barrier"; when End_Of_Text => return ""; when End_Tok => return "end"; when Entry_Tok => return "entry"; when Program_Tok => return "program"; when Protected_Tok => return "protected"; when Resource_Tok => return "resource"; when Root_Tok => return "root"; when Thread_Tok => return "thread"; when Type_Tok => return "type"; when Cyclic_Tok => return "cyclic"; when Sporadic_Tok => return "sporadic"; when Interrupt_Tok => return "interrupt_sporadic"; when Synchro_Tok => return "synchro"; when Comment_Tok => return Tokenizer.Lexeme (Analyzer); when Whitespace => return ""; when Name_Tok => return '"' & Tokenizer.Lexeme (Analyzer) & '"'; end case; end Token_Image; procedure Output_Error(Msg : in String; Locus : in Output.Locus_T) is -- Outputs an error message. use type Output.Locus_T; Statement_Locus : constant Output.Statement_Locus_T := Output.Locus(Line_Number => Output.Line_Number_T( Tokenizer.Line (Analyzer))); begin Output.Error( Text => "col" & Integer'Image(Tokenizer.Column (Analyzer)) & " : " & Msg & " Token: " & Token_Image, Locus => Locus & Output.Locus(Statements => Output.Rainge(Statement_Locus, Statement_Locus))); Errors := Errors + 1; end Output_Error; procedure Output_Warning(Msg : in String; Locus : in Output.Locus_T) is -- Outputs a warning message. use type Output.Locus_T; Statement_Locus : constant Output.Statement_Locus_T := Output.Locus(Line_Number => Output.Line_Number_T( Tokenizer.Line (Analyzer))); begin Output.Warning( Text => "col" & Integer'Image(Tokenizer.Column (Analyzer)) & " : " & Msg & " Token: " & Token_Image, Locus => Locus & Output.Locus(Statements => Output.Rainge(Statement_Locus, Statement_Locus))); end Output_Warning; procedure Next_Token (Comments : in out String_Set_T) is -- Finds the next token and checks that there is one. begin loop Tokenizer.Find_Next (Analyzer); exit when Tokenizer.ID(Analyzer) /= Comment_Tok; String_Vectors.Append(Comments, new String' (Tokenizer.Lexeme(Analyzer))); end loop; if Tokenizer.ID(Analyzer) = End_Of_Text then Output_Error( Msg => "Unexpected end of file.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name)); raise TPOF_Syntax_Error; end if; end Next_Token; function Skip_Till_End return String -- -- Skips over the rest of an definition. -- Returns the name after keyword end; is Comments : String_Set_T; -- Since this function is called only in an error situation -- the comments need not to be returned. begin loop case Tokenizer.ID(Analyzer) is when End_Tok => Next_Token(Comments); return Tokenizer.Lexeme(Analyzer); when Others => Output_Warning( Msg => "Skipping token.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name)); Next_Token(Comments); end case; end loop; end Skip_Till_End; procedure Find ( Name : in String; Msg : in String; Found : out Boolean; Sub : out Programs.Subprogram_T) is begin Programs.Identify ( Identifier => Name, Delimiter => Symbols.Default_Delimiter, Program => Program, Subprogram => Sub); Found := True; exception when Symbols.Ambiguous_Name => Output_Error ( Msg => Msg & " " & Name & " is an ambiguous name. ", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name)); Found := False; when Programs.Subprogram_Not_Found => Output_Error ( Msg => Msg & " " & Name & " is not found. ", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name)); Found := False; end Find; function Get_Thread return Def_T is -- use Thread_Vectors; Ret : Def_T := new Def_Object_T(Thread); Comments : String_Set_T; Found : Boolean; begin Next_Token(Comments); Ret.Thread_Name := new String'(Tokenizer.Lexeme(Analyzer)); Ret.Root := new Thread_Object_T; Ret.Root.Def := Ret; Next_Token(Comments); if Tokenizer.ID(Analyzer) = Type_Tok then Next_Token(Comments); if Tokenizer.ID(Analyzer) in Thread_Type_T then case Tokenizer.ID(Analyzer) is when Cyclic_Tok => Ret.Thread_Kind := Cyclic; when Sporadic_Tok => Ret.Thread_Kind := Sporadic; when Interrupt_Tok => Ret.Thread_Kind := Interrupt_Sporadic; when others => -- Not possible. null; end case; Next_Token(Comments); if Tokenizer.ID(Analyzer) = Root_Tok then Next_Token(Comments); Ret.Root.Name := new String'(Tokenizer.Lexeme(Analyzer)); Next_Token(Comments); else Ret.Root.Name := Ret.Thread_Name; end if; if Tokenizer.ID(Analyzer) = End_Tok then Next_Token(Comments); if Ret.Thread_Name.all /= Tokenizer.Lexeme(Analyzer) then Output_Warning( Msg => "Thread_Name at end does not match.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Ret.Thread_Name.all)); end if; -- Find thread from program. Find(Name => Ret.Root.Name.all, Msg => "Root subprogram", Found => Found, Sub => Ret.Root.Sub); if not Found then All_Found := false; Next_Token(Prog_Comments); return null; end if; if not Programs.Is_Member( Subprogram => Ret.Root.Sub, Of_Set => Roots) then Programs.Add(To => Roots, Adding => Ret.Root.Sub); Programs.Add_Root( Root => Ret.Root.Sub, To => Program, Call => Ret.Root.Call); else Output_Error ( Msg => "Duplicate entry", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Ret.Thread_Name.all)); raise TPOF_Error; end if; -- Append to HRT object. Add(To => HRT_Struct.Threads, Adding => Ret.Root); if String_Vectors.Length(Comments) > 0 then -- Add comments, if any. Ret.Comments := new Name_List_T' (String_Vectors.To_Vector(Comments)); end if; Next_Token(Prog_Comments); return Ret; else Output_Error( Msg => "End " & Ret.Thread_Name.all & " expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Ret.Thread_Name.all)); end if; else Output_Error( Msg => "Thread_Type expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Ret.Thread_Name.all)); end if; else Output_Error( Msg => "Type expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Ret.Thread_Name.all)); end if; -- Skip this protected object if Ret.Thread_Name.all /= Skip_Till_End then Output_Warning( Msg => "Thread_Name at end does not match.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Ret.Thread_Name.all)); end if; Next_Token(Prog_Comments); return null; end Get_Thread; function Get_Resource_Or_Synchro return Def_T is use Entry_Vectors; Ret : Def_T; Comments : String_Set_T; Found : Boolean; Both_Found : Boolean := True; -- Both synchro entries found. begin Next_Token(Comments); declare Name : Name_T := new String'(Tokenizer.Lexeme(Analyzer)); begin Next_Token(Comments); if Tokenizer.ID(Analyzer) /= Type_Tok then Output_Error( Msg => "Protected object type expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); -- Skip this protected object if Name.all /= Skip_Till_End then Output_Warning( Msg => "PO_Name at end does not match.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; else Next_Token(Comments); case Tokenizer.ID(Analyzer) is when Resource_Tok => Ret := new Def_Object_T(Resource); Next_Token(Comments); loop if Tokenizer.ID(Analyzer) /= Entry_Tok then Output_Error( Msg => "PO_Entry expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); Next_Token(Comments); else Next_Token(Comments); declare PO_Entry : Entry_T := new Entry_Object_T; Entry_Name : Name_T := new String' (Tokenizer.Lexeme(Analyzer)); begin PO_Entry.Name := Entry_Name; PO_Entry.Def := Ret; Find(Name => PO_Entry.Name.all, Msg => "Entry subprogram", Found => Found, Sub => PO_Entry.Sub); if not Found then All_Found := false; else if not Programs.Is_Member( Subprogram => PO_Entry.Sub, Of_Set => Roots) then Programs.Add(To => Roots, Adding => PO_Entry.Sub); Programs.Add_Root( Root => PO_Entry.Sub, To => Program, Call => PO_Entry.Call); else Output_Error ( Msg => "Duplicate entry " & PO_Entry.Name.all, Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); raise TPOF_Error; end if; -- Add PO_Entry to this resource and -- to PO_Entries on HRT object. Append(To => Ret.PO_Entries, Value => PO_Entry); Add(To => HRT_Struct.PO_Entries, Adding => PO_Entry); end if; Next_Token(Comments); end; end if; exit when Tokenizer.ID(Analyzer) = End_Tok; end loop; Ret.Res_Name := Name; Next_Token(Comments); if Name.all /= Tokenizer.Lexeme(Analyzer) then Output_Warning( Msg => "PO_Name at end does not match.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; if String_Vectors.Length(Comments) > 0 then -- Add comments, if any. Ret.Comments := new Name_List_T' (String_Vectors.To_Vector(Comments)); end if; Next_Token(Prog_Comments); return Ret; when Synchro_Tok => Ret := new Def_Object_T(Synchro); Ret.PO_Entry := new Entry_Object_T; Ret.Barriered := new Entry_Object_T; Ret.PO_Entry.Def := Ret; Ret.Barriered.Def := Ret; Next_Token(Comments); if Tokenizer.ID(Analyzer) = Entry_Tok then Next_Token(Comments); Ret.PO_Entry.Name := new String'(Tokenizer.Lexeme(Analyzer)); Next_Token(Comments); if Tokenizer.ID(Analyzer) = Barrier_Tok then Next_Token(Comments); if Tokenizer.ID(Analyzer) = Entry_Tok then Next_Token(Comments); Ret.Barriered.Name := new String'(Tokenizer.Lexeme(Analyzer)); Next_Token(Comments); if Tokenizer.ID(Analyzer) = End_Tok then Next_Token(Comments); if Name.all /= Tokenizer.Lexeme(Analyzer) then Output_Warning( Msg => "PO_Name at end does not match.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; Ret.Sync_Name := Name; Find(Name => Ret.PO_Entry.Name.all, Msg => "Entry subprogram", Found => Found, Sub => Ret.PO_Entry.Sub); if Found then if not Programs.Is_Member( Subprogram => Ret.PO_Entry.Sub, Of_Set => Roots) then Programs.Add(To => Roots, Adding => Ret.PO_Entry.Sub); Programs.Add_Root( Root => Ret.PO_Entry.Sub, To => Program, Call => Ret.PO_Entry.Call); else Output_Error ( Msg => "Duplicate entry " & Ret.PO_Entry.Name.all, Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); raise TPOF_Error; end if; else Both_Found := false; end if; Find(Name => Ret.Barriered.Name.all, Msg => "Barriered entry subprogram", Found => Found, Sub => Ret.Barriered.Sub); if Found then if not Programs.Is_Member( Subprogram => Ret.Barriered.Sub, Of_Set => Roots) then Programs.Add(To => Roots, Adding => Ret.Barriered.Sub); Programs.Add_Root( Root => Ret.Barriered.Sub, To => Program, Call => Ret.Barriered.Call); else Output_Error ( Msg => "Duplicate entry " & Ret.Barriered.Name.all, Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); raise TPOF_Error; end if; else Both_Found := false; end if; if Both_Found then -- Add PO_Entries to HRT object. Add(To => HRT_Struct.PO_Entries, Adding => Ret.PO_Entry); Add(To => HRT_Struct.PO_Entries, Adding => Ret.Barriered); else -- At least one entry was not found. Next_Token(Prog_Comments); return null; end if; if String_Vectors.Length(Comments) > 0 then -- Add comments, if any. Ret.Comments := new Name_List_T' (String_Vectors.To_Vector(Comments)); end if; Next_Token(Prog_Comments); return Ret; else Output_Error( Msg => "End " & Name.all & " expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; else Output_Error( Msg => "PO_Entry expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; else Output_Error( Msg => "Barriered_PO_Entry expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; else Output_Error( Msg => "PO_Entry expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; -- Skip this protected object if Name.all /= Skip_Till_End then Output_Warning( Msg => "PO_name at end does not match.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; Next_Token(Prog_Comments); return null; when others => -- Skip this protected object if Name.all /= Skip_Till_End then Output_Warning( Msg => "PO_name at end does not match.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name, Call_Path => Name.all)); end if; end case; end if; Next_Token(Prog_Comments); return null; end; end Get_Resource_Or_Synchro; procedure Get_Definitions is Def : Def_T; begin loop case Tokenizer.ID(Analyzer) is when Thread_Tok => Def := Get_Thread; when Protected_Tok => Def := Get_Resource_Or_Synchro; when End_Tok => exit; when others => Output_Error( Msg => "Definition or end prog_name expected.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name)); Next_Token(Prog_Comments); end case; if Def /= null then Def_Vectors.Append(To => HRT_Struct.Definitions, Value => Def); end if; end loop; end Get_Definitions; procedure Get_Program is begin Next_Token(Prog_Comments); if Tokenizer.ID(Analyzer) = Program_Tok then Next_Token(Prog_Comments); HRT_Struct.Prog_Name := new String' (Tokenizer.Lexeme(Analyzer)); Next_Token(Prog_Comments); if Tokenizer.ID(Analyzer) = End_Tok then Output_Error( Msg => "No definitions found.", Locus => Output.Locus ( Program_File => Program_Locus, Source_File => TPOF_Name)); else Get_Definitions; end if; if Tokenizer.ID(Analyzer) = End_Tok then Next_Token(Prog_Comments); if HRT_Struct.Prog_Name.all /= Tokenizer.Lexeme(Analyzer) then Output_Warning( Msg => "Program name at end does not match.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name)); end if; else Output_Error( Msg => "End program expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name)); raise TPOF_Syntax_Error; end If; if Errors > 0 then raise TPOF_Syntax_Error; end if; else Output_Error( Msg => "Program expected.", Locus => Output.Locus( Program_File => Program_Locus, Source_File => TPOF_Name)); raise TPOF_Syntax_Error; end if; if String_Vectors.Length(Prog_Comments) > 0 then -- Add comments, if any. HRT_Struct.Comments := new Name_List_T' (String_Vectors.To_Vector(Prog_Comments)); end if; exception when TPOF_Syntax_Error => Output.Error(Text => "TPO file contained total of" & Natural'Image(Errors) & " syntax errors."); raise; end Get_Program; begin -- Open the TPOF and read and parse it; Ada.Text_IO.Open (File => File, Mode => Ada.Text_IO.In_File, Name => TPOF_Name); Ada.Text_IO.Set_Input (File); Tokenizer.Input_Feeder := OpenToken.Text_Feeder.Text_IO.Create; Get_Program; Ada.Text_IO.Close (File => File); Ada.Text_IO.Set_Input(Old_File.all); -- Check that the target program contains the entities -- named in the TPOF (error message and failure indication -- if some check fails): if not All_Found then Output.Error( Text => "TPO file contained subprograms" & " that where not found."); raise TPOF_Error; end if; exception when Ada.Text_IO.Name_Error => Output.Error(Text => "TPO file " & TPOF_Name & " was not found."); raise TPOF_Error; when Ada.Text_IO.Use_Error | Ada.Text_IO.Status_Error => Output.Error(Text => "TPO file " & TPOF_Name & " could not be opened for reading."); raise TPOF_Error; end Get_TPOF; end HRT.TPOF;
Heziode/lsystem-editor
Ada
1,898
adb
------------------------------------------------------------------------------- -- LSE -- L-System Editor -- Author: Heziode -- -- License: -- MIT License -- -- Copyright (c) 2018 Quentin Dauprat (Heziode) <[email protected]> -- -- Permission is hereby granted, free of charge, to any person obtaining a -- copy of this software and associated documentation files (the "Software"), -- to deal in the Software without restriction, including without limitation -- the rights to use, copy, modify, merge, publish, distribute, sublicense, -- and/or sell copies of the Software, and to permit persons to whom the -- Software is furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -- DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- package body LSE.Model.L_System.Error.Invalid_Rule is function Initialize (Value : String) return Instance is begin return Instance '(Error => Error_Type.Invalid_Rule, Value => To_Unbounded_String (Value)); end Initialize; function Get_Error (This : Instance) return String is begin return "Ununderstandable rule found near to <" & To_String (This.Value) & ">"; end Get_Error; end LSE.Model.L_System.Error.Invalid_Rule;
optikos/oasis
Ada
6,013
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Discrete_Ranges; with Program.Elements.Component_Definitions; with Program.Elements.Formal_Constrained_Array_Types; with Program.Element_Visitors; package Program.Nodes.Formal_Constrained_Array_Types is pragma Preelaborate; type Formal_Constrained_Array_Type is new Program.Nodes.Node and Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type and Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type_Text with private; function Create (Array_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Index_Subtypes : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Right_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Of_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Component_Definition : not null Program.Elements.Component_Definitions .Component_Definition_Access) return Formal_Constrained_Array_Type; type Implicit_Formal_Constrained_Array_Type is new Program.Nodes.Node and Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type with private; function Create (Index_Subtypes : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Component_Definition : not null Program.Elements.Component_Definitions .Component_Definition_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Formal_Constrained_Array_Type with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Formal_Constrained_Array_Type is abstract new Program.Nodes.Node and Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type with record Index_Subtypes : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Component_Definition : not null Program.Elements.Component_Definitions .Component_Definition_Access; end record; procedure Initialize (Self : aliased in out Base_Formal_Constrained_Array_Type'Class); overriding procedure Visit (Self : not null access Base_Formal_Constrained_Array_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Index_Subtypes (Self : Base_Formal_Constrained_Array_Type) return not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; overriding function Component_Definition (Self : Base_Formal_Constrained_Array_Type) return not null Program.Elements.Component_Definitions .Component_Definition_Access; overriding function Is_Formal_Constrained_Array_Type_Element (Self : Base_Formal_Constrained_Array_Type) return Boolean; overriding function Is_Formal_Type_Definition_Element (Self : Base_Formal_Constrained_Array_Type) return Boolean; overriding function Is_Definition_Element (Self : Base_Formal_Constrained_Array_Type) return Boolean; type Formal_Constrained_Array_Type is new Base_Formal_Constrained_Array_Type and Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type_Text with record Array_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Right_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Of_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Formal_Constrained_Array_Type_Text (Self : aliased in out Formal_Constrained_Array_Type) return Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type_Text_Access; overriding function Array_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Left_Bracket_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Right_Bracket_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Of_Token (Self : Formal_Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Formal_Constrained_Array_Type is new Base_Formal_Constrained_Array_Type with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Formal_Constrained_Array_Type_Text (Self : aliased in out Implicit_Formal_Constrained_Array_Type) return Program.Elements.Formal_Constrained_Array_Types .Formal_Constrained_Array_Type_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Formal_Constrained_Array_Type) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Formal_Constrained_Array_Type) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Formal_Constrained_Array_Type) return Boolean; end Program.Nodes.Formal_Constrained_Array_Types;
AdaCore/Ada_Drivers_Library
Ada
1,759
adb
with Ada.Text_IO; use Ada.Text_IO; with Partitions; use Partitions; with File_Block_Drivers; use File_Block_Drivers; with Test_Directories; use Test_Directories; with File_IO; procedure TC_Read_Partitions is use type File_IO.Status_Code; procedure List_Partitions (Path_To_Disk_Image : String); --------------------- -- List_Partitions -- --------------------- procedure List_Partitions (Path_To_Disk_Image : String) is Disk : aliased File_Block_Driver; Nbr : Natural; P_Entry : Partition_Entry; Status : File_IO.Status_Code; begin Status := Disk.Open (Path_To_Disk_Image, File_IO.Read_Only); if Status /= File_IO.OK then Put_Line ("Cannot open disk image '" & Path_To_Disk_Image & "'"); return; end if; Nbr := Number_Of_Partitions (Disk'Unchecked_Access); Put_Line ("Disk '" & Path_To_Disk_Image & "' has " & Nbr'Img & " parition(s)"); for Id in 1 .. Nbr loop if Get_Partition_Entry (Disk'Unchecked_Access, Id, P_Entry) /= Status_Ok then Put_Line ("Cannot read partition :" & Id'Img); else Put_Line (" - partition :" & Id'Img); Put_Line (" Status:" & P_Entry.Status'Img); Put_Line (" Kind: " & P_Entry.Kind'Img); Put_Line (" LBA: " & P_Entry.First_Sector_LBA'Img); Put_Line (" Number of sectors: " & P_Entry.Number_Of_Sectors'Img); end if; end loop; end List_Partitions; begin Mount_Test_Directory; List_Partitions ("/" & Test_Dir_Mount_Name & "/disk_8_partitions.img"); end TC_Read_Partitions;
sungyeon/drake
Ada
36
ads
../machine-apple-darwin/s-ntitco.ads
charlie5/cBound
Ada
1,633
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_get_clip_plane_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; plane : aliased Interfaces.Integer_32; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_glx_get_clip_plane_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_clip_plane_request_t.Item, Element_Array => xcb.xcb_glx_get_clip_plane_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_get_clip_plane_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_clip_plane_request_t.Pointer, Element_Array => xcb.xcb_glx_get_clip_plane_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_get_clip_plane_request_t;
Fabien-Chouteau/GESTE
Ada
130,273
ads
package GESTE_Fonts.FreeSans18pt7b is Font : constant Bitmap_Font_Ref; private FreeSans18pt7bBitmaps : aliased constant Font_Bitmap := ( 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#79#, 16#C0#, 16#00#, 16#00#, 16#79#, 16#C0#, 16#00#, 16#00#, 16#79#, 16#C0#, 16#00#, 16#00#, 16#79#, 16#C0#, 16#00#, 16#00#, 16#79#, 16#C0#, 16#00#, 16#00#, 16#31#, 16#C0#, 16#00#, 16#00#, 16#31#, 16#C0#, 16#00#, 16#00#, 16#30#, 16#C0#, 16#00#, 16#00#, 16#30#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C3#, 16#80#, 16#00#, 16#01#, 16#C3#, 16#80#, 16#00#, 16#01#, 16#83#, 16#00#, 16#00#, 16#01#, 16#83#, 16#00#, 16#00#, 16#03#, 16#87#, 16#00#, 16#00#, 16#03#, 16#87#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#07#, 16#0E#, 16#00#, 16#00#, 16#07#, 16#0E#, 16#00#, 16#00#, 16#07#, 16#0E#, 16#00#, 16#00#, 16#06#, 16#0E#, 16#00#, 16#00#, 16#06#, 16#0C#, 16#00#, 16#00#, 16#FF#, 16#FF#, 16#C0#, 16#00#, 16#FF#, 16#FF#, 16#C0#, 16#00#, 16#FF#, 16#FF#, 16#C0#, 16#00#, 16#0E#, 16#1C#, 16#00#, 16#00#, 16#0C#, 16#18#, 16#00#, 16#00#, 16#0C#, 16#18#, 16#00#, 16#00#, 16#1C#, 16#38#, 16#00#, 16#00#, 16#1C#, 16#38#, 16#00#, 16#00#, 16#1C#, 16#38#, 16#00#, 16#00#, 16#18#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#1E#, 16#EF#, 16#00#, 16#00#, 16#38#, 16#E3#, 16#80#, 16#00#, 16#38#, 16#E3#, 16#80#, 16#00#, 16#38#, 16#E3#, 16#80#, 16#00#, 16#30#, 16#E1#, 16#80#, 16#00#, 16#38#, 16#E0#, 16#00#, 16#00#, 16#38#, 16#E0#, 16#00#, 16#00#, 16#3C#, 16#E0#, 16#00#, 16#00#, 16#3E#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#00#, 16#01#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#E3#, 16#C0#, 16#00#, 16#00#, 16#E1#, 16#C0#, 16#00#, 16#70#, 16#E1#, 16#C0#, 16#00#, 16#70#, 16#E1#, 16#C0#, 16#00#, 16#70#, 16#E1#, 16#C0#, 16#00#, 16#38#, 16#E3#, 16#C0#, 16#00#, 16#3C#, 16#E7#, 16#80#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#07#, 16#80#, 16#0E#, 16#00#, 16#1F#, 16#E0#, 16#0C#, 16#00#, 16#3F#, 16#F0#, 16#1C#, 16#00#, 16#38#, 16#70#, 16#18#, 16#00#, 16#70#, 16#38#, 16#38#, 16#00#, 16#70#, 16#38#, 16#30#, 16#00#, 16#60#, 16#38#, 16#60#, 16#00#, 16#70#, 16#38#, 16#60#, 16#00#, 16#38#, 16#70#, 16#C0#, 16#00#, 16#3F#, 16#F1#, 16#C0#, 16#00#, 16#1F#, 16#E1#, 16#80#, 16#00#, 16#07#, 16#83#, 16#80#, 16#00#, 16#00#, 16#03#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#0F#, 16#F0#, 16#00#, 16#06#, 16#1F#, 16#F8#, 16#00#, 16#0E#, 16#1C#, 16#3C#, 16#00#, 16#0C#, 16#38#, 16#1C#, 16#00#, 16#18#, 16#38#, 16#0C#, 16#00#, 16#18#, 16#38#, 16#0C#, 16#00#, 16#30#, 16#38#, 16#1C#, 16#00#, 16#70#, 16#1C#, 16#3C#, 16#00#, 16#60#, 16#1F#, 16#F8#, 16#00#, 16#E0#, 16#0F#, 16#F0#, 16#00#, 16#C0#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#01#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#07#, 16#8F#, 16#00#, 16#00#, 16#07#, 16#07#, 16#00#, 16#00#, 16#07#, 16#03#, 16#00#, 16#00#, 16#07#, 16#07#, 16#00#, 16#00#, 16#07#, 16#07#, 16#00#, 16#00#, 16#07#, 16#8F#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#38#, 16#70#, 16#00#, 16#1E#, 16#3C#, 16#70#, 16#00#, 16#3C#, 16#1E#, 16#70#, 16#00#, 16#38#, 16#0F#, 16#E0#, 16#00#, 16#38#, 16#07#, 16#E0#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#3C#, 16#07#, 16#E0#, 16#00#, 16#1E#, 16#0F#, 16#F0#, 16#00#, 16#1F#, 16#FE#, 16#78#, 16#00#, 16#0F#, 16#FC#, 16#38#, 16#00#, 16#03#, 16#F0#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#3B#, 16#70#, 16#00#, 16#00#, 16#7F#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0D#, 16#C0#, 16#00#, 16#00#, 16#1C#, 16#C0#, 16#00#, 16#00#, 16#08#, 16#40#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#07#, 16#00#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#1C#, 16#07#, 16#00#, 16#00#, 16#1F#, 16#0F#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#70#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#3E#, 16#0F#, 16#80#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#01#, 16#DE#, 16#00#, 16#00#, 16#03#, 16#9E#, 16#00#, 16#00#, 16#07#, 16#1E#, 16#00#, 16#00#, 16#07#, 16#1E#, 16#00#, 16#00#, 16#0E#, 16#1E#, 16#00#, 16#00#, 16#1C#, 16#1E#, 16#00#, 16#00#, 16#38#, 16#1E#, 16#00#, 16#00#, 16#38#, 16#1E#, 16#00#, 16#00#, 16#70#, 16#1E#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#80#, 16#00#, 16#0F#, 16#FF#, 16#80#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#F8#, 16#00#, 16#00#, 16#3B#, 16#FE#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#00#, 16#00#, 16#3E#, 16#0F#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#3E#, 16#0F#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#0F#, 16#80#, 16#00#, 16#1E#, 16#03#, 16#80#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#F8#, 16#00#, 16#00#, 16#3B#, 16#FE#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#00#, 16#00#, 16#3F#, 16#0F#, 16#80#, 16#00#, 16#3C#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#1C#, 16#07#, 16#80#, 16#00#, 16#1F#, 16#0F#, 16#80#, 16#00#, 16#0F#, 16#FF#, 16#00#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#C0#, 16#00#, 16#3F#, 16#FF#, 16#C0#, 16#00#, 16#3F#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#1C#, 16#07#, 16#80#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#80#, 16#00#, 16#3C#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#01#, 16#C0#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#78#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#3C#, 16#03#, 16#80#, 16#00#, 16#3E#, 16#0F#, 16#80#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#00#, 16#3C#, 16#07#, 16#C0#, 16#00#, 16#3E#, 16#0F#, 16#C0#, 16#00#, 16#1F#, 16#FD#, 16#C0#, 16#00#, 16#0F#, 16#F9#, 16#C0#, 16#00#, 16#03#, 16#F3#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#00#, 16#00#, 16#1E#, 16#1F#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#0F#, 16#80#, 16#00#, 16#1E#, 16#03#, 16#80#, 16#00#, 16#1C#, 16#03#, 16#C0#, 16#00#, 16#1C#, 16#01#, 16#C0#, 16#00#, 16#1C#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#FC#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#FC#, 16#03#, 16#F0#, 16#01#, 16#F0#, 16#00#, 16#F8#, 16#03#, 16#C0#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#0F#, 16#0E#, 16#01#, 16#F0#, 16#07#, 16#1C#, 16#03#, 16#FD#, 16#C7#, 16#1C#, 16#0F#, 16#0D#, 16#C3#, 16#38#, 16#1E#, 16#07#, 16#83#, 16#38#, 16#1C#, 16#07#, 16#83#, 16#38#, 16#38#, 16#07#, 16#83#, 16#70#, 16#38#, 16#07#, 16#03#, 16#70#, 16#78#, 16#07#, 16#03#, 16#70#, 16#70#, 16#07#, 16#03#, 16#70#, 16#70#, 16#0E#, 16#07#, 16#70#, 16#70#, 16#0E#, 16#07#, 16#78#, 16#78#, 16#1E#, 16#0F#, 16#38#, 16#38#, 16#1E#, 16#1E#, 16#38#, 16#3C#, 16#3E#, 16#3C#, 16#3C#, 16#1F#, 16#EF#, 16#F8#, 16#1E#, 16#07#, 16#87#, 16#E0#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#03#, 16#00#, 16#00#, 16#FF#, 16#FF#, 16#80#, 16#00#, 16#3F#, 16#FF#, 16#80#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#EE#, 16#00#, 16#00#, 16#00#, 16#EF#, 16#00#, 16#00#, 16#01#, 16#E7#, 16#00#, 16#00#, 16#01#, 16#C7#, 16#00#, 16#00#, 16#01#, 16#C7#, 16#80#, 16#00#, 16#03#, 16#C3#, 16#80#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#, 16#03#, 16#83#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#E0#, 16#00#, 16#0F#, 16#FF#, 16#E0#, 16#00#, 16#0F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1E#, 16#00#, 16#70#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#38#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#70#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1C#, 16#01#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#70#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#70#, 16#00#, 16#1C#, 16#00#, 16#70#, 16#00#, 16#1C#, 16#01#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#F8#, 16#00#, 16#1C#, 16#00#, 16#38#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#38#, 16#00#, 16#1C#, 16#00#, 16#F8#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#01#, 16#FF#, 16#E0#, 16#00#, 16#03#, 16#FF#, 16#F0#, 16#00#, 16#07#, 16#C0#, 16#F8#, 16#00#, 16#0F#, 16#00#, 16#3C#, 16#00#, 16#1E#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#3C#, 16#00#, 16#1E#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#0E#, 16#00#, 16#38#, 16#00#, 16#0E#, 16#00#, 16#3C#, 16#00#, 16#1E#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#1E#, 16#00#, 16#3C#, 16#00#, 16#0F#, 16#00#, 16#3C#, 16#00#, 16#0F#, 16#C0#, 16#F8#, 16#00#, 16#07#, 16#FF#, 16#F0#, 16#00#, 16#01#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1C#, 16#01#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#1C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#01#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#01#, 16#FF#, 16#F0#, 16#00#, 16#03#, 16#FF#, 16#F8#, 16#00#, 16#07#, 16#C0#, 16#7C#, 16#00#, 16#0F#, 16#00#, 16#1E#, 16#00#, 16#1E#, 16#00#, 16#0F#, 16#00#, 16#1C#, 16#00#, 16#0F#, 16#00#, 16#3C#, 16#00#, 16#07#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#03#, 16#FF#, 16#80#, 16#78#, 16#03#, 16#FF#, 16#80#, 16#78#, 16#03#, 16#FF#, 16#80#, 16#38#, 16#00#, 16#03#, 16#80#, 16#38#, 16#00#, 16#03#, 16#80#, 16#3C#, 16#00#, 16#03#, 16#80#, 16#3C#, 16#00#, 16#07#, 16#80#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#1E#, 16#00#, 16#0F#, 16#80#, 16#0F#, 16#00#, 16#1F#, 16#80#, 16#07#, 16#E0#, 16#7B#, 16#80#, 16#03#, 16#FF#, 16#F3#, 16#80#, 16#01#, 16#FF#, 16#E3#, 16#80#, 16#00#, 16#7F#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1F#, 16#FF#, 16#FC#, 16#00#, 16#1F#, 16#FF#, 16#FC#, 16#00#, 16#1F#, 16#FF#, 16#FC#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#78#, 16#0F#, 16#00#, 16#00#, 16#78#, 16#0F#, 16#00#, 16#00#, 16#78#, 16#0F#, 16#00#, 16#00#, 16#78#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#3E#, 16#00#, 16#00#, 16#3F#, 16#FC#, 16#00#, 16#00#, 16#1F#, 16#F8#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#7C#, 16#00#, 16#1C#, 16#00#, 16#F8#, 16#00#, 16#1C#, 16#01#, 16#F0#, 16#00#, 16#1C#, 16#03#, 16#E0#, 16#00#, 16#1C#, 16#07#, 16#C0#, 16#00#, 16#1C#, 16#0F#, 16#80#, 16#00#, 16#1C#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#1E#, 16#00#, 16#00#, 16#1C#, 16#3C#, 16#00#, 16#00#, 16#1C#, 16#78#, 16#00#, 16#00#, 16#1C#, 16#F8#, 16#00#, 16#00#, 16#1D#, 16#FC#, 16#00#, 16#00#, 16#1F#, 16#9E#, 16#00#, 16#00#, 16#1F#, 16#1E#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#07#, 16#80#, 16#00#, 16#1C#, 16#07#, 16#80#, 16#00#, 16#1C#, 16#03#, 16#C0#, 16#00#, 16#1C#, 16#01#, 16#E0#, 16#00#, 16#1C#, 16#00#, 16#E0#, 16#00#, 16#1C#, 16#00#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#38#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#03#, 16#E0#, 16#1F#, 16#00#, 16#03#, 16#E0#, 16#1F#, 16#00#, 16#07#, 16#E0#, 16#1F#, 16#00#, 16#07#, 16#E0#, 16#1F#, 16#80#, 16#07#, 16#E0#, 16#1F#, 16#80#, 16#0E#, 16#E0#, 16#1D#, 16#80#, 16#0E#, 16#E0#, 16#1D#, 16#C0#, 16#0E#, 16#E0#, 16#1D#, 16#C0#, 16#1C#, 16#E0#, 16#1C#, 16#C0#, 16#1C#, 16#E0#, 16#1C#, 16#E0#, 16#1C#, 16#E0#, 16#1C#, 16#E0#, 16#18#, 16#E0#, 16#1C#, 16#60#, 16#38#, 16#E0#, 16#1C#, 16#70#, 16#38#, 16#E0#, 16#1C#, 16#70#, 16#30#, 16#E0#, 16#1C#, 16#30#, 16#70#, 16#E0#, 16#1C#, 16#38#, 16#70#, 16#E0#, 16#1C#, 16#38#, 16#60#, 16#E0#, 16#1C#, 16#18#, 16#E0#, 16#E0#, 16#1C#, 16#1C#, 16#E0#, 16#E0#, 16#1C#, 16#1C#, 16#C0#, 16#E0#, 16#1C#, 16#0D#, 16#C0#, 16#E0#, 16#1C#, 16#0F#, 16#C0#, 16#E0#, 16#1C#, 16#0F#, 16#80#, 16#E0#, 16#1C#, 16#07#, 16#80#, 16#E0#, 16#1C#, 16#07#, 16#80#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#0E#, 16#00#, 16#1E#, 16#00#, 16#0E#, 16#00#, 16#1F#, 16#00#, 16#0E#, 16#00#, 16#1F#, 16#80#, 16#0E#, 16#00#, 16#1F#, 16#80#, 16#0E#, 16#00#, 16#1F#, 16#C0#, 16#0E#, 16#00#, 16#1D#, 16#C0#, 16#0E#, 16#00#, 16#1D#, 16#E0#, 16#0E#, 16#00#, 16#1C#, 16#F0#, 16#0E#, 16#00#, 16#1C#, 16#70#, 16#0E#, 16#00#, 16#1C#, 16#78#, 16#0E#, 16#00#, 16#1C#, 16#3C#, 16#0E#, 16#00#, 16#1C#, 16#1C#, 16#0E#, 16#00#, 16#1C#, 16#1E#, 16#0E#, 16#00#, 16#1C#, 16#0E#, 16#0E#, 16#00#, 16#1C#, 16#07#, 16#0E#, 16#00#, 16#1C#, 16#07#, 16#8E#, 16#00#, 16#1C#, 16#03#, 16#8E#, 16#00#, 16#1C#, 16#03#, 16#CE#, 16#00#, 16#1C#, 16#01#, 16#EE#, 16#00#, 16#1C#, 16#00#, 16#EE#, 16#00#, 16#1C#, 16#00#, 16#FE#, 16#00#, 16#1C#, 16#00#, 16#7E#, 16#00#, 16#1C#, 16#00#, 16#3E#, 16#00#, 16#1C#, 16#00#, 16#3E#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#01#, 16#FF#, 16#F0#, 16#00#, 16#03#, 16#FF#, 16#F8#, 16#00#, 16#07#, 16#E0#, 16#7E#, 16#00#, 16#0F#, 16#80#, 16#1E#, 16#00#, 16#1E#, 16#00#, 16#0F#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#3C#, 16#00#, 16#07#, 16#80#, 16#38#, 16#00#, 16#03#, 16#80#, 16#38#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#03#, 16#80#, 16#3C#, 16#00#, 16#03#, 16#80#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#1E#, 16#00#, 16#0F#, 16#00#, 16#0F#, 16#80#, 16#1E#, 16#00#, 16#07#, 16#E0#, 16#7E#, 16#00#, 16#03#, 16#FF#, 16#F8#, 16#00#, 16#01#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1C#, 16#01#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#38#, 16#00#, 16#1C#, 16#00#, 16#38#, 16#00#, 16#1C#, 16#00#, 16#38#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#01#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#01#, 16#FF#, 16#F0#, 16#00#, 16#03#, 16#FF#, 16#F8#, 16#00#, 16#07#, 16#E0#, 16#7E#, 16#00#, 16#0F#, 16#80#, 16#1E#, 16#00#, 16#1E#, 16#00#, 16#0F#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#3C#, 16#00#, 16#03#, 16#80#, 16#38#, 16#00#, 16#03#, 16#80#, 16#38#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#03#, 16#80#, 16#3C#, 16#00#, 16#07#, 16#80#, 16#1E#, 16#00#, 16#E7#, 16#80#, 16#1E#, 16#00#, 16#FF#, 16#00#, 16#0F#, 16#80#, 16#7E#, 16#00#, 16#07#, 16#E0#, 16#7E#, 16#00#, 16#03#, 16#FF#, 16#FE#, 16#00#, 16#01#, 16#FF#, 16#F7#, 16#00#, 16#00#, 16#3F#, 16#83#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#, 16#1C#, 16#00#, 16#7C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#1F#, 16#FF#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#38#, 16#00#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#C0#, 16#00#, 16#0F#, 16#FF#, 16#E0#, 16#00#, 16#0F#, 16#81#, 16#F0#, 16#00#, 16#1E#, 16#00#, 16#70#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#00#, 16#01#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#38#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#1F#, 16#00#, 16#F0#, 16#00#, 16#0F#, 16#FF#, 16#F0#, 16#00#, 16#07#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#F8#, 16#00#, 16#7F#, 16#FF#, 16#F8#, 16#00#, 16#7F#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#3C#, 16#00#, 16#0F#, 16#00#, 16#7C#, 16#00#, 16#0F#, 16#80#, 16#F8#, 16#00#, 16#07#, 16#FF#, 16#F0#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#38#, 16#00#, 16#38#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#70#, 16#00#, 16#1C#, 16#00#, 16#F0#, 16#00#, 16#1E#, 16#00#, 16#F0#, 16#00#, 16#0E#, 16#00#, 16#E0#, 16#00#, 16#0E#, 16#00#, 16#E0#, 16#00#, 16#0F#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#83#, 16#80#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#, 16#03#, 16#C7#, 16#00#, 16#00#, 16#01#, 16#C7#, 16#00#, 16#00#, 16#01#, 16#C7#, 16#00#, 16#00#, 16#01#, 16#EE#, 16#00#, 16#00#, 16#00#, 16#EE#, 16#00#, 16#00#, 16#00#, 16#EE#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#03#, 16#C0#, 16#0F#, 16#78#, 16#03#, 16#E0#, 16#0F#, 16#78#, 16#03#, 16#E0#, 16#0F#, 16#78#, 16#03#, 16#E0#, 16#0E#, 16#38#, 16#07#, 16#E0#, 16#0E#, 16#38#, 16#07#, 16#F0#, 16#1E#, 16#3C#, 16#07#, 16#70#, 16#1E#, 16#3C#, 16#07#, 16#70#, 16#1C#, 16#1C#, 16#0E#, 16#70#, 16#1C#, 16#1C#, 16#0E#, 16#38#, 16#1C#, 16#1E#, 16#0E#, 16#38#, 16#3C#, 16#1E#, 16#0E#, 16#38#, 16#38#, 16#0E#, 16#1C#, 16#3C#, 16#38#, 16#0E#, 16#1C#, 16#1C#, 16#38#, 16#0E#, 16#1C#, 16#1C#, 16#78#, 16#0F#, 16#3C#, 16#1C#, 16#70#, 16#07#, 16#38#, 16#0E#, 16#70#, 16#07#, 16#38#, 16#0E#, 16#70#, 16#07#, 16#38#, 16#0E#, 16#70#, 16#07#, 16#F0#, 16#0E#, 16#E0#, 16#03#, 16#F0#, 16#07#, 16#E0#, 16#03#, 16#F0#, 16#07#, 16#E0#, 16#03#, 16#F0#, 16#07#, 16#E0#, 16#03#, 16#E0#, 16#03#, 16#C0#, 16#01#, 16#E0#, 16#03#, 16#C0#, 16#01#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#1E#, 16#00#, 16#70#, 16#00#, 16#1E#, 16#00#, 16#F0#, 16#00#, 16#0F#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#81#, 16#C0#, 16#00#, 16#07#, 16#83#, 16#C0#, 16#00#, 16#03#, 16#C7#, 16#80#, 16#00#, 16#01#, 16#C7#, 16#00#, 16#00#, 16#01#, 16#EF#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#EE#, 16#00#, 16#00#, 16#01#, 16#EF#, 16#00#, 16#00#, 16#03#, 16#C7#, 16#80#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#, 16#07#, 16#83#, 16#C0#, 16#00#, 16#0F#, 16#01#, 16#E0#, 16#00#, 16#0E#, 16#00#, 16#E0#, 16#00#, 16#1E#, 16#00#, 16#F0#, 16#00#, 16#3C#, 16#00#, 16#78#, 16#00#, 16#38#, 16#00#, 16#78#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#1E#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#3C#, 16#00#, 16#3C#, 16#00#, 16#1E#, 16#00#, 16#78#, 16#00#, 16#1E#, 16#00#, 16#70#, 16#00#, 16#0F#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#00#, 16#E0#, 16#00#, 16#07#, 16#81#, 16#E0#, 16#00#, 16#03#, 16#C3#, 16#C0#, 16#00#, 16#03#, 16#C3#, 16#80#, 16#00#, 16#01#, 16#E7#, 16#80#, 16#00#, 16#00#, 16#E7#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#F0#, 16#00#, 16#3F#, 16#FF#, 16#F0#, 16#00#, 16#3F#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#F0#, 16#00#, 16#7F#, 16#FF#, 16#F0#, 16#00#, 16#7F#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#60#, 16#00#, 16#00#, 16#06#, 16#70#, 16#00#, 16#00#, 16#0E#, 16#30#, 16#00#, 16#00#, 16#0C#, 16#38#, 16#00#, 16#00#, 16#1C#, 16#38#, 16#00#, 16#00#, 16#1C#, 16#18#, 16#00#, 16#00#, 16#18#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#0C#, 16#00#, 16#00#, 16#30#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#FF#, 16#F0#, 16#00#, 16#FF#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#F8#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#3C#, 16#0F#, 16#00#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#00#, 16#00#, 16#3F#, 16#E7#, 16#00#, 16#00#, 16#7C#, 16#07#, 16#00#, 16#00#, 16#78#, 16#07#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#70#, 16#0F#, 16#00#, 16#00#, 16#7C#, 16#3F#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#E3#, 16#C0#, 16#00#, 16#0F#, 16#C1#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#F8#, 16#00#, 16#00#, 16#3B#, 16#FE#, 16#00#, 16#00#, 16#3B#, 16#FF#, 16#00#, 16#00#, 16#3F#, 16#0F#, 16#80#, 16#00#, 16#3E#, 16#03#, 16#C0#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#E0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#, 16#3E#, 16#03#, 16#C0#, 16#00#, 16#3F#, 16#0F#, 16#80#, 16#00#, 16#3F#, 16#FF#, 16#00#, 16#00#, 16#3B#, 16#FE#, 16#00#, 16#00#, 16#38#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#3C#, 16#07#, 16#00#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#3C#, 16#07#, 16#00#, 16#00#, 16#3E#, 16#1F#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#03#, 16#F1#, 16#80#, 16#00#, 16#0F#, 16#F9#, 16#80#, 16#00#, 16#1F#, 16#FD#, 16#80#, 16#00#, 16#3E#, 16#0F#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#01#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#3E#, 16#0F#, 16#80#, 16#00#, 16#1F#, 16#FD#, 16#80#, 16#00#, 16#0F#, 16#F9#, 16#80#, 16#00#, 16#03#, 16#F1#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#7F#, 16#FF#, 16#80#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#E3#, 16#80#, 16#00#, 16#0F#, 16#FB#, 16#80#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#1E#, 16#1F#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#3E#, 16#1F#, 16#80#, 16#00#, 16#1F#, 16#FB#, 16#80#, 16#00#, 16#0F#, 16#FB#, 16#80#, 16#00#, 16#03#, 16#E3#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#3C#, 16#0F#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#FC#, 16#00#, 16#00#, 16#39#, 16#FE#, 16#00#, 16#00#, 16#3B#, 16#FF#, 16#00#, 16#00#, 16#3F#, 16#0F#, 16#00#, 16#00#, 16#3E#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#0F#, 16#00#, 16#00#, 16#38#, 16#1E#, 16#00#, 16#00#, 16#38#, 16#3C#, 16#00#, 16#00#, 16#38#, 16#78#, 16#00#, 16#00#, 16#38#, 16#F0#, 16#00#, 16#00#, 16#39#, 16#E0#, 16#00#, 16#00#, 16#3B#, 16#C0#, 16#00#, 16#00#, 16#3B#, 16#E0#, 16#00#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#00#, 16#3E#, 16#F0#, 16#00#, 16#00#, 16#3C#, 16#78#, 16#00#, 16#00#, 16#38#, 16#38#, 16#00#, 16#00#, 16#38#, 16#3C#, 16#00#, 16#00#, 16#38#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#1E#, 16#00#, 16#00#, 16#38#, 16#0F#, 16#00#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#F8#, 16#3F#, 16#00#, 16#3B#, 16#FC#, 16#7F#, 16#80#, 16#3B#, 16#FE#, 16#FF#, 16#C0#, 16#3E#, 16#1F#, 16#C3#, 16#C0#, 16#3C#, 16#0F#, 16#81#, 16#C0#, 16#3C#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#FC#, 16#00#, 16#00#, 16#39#, 16#FE#, 16#00#, 16#00#, 16#3B#, 16#FF#, 16#00#, 16#00#, 16#3F#, 16#0F#, 16#00#, 16#00#, 16#3E#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#C0#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#70#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#1E#, 16#0F#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#F8#, 16#00#, 16#00#, 16#3B#, 16#FE#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#00#, 16#00#, 16#3F#, 16#0F#, 16#80#, 16#00#, 16#3E#, 16#03#, 16#C0#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#, 16#3C#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#E0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#C0#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#, 16#3E#, 16#03#, 16#C0#, 16#00#, 16#3F#, 16#0F#, 16#80#, 16#00#, 16#3F#, 16#FF#, 16#00#, 16#00#, 16#3B#, 16#FE#, 16#00#, 16#00#, 16#38#, 16#F8#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F1#, 16#80#, 16#00#, 16#0F#, 16#F9#, 16#80#, 16#00#, 16#1F#, 16#FD#, 16#80#, 16#00#, 16#1E#, 16#0F#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#01#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#78#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#3C#, 16#07#, 16#80#, 16#00#, 16#3E#, 16#0F#, 16#80#, 16#00#, 16#1F#, 16#FD#, 16#80#, 16#00#, 16#0F#, 16#F9#, 16#80#, 16#00#, 16#03#, 16#F1#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#E0#, 16#00#, 16#00#, 16#39#, 16#E0#, 16#00#, 16#00#, 16#3B#, 16#E0#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#3C#, 16#1E#, 16#00#, 16#00#, 16#38#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#00#, 16#1F#, 16#F8#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#78#, 16#07#, 16#00#, 16#00#, 16#3C#, 16#1F#, 16#00#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#FC#, 16#00#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#38#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#0F#, 16#80#, 16#00#, 16#3E#, 16#1F#, 16#80#, 16#00#, 16#1F#, 16#FB#, 16#80#, 16#00#, 16#0F#, 16#F3#, 16#80#, 16#00#, 16#07#, 16#E3#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#03#, 16#80#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#38#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#00#, 16#0E#, 16#1C#, 16#00#, 16#00#, 16#0E#, 16#38#, 16#00#, 16#00#, 16#0E#, 16#38#, 16#00#, 16#00#, 16#07#, 16#70#, 16#00#, 16#00#, 16#07#, 16#70#, 16#00#, 16#00#, 16#07#, 16#70#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#1E#, 16#07#, 16#80#, 16#70#, 16#3E#, 16#07#, 16#80#, 16#70#, 16#3E#, 16#07#, 16#00#, 16#70#, 16#3E#, 16#07#, 16#00#, 16#38#, 16#3E#, 16#07#, 16#00#, 16#38#, 16#37#, 16#0E#, 16#00#, 16#38#, 16#77#, 16#0E#, 16#00#, 16#38#, 16#77#, 16#0E#, 16#00#, 16#1C#, 16#73#, 16#0E#, 16#00#, 16#1C#, 16#63#, 16#9C#, 16#00#, 16#1C#, 16#E3#, 16#9C#, 16#00#, 16#0C#, 16#E3#, 16#9C#, 16#00#, 16#0E#, 16#E1#, 16#98#, 16#00#, 16#0E#, 16#C1#, 16#F8#, 16#00#, 16#0F#, 16#C1#, 16#F8#, 16#00#, 16#07#, 16#C1#, 16#F8#, 16#00#, 16#07#, 16#C0#, 16#F0#, 16#00#, 16#07#, 16#80#, 16#F0#, 16#00#, 16#03#, 16#80#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#0E#, 16#00#, 16#00#, 16#3C#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#00#, 16#0E#, 16#38#, 16#00#, 16#00#, 16#0F#, 16#70#, 16#00#, 16#00#, 16#07#, 16#70#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#70#, 16#00#, 16#00#, 16#0E#, 16#78#, 16#00#, 16#00#, 16#1E#, 16#38#, 16#00#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#1E#, 16#00#, 16#00#, 16#78#, 16#0E#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#70#, 16#0F#, 16#00#, 16#00#, 16#78#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#1C#, 16#00#, 16#00#, 16#3C#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#38#, 16#00#, 16#00#, 16#1C#, 16#38#, 16#00#, 16#00#, 16#0E#, 16#38#, 16#00#, 16#00#, 16#0E#, 16#70#, 16#00#, 16#00#, 16#0E#, 16#70#, 16#00#, 16#00#, 16#07#, 16#70#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#83#, 16#00#, 16#00#, 16#71#, 16#E3#, 16#00#, 16#00#, 16#60#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#); Font_D : aliased constant Bitmap_Font := ( Bytes_Per_Glyph => 168, Glyph_Width => 32, Glyph_Height => 42, Data => FreeSans18pt7bBitmaps'Access); Font : constant Bitmap_Font_Ref := Font_D'Access; end GESTE_Fonts.FreeSans18pt7b;
reznikmm/matreshka
Ada
43,157
adb
------------------------------------------------------------------------------ -- -- -- 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$ ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Element_Collections; with AMF.Internals.Helpers; with AMF.Internals.Tables.UML_Attributes; with AMF.Visitors.UML_Iterators; with AMF.Visitors.UML_Visitors; with League.Strings.Internals; with Matreshka.Internals.Strings; package body AMF.Internals.UML_Enumerations is ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant UML_Enumeration_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Enter_Enumeration (AMF.UML.Enumerations.UML_Enumeration_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant UML_Enumeration_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Leave_Enumeration (AMF.UML.Enumerations.UML_Enumeration_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant UML_Enumeration_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then AMF.Visitors.UML_Iterators.UML_Iterator'Class (Iterator).Visit_Enumeration (Visitor, AMF.UML.Enumerations.UML_Enumeration_Access (Self), Control); end if; end Visit_Element; ----------------------- -- Get_Owned_Literal -- ----------------------- overriding function Get_Owned_Literal (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Enumeration_Literals.Collections.Ordered_Set_Of_UML_Enumeration_Literal is begin return AMF.UML.Enumeration_Literals.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Literal (Self.Element))); end Get_Owned_Literal; ------------------------- -- Get_Owned_Attribute -- ------------------------- overriding function Get_Owned_Attribute (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property is begin return AMF.UML.Properties.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Attribute (Self.Element))); end Get_Owned_Attribute; ------------------------- -- Get_Owned_Operation -- ------------------------- overriding function Get_Owned_Operation (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Operations.Collections.Ordered_Set_Of_UML_Operation is begin return AMF.UML.Operations.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Operation (Self.Element))); end Get_Owned_Operation; ------------------- -- Get_Attribute -- ------------------- overriding function Get_Attribute (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Properties.Collections.Set_Of_UML_Property is begin return AMF.UML.Properties.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Attribute (Self.Element))); end Get_Attribute; --------------------------- -- Get_Collaboration_Use -- --------------------------- overriding function Get_Collaboration_Use (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use is begin return AMF.UML.Collaboration_Uses.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Collaboration_Use (Self.Element))); end Get_Collaboration_Use; ----------------- -- Get_Feature -- ----------------- overriding function Get_Feature (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Features.Collections.Set_Of_UML_Feature is begin return AMF.UML.Features.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Feature (Self.Element))); end Get_Feature; ----------------- -- Get_General -- ----------------- overriding function Get_General (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin return AMF.UML.Classifiers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_General (Self.Element))); end Get_General; ------------------------ -- Get_Generalization -- ------------------------ overriding function Get_Generalization (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization is begin return AMF.UML.Generalizations.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Generalization (Self.Element))); end Get_Generalization; -------------------------- -- Get_Inherited_Member -- -------------------------- overriding function Get_Inherited_Member (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Inherited_Member (Self.Element))); end Get_Inherited_Member; --------------------- -- Get_Is_Abstract -- --------------------- overriding function Get_Is_Abstract (Self : not null access constant UML_Enumeration_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Abstract (Self.Element); end Get_Is_Abstract; --------------------------------- -- Get_Is_Final_Specialization -- --------------------------------- overriding function Get_Is_Final_Specialization (Self : not null access constant UML_Enumeration_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Final_Specialization (Self.Element); end Get_Is_Final_Specialization; --------------------------------- -- Set_Is_Final_Specialization -- --------------------------------- overriding procedure Set_Is_Final_Specialization (Self : not null access UML_Enumeration_Proxy; To : Boolean) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Final_Specialization (Self.Element, To); end Set_Is_Final_Specialization; ---------------------------------- -- Get_Owned_Template_Signature -- ---------------------------------- overriding function Get_Owned_Template_Signature (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access is begin return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Template_Signature (Self.Element))); end Get_Owned_Template_Signature; ---------------------------------- -- Set_Owned_Template_Signature -- ---------------------------------- overriding procedure Set_Owned_Template_Signature (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Template_Signature (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owned_Template_Signature; ------------------------ -- Get_Owned_Use_Case -- ------------------------ overriding function Get_Owned_Use_Case (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is begin return AMF.UML.Use_Cases.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Use_Case (Self.Element))); end Get_Owned_Use_Case; -------------------------- -- Get_Powertype_Extent -- -------------------------- overriding function Get_Powertype_Extent (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set is begin return AMF.UML.Generalization_Sets.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Powertype_Extent (Self.Element))); end Get_Powertype_Extent; ------------------------------ -- Get_Redefined_Classifier -- ------------------------------ overriding function Get_Redefined_Classifier (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin return AMF.UML.Classifiers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Classifier (Self.Element))); end Get_Redefined_Classifier; ------------------------ -- Get_Representation -- ------------------------ overriding function Get_Representation (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access is begin return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Representation (Self.Element))); end Get_Representation; ------------------------ -- Set_Representation -- ------------------------ overriding procedure Set_Representation (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Representation (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Representation; ---------------------- -- Get_Substitution -- ---------------------- overriding function Get_Substitution (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution is begin return AMF.UML.Substitutions.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Substitution (Self.Element))); end Get_Substitution; ---------------------------- -- Get_Template_Parameter -- ---------------------------- overriding function Get_Template_Parameter (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access is begin return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter (Self.Element))); end Get_Template_Parameter; ---------------------------- -- Set_Template_Parameter -- ---------------------------- overriding procedure Set_Template_Parameter (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Template_Parameter; ------------------ -- Get_Use_Case -- ------------------ overriding function Get_Use_Case (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is begin return AMF.UML.Use_Cases.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Use_Case (Self.Element))); end Get_Use_Case; ------------------------ -- Get_Element_Import -- ------------------------ overriding function Get_Element_Import (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import is begin return AMF.UML.Element_Imports.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Element_Import (Self.Element))); end Get_Element_Import; ------------------------- -- Get_Imported_Member -- ------------------------- overriding function Get_Imported_Member (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin return AMF.UML.Packageable_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Imported_Member (Self.Element))); end Get_Imported_Member; ---------------- -- Get_Member -- ---------------- overriding function Get_Member (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Member (Self.Element))); end Get_Member; ---------------------- -- Get_Owned_Member -- ---------------------- overriding function Get_Owned_Member (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Member (Self.Element))); end Get_Owned_Member; -------------------- -- Get_Owned_Rule -- -------------------- overriding function Get_Owned_Rule (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is begin return AMF.UML.Constraints.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Rule (Self.Element))); end Get_Owned_Rule; ------------------------ -- Get_Package_Import -- ------------------------ overriding function Get_Package_Import (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import is begin return AMF.UML.Package_Imports.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package_Import (Self.Element))); end Get_Package_Import; --------------------------- -- Get_Client_Dependency -- --------------------------- overriding function Get_Client_Dependency (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is begin return AMF.UML.Dependencies.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency (Self.Element))); end Get_Client_Dependency; ------------------------- -- Get_Name_Expression -- ------------------------- overriding function Get_Name_Expression (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access is begin return AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression (Self.Element))); end Get_Name_Expression; ------------------------- -- Set_Name_Expression -- ------------------------- overriding procedure Set_Name_Expression (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Name_Expression; ------------------- -- Get_Namespace -- ------------------- overriding function Get_Namespace (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin return AMF.UML.Namespaces.UML_Namespace_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace (Self.Element))); end Get_Namespace; ------------------------ -- Get_Qualified_Name -- ------------------------ overriding function Get_Qualified_Name (Self : not null access constant UML_Enumeration_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Qualified_Name; ----------------- -- Get_Package -- ----------------- overriding function Get_Package (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Packages.UML_Package_Access is begin return AMF.UML.Packages.UML_Package_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package (Self.Element))); end Get_Package; ----------------- -- Set_Package -- ----------------- overriding procedure Set_Package (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.Packages.UML_Package_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Package (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Package; ----------------------------------- -- Get_Owning_Template_Parameter -- ----------------------------------- overriding function Get_Owning_Template_Parameter (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter (Self.Element))); end Get_Owning_Template_Parameter; ----------------------------------- -- Set_Owning_Template_Parameter -- ----------------------------------- overriding procedure Set_Owning_Template_Parameter (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owning_Template_Parameter; ---------------------------- -- Get_Template_Parameter -- ---------------------------- overriding function Get_Template_Parameter (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter (Self.Element))); end Get_Template_Parameter; ---------------------------- -- Set_Template_Parameter -- ---------------------------- overriding procedure Set_Template_Parameter (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Template_Parameter; ---------------------------------- -- Get_Owned_Template_Signature -- ---------------------------------- overriding function Get_Owned_Template_Signature (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Template_Signatures.UML_Template_Signature_Access is begin return AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Template_Signature (Self.Element))); end Get_Owned_Template_Signature; ---------------------------------- -- Set_Owned_Template_Signature -- ---------------------------------- overriding procedure Set_Owned_Template_Signature (Self : not null access UML_Enumeration_Proxy; To : AMF.UML.Template_Signatures.UML_Template_Signature_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Template_Signature (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owned_Template_Signature; -------------------------- -- Get_Template_Binding -- -------------------------- overriding function Get_Template_Binding (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding is begin return AMF.UML.Template_Bindings.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Binding (Self.Element))); end Get_Template_Binding; ----------------- -- Get_Is_Leaf -- ----------------- overriding function Get_Is_Leaf (Self : not null access constant UML_Enumeration_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf (Self.Element); end Get_Is_Leaf; ----------------- -- Set_Is_Leaf -- ----------------- overriding procedure Set_Is_Leaf (Self : not null access UML_Enumeration_Proxy; To : Boolean) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf (Self.Element, To); end Set_Is_Leaf; --------------------------- -- Get_Redefined_Element -- --------------------------- overriding function Get_Redefined_Element (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is begin return AMF.UML.Redefinable_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element (Self.Element))); end Get_Redefined_Element; ------------------------------ -- Get_Redefinition_Context -- ------------------------------ overriding function Get_Redefinition_Context (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin return AMF.UML.Classifiers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context (Self.Element))); end Get_Redefinition_Context; ------------- -- Inherit -- ------------- overriding function Inherit (Self : not null access constant UML_Enumeration_Proxy; Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Inherit unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Inherit"; return Inherit (Self, Inhs); end Inherit; ------------------ -- All_Features -- ------------------ overriding function All_Features (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Features.Collections.Set_Of_UML_Feature is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Features unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.All_Features"; return All_Features (Self); end All_Features; ----------------- -- Conforms_To -- ----------------- overriding function Conforms_To (Self : not null access constant UML_Enumeration_Proxy; Other : AMF.UML.Classifiers.UML_Classifier_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Conforms_To"; return Conforms_To (Self, Other); end Conforms_To; ------------- -- General -- ------------- overriding function General (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "General unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.General"; return General (Self); end General; ----------------------- -- Has_Visibility_Of -- ----------------------- overriding function Has_Visibility_Of (Self : not null access constant UML_Enumeration_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Has_Visibility_Of unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Has_Visibility_Of"; return Has_Visibility_Of (Self, N); end Has_Visibility_Of; ------------------------- -- Inheritable_Members -- ------------------------- overriding function Inheritable_Members (Self : not null access constant UML_Enumeration_Proxy; C : AMF.UML.Classifiers.UML_Classifier_Access) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Inheritable_Members unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Inheritable_Members"; return Inheritable_Members (Self, C); end Inheritable_Members; ---------------------- -- Inherited_Member -- ---------------------- overriding function Inherited_Member (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Inherited_Member unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Inherited_Member"; return Inherited_Member (Self); end Inherited_Member; ----------------- -- Is_Template -- ----------------- overriding function Is_Template (Self : not null access constant UML_Enumeration_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Template unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Template"; return Is_Template (Self); end Is_Template; ------------------------- -- May_Specialize_Type -- ------------------------- overriding function May_Specialize_Type (Self : not null access constant UML_Enumeration_Proxy; C : AMF.UML.Classifiers.UML_Classifier_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "May_Specialize_Type unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.May_Specialize_Type"; return May_Specialize_Type (Self, C); end May_Specialize_Type; ------------------------ -- Exclude_Collisions -- ------------------------ overriding function Exclude_Collisions (Self : not null access constant UML_Enumeration_Proxy; Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Exclude_Collisions"; return Exclude_Collisions (Self, Imps); end Exclude_Collisions; ------------------------- -- Get_Names_Of_Member -- ------------------------- overriding function Get_Names_Of_Member (Self : not null access constant UML_Enumeration_Proxy; Element : AMF.UML.Named_Elements.UML_Named_Element_Access) return AMF.String_Collections.Set_Of_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Get_Names_Of_Member"; return Get_Names_Of_Member (Self, Element); end Get_Names_Of_Member; -------------------- -- Import_Members -- -------------------- overriding function Import_Members (Self : not null access constant UML_Enumeration_Proxy; Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Import_Members"; return Import_Members (Self, Imps); end Import_Members; --------------------- -- Imported_Member -- --------------------- overriding function Imported_Member (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Imported_Member unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Imported_Member"; return Imported_Member (Self); end Imported_Member; --------------------------------- -- Members_Are_Distinguishable -- --------------------------------- overriding function Members_Are_Distinguishable (Self : not null access constant UML_Enumeration_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Members_Are_Distinguishable"; return Members_Are_Distinguishable (Self); end Members_Are_Distinguishable; ------------------ -- Owned_Member -- ------------------ overriding function Owned_Member (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Owned_Member unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Owned_Member"; return Owned_Member (Self); end Owned_Member; ------------------------- -- All_Owning_Packages -- ------------------------- overriding function All_Owning_Packages (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.All_Owning_Packages"; return All_Owning_Packages (Self); end All_Owning_Packages; ----------------------------- -- Is_Distinguishable_From -- ----------------------------- overriding function Is_Distinguishable_From (Self : not null access constant UML_Enumeration_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Distinguishable_From"; return Is_Distinguishable_From (Self, N, Ns); end Is_Distinguishable_From; --------------- -- Namespace -- --------------- overriding function Namespace (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Namespace"; return Namespace (Self); end Namespace; ----------------- -- Conforms_To -- ----------------- overriding function Conforms_To (Self : not null access constant UML_Enumeration_Proxy; Other : AMF.UML.Types.UML_Type_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Conforms_To"; return Conforms_To (Self, Other); end Conforms_To; ------------------------ -- Is_Compatible_With -- ------------------------ overriding function Is_Compatible_With (Self : not null access constant UML_Enumeration_Proxy; P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Compatible_With"; return Is_Compatible_With (Self, P); end Is_Compatible_With; --------------------------- -- Is_Template_Parameter -- --------------------------- overriding function Is_Template_Parameter (Self : not null access constant UML_Enumeration_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Template_Parameter"; return Is_Template_Parameter (Self); end Is_Template_Parameter; ---------------------------- -- Parameterable_Elements -- ---------------------------- overriding function Parameterable_Elements (Self : not null access constant UML_Enumeration_Proxy) return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Parameterable_Elements unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Parameterable_Elements"; return Parameterable_Elements (Self); end Parameterable_Elements; ------------------------ -- Is_Consistent_With -- ------------------------ overriding function Is_Consistent_With (Self : not null access constant UML_Enumeration_Proxy; Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Consistent_With"; return Is_Consistent_With (Self, Redefinee); end Is_Consistent_With; ----------------------------------- -- Is_Redefinition_Context_Valid -- ----------------------------------- overriding function Is_Redefinition_Context_Valid (Self : not null access constant UML_Enumeration_Proxy; Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented"); raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Redefinition_Context_Valid"; return Is_Redefinition_Context_Valid (Self, Redefined); end Is_Redefinition_Context_Valid; end AMF.Internals.UML_Enumerations;
AaronC98/PlaneSystem
Ada
3,420
ads
------------------------------------------------------------------------------ -- Ada Web Server -- -- -- -- Copyright (C) 2000-2013, 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; package AWS.Net.Stream_IO is type Socket_Stream_Type is new Root_Stream_Type with private; type Socket_Stream_Access is access Socket_Stream_Type; function Stream (Socket : Socket_Type'Class) return Socket_Stream_Access; -- Build a Stream Socket type procedure Shutdown (Stream : Socket_Stream_Access); -- Terminate the Stream and Flush the stream if needed procedure Free (Stream : in out Socket_Stream_Access); -- Release memory associated with the Stream procedure Flush (Stream : Socket_Stream_Access) with Inline; -- Send all remaining data in the stream to the peer overriding procedure Read (Stream : in out Socket_Stream_Type; Item : out Stream_Element_Array; Last : out Stream_Element_Offset); -- Read a piece of data from the Stream. Returns the data into Item, Last -- point to the last Steam_Element read. overriding procedure Write (Stream : in out Socket_Stream_Type; Item : Stream_Element_Array); -- Write Item to the stream private type Socket_Stream_Type is new Root_Stream_Type with record Socket : Socket_Access := null; end record; end AWS.Net.Stream_IO;
annexi-strayline/AURA
Ada
22,566
adb
------------------------------------------------------------------------------ -- -- -- Ada User Repository Annex (AURA) -- -- Reference Implementation -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Copyright (C) 2020-2023, 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 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 -- -- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Ada.Strings.Fixed; with Ada.Strings.Unbounded; with Configuration; with User_Notices; with Host_Operations; with Registrar.Queries; with Registrar.Source_Files; with Registrar.Registration.Unchecked_Deregister_Unit; separate (Checkout) package body Checkout_Orders is package UBS renames Ada.Strings.Unbounded; use type Repositories.Repository_Cache_State; use type Registrar.Subsystems.Subsystem_State; ------------------------ -- Recursive_Copy_Dir -- ------------------------ procedure Recursive_Copy_Dir (Source_Dir, Target_Dir: String); -- Recursively copies Source_Dir into a new directory within Target_Dir -- I.e. Source => /x/y/z Target => /a/b recursively copies the content -- of /x/y/z into a new directory a/b/z procedure Recursive_Copy_Dir (Source_Dir, Target_Dir: String) is use Ada.Directories; New_Target: constant String := Compose (Containing_Directory => Target_Dir, Name => Simple_Name (Source_Dir)); Search: Search_Type; File : Directory_Entry_Type; begin Create_Path (New_Target); Start_Search (Search => Search, Directory => Source_Dir, Pattern => "*", Filter => (Special_File => False, others => True)); while More_Entries (Search) loop Get_Next_Entry (Search => Search, Directory_Entry => File); -- Don't copy anything starting with "." if Ada.Strings.Fixed.Head (Source => Simple_Name (File), Count => 1) /= "." then case Kind (File) is when Directory => Recursive_Copy_Dir (Source_Dir => Full_Name (File), Target_Dir => New_Target); when Ordinary_File => Copy_File (Source_Name => Full_Name (File), Target_Name => Compose (Containing_Directory => New_Target, Name => Simple_Name (File))); when Special_File => -- Precluded by the filter raise Program_Error; end case; end if; end loop; end Recursive_Copy_Dir; --------------------------- -- Link_From_System_Repo -- --------------------------- procedure Link_From_System_Repo (Repo_Path: in String; Subsys : in Registrar.Subsystems.Subsystem) is use Ada.Directories; Config_Unit_Name: constant Unit_Names.Unit_Name := Configuration.Config_Unit_Name (Subsys); Notice: User_Notices.Notice_Lines; function To_UBS (Source: in String) return UBS.Unbounded_String renames UBS.To_Unbounded_String; begin if Registrar.Queries.Unit_Entered (Config_Unit_Name) then -- System repository checkouts are a bit unusual. System repos are -- special repos that have two subdirectories - include and lib. -- Inside include are subdirectories for each subsystem. Each -- subsystem subdirectory contains a single directory with all the -- sources of the original AURA subsystem, including the contents of -- configured codepaths, as well as all ali files (for GNAT) -- -- The lib subdirectory contains the compiled shared library files for -- each subsystem -- -- Because "System" repositories are pre-compiled, they must also be -- already configured. Therefore the configuration unit is included in -- the include/subsystem subdirectory. -- -- Before we link in the subsystem, we need to ensure that no -- configuration unit for that subsystem has been entered. If it has, -- we back-up the existing unit and scrub it from the registrar Notice.Append (To_UBS ("Subsystem """ & Subsys.Name.To_UTF8_String & '"')); Notice.Append (To_UBS ("is to be checked-out from Repository" & Repositories.Repository_Index'Image (Subsys.Source_Repository) & ", which is a ""System"" repo.")); Notice.Append (To_UBS ("An existing Configuration Unit was found for this " & "subsystem.")); Notice.Append (To_UBS ("Local Configuration Units are not allowed for " & "subsystems.")); Notice.Append (To_UBS ("A backup will be created.")); User_Notices.Post_Notice (Notice); declare use type Registrar.Source_Files.Source_File_Access; Config_Unit: Registrar.Library_Units.Library_Unit := Registrar.Queries.Lookup_Unit (Config_Unit_Name); Spec_Path: constant String := Config_Unit.Spec_File.Full_Name; Body_Path: constant String := (if Config_Unit.Body_File /= null then Config_Unit.Body_File.Full_Name else ""); begin Registrar.Registration.Unchecked_Deregister_Unit (Config_Unit); -- This is is safe because config units are not allowed to have -- children or subunits, and also cannot depend on anything except -- the standard library. These things are enforced by the Registrar -- on entry. -- The linked subsystem, which will be entered at -- Complete_Registration, will contain the configuration unit. Ada.Directories.Rename (Old_Name => Spec_Path, New_Name => Spec_Path & ".bak"); if Body_Path /= "" then Ada.Directories.Rename (Old_Name => Body_Path, New_Name => Body_Path & ".bak"); end if; end; end if; -- Now we can link in the subdirectory Host_Operations.Symbolic_Link (Target_Path => Repo_Path, Source_Path => Current_Directory & '/' & Subsys.Name.To_UTF8_String); end Link_From_System_Repo; ------------------------- -- Checkout_From_Cache -- ------------------------- procedure Checkout_From_Cache (Index : in Repositories.Repository_Index; Target: in Registrar.Subsystems.Subsystem; Done : out Boolean) is use Ada.Directories; use type Repositories.Repository_Format; Search: Search_Type; CO_Source: Directory_Entry_Type; Repo: constant Repositories.Repository := Repositories.Extract_Repository (Index); begin Start_Search (Search => Search, Directory => UBS.To_String (Repo.Cache_Path) & (if Repo.Format = Repositories.System then "/include" else ""), Pattern => Target.Name.To_UTF8_String, Filter => (Directory => True, others => False)); if not More_Entries (Search) then -- Subsystem not found in this repo.. Done := False; return; end if; Get_Next_Entry (Search => Search, Directory_Entry => CO_Source); case Repo.Format is when Repositories.System => Link_From_System_Repo (Repo_Path => Full_NAme (CO_Source), Subsys => Target); when Repositories.Local | Repositories.Git => Recursive_Copy_Dir (Source_Dir => Full_Name (CO_Source), Target_Dir => Current_Directory); end case; Done := True; end Checkout_From_Cache; --------------------------- -- Complete_Registration -- --------------------------- procedure Complete_Registration (Target : in out Registrar.Subsystems.Subsystem; Imperative: in Boolean := True) is use Ada.Directories; use type Repositories.Repository_Format; Search: Search_Type; Dir : Directory_Entry_Type; Repo: constant Repositories.Repository := Repositories.Extract_Repository (Target.Source_Repository); begin -- We are expecting the subsystem source subdirectory to be available Start_Search (Search => Search, Directory => Current_Directory, Pattern => Target.Name.To_UTF8_String, Filter => (Directory => True, others => False)); if More_Entries (Search) then -- Directory exists. This means its already aquired Get_Next_Entry (Search => Search, Directory_Entry => Dir); -- Update the subsystem status case Repo.Format is when Repositories.System => Target.State := Registrar.Subsystems.Available; -- System repositories are "preconfigured" in a sense. when others => Target.State := Registrar.Subsystems.Aquired; end case; Registrar.Registration.Update_Subsystem (Target); -- Dispatch contents to the registrar pragma Assert (Target.AURA); Registrar.Registration.Enter_Directory (Directory => Dir, AURA_Subsystem => Target); else Assert (Check => not Imperative, Message => "Unable to register checked-out subsystem"); end if; end Complete_Registration; ----------- -- Image -- ----------- function Image (Order: Checkout_Order) return String is ( "[Checkout_Order]" & New_Line & " Subsystem: " & Order.Target.Name.To_UTF8_String); ------------- -- Execute -- ------------- procedure Execute (Order: in out Checkout_Order) is package Queries renames Registrar.Queries; use type Repositories.Repository_Index; use type Repositories.Repository_Count; procedure No_Repo_Abort (Reason: in String) is -- There are a few cases where a subsystem cannot be aquired for -- a common reason, such as the checkout repository not being -- registered, the registered repository not having the subsystem, -- or (in the case of Root Repository sourced subsystems) not existing -- in any of the configured repository. -- -- In these cases we want to register a failure, and also report -- the reason in a user-friendly message and pass that up to the -- CLI in a way that allows it to handle the error more gracefully -- than aborting with work reports. Particularily this allows the -- CLI to build the dependency maps and inform the user which -- units/subsystems depend on the missing subsystems. -- -- In order to facilitate this orderly failure, this subprogram -- takes-over the tracker, registering a failure directly and -- removing the responsibility of the executing worker of doing -- so. -- -- Obviously this should only be called immediately before the -- order is completed. begin UBS.Set_Unbounded_String (Target => Order.Target.Aquisition_Failure, Source => Reason); Order.Target.State := Registrar.Subsystems.Unavailable; Registrar.Registration.Update_Subsystem (Order.Target); Order.Tracker.Increment_Failed_Items; Order.Tracker := null; end No_Repo_Abort; begin -- Look for the checkout unit and then submit declare use Unit_Names; Checkout_Unit_Name: constant Unit_Name := Set_Name ("AURA." & Wide_Wide_String'(Order.Target.Name.To_String) & ".Checkout"); begin if Queries.Unit_Entered (Checkout_Unit_Name) then -- Pull it down and parse it declare use Registrar.Library_Units; Checkout_Unit: constant Library_Unit := Queries.Lookup_Unit (Checkout_Unit_Name); begin Order.Target.Source_Repository := Parse_Checkout_Spec (Checkout_Unit); end; else -- No spec, use the default Root Repository for now, and -- write out Order.Target.Source_Repository := Repositories.Root_Repository; Write_Checkout_Spec (Order.Target); -- We now need to return for another cycle, where the new checkout -- that was just registered will be fully entered into the -- registrar. -- -- It is important to do this, otherwise we will potentially re- -- write the spec and submit a duplicate Entry order for the same -- checkout unit, which will cause AURA to abort. return; end if; end; -- This means we need to aquire the subsystem source from a repository of -- some kind. Specification is now in-place -- Make sure the indicated repository actually exists if Order.Target.Source_Repository > Repositories.Total_Repositories then No_Repo_Abort ("Configured Repository" & Repositories.Repository_Index'Image (Order.Target.Source_Repository) & " is not registered."); return; end if; -- If the code is already present, no need to check it out. Just enter it -- and promote the Subsystem to Aquired. This is the usual process of -- Complete_Checkout Complete_Registration (Target => Order.Target, Imperative => False); -- If Complete_Registration saw the expected subdirectory for the -- subsystem in the root directory, Order.Target.State will be set to -- Aquired, and so we can leave now. Otherwise it indicates we need to -- checkout from a cache, if possible if Order.Target.State = Registrar.Subsystems.Aquired then return; end if; -- If we get here, this subsystem needs to be checked-out (eventually) if Order.Target.Source_Repository = Repositories.Root_Repository then -- We don't have a source directory, but the repository is set -- to the Root Repo. This indicates that we need to search the first -- repository to have the subsystem, since we can't actually check -- anything out from the Root Repo. -- If the root repository is the only repository, then we're clearly -- out of luck. if Repositories.Total_Repositories = Repositories.Root_Repository then -- We cant check-out from the root repo! No_Repo_Abort ("Subsystem does not exist in any configured " & "repository."); return; end if; -- Scan for a repository that might have what we are looking -- for. If we find it, we can set to that repository and check -- out the code. If we don't find it, we will ask for all -- repositories to be cached, and retry in the next cycle. -- If all repositories are cached, the checkout attempt fails for I in Repositories.Root_Repository + 1 .. Repositories.Total_Repositories loop if Repositories.Cache_State(I) = Repositories.Available then declare Done: Boolean; begin Checkout_From_Cache (Index => I, Target => Order.Target, Done => Done); if Done then -- She's a keeper. Update the target's checkout -- to be of this repo, and write out the spec Order.Target.Source_Repository := I; Write_Checkout_Spec (Order.Target); Complete_Registration (Order.Target); exit; elsif I = Repositories.Total_Repositories then -- If we get here and I is at the last repository, it -- means that all repositories are cached, but yet we -- still couldn't find it No_Repo_Abort ("Subsystem does not exist in any " & "configured repository."); return; end if; end; else Repositories.Request_Cache (I); -- This means we will request caching of every repo that is -- not currently available, if we can't find the subsystem -- in a currently cached repo end if; end loop; else -- Normal non Root Repo -- -- If the repo is cached, we can do a checkout, otherwise, we will -- request a cache and re-try next cycle. If it is cached, it -- better be there! case Repositories.Cache_State (Order.Target.Source_Repository) is when Repositories.Available => declare Checkout_OK: Boolean; begin Checkout_From_Cache (Index => Order.Target.Source_Repository, Target => Order.Target, Done => Checkout_OK); if not Checkout_OK then No_Repo_Abort ( "Subsystem does not exist within the " & "designated repository (Repository" & Repositories.Repository_Index'Image (Order.Target.Source_Repository) & ')'); return; end if; end; Complete_Registration (Order.Target); when Repositories.Requested => -- Already requested, nothing to do this round null; when Repositories.Standby => -- Not cached. Try again in the next cycle Repositories.Request_Cache (Order.Target.Source_Repository); end case; end if; end Execute; end Checkout_Orders;
zhmu/ananas
Ada
13,028
ads
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.INDEFINITE_DOUBLY_LINKED_LISTS -- -- -- -- 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; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Indefinite_Doubly_Linked_Lists with SPARK_Mode => Off is pragma Annotate (CodePeer, Skip_Analysis); pragma Preelaborate; pragma Remote_Types; type List is tagged private with Constant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type, Aggregate => (Empty => Empty, Add_Unnamed => Append); pragma Preelaborable_Initialization (List); type Cursor is private; pragma Preelaborable_Initialization (Cursor); Empty_List : constant List; function Empty return List; pragma Ada_2022 (Empty); No_Element : constant Cursor; function Has_Element (Position : Cursor) return Boolean; package List_Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); function "=" (Left, Right : List) return Boolean; function Length (Container : List) return Count_Type; function Is_Empty (Container : List) return Boolean; procedure Clear (Container : in out List); function Element (Position : Cursor) return Element_Type; procedure Replace_Element (Container : in out List; Position : Cursor; New_Item : Element_Type); procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)); procedure Update_Element (Container : in out List; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)); 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 List; Position : Cursor) return Constant_Reference_Type; pragma Inline (Constant_Reference); function Reference (Container : aliased in out List; Position : Cursor) return Reference_Type; pragma Inline (Reference); procedure Assign (Target : in out List; Source : List); function Copy (Source : List) return List; procedure Move (Target : in out List; Source : in out List); procedure Insert (Container : in out List; Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1); procedure Insert (Container : in out List; Before : Cursor; New_Item : Element_Type; Position : out Cursor; Count : Count_Type := 1); procedure Prepend (Container : in out List; New_Item : Element_Type; Count : Count_Type := 1); procedure Append (Container : in out List; New_Item : Element_Type; Count : Count_Type); procedure Append (Container : in out List; New_Item : Element_Type); procedure Delete (Container : in out List; Position : in out Cursor; Count : Count_Type := 1); procedure Delete_First (Container : in out List; Count : Count_Type := 1); procedure Delete_Last (Container : in out List; Count : Count_Type := 1); procedure Reverse_Elements (Container : in out List); procedure Swap (Container : in out List; I, J : Cursor); procedure Swap_Links (Container : in out List; I, J : Cursor); procedure Splice (Target : in out List; Before : Cursor; Source : in out List); procedure Splice (Target : in out List; Before : Cursor; Source : in out List; Position : in out Cursor); procedure Splice (Container : in out List; Before : Cursor; Position : Cursor); function First (Container : List) return Cursor; function First_Element (Container : List) return Element_Type; function Last (Container : List) return Cursor; function Last_Element (Container : List) return Element_Type; function Next (Position : Cursor) return Cursor; procedure Next (Position : in out Cursor); function Previous (Position : Cursor) return Cursor; procedure Previous (Position : in out Cursor); function Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; function Reverse_Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; function Contains (Container : List; Item : Element_Type) return Boolean; procedure Iterate (Container : List; Process : not null access procedure (Position : Cursor)); procedure Reverse_Iterate (Container : List; Process : not null access procedure (Position : Cursor)); function Iterate (Container : List) return List_Iterator_Interfaces.Reversible_Iterator'class; function Iterate (Container : List; Start : Cursor) return List_Iterator_Interfaces.Reversible_Iterator'class; generic with function "<" (Left, Right : Element_Type) return Boolean is <>; package Generic_Sorting is function Is_Sorted (Container : List) return Boolean; procedure Sort (Container : in out List); procedure Merge (Target, Source : in out List); end Generic_Sorting; private pragma Inline (Next); pragma Inline (Previous); use Ada.Containers.Helpers; package Implementation is new Generic_Implementation; use Implementation; type Node_Type; type Node_Access is access Node_Type; type Element_Access is access all Element_Type; type Node_Type is limited record Element : Element_Access; Next : Node_Access; Prev : Node_Access; end record; use Ada.Finalization; use Ada.Streams; type List is new Controlled with record First : Node_Access := null; Last : Node_Access := null; Length : Count_Type := 0; TC : aliased Tamper_Counts; end record with Put_Image => Put_Image; procedure Put_Image (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List); overriding procedure Adjust (Container : in out List); overriding procedure Finalize (Container : in out List) renames Clear; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out List); for List'Read use Read; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : List); for List'Write use Write; type List_Access is access all List; for List_Access'Storage_Size use 0; type Cursor is record Container : List_Access; Node : Node_Access; 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 Exp_Ch5 for -- details. function Pseudo_Reference (Container : aliased List'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. function Get_Element_Access (Position : Cursor) return not null Element_Access; -- Returns a pointer to the element designated by Position. Empty_List : constant List := List'(Controlled with others => <>); function Empty return List is (Empty_List); No_Element : constant Cursor := Cursor'(null, null); type Iterator is new Limited_Controlled and List_Iterator_Interfaces.Reversible_Iterator with record Container : List_Access; Node : Node_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 Last (Object : Iterator) return Cursor; overriding function Next (Object : Iterator; Position : Cursor) return Cursor; overriding function Previous (Object : Iterator; Position : Cursor) return Cursor; end Ada.Containers.Indefinite_Doubly_Linked_Lists;
AdaCore/libadalang
Ada
216
adb
procedure Test is type T is array (Positive range <>) of Integer; begin declare type U is access all T with Predicate => U'First = 1; begin null; end; pragma Test_Block; end Test;
AdaCore/gpr
Ada
251
ads
package Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.Package.Name is end Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.Package.Name;
stcarrez/ada-security
Ada
6,775
adb
----------------------------------------------------------------------- -- Security-oauth-clients-tests - Unit tests for OAuth -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Fixed; with Util.Test_Caller; with Util.Measures; with Util.Strings.Sets; package body Security.OAuth.Clients.Tests is package Caller is new Util.Test_Caller (Test, "Security.OAuth.Clients"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Security.OAuth.Clients.Create_Nonce", Test_Create_Nonce'Access); Caller.Add_Test (Suite, "Test Security.OAuth.Clients.Get_State", Test_Get_State'Access); Caller.Add_Test (Suite, "Test Security.OAuth.Clients.Is_Valid_State", Test_Is_Valid_State'Access); Caller.Add_Test (Suite, "Test Security.OAuth.Clients.Get_Auth_Params", Test_Get_Auth_Params'Access); end Add_Tests; -- ------------------------------ -- Test Create_Nonce operation. -- ------------------------------ procedure Test_Create_Nonce (T : in out Test) is Nonces : Util.Strings.Sets.Set; begin for I in 1 .. 1_000 loop for I in 32 .. 734 loop declare S : constant String := Create_Nonce (I * 3); begin T.Assert (not Nonces.Contains (S), "Nonce was not unique: " & S); Nonces.Include (S); end; end loop; end loop; declare S : Util.Measures.Stamp; begin for I in 1 .. 1_000 loop declare Nonce : constant String := Create_Nonce (128); pragma Unreferenced (Nonce); begin null; end; end loop; Util.Measures.Report (S, "128 bits nonce generation", 1_000); end; end Test_Create_Nonce; -- ------------------------------ -- Test the Get_State operation. -- ------------------------------ procedure Test_Get_State (T : in out Test) is App : Application; Nonce : constant String := Create_Nonce (128); begin App.Set_Application_Identifier ("test"); Util.Tests.Assert_Equals (T, "test", App.Get_Application_Identifier, "Invalid application"); App.Set_Application_Secret ("my-secret"); App.Set_Application_Callback ("my-callback"); App.Set_Provider_URI ("http://my-provider"); declare State : constant String := App.Get_State (Nonce); begin T.Assert (State'Length > 25, "State is too small: " & State); T.Assert (Ada.Strings.Fixed.Index (State, Nonce) = 0, "The state must not contain the nonce"); -- Calling Get_State with the same nonce should produce the same result. Util.Tests.Assert_Equals (T, State, App.Get_State (Nonce), "Invalid state"); App.Set_Application_Secret ("second-secret"); declare State2 : constant String := App.Get_State (Nonce); begin T.Assert (State /= State2, "Changing the application key should produce a different state"); end; -- Restore the secret and change the callback. App.Set_Application_Secret ("my-secret"); App.Set_Application_Callback ("my-callback2"); declare State2 : constant String := App.Get_State (Nonce); begin T.Assert (State /= State2, "Changing the application callback should produce a different state"); end; -- Restore the callback and change the client Id. App.Set_Application_Callback ("my-callback"); App.Set_Application_Identifier ("test2"); declare State2 : constant String := App.Get_State (Nonce); begin T.Assert (State /= State2, "Changing the application identifier should produce a different state"); end; end; end Test_Get_State; -- ------------------------------ -- Test the Is_Valid_State operation. -- ------------------------------ procedure Test_Is_Valid_State (T : in out Test) is App : Application; begin App.Set_Application_Identifier ("test"); Util.Tests.Assert_Equals (T, "test", App.Get_Application_Identifier, "Invalid application"); App.Set_Application_Secret ("my-secret"); App.Set_Application_Callback ("my-callback"); App.Set_Provider_URI ("http://my-provider"); for I in 1 .. 100 loop declare Nonce : constant String := Create_Nonce (128); State : constant String := App.Get_State (Nonce); begin T.Assert (State'Length > 25, "State is too small: " & State); T.Assert (App.Is_Valid_State (Nonce, State), "Invalid state: " & State); T.Assert (not App.Is_Valid_State ("", State), "State was valid with invalid nonce"); T.Assert (not App.Is_Valid_State (State, State), "State must be invalid"); T.Assert (not App.Is_Valid_State (Nonce, State & "d"), "State must be invalid"); end; end loop; end Test_Is_Valid_State; -- Test the Get_Auth_Params operation. procedure Test_Get_Auth_Params (T : in out Test) is App : Application; begin App.Set_Application_Identifier ("test"); Util.Tests.Assert_Equals (T, "test", App.Get_Application_Identifier, "Invalid application"); App.Set_Application_Secret ("my-secret"); App.Set_Application_Callback ("my-callback"); App.Set_Provider_URI ("http://my-provider"); declare P : constant String := App.Get_Auth_Params ("the-state", "the-scope"); begin Util.Tests.Assert_Equals (T, "client_id=test&redirect_uri=my-callback&" & "scope=the-scope&state=the-state", P, "Invalid auth params"); end; end Test_Get_Auth_Params; end Security.OAuth.Clients.Tests;
zhmu/ananas
Ada
518
adb
package body Opt67_Pkg is function Make_TSS_Name (Typ : Entity_Id; Nam : TNT) return Name_Id is begin return 0; end; function Stream_Operation_OK (N : Entity_Id; Name : TNT) return Boolean is begin return True; end; procedure Append_To (N1 : Natural; N2 : Node_Id) is begin null; end; function Predef (Loc : Source_Ptr; Name : Name_Id; E : Entity_Id) return Node_Id is begin return 0; end; function Init return Natural is begin return 0; end; end Opt67_Pkg;
sungyeon/drake
Ada
1,548
ads
pragma License (Unrestricted); -- extended unit package Ada.Characters.ASCII.Handling is -- There are functions handling only lower-half characters in -- 16#00# .. 16#7F#. pragma Pure; function Is_Control (Item : Character) return Boolean; function Is_Graphic (Item : Character) return Boolean; function Is_Letter (Item : Character) return Boolean; function Is_Lower (Item : Character) return Boolean; function Is_Upper (Item : Character) return Boolean; function Is_Basic (Item : Character) return Boolean renames Is_Letter; function Is_Digit (Item : Character) return Boolean; function Is_Decimal_Digit (Item : Character) return Boolean renames Is_Digit; function Is_Hexadecimal_Digit (Item : Character) return Boolean; function Is_Alphanumeric (Item : Character) return Boolean; function Is_Special (Item : Character) return Boolean; pragma Inline (Is_Graphic); pragma Inline (Is_Lower); pragma Inline (Is_Upper); pragma Inline (Is_Digit); function To_Lower (Item : Character) return Character; function To_Upper (Item : Character) return Character; function To_Basic (Item : Character) return Character; -- extended function To_Case_Folding (Item : Character) return Character renames To_Lower; pragma Inline (To_Basic); function To_Lower (Item : String) return String; function To_Upper (Item : String) return String; function To_Case_Folding (Item : String) return String renames To_Lower; end Ada.Characters.ASCII.Handling;
reznikmm/matreshka
Ada
4,565
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_Db.Command_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Db_Command_Attribute_Node is begin return Self : Db_Command_Attribute_Node do Matreshka.ODF_Db.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Db_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Db_Command_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Command_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Db_URI, Matreshka.ODF_String_Constants.Command_Attribute, Db_Command_Attribute_Node'Tag); end Matreshka.ODF_Db.Command_Attributes;
AdaCore/Ada_Drivers_Library
Ada
14,115
ads
-- This spec has been automatically generated from STM32F40x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.DAC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR_TSEL1_Field is HAL.UInt3; subtype CR_WAVE1_Field is HAL.UInt2; subtype CR_MAMP1_Field is HAL.UInt4; subtype CR_TSEL2_Field is HAL.UInt3; subtype CR_WAVE2_Field is HAL.UInt2; subtype CR_MAMP2_Field is HAL.UInt4; -- control register type CR_Register is record -- DAC channel1 enable EN1 : Boolean := False; -- DAC channel1 output buffer disable BOFF1 : Boolean := False; -- DAC channel1 trigger enable TEN1 : Boolean := False; -- DAC channel1 trigger selection TSEL1 : CR_TSEL1_Field := 16#0#; -- DAC channel1 noise/triangle wave generation enable WAVE1 : CR_WAVE1_Field := 16#0#; -- DAC channel1 mask/amplitude selector MAMP1 : CR_MAMP1_Field := 16#0#; -- DAC channel1 DMA enable DMAEN1 : Boolean := False; -- DAC channel1 DMA Underrun Interrupt enable DMAUDRIE1 : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- DAC channel2 enable EN2 : Boolean := False; -- DAC channel2 output buffer disable BOFF2 : Boolean := False; -- DAC channel2 trigger enable TEN2 : Boolean := False; -- DAC channel2 trigger selection TSEL2 : CR_TSEL2_Field := 16#0#; -- DAC channel2 noise/triangle wave generation enable WAVE2 : CR_WAVE2_Field := 16#0#; -- DAC channel2 mask/amplitude selector MAMP2 : CR_MAMP2_Field := 16#0#; -- DAC channel2 DMA enable DMAEN2 : Boolean := False; -- DAC channel2 DMA underrun interrupt enable DMAUDRIE2 : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record EN1 at 0 range 0 .. 0; BOFF1 at 0 range 1 .. 1; TEN1 at 0 range 2 .. 2; TSEL1 at 0 range 3 .. 5; WAVE1 at 0 range 6 .. 7; MAMP1 at 0 range 8 .. 11; DMAEN1 at 0 range 12 .. 12; DMAUDRIE1 at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; EN2 at 0 range 16 .. 16; BOFF2 at 0 range 17 .. 17; TEN2 at 0 range 18 .. 18; TSEL2 at 0 range 19 .. 21; WAVE2 at 0 range 22 .. 23; MAMP2 at 0 range 24 .. 27; DMAEN2 at 0 range 28 .. 28; DMAUDRIE2 at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- SWTRIGR_SWTRIG array type SWTRIGR_SWTRIG_Field_Array is array (1 .. 2) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SWTRIGR_SWTRIG type SWTRIGR_SWTRIG_Field (As_Array : Boolean := False) is record case As_Array is when False => -- SWTRIG as a value Val : HAL.UInt2; when True => -- SWTRIG as an array Arr : SWTRIGR_SWTRIG_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SWTRIGR_SWTRIG_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- software trigger register type SWTRIGR_Register is record -- Write-only. DAC channel1 software trigger SWTRIG : SWTRIGR_SWTRIG_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_2_31 : HAL.UInt30 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SWTRIGR_Register use record SWTRIG at 0 range 0 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; subtype DHR12R1_DACC1DHR_Field is HAL.UInt12; -- channel1 12-bit right-aligned data holding register type DHR12R1_Register is record -- DAC channel1 12-bit right-aligned data DACC1DHR : DHR12R1_DACC1DHR_Field := 16#0#; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DHR12R1_Register use record DACC1DHR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype DHR12L1_DACC1DHR_Field is HAL.UInt12; -- channel1 12-bit left aligned data holding register type DHR12L1_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- DAC channel1 12-bit left-aligned data DACC1DHR : DHR12L1_DACC1DHR_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DHR12L1_Register use record Reserved_0_3 at 0 range 0 .. 3; DACC1DHR at 0 range 4 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype DHR8R1_DACC1DHR_Field is HAL.UInt8; -- channel1 8-bit right aligned data holding register type DHR8R1_Register is record -- DAC channel1 8-bit right-aligned data DACC1DHR : DHR8R1_DACC1DHR_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 DHR8R1_Register use record DACC1DHR at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype DHR12R2_DACC2DHR_Field is HAL.UInt12; -- channel2 12-bit right aligned data holding register type DHR12R2_Register is record -- DAC channel2 12-bit right-aligned data DACC2DHR : DHR12R2_DACC2DHR_Field := 16#0#; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DHR12R2_Register use record DACC2DHR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype DHR12L2_DACC2DHR_Field is HAL.UInt12; -- channel2 12-bit left aligned data holding register type DHR12L2_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- DAC channel2 12-bit left-aligned data DACC2DHR : DHR12L2_DACC2DHR_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DHR12L2_Register use record Reserved_0_3 at 0 range 0 .. 3; DACC2DHR at 0 range 4 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype DHR8R2_DACC2DHR_Field is HAL.UInt8; -- channel2 8-bit right-aligned data holding register type DHR8R2_Register is record -- DAC channel2 8-bit right-aligned data DACC2DHR : DHR8R2_DACC2DHR_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 DHR8R2_Register use record DACC2DHR at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype DHR12RD_DACC1DHR_Field is HAL.UInt12; subtype DHR12RD_DACC2DHR_Field is HAL.UInt12; -- Dual DAC 12-bit right-aligned data holding register type DHR12RD_Register is record -- DAC channel1 12-bit right-aligned data DACC1DHR : DHR12RD_DACC1DHR_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- DAC channel2 12-bit right-aligned data DACC2DHR : DHR12RD_DACC2DHR_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DHR12RD_Register use record DACC1DHR at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; DACC2DHR at 0 range 16 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype DHR12LD_DACC1DHR_Field is HAL.UInt12; subtype DHR12LD_DACC2DHR_Field is HAL.UInt12; -- DUAL DAC 12-bit left aligned data holding register type DHR12LD_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- DAC channel1 12-bit left-aligned data DACC1DHR : DHR12LD_DACC1DHR_Field := 16#0#; -- unspecified Reserved_16_19 : HAL.UInt4 := 16#0#; -- DAC channel2 12-bit left-aligned data DACC2DHR : DHR12LD_DACC2DHR_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DHR12LD_Register use record Reserved_0_3 at 0 range 0 .. 3; DACC1DHR at 0 range 4 .. 15; Reserved_16_19 at 0 range 16 .. 19; DACC2DHR at 0 range 20 .. 31; end record; subtype DHR8RD_DACC1DHR_Field is HAL.UInt8; subtype DHR8RD_DACC2DHR_Field is HAL.UInt8; -- DUAL DAC 8-bit right aligned data holding register type DHR8RD_Register is record -- DAC channel1 8-bit right-aligned data DACC1DHR : DHR8RD_DACC1DHR_Field := 16#0#; -- DAC channel2 8-bit right-aligned data DACC2DHR : DHR8RD_DACC2DHR_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DHR8RD_Register use record DACC1DHR at 0 range 0 .. 7; DACC2DHR at 0 range 8 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype DOR1_DACC1DOR_Field is HAL.UInt12; -- channel1 data output register type DOR1_Register is record -- Read-only. DAC channel1 data output DACC1DOR : DOR1_DACC1DOR_Field; -- unspecified Reserved_12_31 : HAL.UInt20; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DOR1_Register use record DACC1DOR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype DOR2_DACC2DOR_Field is HAL.UInt12; -- channel2 data output register type DOR2_Register is record -- Read-only. DAC channel2 data output DACC2DOR : DOR2_DACC2DOR_Field; -- unspecified Reserved_12_31 : HAL.UInt20; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DOR2_Register use record DACC2DOR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; -- status register type SR_Register is record -- unspecified Reserved_0_12 : HAL.UInt13 := 16#0#; -- DAC channel1 DMA underrun flag DMAUDR1 : Boolean := False; -- unspecified Reserved_14_28 : HAL.UInt15 := 16#0#; -- DAC channel2 DMA underrun flag DMAUDR2 : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record Reserved_0_12 at 0 range 0 .. 12; DMAUDR1 at 0 range 13 .. 13; Reserved_14_28 at 0 range 14 .. 28; DMAUDR2 at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Digital-to-analog converter type DAC_Peripheral is record -- control register CR : aliased CR_Register; -- software trigger register SWTRIGR : aliased SWTRIGR_Register; -- channel1 12-bit right-aligned data holding register DHR12R1 : aliased DHR12R1_Register; -- channel1 12-bit left aligned data holding register DHR12L1 : aliased DHR12L1_Register; -- channel1 8-bit right aligned data holding register DHR8R1 : aliased DHR8R1_Register; -- channel2 12-bit right aligned data holding register DHR12R2 : aliased DHR12R2_Register; -- channel2 12-bit left aligned data holding register DHR12L2 : aliased DHR12L2_Register; -- channel2 8-bit right-aligned data holding register DHR8R2 : aliased DHR8R2_Register; -- Dual DAC 12-bit right-aligned data holding register DHR12RD : aliased DHR12RD_Register; -- DUAL DAC 12-bit left aligned data holding register DHR12LD : aliased DHR12LD_Register; -- DUAL DAC 8-bit right aligned data holding register DHR8RD : aliased DHR8RD_Register; -- channel1 data output register DOR1 : aliased DOR1_Register; -- channel2 data output register DOR2 : aliased DOR2_Register; -- status register SR : aliased SR_Register; end record with Volatile; for DAC_Peripheral use record CR at 16#0# range 0 .. 31; SWTRIGR at 16#4# range 0 .. 31; DHR12R1 at 16#8# range 0 .. 31; DHR12L1 at 16#C# range 0 .. 31; DHR8R1 at 16#10# range 0 .. 31; DHR12R2 at 16#14# range 0 .. 31; DHR12L2 at 16#18# range 0 .. 31; DHR8R2 at 16#1C# range 0 .. 31; DHR12RD at 16#20# range 0 .. 31; DHR12LD at 16#24# range 0 .. 31; DHR8RD at 16#28# range 0 .. 31; DOR1 at 16#2C# range 0 .. 31; DOR2 at 16#30# range 0 .. 31; SR at 16#34# range 0 .. 31; end record; -- Digital-to-analog converter DAC_Periph : aliased DAC_Peripheral with Import, Address => System'To_Address (16#40007400#); end STM32_SVD.DAC;
mitchelhaan/ncurses
Ada
3,833
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Text_IO.Complex_IO -- -- -- -- 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.6 $ -- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Text_IO.Float_IO; package body Terminal_Interface.Curses.Text_IO.Complex_IO is package FIO is new Terminal_Interface.Curses.Text_IO.Float_IO (Complex_Types.Real'Base); procedure Put (Win : in Window; Item : in Complex; Fore : in Field := Default_Fore; Aft : in Field := Default_Aft; Exp : in Field := Default_Exp) is begin Put (Win, '('); FIO.Put (Win, Item.Re, Fore, Aft, Exp); Put (Win, ','); FIO.Put (Win, Item.Im, Fore, Aft, Exp); Put (Win, ')'); end Put; procedure Put (Item : in Complex; Fore : in Field := Default_Fore; Aft : in Field := Default_Aft; Exp : in Field := Default_Exp) is begin Put (Get_Window, Item, Fore, Aft, Exp); end Put; end Terminal_Interface.Curses.Text_IO.Complex_IO;
reznikmm/matreshka
Ada
4,359
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Nodes; with XML.DOM.Attributes.Internals; package body ODF.DOM.Attributes.Text.Display_Outline_Level.Internals is ------------ -- Create -- ------------ function Create (Node : Matreshka.ODF_Attributes.Text.Display_Outline_Level.Text_Display_Outline_Level_Access) return ODF.DOM.Attributes.Text.Display_Outline_Level.ODF_Text_Display_Outline_Level is begin return (XML.DOM.Attributes.Internals.Create (Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record); end Create; ---------- -- Wrap -- ---------- function Wrap (Node : Matreshka.ODF_Attributes.Text.Display_Outline_Level.Text_Display_Outline_Level_Access) return ODF.DOM.Attributes.Text.Display_Outline_Level.ODF_Text_Display_Outline_Level is begin return (XML.DOM.Attributes.Internals.Wrap (Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record); end Wrap; end ODF.DOM.Attributes.Text.Display_Outline_Level.Internals;
skrtbhtngr/presto
Ada
4,469
adb
---------------------------------------------------------------- -- ZLib for Ada thick binding. -- -- -- -- Copyright (C) 2002-2003 Dmitriy Anisimkov -- -- -- -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- -- Continuous test for ZLib multithreading. If the test would fail -- we should provide thread safe allocation routines for the Z_Stream. -- -- $Id: mtest.adb,val 1.4 2004/07/23 07:49:54 vagul Exp $ with ZLib; with Ada.Streams; with Ada.Numerics.Discrete_Random; with Ada.Text_IO; with Ada.Exceptions; with Ada.Task_Identification; procedure MTest is use Ada.Streams; use ZLib; Stop : Boolean := False; pragma Atomic (Stop); subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#; package Random_Elements is new Ada.Numerics.Discrete_Random (Visible_Symbols); task type Test_Task; task body Test_Task is Buffer : Stream_Element_Array (1 .. 100_000); Gen : Random_Elements.Generator; Buffer_First : Stream_Element_Offset; Compare_First : Stream_Element_Offset; Deflate : Filter_Type; Inflate : Filter_Type; procedure Further (Item : in Stream_Element_Array); procedure Read_Buffer (Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset); ------------- -- Further -- ------------- procedure Further (Item : in Stream_Element_Array) is procedure Compare (Item : in Stream_Element_Array); ------------- -- Compare -- ------------- procedure Compare (Item : in Stream_Element_Array) is Next_First : Stream_Element_Offset := Compare_First + Item'Length; begin if Buffer (Compare_First .. Next_First - 1) /= Item then raise Program_Error; end if; Compare_First := Next_First; end Compare; procedure Compare_Write is new ZLib.Write (Write => Compare); begin Compare_Write (Inflate, Item, No_Flush); end Further; ----------------- -- Read_Buffer -- ----------------- procedure Read_Buffer (Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset) is Buff_Diff : Stream_Element_Offset := Buffer'Last - Buffer_First; Next_First : Stream_Element_Offset; begin if Item'Length <= Buff_Diff then Last := Item'Last; Next_First := Buffer_First + Item'Length; Item := Buffer (Buffer_First .. Next_First - 1); Buffer_First := Next_First; else Last := Item'First + Buff_Diff; Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last); Buffer_First := Buffer'Last + 1; end if; end Read_Buffer; procedure Translate is new Generic_Translate (Data_In => Read_Buffer, Data_Out => Further); begin Random_Elements.Reset (Gen); Buffer := (others => 20); Main : loop for J in Buffer'Range loop Buffer (J) := Random_Elements.Random (Gen); Deflate_Init (Deflate); Inflate_Init (Inflate); Buffer_First := Buffer'First; Compare_First := Buffer'First; Translate (Deflate); if Compare_First /= Buffer'Last + 1 then raise Program_Error; end if; Ada.Text_IO.Put_Line (Ada.Task_Identification.Image (Ada.Task_Identification.Current_Task) & Stream_Element_Offset'Image (J) & ZLib.Count'Image (Total_Out (Deflate))); Close (Deflate); Close (Inflate); exit Main when Stop; end loop; end loop Main; exception when E : others => Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E)); Stop := True; end Test_Task; Test : array (1 .. 4) of Test_Task; pragma Unreferenced (Test); Dummy : Character; begin Ada.Text_IO.Get_Immediate (Dummy); Stop := True; end MTest;
reznikmm/matreshka
Ada
4,655
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.Animation_Repeat_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Text_Animation_Repeat_Attribute_Node is begin return Self : Text_Animation_Repeat_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_Animation_Repeat_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Animation_Repeat_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Text_URI, Matreshka.ODF_String_Constants.Animation_Repeat_Attribute, Text_Animation_Repeat_Attribute_Node'Tag); end Matreshka.ODF_Text.Animation_Repeat_Attributes;
stcarrez/ada-keystore
Ada
3,724
ads
----------------------------------------------------------------------- -- keystore-files-tests -- Tests for keystore files -- Copyright (C) 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. ----------------------------------------------------------------------- with Util.Tests; package Keystore.Files.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test creation of a keystore and re-opening it. procedure Test_Create (T : in out Test); -- Test opening a keystore when some blocks are corrupted. procedure Test_Corruption (T : in out Test); -- Test adding values to a keystore. procedure Test_Add (T : in out Test); -- Test adding values and getting them back. procedure Test_Add_Get (T : in out Test); -- Test deleting values. procedure Test_Delete (T : in out Test); -- Test update values. procedure Test_Update (T : in out Test); -- Test update values in growing and descending sequences. procedure Test_Update_Sequence (T : in out Test); -- Test opening and closing keystore. procedure Test_Open_Close (T : in out Test); -- Test opening a keystore and listing the entries. procedure Test_List (T : in out Test); -- Test adding values that already exist. procedure Test_Add_Error (T : in out Test); -- Test changing the wallet password. procedure Test_Set_Key (T : in out Test); -- Test adding empty values to a keystore. procedure Test_Add_Empty (T : in out Test); -- Test getting values through an Output_Stream. procedure Test_Get_Stream (T : in out Test); -- Test setting values through an Input_Stream. procedure Test_Set_From_Stream (T : in out Test); procedure Test_Set_From_Larger_Stream (T : in out Test); -- Test updating values through an Input and Output_Stream. procedure Test_Update_Stream (T : in out Test); -- Test reading partial value starting at a given position. procedure Test_Read (T : in out Test); -- Test writing partial value starting at a given position. procedure Test_Write (T : in out Test); -- Test writing partial value with several workers. procedure Test_Write_Workers (T : in out Test); -- Perforamce test adding values. procedure Test_Perf_Add (T : in out Test); procedure Test_File_Stream (T : in out Test; Name : in String; Input : in String; Create : in Boolean); -- Test setting and getting header data. procedure Test_Header_Data_1 (T : in out Test); procedure Test_Header_Data_10 (T : in out Test); procedure Test_Header_Data_Error (T : in out Test); procedure Test_Header_Data_Update (T : in out Test); -- Test creating a wallet. procedure Test_Add_Wallet (T : in out Test); procedure Test_Child_Wallet_Error (T : in out Test); -- Test operation on corrupted keystore. procedure Test_Corrupted_1 (T : in out Test); procedure Test_Corrupted_2 (T : in out Test); end Keystore.Files.Tests;
AaronC98/PlaneSystem
Ada
3,115
ads
------------------------------------------------------------------------------ -- Ada Web Server -- -- -- -- Copyright (C) 2014-2019, 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; -- Support for denying an handshake with AWS.Messages; package AWS.Net.Websocket.Handshake_Error is type Object is new WebSocket.Object with private; function Create (Status_Code : Messages.Client_Error := Messages.S403; Reason_Phrase : String := "") return Object; -- Create a WebSocket error response, Status_Code is the HTTP code that -- will be returned during the handshake. function Status_Code (Socket : Object'Class) return Messages.Client_Error with Inline; -- Returns the status code for the handshake function Reason_Phrase (Socket : Object'Class) return String with Inline; -- Returns the associated reason-phrase private type Object is new WebSocket.Object with record Status_Code : AWS.Messages.Client_Error; Reason_Phrase : Unbounded_String; end record; end AWS.Net.WebSocket.Handshake_Error;
reznikmm/matreshka
Ada
18,977
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$ ------------------------------------------------------------------------------ with AMF.Internals.UML_Named_Elements; with AMF.UML.Activities; with AMF.UML.Activity_Edges.Collections; with AMF.UML.Activity_Groups.Collections; with AMF.UML.Activity_Nodes.Collections; with AMF.UML.Activity_Partitions.Collections; with AMF.UML.Classifiers.Collections; with AMF.UML.Constraints.Collections; with AMF.UML.Dependencies.Collections; with AMF.UML.Exception_Handlers.Collections; with AMF.UML.Input_Pins.Collections; with AMF.UML.Interruptible_Activity_Regions.Collections; with AMF.UML.Named_Elements; with AMF.UML.Namespaces; with AMF.UML.Output_Pins.Collections; with AMF.UML.Packages.Collections; with AMF.UML.Redefinable_Elements.Collections; with AMF.UML.String_Expressions; with AMF.UML.Structured_Activity_Nodes; with AMF.UML.Unmarshall_Actions; with AMF.Visitors; package AMF.Internals.UML_Unmarshall_Actions is type UML_Unmarshall_Action_Proxy is limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy and AMF.UML.Unmarshall_Actions.UML_Unmarshall_Action with null record; overriding function Get_Object (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Input_Pins.UML_Input_Pin_Access; -- Getter of UnmarshallAction::object. -- -- The object to be unmarshalled. overriding procedure Set_Object (Self : not null access UML_Unmarshall_Action_Proxy; To : AMF.UML.Input_Pins.UML_Input_Pin_Access); -- Setter of UnmarshallAction::object. -- -- The object to be unmarshalled. overriding function Get_Result (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Output_Pins.Collections.Set_Of_UML_Output_Pin; -- Getter of UnmarshallAction::result. -- -- The values of the structural features of the input object. overriding function Get_Unmarshall_Type (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access; -- Getter of UnmarshallAction::unmarshallType. -- -- The type of the object to be unmarshalled. overriding procedure Set_Unmarshall_Type (Self : not null access UML_Unmarshall_Action_Proxy; To : AMF.UML.Classifiers.UML_Classifier_Access); -- Setter of UnmarshallAction::unmarshallType. -- -- The type of the object to be unmarshalled. overriding function Get_Context (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access; -- Getter of Action::context. -- -- The classifier that owns the behavior of which this action is a part. overriding function Get_Input (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin; -- Getter of Action::input. -- -- The ordered set of input pins connected to the Action. These are among -- the total set of inputs. overriding function Get_Is_Locally_Reentrant (Self : not null access constant UML_Unmarshall_Action_Proxy) return Boolean; -- Getter of Action::isLocallyReentrant. -- -- If true, the action can begin a new, concurrent execution, even if -- there is already another execution of the action ongoing. If false, the -- action cannot begin a new execution until any previous execution has -- completed. overriding procedure Set_Is_Locally_Reentrant (Self : not null access UML_Unmarshall_Action_Proxy; To : Boolean); -- Setter of Action::isLocallyReentrant. -- -- If true, the action can begin a new, concurrent execution, even if -- there is already another execution of the action ongoing. If false, the -- action cannot begin a new execution until any previous execution has -- completed. overriding function Get_Local_Postcondition (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint; -- Getter of Action::localPostcondition. -- -- Constraint that must be satisfied when executed is completed. overriding function Get_Local_Precondition (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint; -- Getter of Action::localPrecondition. -- -- Constraint that must be satisfied when execution is started. overriding function Get_Output (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin; -- Getter of Action::output. -- -- The ordered set of output pins connected to the Action. The action -- places its results onto pins in this set. overriding function Get_Handler (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler; -- Getter of ExecutableNode::handler. -- -- A set of exception handlers that are examined if an uncaught exception -- propagates to the outer level of the executable node. overriding function Get_Activity (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Activities.UML_Activity_Access; -- Getter of ActivityNode::activity. -- -- Activity containing the node. overriding procedure Set_Activity (Self : not null access UML_Unmarshall_Action_Proxy; To : AMF.UML.Activities.UML_Activity_Access); -- Setter of ActivityNode::activity. -- -- Activity containing the node. overriding function Get_In_Group (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group; -- Getter of ActivityNode::inGroup. -- -- Groups containing the node. overriding function Get_In_Interruptible_Region (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region; -- Getter of ActivityNode::inInterruptibleRegion. -- -- Interruptible regions containing the node. overriding function Get_In_Partition (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition; -- Getter of ActivityNode::inPartition. -- -- Partitions containing the node. overriding function Get_In_Structured_Node (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access; -- Getter of ActivityNode::inStructuredNode. -- -- Structured activity node containing the node. overriding procedure Set_In_Structured_Node (Self : not null access UML_Unmarshall_Action_Proxy; To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access); -- Setter of ActivityNode::inStructuredNode. -- -- Structured activity node containing the node. overriding function Get_Incoming (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; -- Getter of ActivityNode::incoming. -- -- Edges that have the node as target. overriding function Get_Outgoing (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; -- Getter of ActivityNode::outgoing. -- -- Edges that have the node as source. overriding function Get_Redefined_Node (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node; -- Getter of ActivityNode::redefinedNode. -- -- Inherited nodes replaced by this node in a specialization of the -- activity. overriding function Get_Is_Leaf (Self : not null access constant UML_Unmarshall_Action_Proxy) return Boolean; -- Getter of RedefinableElement::isLeaf. -- -- Indicates whether it is possible to further redefine a -- RedefinableElement. If the value is true, then it is not possible to -- further redefine the RedefinableElement. Note that this property is -- preserved through package merge operations; that is, the capability to -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in -- the resulting RedefinableElement of a package merge operation where a -- RedefinableElement with isLeaf=false is merged with a matching -- RedefinableElement with isLeaf=true: the resulting RedefinableElement -- will have isLeaf=false. Default value is false. overriding procedure Set_Is_Leaf (Self : not null access UML_Unmarshall_Action_Proxy; To : Boolean); -- Setter of RedefinableElement::isLeaf. -- -- Indicates whether it is possible to further redefine a -- RedefinableElement. If the value is true, then it is not possible to -- further redefine the RedefinableElement. Note that this property is -- preserved through package merge operations; that is, the capability to -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in -- the resulting RedefinableElement of a package merge operation where a -- RedefinableElement with isLeaf=false is merged with a matching -- RedefinableElement with isLeaf=true: the resulting RedefinableElement -- will have isLeaf=false. Default value is false. overriding function Get_Redefined_Element (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element; -- Getter of RedefinableElement::redefinedElement. -- -- The redefinable element that is being redefined by this element. overriding function Get_Redefinition_Context (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; -- Getter of RedefinableElement::redefinitionContext. -- -- References the contexts that this element may be redefined from. overriding function Get_Client_Dependency (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; -- Getter of NamedElement::clientDependency. -- -- Indicates the dependencies that reference the client. overriding function Get_Name_Expression (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access; -- Getter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding procedure Set_Name_Expression (Self : not null access UML_Unmarshall_Action_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access); -- Setter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding function Get_Namespace (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Getter of NamedElement::namespace. -- -- Specifies the namespace that owns the NamedElement. overriding function Get_Qualified_Name (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.Optional_String; -- Getter of NamedElement::qualifiedName. -- -- A name which allows the NamedElement to be identified within a -- hierarchy of nested Namespaces. It is constructed from the names of the -- containing namespaces starting at the root of the hierarchy and ending -- with the name of the NamedElement itself. overriding function Context (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access; -- Operation Action::context. -- -- Missing derivation for Action::/context : Classifier overriding function Is_Consistent_With (Self : not null access constant UML_Unmarshall_Action_Proxy; Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean; -- Operation RedefinableElement::isConsistentWith. -- -- The query isConsistentWith() specifies, for any two RedefinableElements -- in a context in which redefinition is possible, whether redefinition -- would be logically consistent. By default, this is false; this -- operation must be overridden for subclasses of RedefinableElement to -- define the consistency conditions. overriding function Is_Redefinition_Context_Valid (Self : not null access constant UML_Unmarshall_Action_Proxy; Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean; -- Operation RedefinableElement::isRedefinitionContextValid. -- -- The query isRedefinitionContextValid() specifies whether the -- redefinition contexts of this RedefinableElement are properly related -- to the redefinition contexts of the specified RedefinableElement to -- allow this element to redefine the other. By default at least one of -- the redefinition contexts of this element must be a specialization of -- at least one of the redefinition contexts of the specified element. overriding function All_Owning_Packages (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package; -- Operation NamedElement::allOwningPackages. -- -- The query allOwningPackages() returns all the directly or indirectly -- owning packages. overriding function Is_Distinguishable_From (Self : not null access constant UML_Unmarshall_Action_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean; -- Operation NamedElement::isDistinguishableFrom. -- -- The query isDistinguishableFrom() determines whether two NamedElements -- may logically co-exist within a Namespace. By default, two named -- elements are distinguishable if (a) they have unrelated types or (b) -- they have related types but different names. overriding function Namespace (Self : not null access constant UML_Unmarshall_Action_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Operation NamedElement::namespace. -- -- Missing derivation for NamedElement::/namespace : Namespace overriding procedure Enter_Element (Self : not null access constant UML_Unmarshall_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Leave_Element (Self : not null access constant UML_Unmarshall_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Visit_Element (Self : not null access constant UML_Unmarshall_Action_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of iterator interface. end AMF.Internals.UML_Unmarshall_Actions;
charlie5/cBound
Ada
2,315
ads
private with GMP_c.mpz_t; package GMP.discrete -- -- A thick binding to the GMP C library. -- is type Integer is private; --------- --- Forge -- function to_Integer return Integer; function to_Integer (From : long_long_Integer) return Integer; function to_Integer (From : discrete.Integer) return Integer; procedure define (Self : in out Integer); procedure define (Self : in out Integer; Value : in long_long_Integer); procedure define (Self : in out Integer; Value : in discrete.Integer); procedure destroy (Self : in out Integer); ------------- -- Attributes -- function Value (Self : in Integer) return long_long_Integer; function Image (Self : in Integer) return String; function hex_Image (Self : in Integer) return String; function oct_Image (Self : in Integer) return String; ------------- -- Operations -- overriding function "=" (Left, Right : in Integer) return Boolean; function "<" (Left, Right : in Integer) return Boolean; function "+" (Left, Right : in Integer) return Integer; function "-" (Left, Right : in Integer) return Integer; function "*" (Left, Right : in Integer) return Integer; function "/" (Left, Right : in Integer) return Integer; -- Rounds towards 0 and result will have the same sign as 'Left'. type Rounding is (Up, -- Rounds up towards '+Infinity' and result will have the opposite sign to 'Right'. Down); -- Rounds down towards '-Infinity' and result will have the same sign as 'Right'. function div (Left, Right : in Integer; Round : in Rounding) return Integer; function "**" (Left : in Integer; Right : in long_long_Integer) return Integer; function "or" (Left, Right : in Integer) return Integer; function "xor" (Left, Right : in Integer) return Integer; function "and" (Left, Right : in Integer) return Integer; function "-" (Self : in Integer) return Integer; function "not" (Self : in Integer) return Integer; private type Integer is record Lean : GMP_c.mpz_t.Pointer; end record; end GMP.Discrete;
faelys/natools
Ada
15,925
adb
------------------------------------------------------------------------------ -- Copyright (c) 2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Test_Tools; package body Natools.S_Expressions.Atom_Buffers.Tests is ---------------------- -- Whole Test Suite -- ---------------------- procedure All_Tests (Report : in out NT.Reporter'Class) is begin Test_Block_Append (Report); Test_Octet_Append (Report); Test_Preallocate (Report); Test_Query (Report); Test_Query_Null (Report); Test_Reset (Report); Test_Reverse_Append (Report); Test_Invert (Report); Test_Empty_Append (Report); Test_Stream_Interface (Report); end All_Tests; ---------------------- -- Individual Tests -- ---------------------- procedure Test_Block_Append (Report : in out NT.Reporter'Class) is Name : constant String := "Append in blocks"; Data : Atom (0 .. 255); begin for O in Octet loop Data (Count (O)) := O; end loop; declare Buffer : Atom_Buffer; begin Buffer.Append (Data (0 .. 10)); Buffer.Append (Data (11 .. 11)); Buffer.Append (Data (12 .. 101)); Buffer.Append (Data (102 .. 101)); Buffer.Append (Data (102 .. 255)); Test_Tools.Test_Atom (Report, Name, Data, Buffer.Data); end; exception when Error : others => Report.Report_Exception (Name, Error); end Test_Block_Append; procedure Test_Invert (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Invert procedure"); Source : Atom (1 .. 10); Inverse : Atom (1 .. 10); begin for I in Source'Range loop Source (I) := 10 + Octet (I); Inverse (11 - I) := Source (I); end loop; declare Buffer : Atom_Buffer; begin Buffer.Invert; Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data); Buffer.Append (Source (1 .. 1)); Buffer.Invert; Test_Tools.Test_Atom (Test, Source (1 .. 1), Buffer.Data); Buffer.Append (Source (2 .. 7)); Buffer.Invert; Test_Tools.Test_Atom (Test, Inverse (4 .. 10), Buffer.Data); Buffer.Invert; Buffer.Append (Source (8 .. 10)); Buffer.Invert; Test_Tools.Test_Atom (Test, Inverse, Buffer.Data); end; exception when Error : others => Test.Report_Exception (Error); end Test_Invert; procedure Test_Octet_Append (Report : in out NT.Reporter'Class) is Name : constant String := "Append octet by octet"; Data : Atom (0 .. 255); begin for O in Octet loop Data (Count (O)) := O; end loop; declare Buffer : Atom_Buffer; begin for O in Octet loop Buffer.Append (O); end loop; Test_Tools.Test_Atom (Report, Name, Data, Buffer.Data); end; exception when Error : others => Report.Report_Exception (Name, Error); end Test_Octet_Append; procedure Test_Preallocate (Report : in out NT.Reporter'Class) is Name : constant String := "Preallocation of memory"; begin declare Buffer : Atom_Buffer; begin Buffer.Preallocate (256); declare Old_Accessor : Atom_Refs.Accessor := Buffer.Raw_Query; begin for O in Octet loop Buffer.Append (O); end loop; Report.Item (Name, NT.To_Result (Old_Accessor.Data = Buffer.Raw_Query.Data)); end; end; exception when Error : others => Report.Report_Exception (Name, Error); end Test_Preallocate; procedure Test_Query (Report : in out NT.Reporter'Class) is Name : constant String := "Accessors"; Data : Atom (0 .. 255); begin for O in Octet loop Data (Count (O)) := O; end loop; declare Buffer : Atom_Buffer; begin Buffer.Append (Data); if Buffer.Length /= Data'Length then Report.Item (Name, NT.Fail); Report.Info ("Buffer.Length returned" & Count'Image (Buffer.Length) & ", expected" & Count'Image (Data'Length)); return; end if; if Buffer.Data /= Data then Report.Item (Name, NT.Fail); Report.Info ("Data, returning an Atom"); Test_Tools.Dump_Atom (Report, Buffer.Data, "Found"); Test_Tools.Dump_Atom (Report, Data, "Expected"); return; end if; if Buffer.Raw_Query.Data.all /= Data then Report.Item (Name, NT.Fail); Report.Info ("Raw_Query, returning an accessor"); Test_Tools.Dump_Atom (Report, Buffer.Raw_Query.Data.all, "Found"); Test_Tools.Dump_Atom (Report, Data, "Expected"); return; end if; if Buffer.Element (25) /= Data (24) then Report.Item (Name, NT.Fail); Report.Info ("Element, returning an octet"); return; end if; declare O, P : Octet; begin Buffer.Pop (O); Buffer.Pop (P); if O /= Data (Data'Last) or P /= Data (Data'Last - 1) or Buffer.Data /= Data (Data'First .. Data'Last - 2) then Report.Item (Name, NT.Fail); Report.Info ("Pop of an octet: " & Octet'Image (P) & " " & Octet'Image (O)); Test_Tools.Dump_Atom (Report, Buffer.Data, "Remaining"); Test_Tools.Dump_Atom (Report, Data, "Expected"); return; end if; Buffer.Append ((P, O)); if Buffer.Data /= Data then Report.Item (Name, NT.Fail); Report.Info ("Append back after Pop"); Test_Tools.Dump_Atom (Report, Buffer.Data, "Found"); Test_Tools.Dump_Atom (Report, Data, "Expected"); return; end if; end; declare Retrieved : Atom (10 .. 310); Length : Count; begin Buffer.Peek (Retrieved, Length); if Length /= Data'Length or else Retrieved (10 .. Length + 9) /= Data then Report.Item (Name, NT.Fail); Report.Info ("Peek into an existing buffer"); Report.Info ("Length returned" & Count'Image (Length) & ", expected" & Count'Image (Data'Length)); Test_Tools.Dump_Atom (Report, Retrieved (10 .. Length + 9), "Found"); Test_Tools.Dump_Atom (Report, Data, "Expected"); return; end if; end; declare Retrieved : Atom (20 .. 50); Length : Count; begin Buffer.Peek (Retrieved, Length); if Length /= Data'Length or else Retrieved /= Data (0 .. 30) then Report.Item (Name, NT.Fail); Report.Info ("Peek into a buffer too small"); Report.Info ("Length returned" & Count'Image (Length) & ", expected" & Count'Image (Data'Length)); Test_Tools.Dump_Atom (Report, Retrieved, "Found"); Test_Tools.Dump_Atom (Report, Data (0 .. 30), "Expected"); return; end if; end; declare procedure Check (Found : in Atom); Result : Boolean := False; procedure Check (Found : in Atom) is begin Result := Found = Data; end Check; begin Buffer.Query (Check'Access); if not Result then Report.Item (Name, NT.Fail); Report.Info ("Query with callback"); return; end if; end; end; Report.Item (Name, NT.Success); exception when Error : others => Report.Report_Exception (Name, Error); end Test_Query; procedure Test_Query_Null (Report : in out NT.Reporter'Class) is Name : constant String := "Accessor variants against a null buffer"; begin declare Buffer : Atom_Buffer; begin if Buffer.Data /= Null_Atom then Report.Item (Name, NT.Fail); Report.Info ("Data, returning an Atom"); Test_Tools.Dump_Atom (Report, Buffer.Data, "Found"); return; end if; if Buffer.Raw_Query.Data.all /= Null_Atom then Report.Item (Name, NT.Fail); Report.Info ("Raw_Query, returning an accessor"); Test_Tools.Dump_Atom (Report, Buffer.Raw_Query.Data.all, "Found"); return; end if; declare Retrieved : Atom (1 .. 10); Length : Count; begin Buffer.Peek (Retrieved, Length); if Length /= 0 then Report.Item (Name, NT.Fail); Report.Info ("Peek into an existing buffer"); Report.Info ("Length returned" & Count'Image (Length) & ", expected 0"); return; end if; end; declare procedure Check (Found : in Atom); Result : Boolean := False; procedure Check (Found : in Atom) is begin Result := Found = Null_Atom; end Check; begin Buffer.Query (Check'Access); if not Result then Report.Item (Name, NT.Fail); Report.Info ("Query with callback"); return; end if; end; end; Report.Item (Name, NT.Success); exception when Error : others => Report.Report_Exception (Name, Error); end Test_Query_Null; procedure Test_Reset (Report : in out NT.Reporter'Class) is Name : constant String := "Reset procedures"; begin declare Buffer : Atom_Buffer; begin for O in Octet loop Buffer.Append (O); end loop; declare Accessor : Atom_Refs.Accessor := Buffer.Raw_Query; begin Buffer.Soft_Reset; if Buffer.Length /= 0 then Report.Item (Name, NT.Fail); Report.Info ("Soft reset left length" & Count'Image (Buffer.Length)); return; end if; if Buffer.Raw_Query.Data /= Accessor.Data then Report.Item (Name, NT.Fail); Report.Info ("Soft reset changed storage area"); return; end if; if Buffer.Raw_Query.Data.all'Length /= Buffer.Capacity then Report.Item (Name, NT.Fail); Report.Info ("Available length inconsistency, recorded" & Count'Image (Buffer.Capacity) & ", actual" & Count'Image (Buffer.Raw_Query.Data.all'Length)); return; end if; if Buffer.Data'Length /= Buffer.Used then Report.Item (Name, NT.Fail); Report.Info ("Used length inconsistency, recorded" & Count'Image (Buffer.Used) & ", actual" & Count'Image (Buffer.Data'Length)); return; end if; end; for O in Octet'(10) .. Octet'(50) loop Buffer.Append (O); end loop; Buffer.Hard_Reset; if Buffer.Length /= 0 or else Buffer.Capacity /= 0 or else not Buffer.Ref.Is_Empty then Report.Item (Name, NT.Fail); Report.Info ("Hard reset did not completely clean structure"); end if; end; Report.Item (Name, NT.Success); exception when Error : others => Report.Report_Exception (Name, Error); end Test_Reset; procedure Test_Reverse_Append (Report : in out NT.Reporter'Class) is Name : constant String := "procedure Append_Reverse"; Source_1 : Atom (1 .. 10); Source_2 : Atom (1 .. 1); Source_3 : Atom (51 .. 65); Source_4 : Atom (1 .. 0); Source_5 : Atom (101 .. 114); Expected : Atom (1 .. 40); begin for I in Source_1'Range loop Source_1 (I) := 10 + Octet (I); Expected (Expected'First + Source_1'Last - I) := Source_1 (I); end loop; for I in Source_2'Range loop Source_2 (I) := 42; Expected (Expected'First + Source_1'Length + Source_2'Last - I) := Source_2 (I); end loop; for I in Source_3'Range loop Source_3 (I) := Octet (I); Expected (Expected'First + Source_1'Length + Source_2'Length + I - Source_3'First) := Source_3 (I); end loop; for I in Source_5'Range loop Source_5 (I) := Octet (I); Expected (Expected'First + Source_1'Length + Source_2'Length + Source_3'Length + Source_5'Last - I) := Source_5 (I); end loop; declare Buffer : Atom_Buffer; begin Buffer.Append_Reverse (Source_1); Buffer.Append_Reverse (Source_2); Buffer.Append (Source_3); Buffer.Append_Reverse (Source_4); Buffer.Append_Reverse (Source_5); Test_Tools.Test_Atom (Report, Name, Expected, Buffer.Data); end; exception when Error : others => Report.Report_Exception (Name, Error); end Test_Reverse_Append; procedure Test_Empty_Append (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Empty append on empty buffer"); begin declare Buffer : Atom_Buffer; begin Buffer.Append (Null_Atom); Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data); end; exception when Error : others => Test.Report_Exception (Error); end Test_Empty_Append; procedure Test_Stream_Interface (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Stream interface"); begin declare Buffer : Atom_Buffer; Part_1 : constant Atom := To_Atom ("0123456789"); Part_2 : constant Atom := To_Atom ("ABCDEF"); Data : Atom (1 .. 10); Last : Offset; begin Buffer.Write (Part_1 & Part_2); Buffer.Read (Data, Last); Test_Tools.Test_Atom (Test, Part_1, Data); Test_Tools.Test_Atom (Test, Part_2, Buffer.Data); Buffer.Read (Data, Last); Test_Tools.Test_Atom (Test, Part_2, Data (Data'First .. Last)); Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data); end; exception when Error : others => Test.Report_Exception (Error); end Test_Stream_Interface; end Natools.S_Expressions.Atom_Buffers.Tests;
charlie5/aIDE
Ada
3,002
adb
with asis.Elements, asis.Compilation_Units, AdaM.compilation_Unit, AdaM.library_Item, AdaM.library_Unit.declaration, AdaM.Assist.Query.find_All.element_Processing, AdaM.Assist.Query.find_All.Metrics, Ada.Characters.Handling; with Ada.Text_IO; use Ada.Text_IO; package body AdaM.Assist.Query.find_All.unit_Processing is procedure Process_Unit (The_Unit : Asis.Compilation_Unit) is use Asis, ada.Characters.Handling; Cont_Clause_Elements : constant Asis.Element_List := Asis.Elements.Context_Clause_Elements (Compilation_Unit => The_Unit, Include_Pragmas => True); -- This is the list of the context clauses, including pragmas, if any. -- If you do not want to process pragmas, set Include_Pragmas OFF when -- calling Asis.Elements.Context_Clause_Elements. Unit_Decl : constant Asis.Element := Asis.Elements.Unit_Declaration (The_Unit); -- The top-level structural element of the library item or subunit -- contained in The_Unit. the_Name : constant String := to_String (asis.Compilation_Units.Unit_Full_Name (The_Unit)); Kind : constant asis.Unit_Kinds := asis.Compilation_Units.Unit_Kind (the_Unit); begin -- Metrics.new_Unit := adam.compilation_Unit.new_Unit ("anon"); put_Line (the_Name & " " & asis.Unit_Kinds'Image (Kind)); if Kind = asis.a_Package then Metrics.current_compilation_Unit := AdaM.compilation_Unit.new_compilation_Unit; -- := adam.compilation_Unit.new_library_Unit -- (the_Name, -- library_Item.new_Item (adam.library_Unit.declaration.new_Package.all'Access)); -- -- Metrics.current_package_Declaration -- := AdaM.library_Unit.declaration.view (Metrics.current_compilation_Unit.library_Item.Unit).my_Package; end if; Metrics.compilation_Unit.clear; Metrics.compilation_Unit.Name_is (the_Name); for J in Cont_Clause_Elements'Range loop AdaM.Assist.Query.find_All.element_Processing.Process_Construct (Cont_Clause_Elements (J)); end loop; AdaM.Assist.Query.find_All.element_Processing.Process_Construct (Unit_Decl); -- This procedure does not contain any exception handler because it -- supposes that Element_Processing.Process_Construct should handle -- all the exceptions which can be raised when processing the element -- hierarchy. -- declare -- new_Unit : constant AdaM.compilation_Unit.view -- := AdaM.compilation_Unit.new_Unit (Name => "", -- of_Kind => compilation_Unit.library_unit_Kind); -- begin -- AdaM.compilation_Unit.item (new_Unit.all) := Metrics.compilation_Unit; -- Metrics.Environment.add (new_Unit); -- end; end Process_Unit; end AdaM.Assist.Query.find_All.unit_Processing;
reznikmm/matreshka
Ada
3,482
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- 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 XML.Schema.Objects.Notation_Declarations; package XML.Schema.Notation_Declarations renames XML.Schema.Objects.Notation_Declarations;
charlie5/aShell
Ada
154
adb
with Pipe_Tests, Ahven.Text_Runner; procedure Test_Pipes is Test : Pipe_Tests.Test; begin Ahven.Text_Runner.Run (Test); end Test_Pipes;
BrickBot/Bound-T-H8-300
Ada
31,599
adb
-- Bounds.Calling (body) -- -- A component of the Bound-T Worst-Case Execution Time Tool. -- ------------------------------------------------------------------------------- -- Copyright (c) 1999 .. 2015 Tidorum Ltd -- 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. -- -- 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 owner 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. -- -- Other modules (files) of this software composition should contain their -- own copyright statements, which may have different copyright and usage -- conditions. The above conditions apply to this file. ------------------------------------------------------------------------------- -- -- $Revision: 1.18 $ -- $Date: 2015/10/24 20:05:46 $ -- -- $Log: bounds-calling.adb,v $ -- Revision 1.18 2015/10/24 20:05:46 niklas -- Moved to free licence. -- -- Revision 1.17 2009-10-07 19:26:09 niklas -- BT-CH-0183: Cell-sets are a tagged-type class. -- -- Revision 1.16 2009-01-18 08:10:33 niklas -- Removed unused context clauses and locals. -- -- Revision 1.15 2008/11/09 21:43:03 niklas -- BT-CH-0158: Output.Image (Time_T) replaces Programs.Execution.Image. -- -- Revision 1.14 2008/09/24 08:38:51 niklas -- BT-CH-0146: Assertions on "loop starts <bound> times". -- BT-CH-0146: Loop-repeat assertions set both lower and upper bound. -- BT-CH-0146: Report locations of contradictory "count" assertions. -- BT-CH-0146: Contradictory "count" assertions imply infeasibility. -- -- Revision 1.13 2008/09/20 12:41:50 niklas -- BT-CH-0145: No error re too few assertion matches if graph is growing. -- -- Revision 1.12 2008/02/27 14:58:47 niklas -- BT-CH-0116: Call-specific time and stack assertions. -- -- Revision 1.11 2007/12/17 13:54:34 niklas -- BT-CH-0098: Assertions on stack usage and final stack height, etc. -- -- Revision 1.10 2007/01/13 13:51:01 niklas -- BT-CH-0041. -- -- Revision 1.9 2006/11/26 22:07:24 niklas -- BT-CH-0039. -- -- Revision 1.8 2006/05/28 07:10:58 niklas -- Extended the trace output from Bound_Protocol. -- -- Revision 1.7 2006/05/27 21:46:38 niklas -- Updated for BT-CH-0020. -- -- Revision 1.6 2005/10/20 11:28:27 niklas -- BT-CH-0015. -- -- Revision 1.5 2005/07/01 11:02:25 niklas -- Extended Bound_Protocol to note when the exception Flow.False_Path -- occurs and to propagate it to the caller. Only other exceptions -- give rise to a Fault message. -- Changed Parameter_Bounds to propagate Flow.False_Path instead of -- Calculator.Empty_Flux, and changed Bound_Call accordingly to catch -- this exception as a sign that the call is unreachable. -- -- Revision 1.4 2005/06/29 12:56:01 niklas -- Made the warning re "infeasible" call conditional on the -- option "-warn reach" and changed it to "unreachable". -- -- Revision 1.3 2005/06/28 08:34:49 niklas -- Added output for Bounds.Opt.Trace_Context. -- -- Revision 1.2 2005/02/23 09:05:13 niklas -- BT-CH-0005. -- -- Revision 1.1 2005/02/16 21:11:38 niklas -- BT-CH-0002. -- with Bounds.Opt; with Calling; with Calling.Opt; with Flow.Calls; with Flow.Execution; with Flow.Pruning.Opt; with Output; with Processor; package body Bounds.Calling is use type Programs.Call_Path_T; procedure Bound_Protocol ( Call : in Programs.Call_T; Data : in Storage.Bounds.Bounds_T'Class; Model : in out Flow.Computation.Model_Ref; Bounded : out Boolean) is use type Standard.Calling.Protocol_Ref; Call_Mark : Output.Nest_Mark_T; -- For the output locus of the Call. Protocol : constant Standard.Calling.Protocol_Ref := Flow.Computation.Calling_Protocol (Call, Model); -- The old calling protocol for Call. Opt_Trace : constant Boolean := Standard.Calling.Opt.Trace_Protocols; -- Whether the bounding should be traced. New_Protocol : Standard.Calling.Protocol_Ref; -- The bounded new protocol, or null if not better than the old. begin Call_Mark := Output.Nest (Programs.Locus (Call)); if Standard.Calling.Static (Protocol.all) then -- The protocol is static so we need do nothing. Bounded := False; if Standard.Calling.Opt.Trace_Protocols then Output.Trace ( "Protocol is static" & Output.Field_Separator & Standard.Calling.Image (Protocol.all)); end if; else -- The protocol is dynamic and needs bounding. if Opt_Trace then Output.Trace ( "Applying " & Storage.Bounds.Image (Data) & " upon " & Standard.Calling.Image (Protocol.all)); end if; Standard.Calling.Apply ( Bounds => Data, Upon => Protocol.all, Giving => New_Protocol); Bounded := New_Protocol /= null; if Bounded then -- The protocol was constrained, and so the effect of -- the Call may need update. The set of input cells and -- the basis cells for the protocol may also have changed. if Opt_Trace then Output.Trace ( "Bounded calling protocol" & Output.Field_Separator & Standard.Calling.Image (New_Protocol.all)); end if; Flow.Computation.Set_Calling_Protocol ( Call => Call, To => New_Protocol, Under => Model); elsif Opt_Trace then Output.Trace ("Protocol was not bounded."); end if; end if; Output.Unnest (Call_Mark); exception when Flow.False_Path => -- The Call is probably infeasible. Output.Note ("Bounding protocol raised False_Path."); Output.Unnest (Call_Mark); raise; when others => Output.Fault ( Location => "Bounds.Calling.Bound_Protocol", Text => "Exception propagated."); Output.Unnest (Call_Mark); raise; end Bound_Protocol; procedure Apply_Final_Stack_Height_Assertions ( Call : in Programs.Call_T; Assert_Map : in Assertions.Assertion_Map_T; Callee_Bounds : in Programs.Execution.Bounds_Ref) -- -- Applies any assertions on final stack-height on this Call, -- within the Assert_Map, to the Callee_Bounds. -- is use Programs.Execution; Program : constant Programs.Program_T := Programs.Program (Call); -- The program under analysis. Final : constant Assertions.Stack_Bounds_T := Assertions.Call_Final_Stack_Height (Call, Assert_Map); -- Assertions on the final stack-height for this call. Stack : Programs.Stack_T; -- One of the stacks in the Program. Limit : Programs.Execution.Stack_Limit_T; -- The Final bound for the Stack, as a stack-limit. begin for F in Final'Range loop case Programs.Stack_Kind (F, Program) is when Programs.Stable => -- Ignore any assertions. The final height is zero. null; when Programs.Unstable => -- Check for assertion: if Storage.Bounds.Known (Final(F)) then -- An upper and/or lower bound is asserted. Limit := To_Stack_Limit (Final(F)); Stack := Programs.Stack_By (F, Program); Output.Note ( "Asserted final stack height for call" & Output.Field_Separator & Programs.Name (Stack) & Output.Field_Separator & Programs.Execution.Image (Limit)); Bound_Final_Stack_Height ( Stack => Stack, To => Limit, Within => Callee_Bounds); end if; end case; end loop; end Apply_Final_Stack_Height_Assertions; procedure Apply_Stack_Usage_Assertions ( Call : in Programs.Call_T; Assert_Map : in Assertions.Assertion_Map_T; Callee_Bounds : in Programs.Execution.Bounds_Ref) -- -- Applies any assertions on stack usage on this Call, within -- the Assert_Map, to the Callee_Bounds, assuming that we are -- analysing for space bounds. -- is use Programs.Execution; Program : constant Programs.Program_T := Programs.Program (Call); -- The program under analysis. Usage : constant Assertions.Stack_Bounds_T := Assertions.Call_Stack_Usage (Call, Assert_Map); -- Assertions on the total stack usage of the Call. Stack : Programs.Stack_T; -- One of the stacks in the Program. Bound : Storage.Bounds.Interval_T; -- The asserted bounds on the Stack. begin for U in Usage'Range loop if Storage.Bounds.Known (Usage(U).Max) then -- An upper bound is asserted on stack usage. Bound := Usage(U); Stack := Programs.Stack_By (U, Program); Output.Note ( "Asserted stack usage for call" & Output.Field_Separator & Programs.Name (Stack) & Output.Field_Separator & Storage.Bounds.Image (Bound)); Bound_Stack_Usage ( Stack => Stack, To => ( State => Asserted, Height => Storage.Bounds.Value (Bound.Max), Call => Programs.No_Call), Within => Callee_Bounds); end if; end loop; end Apply_Stack_Usage_Assertions; procedure Bound_Asserted_Calls ( Calls : in Programs.Call_List_T; Assert_Map : in Assertions.Assertion_Map_T; Caller_Bounds : in Programs.Execution.Bounds_Ref; Bounds_Set : in Programs.Execution.Bounds_Set_T) is use type Processor.Time_T; Model : constant Flow.Computation.Model_Handle_T := Programs.Execution.Computation (Caller_Bounds); -- The computation model of the caller. We may mark some -- call-steps as infeasible and then prune the model. procedure Bound_Call_Time_Space (Call : in Programs.Call_T) -- -- Applies time and space assertions to the given Call. -- is Time_Bound : constant Assertions.Time_Bound_T := Assertions.Call_Time ( Call => Call, Asserts => Assert_Map); -- The time bounds asserted for this Call, if any. Time_Asserted : constant Boolean := Programs.Execution.For_Time (Caller_Bounds) and then Time_Bound.Max < Processor.Time_T'Last; -- Whether an upper time bound is asserted for this Call. Stack_Final_Asserted : constant Boolean := Assertions.Call_Final_Stack_Height_Asserted ( Call => Call, Asserts => Assert_Map); -- Whether there are some effective assertions on the -- final stack height for this Call. Stack_Usage_Asserted : constant Boolean := Programs.Execution.For_Space (Caller_Bounds) and then Assertions.Call_Stack_Usage_Asserted ( Call => Call, Asserts => Assert_Map); -- Whether there are some effective assertions on the -- stack usage for this Call, assuming that stack usage -- analysis is requested. Callee_Bounds : Programs.Execution.Bounds_Ref; -- Execution bounds for the callee. Flow_Frozen : Boolean; -- Whether the Callee_Bounds, when fully bounded by -- assertions (and previous analysis), have only static -- flow of control. begin if Time_Asserted or Stack_Final_Asserted or Stack_Usage_Asserted then -- Time or space or both are asserted for this call. -- Ensure that the bounds on this Call are specific -- to this context: Programs.Execution.Adopt_To_Context ( Call => Call, Caller => Caller_Bounds, Within => Bounds_Set, Giving => Callee_Bounds); if Time_Asserted then Output.Note ( "Asserted execution time for call" & Output.Field_Separator & Output.Image (Time_Bound.Max)); Programs.Execution.Bound_Time ( Time => Time_Bound.Max, State => Programs.Execution.Asserted, Within => Callee_Bounds); end if; if Stack_Final_Asserted then Apply_Final_Stack_Height_Assertions ( Call => Call, Assert_Map => Assert_Map, Callee_Bounds => Callee_Bounds); end if; if Stack_Usage_Asserted then Apply_Stack_Usage_Assertions ( Call => Call, Assert_Map => Assert_Map, Callee_Bounds => Callee_Bounds); end if; if Fully_Bounded (Callee_Bounds) then -- These bounds are done and can be finished. Finish_Bounds ( Exec_Bounds => Callee_Bounds, Assert_Map => Programs.Execution.Assertion_Map (Callee_Bounds), Bounds_Set => Bounds_Set, Flow_Frozen => Flow_Frozen); if not Flow_Frozen then Output.Fault ( Location => "Bounds.Calling.Bound_Asserted_Calls", Text => "Callee has unbounded dynamic flow."); end if; end if; end if; end Bound_Call_Time_Space; procedure Bound_Call_Count (Call : in Programs.Call_T) -- -- Applies execution-count assertions to the given Call. -- This has no effect on the execution-bounds for the callee -- at the Call, only on the Caller_Bounds. -- is Exec_Bound : constant Flow.Execution.Bound_T := Assertions.Call_Count ( Call => Call, Asserts => Assert_Map); -- The execution-count bound asserted for this Call, if any. begin -- Possible assertion on execution count: if Flow.Execution.Bounded (Exec_Bound) then Programs.Execution.Bound_Call_Count ( Call => Call, Count => Exec_Bound, Within => Caller_Bounds); -- Perhaps the call even becomes infeasible? if Exec_Bound.Max = 0 then -- A call that can only be executed zero times is infeasible. Programs.Execution.Mark_Infeasible ( Step => Programs.Step (Call), Within => Caller_Bounds); end if; end if; end Bound_Call_Count; procedure Bound_Call (Call : in Programs.Call_T) -- -- Apply all assertions for this Call. -- is Call_Mark : Output.Nest_Mark_T; -- The locus of this Call within the Caller_Bounds. begin Call_Mark := Output.Nest (Programs.Execution.Locus ( Call => Call, Within => Caller_Bounds)); -- Possible assertions on time or space: Bound_Call_Time_Space (Call); -- Possible assertions on execution count: Bound_Call_Count (Call); -- Possible assertions on call-invariant cells: Flow.Calls.Spare_Call_Invariants ( Call => Call, Invariant => Assertions.Call_Invariants (Call, Assert_Map), Within => Model.all); Output.Unnest (Call_Mark); end Bound_Call; begin -- Bound_Asserted_Calls for C in Calls'Range loop Bound_Call (Calls(C)); end loop; end Bound_Asserted_Calls; -- -- Context-specific bounding of calls -- function Input_Parameters ( Call : Programs.Call_T; Within : Programs.Execution.Bounds_Ref) return Flow.Calls.Parameter_Map_T -- -- The input parameters for the Call, Within the caller's -- execution bounds, defined by the input cells for the -- execution bounds on the Call, mapped through the protocol -- for the Call. -- is begin return Flow.Calls.Input_Parameters ( Inputs => Programs.Execution.Input_Cells (Call, Within), Protocol => Programs.Execution.Calling_Protocol (Call, Within).all); end Input_Parameters; procedure Bound_Call_With_Parameters ( Call : in Programs.Call_T; Caller_Bounds : in Programs.Execution.Bounds_Ref; Param_Bounds : in Storage.Bounds.Cell_Interval_List_T; Inherit_Inv : in Storage.Cell_Set_T; Asserts : in Assertions.Assertion_Set_T; Assert_Map : in Assertions.Assertion_Map_T; Bounds_Set : in Programs.Execution.Bounds_Set_T) -- -- Analyse the Call, in the context of the given Caller_Bounds, -- Param_Bounds, and Inherited Invariants, for time and/or space bounds. -- The assertion set, the assertion map for this Call, and the set of -- execution bounds are further parameters. -- is use type Programs.Subprogram_T; Caller : constant Programs.Subprogram_T := Programs.Execution.Subprogram (Caller_Bounds); -- The caller subprogram, according to Caller_Bounds. Call_Inv : constant Storage.Cell_Set_T := Assertions.Call_Invariants ( Call => Call, Asserts => Assert_Map); -- Cells asserted as invariant for the call. Call_Bounds : Programs.Execution.Bounds_Ref; -- The execution bounds for the Call in the Caller_Bounds context. Flow_Frozen : Boolean; -- Whether the dynamic control flow in the callee is now frozen. -- It damn well should be true, since the analysis of the callee -- on the universal (call-independent) level should make it so. begin -- Bound_Call_With_Parameters -- Check consistency: if Programs.Caller (Call) /= Caller then Output.Fault ( Location => "Bounds.Calling.Bound_Call_With_Parameters", Text => "Caller_Bounds for " & Programs.Name (Caller) & ", call " & Programs.Image (Call)); end if; -- Optionally trace the context: if Opt.Trace_Context then Output.Trace ( "Call values" & Output.Field_Separator & Storage.Bounds.Image (Param_Bounds)); Output.Trace ( "Call invariants" & Output.Field_Separator & Storage.Image (Call_Inv)); end if; -- Call-specific analysis is done if some input parameter -- is bounded, or there are call-specific assertions: if Param_Bounds'Length > 0 or not Storage.Is_Empty (Call_Inv) then Output.Note (Text => "Start bounding call."); -- Ensure that the bounds on this call are specific -- to this context: Programs.Execution.Adopt_To_Context ( Call => Call, Caller => Caller_Bounds, Within => Bounds_Set, Giving => Call_Bounds); Bound_Execution ( Exec_Bounds => Call_Bounds, Params => Param_Bounds, Inherit_Inv => Storage.Mixed.Union (Call_Inv, Inherit_Inv), Asserts => Asserts, Bounds_Set => Bounds_Set, Flow_Frozen => Flow_Frozen); if not Flow_Frozen then Output.Fault ( Location => "Bounds.Calling.Bound_Call_With_Parameters", Text => "Callee has unresolved dynamic flow"); end if; -- The returned execution bounds may be incomplete -- in that some loops/calls are not bounded. -- This will lead to a new attempt at bounding the -- call, in a "deeper" context (one more call level -- up in the call-graph). -- Nevertheless, the bounds that resulted from this -- attempt (call-specific but incomplete bounds) were -- stored, for possible inspection by the user. The -- bounds were stored in Bound_Execution. if Bounds.Fully_Bounded (Call_Bounds) then Output.Note (Text => "Fully bounded"); else Output.Note (Text => "Not yet fully bounded"); end if; else -- Leave Call as "unbounded" (refer to the old bounds), -- This will lead to a new attempt at bounding. Output.Note (Text => "No new context"); end if; end Bound_Call_With_Parameters; procedure Mark_Infeasible ( Call : in Programs.Call_T; Within : in Programs.Execution.Bounds_Ref) -- -- Marks the Call as infeasible (unreachable) Within the given -- bounds on the execution of the caller. -- is begin if Flow.Pruning.Opt.Warn_Unreachable then Output.Warning ("Unreachable call."); end if; Programs.Execution.Mark_Infeasible ( Step => Programs.Step (Call), Within => Within); end Mark_Infeasible; -- -- Context-specific bounding of calls by Calculator pools -- function Parameter_Bounds ( Call : Programs.Call_T; Params : Flow.Calls.Parameter_Map_T; Data : Calculator.Pool_T) return Storage.Bounds.Cell_Interval_List_T -- -- Bounds on Parameter cells (input cells) for a given Call. -- -- Call -- The call for which input values will be bounded. -- Params -- The parameter mapping for the input parameters of the Call, -- pairing value-providing cells from the caller's frame with -- value-receiving cell's from the callee's frame. -- Data -- Bounds on the caller's cells at the call-step. -- -- The cells in the result are in the callee frame. -- -- If the Data flux turns out to be empty, this function propagates -- the exception Flow.False_Path. -- is Param_Bounds : Storage.Bounds.Cell_Interval_List_T (1 .. Params'Length); Num_Bounds : Natural := 0; -- -- Real bounds on each input parameter from the call-context -- are collected in Param_Bounds(1 .. Num_Bounds). Caller_Cell : Storage.Cell_T; Callee_Cell : Storage.Cell_T; -- One mapped pair of caller/callee cells. Bound : Storage.Bounds.Interval_T; -- Bounds on a parameter (input) cell. begin -- Perhaps show the parameter associations: if Standard.Calling.Opt.Trace_Parameters then for F in Params'Range loop Output.Trace (Text => "Parameter association " & Storage.Name_Of (Params(F).Caller) & " -> " & Storage.Name_Of (Params(F).Callee)); end loop; end if; -- Determine the bounds on actual parameter values, -- implied by the assertions and the caller's computation: for P in Params'Range loop Caller_Cell := Params(P).Caller; Callee_Cell := Params(P).Callee; Calculator.Comment ( Text => "Parameter bounds for " & Storage.Name_Of (Caller_Cell) & " -> " & Storage.Name_Of (Callee_Cell), Calc => Calculator.Owner_Of (Data)); Bound := Calculator.Bounds_From_Pool ( Pool => Data, Cell => Caller_Cell); if Storage.Bounds.Known (Bound) then -- A real bound, collect it: Num_Bounds := Num_Bounds + 1; Param_Bounds(Num_Bounds) := ( Cell => Callee_Cell, Interval => Bound); end if; if Standard.Calling.Opt.Trace_Parameters then Output.Result ( Key => "Param_Bounds", Locus => Output.Current_Locus, Text => Storage.Name_Of (Caller_Cell) & Output.Field_Separator & Storage.Bounds.Image ( Item => Bound, Name => Storage.Name_Of (Callee_Cell))); end if; end loop; return Param_Bounds(1 .. Num_Bounds); exception when Calculator.Null_Set_Error => -- The call is probably infeasible. Output.Note ("Parameter flux is empty."); raise Flow.False_Path; end Parameter_Bounds; procedure Bound_Call ( Call : in Programs.Call_T; Caller_Bounds : in Programs.Execution.Bounds_Ref; Data : in Calculator.Pool_T; Inherit_Inv : in Storage.Cell_Set_T; Asserts : in Assertions.Assertion_Set_T; Assert_Map : in Assertions.Assertion_Map_T; Bounds_Set : in Programs.Execution.Bounds_Set_T) is begin Bound_Call_With_Parameters ( Call => Call, Caller_Bounds => Caller_Bounds, Param_Bounds => Parameter_Bounds ( Call => Call, Params => Input_Parameters (Call, Caller_Bounds), Data => Calculator.Bounded_Pool ( Pool => Data, Bounds => Assertions.Call_Values (Call, Assert_Map))), Inherit_Inv => Inherit_Inv, Asserts => Asserts, Assert_Map => Assert_Map, Bounds_Set => Bounds_Set); exception when Flow.False_Path => -- This call seems infeasible because the input flux is empty. -- This may be due to an infeasible branch or a conflict between -- derived input bounds and asserted input bounds for this call. Mark_Infeasible (Call, Caller_Bounds); end Bound_Call; -- -- Context-specific bounding of calls by intervals -- function Parameter_Bounds ( Call : Programs.Call_T; Params : Flow.Calls.Parameter_Map_T; Data : Storage.Bounds.Cell_Interval_List_T) return Storage.Bounds.Cell_Interval_List_T -- -- Bounds on Parameter cells (input cells) for a given Call. -- -- Call -- The call for which input values will be bounded. -- Params -- The parameter mapping for the input parameters of the Call, -- pairing value-providing cells from the caller's frame with -- value-receiving cell's from the callee's frame. -- Data -- Bounds on the caller's cells at the call-step. -- -- The cells in the result are in the callee frame. -- -- If the Data flux turns out to be empty, this function propagates -- the exception Flow.False_Path. -- is Param_Bounds : Storage.Bounds.Cell_Interval_List_T (1 .. Params'Length); Num_Bounds : Natural := 0; -- -- Real bounds on each input parameter from the call-context -- are collected in Param_Bounds(1 .. Num_Bounds). Caller_Cell : Storage.Cell_T; Callee_Cell : Storage.Cell_T; -- One mapped pair of caller/callee cells. Bound : Storage.Bounds.Interval_T; -- Bounds on a parameter (input) cell. Some_Void : Boolean := False; -- Whether some Bound is void (null set). begin -- Perhaps show the parameter associations: if Standard.Calling.Opt.Trace_Parameters then for F in Params'Range loop Output.Trace (Text => "Parameter association " & Storage.Name_Of (Params(F).Caller) & " -> " & Storage.Name_Of (Params(F).Callee)); end loop; end if; -- Determine the bounds on actual parameter values, -- implied by the assertions and the caller's computation: for P in Params'Range loop Caller_Cell := Params(P).Caller; Callee_Cell := Params(P).Callee; Bound := Storage.Bounds.Interval ( Cell => Caller_Cell, From => Data); if Storage.Bounds.Known (Bound) then -- A real bound, collect it: Num_Bounds := Num_Bounds + 1; Param_Bounds(Num_Bounds) := ( Cell => Callee_Cell, Interval => Bound); Some_Void := Some_Void or Storage.Bounds.Void (Bound); end if; if Standard.Calling.Opt.Trace_Parameters then Output.Result ( Key => "Param_Bounds", Locus => Output.Current_Locus, Text => Storage.Name_Of (Caller_Cell) & Output.Field_Separator & Storage.Bounds.Image ( Item => Bound, Name => Storage.Name_Of (Callee_Cell))); end if; end loop; -- Check for void bounds as signs of an infeasible call: if Some_Void then -- The call is probably infeasible. Output.Note ("Parameter flux is empty."); raise Flow.False_Path; end if; return Param_Bounds(1 .. Num_Bounds); end Parameter_Bounds; procedure Bound_Call ( Call : in Programs.Call_T; Caller_Bounds : in Programs.Execution.Bounds_Ref; Data : in Storage.Bounds.Cell_Interval_List_T; Inherit_Inv : in Storage.Cell_Set_T; Asserts : in Assertions.Assertion_Set_T; Assert_Map : in Assertions.Assertion_Map_T; Bounds_Set : in Programs.Execution.Bounds_Set_T) is begin Bound_Call_With_Parameters ( Call => Call, Caller_Bounds => Caller_Bounds, Param_Bounds => Parameter_Bounds ( Call => Call, Params => Input_Parameters (Call, Caller_Bounds), Data => Data), Inherit_Inv => Inherit_Inv, Asserts => Asserts, Assert_Map => Assert_Map, Bounds_Set => Bounds_Set); exception when Flow.False_Path => -- This call seems infeasible because the input flux is empty. -- This may be due to an infeasible branch or a conflict between -- derived input bounds and asserted input bounds for this call. Mark_Infeasible (Call, Caller_Bounds); end Bound_Call; end Bounds.Calling;
reznikmm/matreshka
Ada
6,940
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.Dde_Connection_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Text_Dde_Connection_Element_Node is begin return Self : Text_Dde_Connection_Element_Node do Matreshka.ODF_Text.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Text_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Text_Dde_Connection_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Text_Dde_Connection (ODF.DOM.Text_Dde_Connection_Elements.ODF_Text_Dde_Connection_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Text_Dde_Connection_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Dde_Connection_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Text_Dde_Connection_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Text_Dde_Connection (ODF.DOM.Text_Dde_Connection_Elements.ODF_Text_Dde_Connection_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Text_Dde_Connection_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Text_Dde_Connection (Visitor, ODF.DOM.Text_Dde_Connection_Elements.ODF_Text_Dde_Connection_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Text_URI, Matreshka.ODF_String_Constants.Dde_Connection_Element, Text_Dde_Connection_Element_Node'Tag); end Matreshka.ODF_Text.Dde_Connection_Elements;
reznikmm/matreshka
Ada
3,765
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.Constants; package body Matreshka.ODF_Attributes.Style.Line_Style is -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Line_Style_Node) return League.Strings.Universal_String is begin return ODF.Constants.Line_Style_Name; end Get_Local_Name; end Matreshka.ODF_Attributes.Style.Line_Style;
reznikmm/matreshka
Ada
4,019
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.DOM.Style_Page_Number_Attributes; package Matreshka.ODF_Style.Page_Number_Attributes is type Style_Page_Number_Attribute_Node is new Matreshka.ODF_Style.Abstract_Style_Attribute_Node and ODF.DOM.Style_Page_Number_Attributes.ODF_Style_Page_Number_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Page_Number_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Style_Page_Number_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Style.Page_Number_Attributes;
reznikmm/gela
Ada
92,632
adb
with Gela.Compilations; with Gela.Lexical_Types; with Gela.Element_Visiters; with Gela.Elements.Abort_Statements; with Gela.Elements.Accept_Statements; with Gela.Elements.Access_To_Function_Definitions; with Gela.Elements.Access_To_Object_Definitions; with Gela.Elements.Access_To_Procedure_Definitions; with Gela.Elements.Allocators; with Gela.Elements.Anonymous_Access_To_Function_Definitions; with Gela.Elements.Anonymous_Access_To_Object_Definitions; with Gela.Elements.Anonymous_Access_To_Procedure_Definitions; with Gela.Elements.Aspect_Specifications; with Gela.Elements.Assignment_Statements; with Gela.Elements.Association_Lists; with Gela.Elements.Associations; with Gela.Elements.Asynchronous_Selects; with Gela.Elements.At_Clauses; with Gela.Elements.Attribute_Definition_Clauses; with Gela.Elements.Attribute_References; with Gela.Elements.Block_Statements; with Gela.Elements.Boxes; with Gela.Elements.Case_Expression_Paths; with Gela.Elements.Case_Expressions; with Gela.Elements.Case_Paths; with Gela.Elements.Case_Statements; with Gela.Elements.Character_Literals; with Gela.Elements.Choice_Parameter_Specifications; with Gela.Elements.Compilation_Unit_Bodies; with Gela.Elements.Compilation_Unit_Declarations; with Gela.Elements.Compilations; with Gela.Elements.Component_Clauses; with Gela.Elements.Component_Declarations; with Gela.Elements.Component_Definitions; with Gela.Elements.Composite_Constraints; with Gela.Elements.Composite_Subtype_Indications; with Gela.Elements.Constrained_Array_Definitions; with Gela.Elements.Decimal_Fixed_Point_Definitions; with Gela.Elements.Defining_Character_Literals; with Gela.Elements.Defining_Enumeration_Literals; with Gela.Elements.Defining_Expanded_Unit_Names; with Gela.Elements.Defining_Identifiers; with Gela.Elements.Defining_Names; with Gela.Elements.Defining_Operator_Symbols; with Gela.Elements.Delay_Statements; with Gela.Elements.Delta_Constraints; with Gela.Elements.Derived_Record_Definitions; with Gela.Elements.Derived_Type_Definitions; with Gela.Elements.Digits_Constraints; with Gela.Elements.Discrete_Range_Attribute_References; with Gela.Elements.Discrete_Simple_Expression_Ranges; with Gela.Elements.Discrete_Subtype_Indication_Drs; with Gela.Elements.Discrete_Subtype_Indications; with Gela.Elements.Discriminant_Specifications; with Gela.Elements.Element_Iterator_Specifications; with Gela.Elements.Else_Expression_Paths; with Gela.Elements.Else_Paths; with Gela.Elements.Elsif_Expression_Paths; with Gela.Elements.Elsif_Paths; with Gela.Elements.Entry_Bodies; with Gela.Elements.Entry_Declarations; with Gela.Elements.Entry_Index_Specifications; with Gela.Elements.Enumeration_Literal_Specifications; with Gela.Elements.Enumeration_Type_Definitions; with Gela.Elements.Exception_Declarations; with Gela.Elements.Exception_Handlers; with Gela.Elements.Exception_Renaming_Declarations; with Gela.Elements.Exit_Statements; with Gela.Elements.Explicit_Dereferences; with Gela.Elements.Extended_Return_Statements; with Gela.Elements.Extension_Aggregates; with Gela.Elements.Floating_Point_Definitions; with Gela.Elements.For_Loop_Statements; with Gela.Elements.Formal_Access_To_Function_Definitions; with Gela.Elements.Formal_Access_To_Object_Definitions; with Gela.Elements.Formal_Access_To_Procedure_Definitions; with Gela.Elements.Formal_Constrained_Array_Definitions; with Gela.Elements.Formal_Decimal_Fixed_Point_Definitions; with Gela.Elements.Formal_Derived_Type_Definitions; with Gela.Elements.Formal_Discrete_Type_Definitions; with Gela.Elements.Formal_Floating_Point_Definitions; with Gela.Elements.Formal_Function_Declarations; with Gela.Elements.Formal_Incomplete_Type_Declarations; with Gela.Elements.Formal_Interface_Type_Definitions; with Gela.Elements.Formal_Modular_Type_Definitions; with Gela.Elements.Formal_Object_Declarations; with Gela.Elements.Formal_Ordinary_Fixed_Point_Definitions; with Gela.Elements.Formal_Package_Declarations; with Gela.Elements.Formal_Private_Type_Definitions; with Gela.Elements.Formal_Procedure_Declarations; with Gela.Elements.Formal_Signed_Integer_Type_Definitions; with Gela.Elements.Formal_Type_Declarations; with Gela.Elements.Formal_Unconstrained_Array_Definitions; with Gela.Elements.Full_Type_Declarations; with Gela.Elements.Function_Bodies; with Gela.Elements.Function_Calls; with Gela.Elements.Function_Declarations; with Gela.Elements.Function_Instantiations; with Gela.Elements.Generalized_Iterator_Specifications; with Gela.Elements.Generic_Associations; with Gela.Elements.Generic_Function_Declarations; with Gela.Elements.Generic_Function_Renamings; with Gela.Elements.Generic_Package_Declarations; with Gela.Elements.Generic_Package_Renamings; with Gela.Elements.Generic_Procedure_Declarations; with Gela.Elements.Generic_Procedure_Renamings; with Gela.Elements.Goto_Statements; with Gela.Elements.Identifiers; with Gela.Elements.If_Expression_Paths; with Gela.Elements.If_Expressions; with Gela.Elements.If_Paths; with Gela.Elements.If_Statements; with Gela.Elements.Incomplete_Type_Declarations; with Gela.Elements.Incomplete_Type_Definitions; with Gela.Elements.Interface_Type_Definitions; with Gela.Elements.Known_Discriminant_Parts; with Gela.Elements.Label_Decorators; with Gela.Elements.Loop_Parameter_Specifications; with Gela.Elements.Loop_Statements; with Gela.Elements.Membership_Tests; with Gela.Elements.Modular_Type_Definitions; with Gela.Elements.Names; with Gela.Elements.Null_Components; with Gela.Elements.Null_Literals; with Gela.Elements.Null_Record_Definitions; with Gela.Elements.Null_Statements; with Gela.Elements.Number_Declarations; with Gela.Elements.Numeric_Literals; with Gela.Elements.Object_Declarations; with Gela.Elements.Object_Renaming_Declarations; with Gela.Elements.Operator_Symbols; with Gela.Elements.Ordinary_Fixed_Point_Definitions; with Gela.Elements.Others_Choices; with Gela.Elements.Package_Bodies; with Gela.Elements.Package_Body_Stubs; with Gela.Elements.Package_Declarations; with Gela.Elements.Package_Instantiations; with Gela.Elements.Package_Renaming_Declarations; with Gela.Elements.Parameter_Associations; with Gela.Elements.Parameter_Specifications; with Gela.Elements.Parenthesized_Expressions; with Gela.Elements.Pragma_Argument_Associations; with Gela.Elements.Pragma_Nodes; with Gela.Elements.Private_Extension_Declarations; with Gela.Elements.Private_Extension_Definitions; with Gela.Elements.Private_Type_Declarations; with Gela.Elements.Private_Type_Definitions; with Gela.Elements.Procedure_Bodies; with Gela.Elements.Procedure_Call_Statements; with Gela.Elements.Procedure_Declarations; with Gela.Elements.Procedure_Instantiations; with Gela.Elements.Protected_Bodies; with Gela.Elements.Protected_Body_Stubs; with Gela.Elements.Protected_Definitions; with Gela.Elements.Protected_Type_Declarations; with Gela.Elements.Qualified_Expressions; with Gela.Elements.Quantified_Expressions; with Gela.Elements.Raise_Statements; with Gela.Elements.Range_Attribute_Reference_Drs; with Gela.Elements.Range_Attribute_References; with Gela.Elements.Record_Aggregates; with Gela.Elements.Record_Definitions; with Gela.Elements.Record_Representation_Clauses; with Gela.Elements.Record_Type_Definitions; with Gela.Elements.Requeue_Statements; with Gela.Elements.Return_Object_Specifications; with Gela.Elements.Scalar_Subtype_Indications; with Gela.Elements.Select_Or_Paths; with Gela.Elements.Selected_Components; with Gela.Elements.Selected_Identifiers; with Gela.Elements.Selective_Accepts; with Gela.Elements.Short_Circuits; with Gela.Elements.Signed_Integer_Type_Definitions; with Gela.Elements.Simple_Expression_Range_Drs; with Gela.Elements.Simple_Expression_Ranges; with Gela.Elements.Simple_Return_Statements; with Gela.Elements.Single_Protected_Declarations; with Gela.Elements.Single_Task_Declarations; with Gela.Elements.String_Literals; with Gela.Elements.Subtype_Declarations; with Gela.Elements.Subunits; with Gela.Elements.Task_Bodies; with Gela.Elements.Task_Body_Stubs; with Gela.Elements.Task_Definitions; with Gela.Elements.Task_Type_Declarations; with Gela.Elements.Terminate_Alternative_Statements; with Gela.Elements.Then_Abort_Paths; with Gela.Elements.Unconstrained_Array_Definitions; with Gela.Elements.Unknown_Discriminant_Parts; with Gela.Elements.Use_Package_Clauses; with Gela.Elements.Use_Type_Clauses; with Gela.Elements.Variant_Parts; with Gela.Elements.Variants; with Gela.Elements.While_Loop_Statements; with Gela.Elements.With_Clauses; with Gela.Interpretations; with Gela.Semantic_Types; with Gela.Type_Managers; with Gela.Types; package body Asis.Extensions.Flat_Kinds is type Visiter is new Gela.Element_Visiters.Visiter with record Result : Element_Flat_Kind; end record; overriding procedure Compilation (Self : in out Visiter; Node : not null Gela.Elements.Compilations.Compilation_Access) is null; overriding procedure Abort_Statement (Self : in out Visiter; Node : not null Gela.Elements.Abort_Statements.Abort_Statement_Access) is null; overriding procedure Accept_Statement (Self : in out Visiter; Node : not null Gela.Elements.Accept_Statements.Accept_Statement_Access); overriding procedure Access_To_Function_Definition (Self : in out Visiter; Node : not null Gela.Elements.Access_To_Function_Definitions. Access_To_Function_Definition_Access) is null; overriding procedure Access_To_Object_Definition (Self : in out Visiter; Node : not null Gela.Elements.Access_To_Object_Definitions. Access_To_Object_Definition_Access); overriding procedure Access_To_Procedure_Definition (Self : in out Visiter; Node : not null Gela.Elements.Access_To_Procedure_Definitions. Access_To_Procedure_Definition_Access) is null; overriding procedure Allocator (Self : in out Visiter; Node : not null Gela.Elements.Allocators.Allocator_Access); overriding procedure Anonymous_Access_To_Function_Definition (Self : in out Visiter; Node : not null Gela.Elements.Anonymous_Access_To_Function_Definitions. Anonymous_Access_To_Function_Definition_Access) is null; overriding procedure Anonymous_Access_To_Object_Definition (Self : in out Visiter; Node : not null Gela.Elements.Anonymous_Access_To_Object_Definitions. Anonymous_Access_To_Object_Definition_Access); overriding procedure Anonymous_Access_To_Procedure_Definition (Self : in out Visiter; Node : not null Gela.Elements.Anonymous_Access_To_Procedure_Definitions. Anonymous_Access_To_Procedure_Definition_Access) is null; overriding procedure Aspect_Specification (Self : in out Visiter; Node : not null Gela.Elements.Aspect_Specifications. Aspect_Specification_Access) is null; overriding procedure Assignment_Statement (Self : in out Visiter; Node : not null Gela.Elements.Assignment_Statements. Assignment_Statement_Access); overriding procedure Association (Self : in out Visiter; Node : not null Gela.Elements.Associations.Association_Access); overriding procedure Asynchronous_Select (Self : in out Visiter; Node : not null Gela.Elements.Asynchronous_Selects. Asynchronous_Select_Access) is null; overriding procedure At_Clause (Self : in out Visiter; Node : not null Gela.Elements.At_Clauses.At_Clause_Access) is null; overriding procedure Attribute_Definition_Clause (Self : in out Visiter; Node : not null Gela.Elements.Attribute_Definition_Clauses. Attribute_Definition_Clause_Access) is null; overriding procedure Attribute_Reference (Self : in out Visiter; Node : not null Gela.Elements.Attribute_References. Attribute_Reference_Access); overriding procedure Function_Call (Self : in out Visiter; Node : not null Gela.Elements.Function_Calls.Function_Call_Access); overriding procedure Block_Statement (Self : in out Visiter; Node : not null Gela.Elements.Block_Statements.Block_Statement_Access); overriding procedure Box (Self : in out Visiter; Node : not null Gela.Elements.Boxes.Box_Access) is null; overriding procedure Case_Expression (Self : in out Visiter; Node : not null Gela.Elements.Case_Expressions.Case_Expression_Access) is null; overriding procedure Case_Expression_Path (Self : in out Visiter; Node : not null Gela.Elements.Case_Expression_Paths. Case_Expression_Path_Access) is null; overriding procedure Case_Path (Self : in out Visiter; Node : not null Gela.Elements.Case_Paths.Case_Path_Access); overriding procedure Case_Statement (Self : in out Visiter; Node : not null Gela.Elements.Case_Statements.Case_Statement_Access); overriding procedure Character_Literal (Self : in out Visiter; Node : not null Gela.Elements.Character_Literals. Character_Literal_Access); overriding procedure Choice_Parameter_Specification (Self : in out Visiter; Node : not null Gela.Elements.Choice_Parameter_Specifications. Choice_Parameter_Specification_Access) is null; overriding procedure Compilation_Unit_Body (Self : in out Visiter; Node : not null Gela.Elements.Compilation_Unit_Bodies. Compilation_Unit_Body_Access) is null; overriding procedure Compilation_Unit_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Compilation_Unit_Declarations. Compilation_Unit_Declaration_Access) is null; overriding procedure Component_Clause (Self : in out Visiter; Node : not null Gela.Elements.Component_Clauses.Component_Clause_Access); overriding procedure Component_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Component_Declarations. Component_Declaration_Access); overriding procedure Component_Definition (Self : in out Visiter; Node : not null Gela.Elements.Component_Definitions. Component_Definition_Access); overriding procedure Composite_Constraint (Self : in out Visiter; Node : not null Gela.Elements.Composite_Constraints. Composite_Constraint_Access); overriding procedure Composite_Subtype_Indication (Self : in out Visiter; Node : not null Gela.Elements.Composite_Subtype_Indications. Composite_Subtype_Indication_Access); overriding procedure Constrained_Array_Definition (Self : in out Visiter; Node : not null Gela.Elements.Constrained_Array_Definitions. Constrained_Array_Definition_Access); overriding procedure Decimal_Fixed_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Decimal_Fixed_Point_Definitions. Decimal_Fixed_Point_Definition_Access) is null; overriding procedure Defining_Character_Literal (Self : in out Visiter; Node : not null Gela.Elements.Defining_Character_Literals. Defining_Character_Literal_Access); overriding procedure Defining_Enumeration_Literal (Self : in out Visiter; Node : not null Gela.Elements.Defining_Enumeration_Literals. Defining_Enumeration_Literal_Access); overriding procedure Defining_Expanded_Unit_Name (Self : in out Visiter; Node : not null Gela.Elements.Defining_Expanded_Unit_Names. Defining_Expanded_Unit_Name_Access); overriding procedure Defining_Identifier (Self : in out Visiter; Node : not null Gela.Elements.Defining_Identifiers. Defining_Identifier_Access); overriding procedure Defining_Operator_Symbol (Self : in out Visiter; Node : not null Gela.Elements.Defining_Operator_Symbols. Defining_Operator_Symbol_Access); overriding procedure Delay_Statement (Self : in out Visiter; Node : not null Gela.Elements.Delay_Statements.Delay_Statement_Access); overriding procedure Delta_Constraint (Self : in out Visiter; Node : not null Gela.Elements.Delta_Constraints.Delta_Constraint_Access) is null; overriding procedure Derived_Record_Definition (Self : in out Visiter; Node : not null Gela.Elements.Derived_Record_Definitions. Derived_Record_Definition_Access) is null; overriding procedure Derived_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Derived_Type_Definitions. Derived_Type_Definition_Access); overriding procedure Digits_Constraint (Self : in out Visiter; Node : not null Gela.Elements.Digits_Constraints. Digits_Constraint_Access) is null; overriding procedure Discrete_Range_Attribute_Reference (Self : in out Visiter; Node : not null Gela.Elements.Discrete_Range_Attribute_References. Discrete_Range_Attribute_Reference_Access) is null; overriding procedure Discrete_Simple_Expression_Range (Self : in out Visiter; Node : not null Gela.Elements.Discrete_Simple_Expression_Ranges. Discrete_Simple_Expression_Range_Access); overriding procedure Discrete_Subtype_Indication (Self : in out Visiter; Node : not null Gela.Elements.Discrete_Subtype_Indications. Discrete_Subtype_Indication_Access); overriding procedure Discrete_Subtype_Indication_Dr (Self : in out Visiter; Node : not null Gela.Elements.Discrete_Subtype_Indication_Drs. Discrete_Subtype_Indication_Dr_Access) is null; overriding procedure Discriminant_Specification (Self : in out Visiter; Node : not null Gela.Elements.Discriminant_Specifications. Discriminant_Specification_Access); overriding procedure Element_Iterator_Specification (Self : in out Visiter; Node : not null Gela.Elements.Element_Iterator_Specifications. Element_Iterator_Specification_Access) is null; overriding procedure Else_Expression_Path (Self : in out Visiter; Node : not null Gela.Elements.Else_Expression_Paths. Else_Expression_Path_Access) is null; overriding procedure Else_Path (Self : in out Visiter; Node : not null Gela.Elements.Else_Paths.Else_Path_Access); overriding procedure Elsif_Expression_Path (Self : in out Visiter; Node : not null Gela.Elements.Elsif_Expression_Paths. Elsif_Expression_Path_Access) is null; overriding procedure Elsif_Path (Self : in out Visiter; Node : not null Gela.Elements.Elsif_Paths.Elsif_Path_Access) is null; overriding procedure Entry_Body (Self : in out Visiter; Node : not null Gela.Elements.Entry_Bodies.Entry_Body_Access); overriding procedure Entry_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Entry_Declarations. Entry_Declaration_Access); overriding procedure Entry_Index_Specification (Self : in out Visiter; Node : not null Gela.Elements.Entry_Index_Specifications. Entry_Index_Specification_Access) is null; overriding procedure Enumeration_Literal_Specification (Self : in out Visiter; Node : not null Gela.Elements.Enumeration_Literal_Specifications. Enumeration_Literal_Specification_Access); overriding procedure Enumeration_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Enumeration_Type_Definitions. Enumeration_Type_Definition_Access); overriding procedure Exception_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Exception_Declarations. Exception_Declaration_Access); overriding procedure Exception_Handler (Self : in out Visiter; Node : not null Gela.Elements.Exception_Handlers. Exception_Handler_Access); overriding procedure Exception_Renaming_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Exception_Renaming_Declarations. Exception_Renaming_Declaration_Access); overriding procedure Exit_Statement (Self : in out Visiter; Node : not null Gela.Elements.Exit_Statements.Exit_Statement_Access); overriding procedure Explicit_Dereference (Self : in out Visiter; Node : not null Gela.Elements.Explicit_Dereferences. Explicit_Dereference_Access); overriding procedure Extended_Return_Statement (Self : in out Visiter; Node : not null Gela.Elements.Extended_Return_Statements. Extended_Return_Statement_Access) is null; overriding procedure Extension_Aggregate (Self : in out Visiter; Node : not null Gela.Elements.Extension_Aggregates. Extension_Aggregate_Access) is null; overriding procedure Floating_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Floating_Point_Definitions. Floating_Point_Definition_Access); overriding procedure For_Loop_Statement (Self : in out Visiter; Node : not null Gela.Elements.For_Loop_Statements. For_Loop_Statement_Access); overriding procedure Formal_Access_To_Function_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Access_To_Function_Definitions. Formal_Access_To_Function_Definition_Access) is null; overriding procedure Formal_Access_To_Object_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Access_To_Object_Definitions. Formal_Access_To_Object_Definition_Access) is null; overriding procedure Formal_Access_To_Procedure_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Access_To_Procedure_Definitions. Formal_Access_To_Procedure_Definition_Access) is null; overriding procedure Formal_Constrained_Array_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Constrained_Array_Definitions. Formal_Constrained_Array_Definition_Access) is null; overriding procedure Formal_Decimal_Fixed_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Decimal_Fixed_Point_Definitions. Formal_Decimal_Fixed_Point_Definition_Access) is null; overriding procedure Formal_Derived_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Derived_Type_Definitions. Formal_Derived_Type_Definition_Access); overriding procedure Formal_Discrete_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Discrete_Type_Definitions. Formal_Discrete_Type_Definition_Access); overriding procedure Formal_Floating_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Floating_Point_Definitions. Formal_Floating_Point_Definition_Access) is null; overriding procedure Formal_Function_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Function_Declarations. Formal_Function_Declaration_Access) is null; overriding procedure Formal_Incomplete_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Incomplete_Type_Declarations. Formal_Incomplete_Type_Declaration_Access) is null; overriding procedure Formal_Interface_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Interface_Type_Definitions. Formal_Interface_Type_Definition_Access) is null; overriding procedure Formal_Modular_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Modular_Type_Definitions. Formal_Modular_Type_Definition_Access) is null; overriding procedure Formal_Object_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Object_Declarations. Formal_Object_Declaration_Access); overriding procedure Formal_Ordinary_Fixed_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Ordinary_Fixed_Point_Definitions. Formal_Ordinary_Fixed_Point_Definition_Access) is null; overriding procedure Formal_Package_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Package_Declarations. Formal_Package_Declaration_Access) is null; overriding procedure Formal_Private_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Private_Type_Definitions. Formal_Private_Type_Definition_Access) is null; overriding procedure Formal_Procedure_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Procedure_Declarations. Formal_Procedure_Declaration_Access) is null; overriding procedure Formal_Signed_Integer_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Signed_Integer_Type_Definitions. Formal_Signed_Integer_Type_Definition_Access); overriding procedure Formal_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Type_Declarations. Formal_Type_Declaration_Access); overriding procedure Formal_Unconstrained_Array_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Unconstrained_Array_Definitions. Formal_Unconstrained_Array_Definition_Access) is null; overriding procedure Full_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Full_Type_Declarations. Full_Type_Declaration_Access); overriding procedure Function_Body (Self : in out Visiter; Node : not null Gela.Elements.Function_Bodies.Function_Body_Access); overriding procedure Function_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Function_Declarations. Function_Declaration_Access); overriding procedure Function_Instantiation (Self : in out Visiter; Node : not null Gela.Elements.Function_Instantiations. Function_Instantiation_Access) is null; overriding procedure Generalized_Iterator_Specification (Self : in out Visiter; Node : not null Gela.Elements.Generalized_Iterator_Specifications. Generalized_Iterator_Specification_Access) is null; overriding procedure Generic_Association (Self : in out Visiter; Node : not null Gela.Elements.Generic_Associations. Generic_Association_Access); overriding procedure Generic_Function_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Generic_Function_Declarations. Generic_Function_Declaration_Access) is null; overriding procedure Generic_Function_Renaming (Self : in out Visiter; Node : not null Gela.Elements.Generic_Function_Renamings. Generic_Function_Renaming_Access) is null; overriding procedure Generic_Package_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Generic_Package_Declarations. Generic_Package_Declaration_Access); overriding procedure Generic_Package_Renaming (Self : in out Visiter; Node : not null Gela.Elements.Generic_Package_Renamings. Generic_Package_Renaming_Access) is null; overriding procedure Generic_Procedure_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Generic_Procedure_Declarations. Generic_Procedure_Declaration_Access) is null; overriding procedure Generic_Procedure_Renaming (Self : in out Visiter; Node : not null Gela.Elements.Generic_Procedure_Renamings. Generic_Procedure_Renaming_Access) is null; overriding procedure Goto_Statement (Self : in out Visiter; Node : not null Gela.Elements.Goto_Statements.Goto_Statement_Access) is null; overriding procedure Identifier (Self : in out Visiter; Node : not null Gela.Elements.Identifiers.Identifier_Access); overriding procedure If_Expression (Self : in out Visiter; Node : not null Gela.Elements.If_Expressions.If_Expression_Access) is null; overriding procedure If_Expression_Path (Self : in out Visiter; Node : not null Gela.Elements.If_Expression_Paths. If_Expression_Path_Access) is null; overriding procedure If_Path (Self : in out Visiter; Node : not null Gela.Elements.If_Paths.If_Path_Access); overriding procedure If_Statement (Self : in out Visiter; Node : not null Gela.Elements.If_Statements.If_Statement_Access); overriding procedure Incomplete_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Incomplete_Type_Declarations. Incomplete_Type_Declaration_Access); overriding procedure Incomplete_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Incomplete_Type_Definitions. Incomplete_Type_Definition_Access); overriding procedure Interface_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Interface_Type_Definitions. Interface_Type_Definition_Access) is null; overriding procedure Known_Discriminant_Part (Self : in out Visiter; Node : not null Gela.Elements.Known_Discriminant_Parts. Known_Discriminant_Part_Access); overriding procedure Label_Decorator (Self : in out Visiter; Node : not null Gela.Elements.Label_Decorators.Label_Decorator_Access) is null; overriding procedure Loop_Parameter_Specification (Self : in out Visiter; Node : not null Gela.Elements.Loop_Parameter_Specifications. Loop_Parameter_Specification_Access); overriding procedure Loop_Statement (Self : in out Visiter; Node : not null Gela.Elements.Loop_Statements.Loop_Statement_Access); overriding procedure Membership_Test (Self : in out Visiter; Node : not null Gela.Elements.Membership_Tests.Membership_Test_Access); overriding procedure Modular_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Modular_Type_Definitions. Modular_Type_Definition_Access) is null; overriding procedure Null_Component (Self : in out Visiter; Node : not null Gela.Elements.Null_Components.Null_Component_Access); overriding procedure Null_Literal (Self : in out Visiter; Node : not null Gela.Elements.Null_Literals.Null_Literal_Access) is null; overriding procedure Null_Record_Definition (Self : in out Visiter; Node : not null Gela.Elements.Null_Record_Definitions. Null_Record_Definition_Access) is null; overriding procedure Null_Statement (Self : in out Visiter; Node : not null Gela.Elements.Null_Statements.Null_Statement_Access); overriding procedure Number_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Number_Declarations. Number_Declaration_Access); overriding procedure Numeric_Literal (Self : in out Visiter; Node : not null Gela.Elements.Numeric_Literals.Numeric_Literal_Access); overriding procedure Object_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Object_Declarations. Object_Declaration_Access); overriding procedure Object_Renaming_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Object_Renaming_Declarations. Object_Renaming_Declaration_Access); overriding procedure Operator_Symbol (Self : in out Visiter; Node : not null Gela.Elements.Operator_Symbols.Operator_Symbol_Access); overriding procedure Ordinary_Fixed_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Ordinary_Fixed_Point_Definitions. Ordinary_Fixed_Point_Definition_Access); overriding procedure Others_Choice (Self : in out Visiter; Node : not null Gela.Elements.Others_Choices.Others_Choice_Access); overriding procedure Package_Body (Self : in out Visiter; Node : not null Gela.Elements.Package_Bodies.Package_Body_Access); overriding procedure Package_Body_Stub (Self : in out Visiter; Node : not null Gela.Elements.Package_Body_Stubs. Package_Body_Stub_Access); overriding procedure Package_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Package_Declarations. Package_Declaration_Access); overriding procedure Package_Instantiation (Self : in out Visiter; Node : not null Gela.Elements.Package_Instantiations. Package_Instantiation_Access); overriding procedure Package_Renaming_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Package_Renaming_Declarations. Package_Renaming_Declaration_Access); overriding procedure Parameter_Association (Self : in out Visiter; Node : not null Gela.Elements.Parameter_Associations. Parameter_Association_Access) is null; overriding procedure Parameter_Specification (Self : in out Visiter; Node : not null Gela.Elements.Parameter_Specifications. Parameter_Specification_Access); overriding procedure Parenthesized_Expression (Self : in out Visiter; Node : not null Gela.Elements.Parenthesized_Expressions. Parenthesized_Expression_Access); overriding procedure Pragma_Argument_Association (Self : in out Visiter; Node : not null Gela.Elements.Pragma_Argument_Associations. Pragma_Argument_Association_Access) is null; overriding procedure Pragma_Node (Self : in out Visiter; Node : not null Gela.Elements.Pragma_Nodes.Pragma_Node_Access); overriding procedure Private_Extension_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Private_Extension_Declarations. Private_Extension_Declaration_Access) is null; overriding procedure Private_Extension_Definition (Self : in out Visiter; Node : not null Gela.Elements.Private_Extension_Definitions. Private_Extension_Definition_Access) is null; overriding procedure Private_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Private_Type_Declarations. Private_Type_Declaration_Access); overriding procedure Private_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Private_Type_Definitions. Private_Type_Definition_Access); overriding procedure Procedure_Body (Self : in out Visiter; Node : not null Gela.Elements.Procedure_Bodies.Procedure_Body_Access); overriding procedure Procedure_Call_Statement (Self : in out Visiter; Node : not null Gela.Elements.Procedure_Call_Statements. Procedure_Call_Statement_Access); overriding procedure Procedure_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Procedure_Declarations. Procedure_Declaration_Access); overriding procedure Procedure_Instantiation (Self : in out Visiter; Node : not null Gela.Elements.Procedure_Instantiations. Procedure_Instantiation_Access) is null; overriding procedure Protected_Body (Self : in out Visiter; Node : not null Gela.Elements.Protected_Bodies.Protected_Body_Access); overriding procedure Protected_Body_Stub (Self : in out Visiter; Node : not null Gela.Elements.Protected_Body_Stubs. Protected_Body_Stub_Access) is null; overriding procedure Protected_Definition (Self : in out Visiter; Node : not null Gela.Elements.Protected_Definitions. Protected_Definition_Access); overriding procedure Protected_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Protected_Type_Declarations. Protected_Type_Declaration_Access) is null; overriding procedure Qualified_Expression (Self : in out Visiter; Node : not null Gela.Elements.Qualified_Expressions. Qualified_Expression_Access); overriding procedure Quantified_Expression (Self : in out Visiter; Node : not null Gela.Elements.Quantified_Expressions. Quantified_Expression_Access) is null; overriding procedure Raise_Statement (Self : in out Visiter; Node : not null Gela.Elements.Raise_Statements.Raise_Statement_Access) is null; overriding procedure Range_Attribute_Reference (Self : in out Visiter; Node : not null Gela.Elements.Range_Attribute_References. Range_Attribute_Reference_Access); overriding procedure Range_Attribute_Reference_Dr (Self : in out Visiter; Node : not null Gela.Elements.Range_Attribute_Reference_Drs. Range_Attribute_Reference_Dr_Access) is null; overriding procedure Association_List (Self : in out Visiter; Node : not null Gela.Elements.Association_Lists.Association_List_Access) is null; overriding procedure Record_Aggregate (Self : in out Visiter; Node : not null Gela.Elements.Record_Aggregates.Record_Aggregate_Access); overriding procedure Record_Definition (Self : in out Visiter; Node : not null Gela.Elements.Record_Definitions. Record_Definition_Access); overriding procedure Record_Representation_Clause (Self : in out Visiter; Node : not null Gela.Elements.Record_Representation_Clauses. Record_Representation_Clause_Access); overriding procedure Record_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Record_Type_Definitions. Record_Type_Definition_Access); overriding procedure Requeue_Statement (Self : in out Visiter; Node : not null Gela.Elements.Requeue_Statements. Requeue_Statement_Access); overriding procedure Return_Object_Specification (Self : in out Visiter; Node : not null Gela.Elements.Return_Object_Specifications. Return_Object_Specification_Access) is null; overriding procedure Scalar_Subtype_Indication (Self : in out Visiter; Node : not null Gela.Elements.Scalar_Subtype_Indications. Scalar_Subtype_Indication_Access); overriding procedure Select_Or_Path (Self : in out Visiter; Node : not null Gela.Elements.Select_Or_Paths.Select_Or_Path_Access); overriding procedure Selected_Component (Self : in out Visiter; Node : not null Gela.Elements.Selected_Components. Selected_Component_Access); overriding procedure Selected_Identifier (Self : in out Visiter; Node : not null Gela.Elements.Selected_Identifiers. Selected_Identifier_Access); overriding procedure Selective_Accept (Self : in out Visiter; Node : not null Gela.Elements.Selective_Accepts.Selective_Accept_Access); overriding procedure Short_Circuit (Self : in out Visiter; Node : not null Gela.Elements.Short_Circuits.Short_Circuit_Access) is null; overriding procedure Signed_Integer_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Signed_Integer_Type_Definitions. Signed_Integer_Type_Definition_Access); overriding procedure Simple_Expression_Range (Self : in out Visiter; Node : not null Gela.Elements.Simple_Expression_Ranges. Simple_Expression_Range_Access); overriding procedure Simple_Expression_Range_Dr (Self : in out Visiter; Node : not null Gela.Elements.Simple_Expression_Range_Drs. Simple_Expression_Range_Dr_Access); overriding procedure Simple_Return_Statement (Self : in out Visiter; Node : not null Gela.Elements.Simple_Return_Statements. Simple_Return_Statement_Access); overriding procedure Single_Protected_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Single_Protected_Declarations. Single_Protected_Declaration_Access); overriding procedure Single_Task_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Single_Task_Declarations. Single_Task_Declaration_Access); overriding procedure String_Literal (Self : in out Visiter; Node : not null Gela.Elements.String_Literals.String_Literal_Access); overriding procedure Subtype_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Subtype_Declarations. Subtype_Declaration_Access); overriding procedure Subunit (Self : in out Visiter; Node : not null Gela.Elements.Subunits.Subunit_Access) is null; overriding procedure Task_Body (Self : in out Visiter; Node : not null Gela.Elements.Task_Bodies.Task_Body_Access); overriding procedure Task_Body_Stub (Self : in out Visiter; Node : not null Gela.Elements.Task_Body_Stubs.Task_Body_Stub_Access); overriding procedure Task_Definition (Self : in out Visiter; Node : not null Gela.Elements.Task_Definitions.Task_Definition_Access); overriding procedure Task_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Task_Type_Declarations. Task_Type_Declaration_Access) is null; overriding procedure Terminate_Alternative_Statement (Self : in out Visiter; Node : not null Gela.Elements.Terminate_Alternative_Statements. Terminate_Alternative_Statement_Access); overriding procedure Then_Abort_Path (Self : in out Visiter; Node : not null Gela.Elements.Then_Abort_Paths.Then_Abort_Path_Access) is null; overriding procedure Unconstrained_Array_Definition (Self : in out Visiter; Node : not null Gela.Elements.Unconstrained_Array_Definitions. Unconstrained_Array_Definition_Access); overriding procedure Unknown_Discriminant_Part (Self : in out Visiter; Node : not null Gela.Elements.Unknown_Discriminant_Parts. Unknown_Discriminant_Part_Access) is null; overriding procedure Use_Package_Clause (Self : in out Visiter; Node : not null Gela.Elements.Use_Package_Clauses. Use_Package_Clause_Access); overriding procedure Use_Type_Clause (Self : in out Visiter; Node : not null Gela.Elements.Use_Type_Clauses.Use_Type_Clause_Access); overriding procedure Variant (Self : in out Visiter; Node : not null Gela.Elements.Variants.Variant_Access); overriding procedure Variant_Part (Self : in out Visiter; Node : not null Gela.Elements.Variant_Parts.Variant_Part_Access); overriding procedure While_Loop_Statement (Self : in out Visiter; Node : not null Gela.Elements.While_Loop_Statements. While_Loop_Statement_Access) is null; overriding procedure With_Clause (Self : in out Visiter; Node : not null Gela.Elements.With_Clauses.With_Clause_Access); overriding procedure Accept_Statement (Self : in out Visiter; Node : not null Gela.Elements.Accept_Statements.Accept_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := An_Accept_Statement; end Accept_Statement; overriding procedure Access_To_Object_Definition (Self : in out Visiter; Node : not null Gela.Elements.Access_To_Object_Definitions. Access_To_Object_Definition_Access) is use type Gela.Lexical_Types.Token_Count; use type Gela.Lexical_Types.Token_Kind; Comp : constant Gela.Compilations.Compilation_Access := Node.Enclosing_Compilation; Token : Gela.Lexical_Types.Token; begin if Node.Constant_Token = 0 then Self.Result := A_Pool_Specific_Access_To_Variable; return; end if; Token := Comp.Get_Token (Node.Constant_Token); if Token.Kind = Gela.Lexical_Types.All_Token then Self.Result := An_Access_To_Variable; else Self.Result := An_Access_To_Constant; end if; end Access_To_Object_Definition; overriding procedure Allocator (Self : in out Visiter; Node : not null Gela.Elements.Allocators.Allocator_Access) is Name : constant Gela.Elements.Names.Name_Access := Node.Subtype_Or_Expression; begin Name.Visit (Self); case Self.Result is when A_Qualified_Expression => Self.Result := An_Allocation_From_Qualified_Expression; when others => Self.Result := An_Allocation_From_Subtype; end case; end Allocator; overriding procedure Anonymous_Access_To_Object_Definition (Self : in out Visiter; Node : not null Gela.Elements.Anonymous_Access_To_Object_Definitions. Anonymous_Access_To_Object_Definition_Access) is use type Gela.Lexical_Types.Token_Count; begin if Node.Constant_Token = 0 then Self.Result := An_Anonymous_Access_To_Variable; else Self.Result := An_Anonymous_Access_To_Constant; end if; end Anonymous_Access_To_Object_Definition; overriding procedure Assignment_Statement (Self : in out Visiter; Node : not null Gela.Elements.Assignment_Statements. Assignment_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := An_Assignment_Statement; end Assignment_Statement; overriding procedure Association (Self : in out Visiter; Node : not null Gela.Elements.Associations.Association_Access) is Parent : Gela.Elements.Element_Access := Node.Enclosing_Element; begin while Auxilary ((Data => Parent)) loop Parent := Parent.Enclosing_Element; end loop; Parent.Visit (Self); case Self.Result is when A_Record_Aggregate => Self.Result := A_Record_Component_Association; when A_Positional_Array_Aggregate | A_Named_Array_Aggregate => Self.Result := An_Array_Component_Association; when A_Discriminant_Constraint => Self.Result := A_Discriminant_Association; when others => Self.Result := A_Parameter_Association; end case; end Association; overriding procedure Attribute_Reference (Self : in out Visiter; Node : not null Gela.Elements.Attribute_References. Attribute_Reference_Access) is package X renames Gela.Lexical_Types.Predefined_Symbols; Id : constant Gela.Elements.Identifiers.Identifier_Access := Node.Attribute_Designator_Identifier; Comp : constant Gela.Compilations.Compilation_Access := Node.Enclosing_Compilation; Token : Gela.Lexical_Types.Token; Map : constant array (Gela.Lexical_Types.Symbol range X.Access_Symbol .. X.Write) of Element_Flat_Kind := ( X.Access_Symbol => An_Access_Attribute, X.Address => An_Address_Attribute, X.Adjacent => An_Adjacent_Attribute, X.Aft => An_Aft_Attribute, X.Alignment => An_Alignment_Attribute, X.Base => A_Base_Attribute, X.Bit_Order => A_Bit_Order_Attribute, X.Body_Version => A_Body_Version_Attribute, X.Callable => A_Callable_Attribute, X.Caller => A_Caller_Attribute, X.Ceiling => A_Ceiling_Attribute, X.Class => A_Class_Attribute, X.Component_Size => A_Component_Size_Attribute, X.Compose => A_Compose_Attribute, X.Constrained => A_Constrained_Attribute, X.Copy_Sign => A_Copy_Sign_Attribute, X.Count => A_Count_Attribute, X.Definite => A_Definite_Attribute, X.Delta_Symbol => A_Delta_Attribute, X.Denorm => A_Denorm_Attribute, X.Digits_Symbol => A_Digits_Attribute, X.Exponent => An_Exponent_Attribute, X.External_Tag => An_External_Tag_Attribute, X.First => A_First_Attribute, X.First_Bit => A_First_Bit_Attribute, X.Floor => A_Floor_Attribute, X.Fore => A_Fore_Attribute, X.Fraction => A_Fraction_Attribute, X.Identity => An_Identity_Attribute, X.Image => An_Image_Attribute, X.Input => An_Input_Attribute, X.Last => A_Last_Attribute, X.Last_Bit => A_Last_Bit_Attribute, X.Leading_Part => A_Leading_Part_Attribute, X.Length => A_Length_Attribute, X.Machine => A_Machine_Attribute, X.Machine_Emax => A_Machine_Emax_Attribute, X.Machine_Emin => A_Machine_Emin_Attribute, X.Machine_Mantissa => A_Machine_Mantissa_Attribute, X.Machine_Overflows => A_Machine_Overflows_Attribute, X.Machine_Radix => A_Machine_Radix_Attribute, X.Machine_Rounding => A_Machine_Rounding_Attribute, X.Machine_Rounds => A_Machine_Rounds_Attribute, X.Max => A_Max_Attribute, X.Max_Size_In_Storage_Elements => A_Max_Size_In_Storage_Elements_Attribute, X.Min => A_Min_Attribute, X.Mod_Symbol => A_Mod_Attribute, X.Model => A_Model_Attribute, X.Model_Emin => A_Model_Emin_Attribute, X.Model_Epsilon => A_Model_Epsilon_Attribute, X.Model_Mantissa => A_Model_Mantissa_Attribute, X.Model_Small => A_Model_Small_Attribute, X.Modulus => A_Modulus_Attribute, X.Output => An_Output_Attribute, X.Partition_ID => A_Partition_ID_Attribute, X.Pos => A_Pos_Attribute, X.Position => A_Position_Attribute, X.Pred => A_Pred_Attribute, X.Priority => A_Priority_Attribute, X.Range_Symbol => A_Range_Attribute, X.Read => A_Read_Attribute, X.Remainder => A_Remainder_Attribute, X.Round => A_Round_Attribute, X.Rounding => A_Rounding_Attribute, X.Safe_First => A_Safe_First_Attribute, X.Safe_Last => A_Safe_Last_Attribute, X.Scale => A_Scale_Attribute, X.Scaling => A_Scaling_Attribute, X.Signed_Zeros => A_Signed_Zeros_Attribute, X.Size => A_Size_Attribute, X.Small => A_Small_Attribute, X.Storage_Pool => A_Storage_Pool_Attribute, X.Storage_Size => A_Storage_Size_Attribute, X.Stream_Size => A_Stream_Size_Attribute, X.Succ => A_Succ_Attribute, X.Tag => A_Tag_Attribute, X.Terminated => A_Terminated_Attribute, X.Truncation => A_Truncation_Attribute, X.Unbiased_Rounding => An_Unbiased_Rounding_Attribute, X.Unchecked_Access => An_Unchecked_Access_Attribute, X.Val => A_Val_Attribute, X.Valid => A_Valid_Attribute, X.Value => A_Value_Attribute, X.Version => A_Version_Attribute, X.Wide_Image => A_Wide_Image_Attribute, X.Wide_Value => A_Wide_Value_Attribute, X.Wide_Wide_Image => A_Wide_Wide_Image_Attribute, X.Wide_Wide_Value => A_Wide_Wide_Value_Attribute, X.Wide_Wide_Width => A_Wide_Wide_Width_Attribute, X.Wide_Width => A_Wide_Width_Attribute, X.Width => A_Width_Attribute, X.Write => A_Write_Attribute); begin Token := Comp.Get_Token (Id.Identifier_Token); if Token.Symbol in Map'Range then Self.Result := Map (Token.Symbol); else Self.Result := A_Range_Attribute; end if; end Attribute_Reference; overriding procedure Function_Call (Self : in out Visiter; Node : not null Gela.Elements.Function_Calls.Function_Call_Access) is use type Gela.Interpretations.Auxiliary_Apply_Kinds; begin case Node.Chosen_Interpretation is when Gela.Interpretations.Indexed_Component => Self.Result := An_Indexed_Component; when Gela.Interpretations.Function_Call => Self.Result := A_Function_Call; when Gela.Interpretations.Type_Convertion => Self.Result := A_Type_Conversion; when others => Self.Result := A_Function_Call; -- ??? raise exception? end case; end Function_Call; overriding procedure Block_Statement (Self : in out Visiter; Node : not null Gela.Elements.Block_Statements.Block_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_Block_Statement; end Block_Statement; overriding procedure Case_Path (Self : in out Visiter; Node : not null Gela.Elements.Case_Paths.Case_Path_Access) is pragma Unreferenced (Node); begin Self.Result := A_Case_Path; end Case_Path; overriding procedure Case_Statement (Self : in out Visiter; Node : not null Gela.Elements.Case_Statements.Case_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_Case_Statement; end Case_Statement; overriding procedure Character_Literal (Self : in out Visiter; Node : not null Gela.Elements.Character_Literals. Character_Literal_Access) is pragma Unreferenced (Node); begin Self.Result := A_Character_Literal; end Character_Literal; overriding procedure Component_Clause (Self : in out Visiter; Node : not null Gela.Elements.Component_Clauses.Component_Clause_Access) is pragma Unreferenced (Node); begin Self.Result := A_Component_Clause; end Component_Clause; overriding procedure Component_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Component_Declarations. Component_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Component_Declaration; end Component_Declaration; overriding procedure Component_Definition (Self : in out Visiter; Node : not null Gela.Elements.Component_Definitions. Component_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Component_Definition; end Component_Definition; overriding procedure Composite_Constraint (Self : in out Visiter; Node : not null Gela.Elements.Composite_Constraints. Composite_Constraint_Access) is use type Gela.Interpretations.Interpretation_Kinds; begin if Node.Chosen_Interpretation = Gela.Interpretations.Index_Constraint then Self.Result := An_Index_Constraint; else Self.Result := A_Discriminant_Constraint; end if; end Composite_Constraint; overriding procedure Composite_Subtype_Indication (Self : in out Visiter; Node : not null Gela.Elements.Composite_Subtype_Indications. Composite_Subtype_Indication_Access) is pragma Unreferenced (Node); begin Self.Result := A_Subtype_Indication; end Composite_Subtype_Indication; overriding procedure Constrained_Array_Definition (Self : in out Visiter; Node : not null Gela.Elements.Constrained_Array_Definitions. Constrained_Array_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Constrained_Array_Definition; end Constrained_Array_Definition; overriding procedure Defining_Character_Literal (Self : in out Visiter; Node : not null Gela.Elements.Defining_Character_Literals. Defining_Character_Literal_Access) is pragma Unreferenced (Node); begin Self.Result := A_Defining_Character_Literal; end Defining_Character_Literal; overriding procedure Defining_Enumeration_Literal (Self : in out Visiter; Node : not null Gela.Elements.Defining_Enumeration_Literals. Defining_Enumeration_Literal_Access) is pragma Unreferenced (Node); begin Self.Result := A_Defining_Enumeration_Literal; end Defining_Enumeration_Literal; overriding procedure Defining_Expanded_Unit_Name (Self : in out Visiter; Node : not null Gela.Elements.Defining_Expanded_Unit_Names. Defining_Expanded_Unit_Name_Access) is pragma Unreferenced (Node); begin Self.Result := A_Defining_Expanded_Name; end Defining_Expanded_Unit_Name; overriding procedure Defining_Identifier (Self : in out Visiter; Node : not null Gela.Elements.Defining_Identifiers. Defining_Identifier_Access) is pragma Unreferenced (Node); begin Self.Result := A_Defining_Identifier; end Defining_Identifier; overriding procedure Defining_Operator_Symbol (Self : in out Visiter; Node : not null Gela.Elements.Defining_Operator_Symbols. Defining_Operator_Symbol_Access) is Operator_Map : constant array (Gela.Lexical_Types.Symbol range 1 .. 19) of Element_Flat_Kind := (A_Defining_Less_Than_Operator, A_Defining_Equal_Operator, A_Defining_Greater_Than_Operator, A_Defining_Minus_Operator, A_Defining_Divide_Operator, A_Defining_Multiply_Operator, A_Defining_Concatenate_Operator, A_Defining_Plus_Operator, A_Defining_Less_Than_Or_Equal_Operator, A_Defining_Greater_Than_Or_Equal_Operator, A_Defining_Not_Equal_Operator, A_Defining_Exponentiate_Operator, A_Defining_Or_Operator, A_Defining_And_Operator, A_Defining_Xor_Operator, A_Defining_Mod_Operator, A_Defining_Rem_Operator, A_Defining_Abs_Operator, A_Defining_Not_Operator); Comp : constant Gela.Compilations.Compilation_Access := Node.Enclosing_Compilation; Token : constant Gela.Lexical_Types.Token := Comp.Get_Token (Node.Operator_Symbol_Token); begin if Token.Symbol in Operator_Map'Range then Self.Result := Operator_Map (Token.Symbol); end if; end Defining_Operator_Symbol; overriding procedure Delay_Statement (Self : in out Visiter; Node : not null Gela.Elements.Delay_Statements.Delay_Statement_Access) is use type Gela.Lexical_Types.Token_Index; begin if Node.Until_Token = 0 then Self.Result := A_Delay_Relative_Statement; else Self.Result := A_Delay_Until_Statement; end if; end Delay_Statement; overriding procedure Derived_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Derived_Type_Definitions. Derived_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Derived_Type_Definition; end Derived_Type_Definition; overriding procedure Discrete_Simple_Expression_Range (Self : in out Visiter; Node : not null Gela.Elements.Discrete_Simple_Expression_Ranges. Discrete_Simple_Expression_Range_Access) is begin Node.Enclosing_Element.Visit (Self); case Self.Result is when A_Component_Clause => Self.Result := A_Discrete_Simple_Expression_Range_DR; when others => Self.Result := A_Discrete_Simple_Expression_Range; end case; end Discrete_Simple_Expression_Range; overriding procedure Discrete_Subtype_Indication (Self : in out Visiter; Node : not null Gela.Elements.Discrete_Subtype_Indications. Discrete_Subtype_Indication_Access) is pragma Unreferenced (Node); begin Self.Result := A_Discrete_Subtype_Indication; end Discrete_Subtype_Indication; overriding procedure Discriminant_Specification (Self : in out Visiter; Node : not null Gela.Elements.Discriminant_Specifications. Discriminant_Specification_Access) is pragma Unreferenced (Node); begin Self.Result := A_Discriminant_Specification; end Discriminant_Specification; overriding procedure Else_Path (Self : in out Visiter; Node : not null Gela.Elements.Else_Paths.Else_Path_Access) is pragma Unreferenced (Node); begin Self.Result := An_Else_Path; end Else_Path; overriding procedure Entry_Body (Self : in out Visiter; Node : not null Gela.Elements.Entry_Bodies.Entry_Body_Access) is pragma Unreferenced (Node); begin Self.Result := An_Entry_Body_Declaration; end Entry_Body; overriding procedure Entry_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Entry_Declarations. Entry_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := An_Entry_Declaration; end Entry_Declaration; overriding procedure Enumeration_Literal_Specification (Self : in out Visiter; Node : not null Gela.Elements.Enumeration_Literal_Specifications. Enumeration_Literal_Specification_Access) is pragma Unreferenced (Node); begin Self.Result := An_Enumeration_Literal_Specification; end Enumeration_Literal_Specification; overriding procedure Enumeration_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Enumeration_Type_Definitions. Enumeration_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := An_Enumeration_Type_Definition; end Enumeration_Type_Definition; overriding procedure Exception_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Exception_Declarations. Exception_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := An_Exception_Declaration; end Exception_Declaration; overriding procedure Exception_Handler (Self : in out Visiter; Node : not null Gela.Elements.Exception_Handlers. Exception_Handler_Access) is pragma Unreferenced (Node); begin Self.Result := An_Exception_Handler; end Exception_Handler; overriding procedure Exception_Renaming_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Exception_Renaming_Declarations. Exception_Renaming_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := An_Exception_Renaming_Declaration; end Exception_Renaming_Declaration; overriding procedure Exit_Statement (Self : in out Visiter; Node : not null Gela.Elements.Exit_Statements.Exit_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := An_Exit_Statement; end Exit_Statement; overriding procedure Explicit_Dereference (Self : in out Visiter; Node : not null Gela.Elements.Explicit_Dereferences. Explicit_Dereference_Access) is pragma Unreferenced (Node); begin Self.Result := An_Explicit_Dereference; end Explicit_Dereference; --------------- -- Flat_Kind -- --------------- function Flat_Kind (Element : Asis.Element) return Element_Flat_Kind is V : aliased Visiter := (Result => Not_An_Element); begin Element.Data.Visit (V); pragma Assert (Element.Data.Assigned and then V.Result /= Not_An_Element); return V.Result; end Flat_Kind; overriding procedure Floating_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Floating_Point_Definitions. Floating_Point_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Floating_Point_Definition; end Floating_Point_Definition; overriding procedure For_Loop_Statement (Self : in out Visiter; Node : not null Gela.Elements.For_Loop_Statements. For_Loop_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_For_Loop_Statement; end For_Loop_Statement; overriding procedure Formal_Derived_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Derived_Type_Definitions. Formal_Derived_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Formal_Derived_Type_Definition; end Formal_Derived_Type_Definition; overriding procedure Formal_Discrete_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Discrete_Type_Definitions. Formal_Discrete_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Formal_Discrete_Type_Definition; end Formal_Discrete_Type_Definition; overriding procedure Formal_Object_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Object_Declarations. Formal_Object_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Formal_Object_Declaration; end Formal_Object_Declaration; overriding procedure Formal_Signed_Integer_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Formal_Signed_Integer_Type_Definitions. Formal_Signed_Integer_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Formal_Signed_Integer_Type_Definition; end Formal_Signed_Integer_Type_Definition; overriding procedure Formal_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Formal_Type_Declarations. Formal_Type_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Formal_Type_Declaration; end Formal_Type_Declaration; overriding procedure Full_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Full_Type_Declarations. Full_Type_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := An_Ordinary_Type_Declaration; end Full_Type_Declaration; overriding procedure Function_Body (Self : in out Visiter; Node : not null Gela.Elements.Function_Bodies.Function_Body_Access) is pragma Unreferenced (Node); begin Self.Result := A_Function_Body_Declaration; end Function_Body; overriding procedure Function_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Function_Declarations. Function_Declaration_Access) is use type Gela.Lexical_Types.Token_Count; begin if Node.Renames_Token = 0 then Self.Result := A_Function_Declaration; else Self.Result := A_Function_Renaming_Declaration; end if; end Function_Declaration; overriding procedure Generic_Association (Self : in out Visiter; Node : not null Gela.Elements.Generic_Associations. Generic_Association_Access) is pragma Unreferenced (Node); begin Self.Result := A_Generic_Association; end Generic_Association; overriding procedure Generic_Package_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Generic_Package_Declarations. Generic_Package_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Generic_Package_Declaration; end Generic_Package_Declaration; overriding procedure Identifier (Self : in out Visiter; Node : not null Gela.Elements.Identifiers.Identifier_Access) is Name : constant Gela.Elements.Defining_Names.Defining_Name_Access := Node.Defining_Name; begin if Name.Assigned then Name.Visit (Self); if Self.Result = A_Defining_Enumeration_Literal then Self.Result := An_Enumeration_Literal; return; end if; end if; Self.Result := An_Identifier; end Identifier; overriding procedure If_Path (Self : in out Visiter; Node : not null Gela.Elements.If_Paths.If_Path_Access) is pragma Unreferenced (Node); begin Self.Result := An_If_Path; end If_Path; overriding procedure If_Statement (Self : in out Visiter; Node : not null Gela.Elements.If_Statements.If_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := An_If_Statement; end If_Statement; overriding procedure Incomplete_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Incomplete_Type_Declarations. Incomplete_Type_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := An_Incomplete_Type_Declaration; end Incomplete_Type_Declaration; overriding procedure Incomplete_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Incomplete_Type_Definitions. Incomplete_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := An_Incomplete_Type_Definition; end Incomplete_Type_Definition; overriding procedure Known_Discriminant_Part (Self : in out Visiter; Node : not null Gela.Elements.Known_Discriminant_Parts. Known_Discriminant_Part_Access) is pragma Unreferenced (Node); begin Self.Result := A_Known_Discriminant_Part; end Known_Discriminant_Part; overriding procedure Loop_Parameter_Specification (Self : in out Visiter; Node : not null Gela.Elements.Loop_Parameter_Specifications. Loop_Parameter_Specification_Access) is pragma Unreferenced (Node); begin Self.Result := A_Loop_Parameter_Specification; end Loop_Parameter_Specification; overriding procedure Loop_Statement (Self : in out Visiter; Node : not null Gela.Elements.Loop_Statements.Loop_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_Loop_Statement; end Loop_Statement; overriding procedure Membership_Test (Self : in out Visiter; Node : not null Gela.Elements.Membership_Tests.Membership_Test_Access) is use type Gela.Lexical_Types.Token_Count; begin if Node.Not_Token = 0 then Self.Result := An_In_Membership_Test; else Self.Result := A_Not_In_Membership_Test; end if; end Membership_Test; overriding procedure Null_Component (Self : in out Visiter; Node : not null Gela.Elements.Null_Components.Null_Component_Access) is pragma Unreferenced (Node); begin Self.Result := A_Null_Component; end Null_Component; overriding procedure Null_Statement (Self : in out Visiter; Node : not null Gela.Elements.Null_Statements.Null_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_Null_Statement; end Null_Statement; overriding procedure Number_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Number_Declarations. Number_Declaration_Access) is begin if Node.Chosen_Interpretation in Gela.Interpretations.Integer_Number then Self.Result := An_Integer_Number_Declaration; else Self.Result := A_Real_Number_Declaration; end if; end Number_Declaration; overriding procedure Numeric_Literal (Self : in out Visiter; Node : not null Gela.Elements.Numeric_Literals.Numeric_Literal_Access) is Comp : constant Gela.Compilations.Compilation_Access := Node.Enclosing_Compilation; Source : constant League.Strings.Universal_String := Comp.Source; Token : constant Gela.Lexical_Types.Token := Comp.Get_Token (Node.Numeric_Literal_Token); Point : constant Natural := Source.Index (Token.First, Token.Last, '.'); begin if Point > 0 then Self.Result := A_Real_Literal; else Self.Result := An_Integer_Literal; end if; end Numeric_Literal; overriding procedure Object_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Object_Declarations. Object_Declaration_Access) is use type Gela.Lexical_Types.Token_Count; begin if Node.Constant_Token = 0 then Self.Result := A_Variable_Declaration; elsif Node.Initialization_Expression in null then Self.Result := A_Deferred_Constant_Declaration; else Self.Result := A_Constant_Declaration; end if; end Object_Declaration; overriding procedure Object_Renaming_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Object_Renaming_Declarations. Object_Renaming_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := An_Object_Renaming_Declaration; end Object_Renaming_Declaration; overriding procedure Operator_Symbol (Self : in out Visiter; Node : not null Gela.Elements.Operator_Symbols.Operator_Symbol_Access) is Operator_Map : constant array (Gela.Lexical_Types.Symbol range 1 .. 19) of Element_Flat_Kind := (A_Less_Than_Operator, An_Equal_Operator, A_Greater_Than_Operator, A_Minus_Operator, A_Divide_Operator, A_Multiply_Operator, A_Concatenate_Operator, A_Plus_Operator, A_Less_Than_Or_Equal_Operator, A_Greater_Than_Or_Equal_Operator, A_Not_Equal_Operator, An_Exponentiate_Operator, An_Or_Operator, An_And_Operator, An_Xor_Operator, A_Mod_Operator, A_Rem_Operator, An_Abs_Operator, A_Not_Operator); Comp : constant Gela.Compilations.Compilation_Access := Node.Enclosing_Compilation; Token : constant Gela.Lexical_Types.Token := Comp.Get_Token (Node.Operator_Symbol_Token); begin if Token.Symbol in Operator_Map'Range then Self.Result := Operator_Map (Token.Symbol); end if; end Operator_Symbol; overriding procedure Ordinary_Fixed_Point_Definition (Self : in out Visiter; Node : not null Gela.Elements.Ordinary_Fixed_Point_Definitions. Ordinary_Fixed_Point_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := An_Ordinary_Fixed_Point_Definition; end Ordinary_Fixed_Point_Definition; overriding procedure Others_Choice (Self : in out Visiter; Node : not null Gela.Elements.Others_Choices.Others_Choice_Access) is pragma Unreferenced (Node); begin Self.Result := An_Others_Choice; end Others_Choice; overriding procedure Package_Body (Self : in out Visiter; Node : not null Gela.Elements.Package_Bodies.Package_Body_Access) is pragma Unreferenced (Node); begin Self.Result := A_Package_Body_Declaration; end Package_Body; overriding procedure Package_Body_Stub (Self : in out Visiter; Node : not null Gela.Elements.Package_Body_Stubs. Package_Body_Stub_Access) is pragma Unreferenced (Node); begin Self.Result := A_Package_Body_Stub; end Package_Body_Stub; overriding procedure Package_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Package_Declarations. Package_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Package_Declaration; end Package_Declaration; overriding procedure Package_Instantiation (Self : in out Visiter; Node : not null Gela.Elements.Package_Instantiations. Package_Instantiation_Access) is pragma Unreferenced (Node); begin Self.Result := A_Package_Instantiation; end Package_Instantiation; overriding procedure Package_Renaming_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Package_Renaming_Declarations. Package_Renaming_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Package_Renaming_Declaration; end Package_Renaming_Declaration; overriding procedure Parameter_Specification (Self : in out Visiter; Node : not null Gela.Elements.Parameter_Specifications. Parameter_Specification_Access) is pragma Unreferenced (Node); begin Self.Result := A_Parameter_Specification; end Parameter_Specification; overriding procedure Parenthesized_Expression (Self : in out Visiter; Node : not null Gela.Elements.Parenthesized_Expressions. Parenthesized_Expression_Access) is pragma Unreferenced (Node); begin Self.Result := A_Parenthesized_Expression; end Parenthesized_Expression; overriding procedure Pragma_Node (Self : in out Visiter; Node : not null Gela.Elements.Pragma_Nodes.Pragma_Node_Access) is package X renames Gela.Lexical_Types.Predefined_Symbols; Comp : constant Gela.Compilations.Compilation_Access := Node.Enclosing_Compilation; Token : constant Gela.Lexical_Types.Token := Comp.Get_Token (Node.Pragma_Token); Map : constant array (Gela.Lexical_Types.Symbol range X.All_Calls_Remote .. X.Storage_Size) of Element_Flat_Kind := (X.All_Calls_Remote => An_All_Calls_Remote_Pragma, X.Assert => An_Assert_Pragma, X.Assertion_Policy => An_Assertion_Policy_Pragma, X.Asynchronous => An_Asynchronous_Pragma, X.Atomic => An_Atomic_Pragma, X.Atomic_Components => An_Atomic_Components_Pragma, X.Attach_Handler => An_Attach_Handler_Pragma, X.Controlled => A_Controlled_Pragma, X.Convention => A_Convention_Pragma, X.Detect_Blocking => A_Detect_Blocking_Pragma, X.Discard_Names => A_Discard_Names_Pragma, X.Elaborate => An_Elaborate_Pragma, X.Elaborate_All => An_Elaborate_All_Pragma, X.Elaborate_Body => An_Elaborate_Body_Pragma, X.Export => An_Export_Pragma, X.Import => An_Import_Pragma, X.Inline => An_Inline_Pragma, X.Inspection_Point => An_Inspection_Point_Pragma, X.Interrupt_Handler => An_Interrupt_Handler_Pragma, X.Interrupt_Priority => An_Interrupt_Priority_Pragma, X.Linker_Options => A_Linker_Options_Pragma, X.List => A_List_Pragma, X.Locking_Policy => A_Locking_Policy_Pragma, X.No_Return => A_No_Return_Pragma, X.Normalize_Scalars => A_Normalize_Scalars_Pragma, X.Optimize => An_Optimize_Pragma, X.Pack => A_Pack_Pragma, X.Page => A_Page_Pragma, X.Partition_Elaboration_Policy => A_Partition_Elaboration_Policy_Pragma, X.Preelaborable_Initialization => A_Preelaborable_Initialization_Pragma, X.Preelaborate => A_Preelaborate_Pragma, X.Priority => A_Priority_Pragma, X.Priority_Specific_Dispatching => A_Priority_Specific_Dispatching_Pragma, X.Profile => A_Profile_Pragma, X.Pure => A_Pure_Pragma, X.Queuing_Policy => A_Queuing_Policy_Pragma, X.Relative_Deadline => A_Relative_Deadline_Pragma, X.Remote_Call_Interface => A_Remote_Call_Interface_Pragma, X.Remote_Types => A_Remote_Types_Pragma, X.Restrictions => A_Restrictions_Pragma, X.Reviewable => A_Reviewable_Pragma, X.Shared_Passive => A_Shared_Passive_Pragma, X.Storage_Size => A_Storage_Size_Pragma, X.Suppress => A_Suppress_Pragma, X.Task_Dispatching_Policy => A_Task_Dispatching_Policy_Pragma, X.Unchecked_Union => An_Unchecked_Union_Pragma, X.Unsuppress => An_Unsuppress_Pragma, X.Volatile => A_Volatile_Pragma, X.Volatile_Components => A_Volatile_Components_Pragma, others => An_Unknown_Pragma); begin if Token.Symbol in Map'Range then Self.Result := Map (Token.Symbol); else Self.Result := An_Unknown_Pragma; end if; end Pragma_Node; overriding procedure Private_Type_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Private_Type_Declarations. Private_Type_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Private_Type_Declaration; end Private_Type_Declaration; overriding procedure Private_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Private_Type_Definitions. Private_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Private_Type_Definition; end Private_Type_Definition; -------------------- -- Procedure_Body -- -------------------- overriding procedure Procedure_Body (Self : in out Visiter; Node : not null Gela.Elements.Procedure_Bodies.Procedure_Body_Access) is pragma Unreferenced (Node); begin Self.Result := A_Procedure_Body_Declaration; end Procedure_Body; ------------------------------ -- Procedure_Call_Statement -- ------------------------------ overriding procedure Procedure_Call_Statement (Self : in out Visiter; Node : not null Gela.Elements.Procedure_Call_Statements. Procedure_Call_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_Procedure_Call_Statement; end Procedure_Call_Statement; overriding procedure Procedure_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Procedure_Declarations. Procedure_Declaration_Access) is use type Gela.Lexical_Types.Token_Count; begin if Node.Renames_Token = 0 then Self.Result := A_Procedure_Declaration; else Self.Result := A_Procedure_Renaming_Declaration; end if; end Procedure_Declaration; overriding procedure Protected_Body (Self : in out Visiter; Node : not null Gela.Elements.Protected_Bodies.Protected_Body_Access) is pragma Unreferenced (Node); begin Self.Result := A_Protected_Body_Declaration; end Protected_Body; overriding procedure Protected_Definition (Self : in out Visiter; Node : not null Gela.Elements.Protected_Definitions. Protected_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Protected_Definition; end Protected_Definition; overriding procedure Qualified_Expression (Self : in out Visiter; Node : not null Gela.Elements.Qualified_Expressions. Qualified_Expression_Access) is pragma Unreferenced (Node); begin Self.Result := A_Qualified_Expression; end Qualified_Expression; overriding procedure Range_Attribute_Reference (Self : in out Visiter; Node : not null Gela.Elements.Range_Attribute_References. Range_Attribute_Reference_Access) is pragma Unreferenced (Node); begin Self.Result := A_Range_Attribute_Reference; end Range_Attribute_Reference; overriding procedure Record_Aggregate (Self : in out Visiter; Node : not null Gela.Elements.Record_Aggregates.Record_Aggregate_Access) is Comp : constant Gela.Compilations.Compilation_Access := Node.Enclosing_Compilation; IM : constant Gela.Interpretations.Interpretation_Manager_Access := Comp.Context.Interpretation_Manager; TM : constant Gela.Type_Managers.Type_Manager_Access := Comp.Context.Types; package Visiters is type Visiter is new Gela.Interpretations.Down_Visiter with record Result : Element_Flat_Kind := A_Record_Aggregate; end record; overriding procedure On_Expression (Self : in out Visiter; Tipe : Gela.Semantic_Types.Type_View_Index; Kind : Gela.Interpretations.Unknown_Auxiliary_Apply_Kinds; Down : Gela.Interpretations.Interpretation_Index_Array); end Visiters; package body Visiters is overriding procedure On_Expression (Self : in out Visiter; Tipe : Gela.Semantic_Types.Type_View_Index; Kind : Gela.Interpretations.Unknown_Auxiliary_Apply_Kinds; Down : Gela.Interpretations.Interpretation_Index_Array) is pragma Unreferenced (Down, Kind); View : constant Gela.Types.Type_View_Access := TM.Get (Tipe); begin if View.Assigned and then View.Is_Array then Self.Result := A_Positional_Array_Aggregate; end if; end On_Expression; end Visiters; V : Visiters.Visiter; begin IM.Visit (Node.Down, V); Self.Result := V.Result; end Record_Aggregate; overriding procedure Record_Definition (Self : in out Visiter; Node : not null Gela.Elements.Record_Definitions. Record_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Record_Definition; end Record_Definition; overriding procedure Record_Representation_Clause (Self : in out Visiter; Node : not null Gela.Elements.Record_Representation_Clauses. Record_Representation_Clause_Access) is pragma Unreferenced (Node); begin Self.Result := A_Record_Representation_Clause; end Record_Representation_Clause; overriding procedure Record_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Record_Type_Definitions. Record_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Record_Type_Definition; end Record_Type_Definition; overriding procedure Requeue_Statement (Self : in out Visiter; Node : not null Gela.Elements.Requeue_Statements. Requeue_Statement_Access) is use type Gela.Lexical_Types.Token_Count; begin if Node.With_Token = 0 then Self.Result := A_Requeue_Statement; else Self.Result := A_Requeue_Statement_With_Abort; end if; end Requeue_Statement; overriding procedure Scalar_Subtype_Indication (Self : in out Visiter; Node : not null Gela.Elements.Scalar_Subtype_Indications. Scalar_Subtype_Indication_Access) is pragma Unreferenced (Node); begin Self.Result := A_Subtype_Indication; end Scalar_Subtype_Indication; overriding procedure Select_Or_Path (Self : in out Visiter; Node : not null Gela.Elements.Select_Or_Paths.Select_Or_Path_Access) is pragma Unreferenced (Node); begin Self.Result := An_Or_Path; end Select_Or_Path; ------------------------ -- Selected_Component -- ------------------------ overriding procedure Selected_Component (Self : in out Visiter; Node : not null Gela.Elements.Selected_Components. Selected_Component_Access) is pragma Unreferenced (Node); begin Self.Result := A_Selected_Component; end Selected_Component; ------------------------- -- Selected_Identifier -- ------------------------- overriding procedure Selected_Identifier (Self : in out Visiter; Node : not null Gela.Elements.Selected_Identifiers. Selected_Identifier_Access) is pragma Unreferenced (Node); begin Self.Result := A_Selected_Component; end Selected_Identifier; overriding procedure Selective_Accept (Self : in out Visiter; Node : not null Gela.Elements.Selective_Accepts.Selective_Accept_Access) is pragma Unreferenced (Node); begin Self.Result := A_Selective_Accept_Statement; end Selective_Accept; overriding procedure Signed_Integer_Type_Definition (Self : in out Visiter; Node : not null Gela.Elements.Signed_Integer_Type_Definitions. Signed_Integer_Type_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Signed_Integer_Type_Definition; end Signed_Integer_Type_Definition; overriding procedure Simple_Expression_Range (Self : in out Visiter; Node : not null Gela.Elements.Simple_Expression_Ranges. Simple_Expression_Range_Access) is pragma Unreferenced (Node); begin Self.Result := A_Simple_Expression_Range; end Simple_Expression_Range; overriding procedure Simple_Expression_Range_Dr (Self : in out Visiter; Node : not null Gela.Elements.Simple_Expression_Range_Drs. Simple_Expression_Range_Dr_Access) is pragma Unreferenced (Node); begin Self.Result := A_Discrete_Simple_Expression_Range_DR; end Simple_Expression_Range_Dr; overriding procedure Simple_Return_Statement (Self : in out Visiter; Node : not null Gela.Elements.Simple_Return_Statements. Simple_Return_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_Simple_Return_Statement; end Simple_Return_Statement; overriding procedure Single_Protected_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Single_Protected_Declarations. Single_Protected_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Single_Protected_Declaration; end Single_Protected_Declaration; overriding procedure Single_Task_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Single_Task_Declarations. Single_Task_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Single_Task_Declaration; end Single_Task_Declaration; -------------------- -- String_Literal -- -------------------- overriding procedure String_Literal (Self : in out Visiter; Node : not null Gela.Elements.String_Literals.String_Literal_Access) is pragma Unreferenced (Node); begin Self.Result := A_String_Literal; end String_Literal; overriding procedure Subtype_Declaration (Self : in out Visiter; Node : not null Gela.Elements.Subtype_Declarations. Subtype_Declaration_Access) is pragma Unreferenced (Node); begin Self.Result := A_Subtype_Declaration; end Subtype_Declaration; overriding procedure Task_Body (Self : in out Visiter; Node : not null Gela.Elements.Task_Bodies.Task_Body_Access) is pragma Unreferenced (Node); begin Self.Result := A_Task_Body_Declaration; end Task_Body; overriding procedure Task_Body_Stub (Self : in out Visiter; Node : not null Gela.Elements.Task_Body_Stubs.Task_Body_Stub_Access) is pragma Unreferenced (Node); begin Self.Result := A_Task_Body_Stub; end Task_Body_Stub; overriding procedure Task_Definition (Self : in out Visiter; Node : not null Gela.Elements.Task_Definitions.Task_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := A_Task_Definition; end Task_Definition; overriding procedure Terminate_Alternative_Statement (Self : in out Visiter; Node : not null Gela.Elements.Terminate_Alternative_Statements. Terminate_Alternative_Statement_Access) is pragma Unreferenced (Node); begin Self.Result := A_Terminate_Alternative_Statement; end Terminate_Alternative_Statement; overriding procedure Unconstrained_Array_Definition (Self : in out Visiter; Node : not null Gela.Elements.Unconstrained_Array_Definitions. Unconstrained_Array_Definition_Access) is pragma Unreferenced (Node); begin Self.Result := An_Unconstrained_Array_Definition; end Unconstrained_Array_Definition; ------------------------ -- Use_Package_Clause -- ------------------------ overriding procedure Use_Package_Clause (Self : in out Visiter; Node : not null Gela.Elements.Use_Package_Clauses. Use_Package_Clause_Access) is pragma Unreferenced (Node); begin Self.Result := A_Use_Package_Clause; end Use_Package_Clause; overriding procedure Use_Type_Clause (Self : in out Visiter; Node : not null Gela.Elements.Use_Type_Clauses.Use_Type_Clause_Access) is pragma Unreferenced (Node); begin Self.Result := A_Use_Type_Clause; end Use_Type_Clause; overriding procedure Variant (Self : in out Visiter; Node : not null Gela.Elements.Variants.Variant_Access) is pragma Unreferenced (Node); begin Self.Result := A_Variant; end Variant; overriding procedure Variant_Part (Self : in out Visiter; Node : not null Gela.Elements.Variant_Parts.Variant_Part_Access) is pragma Unreferenced (Node); begin Self.Result := A_Variant_Part; end Variant_Part; ----------------- -- With_Clause -- ----------------- overriding procedure With_Clause (Self : in out Visiter; Node : not null Gela.Elements.With_Clauses.With_Clause_Access) is pragma Unreferenced (Node); begin Self.Result := A_With_Clause; end With_Clause; end Asis.Extensions.Flat_Kinds;
reznikmm/matreshka
Ada
4,067
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.Chart_Three_Dimensional_Attributes; package Matreshka.ODF_Chart.Three_Dimensional_Attributes is type Chart_Three_Dimensional_Attribute_Node is new Matreshka.ODF_Chart.Abstract_Chart_Attribute_Node and ODF.DOM.Chart_Three_Dimensional_Attributes.ODF_Chart_Three_Dimensional_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Chart_Three_Dimensional_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Chart_Three_Dimensional_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Chart.Three_Dimensional_Attributes;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
3,121
ads
-- This spec has been automatically generated from STM32F411xx.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.IWDG is pragma Preelaborate; --------------- -- Registers -- --------------- subtype KR_KEY_Field is STM32_SVD.UInt16; -- Key register type KR_Register is record -- Write-only. Key value KEY : KR_KEY_Field := 16#0#; -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for KR_Register use record KEY at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype PR_PR_Field is STM32_SVD.UInt3; -- Prescaler register type PR_Register is record -- Prescaler divider PR : PR_PR_Field := 16#0#; -- unspecified Reserved_3_31 : STM32_SVD.UInt29 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PR_Register use record PR at 0 range 0 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; subtype RLR_RL_Field is STM32_SVD.UInt12; -- Reload register type RLR_Register is record -- Watchdog counter reload value RL : RLR_RL_Field := 16#FFF#; -- unspecified Reserved_12_31 : STM32_SVD.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for RLR_Register use record RL at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype SR_PVU_Field is STM32_SVD.Bit; subtype SR_RVU_Field is STM32_SVD.Bit; -- Status register type SR_Register is record -- Read-only. Watchdog prescaler value update PVU : SR_PVU_Field; -- Read-only. Watchdog counter reload value update RVU : SR_RVU_Field; -- unspecified Reserved_2_31 : STM32_SVD.UInt30; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record PVU at 0 range 0 .. 0; RVU at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Independent watchdog type IWDG_Peripheral is record -- Key register KR : aliased KR_Register; -- Prescaler register PR : aliased PR_Register; -- Reload register RLR : aliased RLR_Register; -- Status register SR : aliased SR_Register; end record with Volatile; for IWDG_Peripheral use record KR at 16#0# range 0 .. 31; PR at 16#4# range 0 .. 31; RLR at 16#8# range 0 .. 31; SR at 16#C# range 0 .. 31; end record; -- Independent watchdog IWDG_Periph : aliased IWDG_Peripheral with Import, Address => System'To_Address (16#40003000#); end STM32_SVD.IWDG;
AdaCore/training_material
Ada
327
ads
with Test_Suite; use Test_Suite; with Test_Suite.Test; package BMP_File_IO.Tests is procedure Test_Get_Square_10x10 (TC : Test_Case_T'Class); package Pkg_Test_Get_Square_10x10 is new Test_Suite.Test (Name => "Get (square 10x10 BMP)", Run_Test => Test_Get_Square_10x10); end BMP_File_IO.Tests;
reznikmm/matreshka
Ada
4,752
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Table_Help_Message_Elements; package Matreshka.ODF_Table.Help_Message_Elements is type Table_Help_Message_Element_Node is new Matreshka.ODF_Table.Abstract_Table_Element_Node and ODF.DOM.Table_Help_Message_Elements.ODF_Table_Help_Message with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Table_Help_Message_Element_Node; overriding function Get_Local_Name (Self : not null access constant Table_Help_Message_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Table_Help_Message_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Table_Help_Message_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Table_Help_Message_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Table.Help_Message_Elements;
yannickmoy/SPARKNaCl
Ada
727
adb
with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.Debug; use SPARKNaCl.Debug; with SPARKNaCl.Hashing; use SPARKNaCl.Hashing; with Interfaces; use Interfaces; procedure Hash is R1 : Bytes_64; -- Case 1: same as NaCl standard test suite M3 : constant String (1 .. 8) := "testing" & ASCII.LF; M4 : Byte_Seq (0 .. 7); -- Case 2: two blocks, with final block >= 112 bytes to cover -- final block padding M5 : constant Byte_Seq (0 .. 240) := (16#AA#, others => 0); begin for I in M4'Range loop M4 (I) := Character'Pos (M3 (Integer (I + 1))); end loop; Hash (R1, M4); DH ("Hash is", R1); -- Functional style interface R1 := Hash (M5); DH ("Hash is", R1); end Hash;
charlie5/lace
Ada
197
ads
with gel.remote.World; package gel_demo_Services -- -- Provides RCI services. -- is pragma remote_call_Interface; function World return gel.remote.World.view; end gel_demo_Services;
reznikmm/matreshka
Ada
4,049
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.Draw_Start_Glue_Point_Attributes; package Matreshka.ODF_Draw.Start_Glue_Point_Attributes is type Draw_Start_Glue_Point_Attribute_Node is new Matreshka.ODF_Draw.Abstract_Draw_Attribute_Node and ODF.DOM.Draw_Start_Glue_Point_Attributes.ODF_Draw_Start_Glue_Point_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Draw_Start_Glue_Point_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Draw_Start_Glue_Point_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Draw.Start_Glue_Point_Attributes;
charlie5/lace
Ada
10,498
adb
with openGL.Shader, openGL.Attribute, openGL.Buffer.general, openGL.Texture, openGL.Tasks, openGL.Errors, GL.lean, GL.Pointers, Interfaces.C.Strings, System.storage_Elements; package body openGL.Geometry.lit_colored_skinned is -- Globals -- vertex_Shader : aliased Shader.item; fragment_Shader : aliased Shader.item; the_Program : aliased openGL.Program.lit.colored_skinned.item; is_Defined : Boolean := False; Name_1 : constant String := "Site"; Name_2 : constant String := "Normal"; Name_3 : constant String := "Color"; Name_4 : constant String := "Shine"; Name_5 : constant String := "bone_Ids"; Name_6 : constant String := "bone_Weights"; use Interfaces; Attribute_1_Name : aliased C.char_array := C.to_C (Name_1); Attribute_2_Name : aliased C.char_array := C.to_C (Name_2); Attribute_3_Name : aliased C.char_array := C.to_C (Name_3); Attribute_4_Name : aliased C.char_array := C.to_C (Name_4); Attribute_5_Name : aliased C.char_array := C.to_C (Name_5); Attribute_6_Name : aliased C.char_array := C.to_C (Name_6); Attribute_1_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_1_Name'Access); Attribute_2_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_2_Name'Access); Attribute_3_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_3_Name'Access); Attribute_4_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_4_Name'Access); Attribute_5_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_5_Name'Access); Attribute_6_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_6_Name'Access); ---------- -- Vertex -- function is_Transparent (Self : in Vertex_array) return Boolean -- TODO: Replace this with the generic (check that all similar functions use the generic). is use type color_Value; begin for Each in Self'Range loop if Self (Each).Color.Alpha /= opaque_Value then return True; end if; end loop; return False; end is_Transparent; --------- -- Forge -- function new_Geometry return Geometry.lit_colored_skinned.view is Self : constant Geometry.lit_colored_skinned.view := new Geometry.lit_colored_skinned.item; begin Self.Program_is (the_Program'Access); return Self; end new_Geometry; procedure define_Program is use Attribute.Forge, GL.lean, GL.Pointers, System.storage_Elements; Sample : Vertex; Attribute_1 : openGL.Attribute.view; Attribute_2 : openGL.Attribute.view; Attribute_3 : openGL.Attribute.view; Attribute_4 : openGL.Attribute.view; Attribute_5 : openGL.Attribute.view; Attribute_6 : openGL.Attribute.view; begin Tasks.check; if is_Defined then raise Error with "The lit_colored_textured_skinned program has already been defined."; end if; is_Defined := True; -- Define the shaders and program. -- vertex_Shader .define (Shader.Vertex, "assets/opengl/shader/lit_colored_skinned.vert"); fragment_Shader.define (Shader.Fragment, "assets/opengl/shader/lit_colored_skinned.frag"); the_Program.define ( vertex_Shader'Access, fragment_Shader'Access); the_Program.enable; Attribute_1 := new_Attribute (Name => Name_1, gl_Location => the_Program.attribute_Location (Name_1), Size => 3, data_Kind => Attribute.GL_FLOAT, Stride => lit_colored_skinned.Vertex'Size / 8, Offset => 0, Normalized => False); Attribute_2 := new_Attribute (Name => Name_2, gl_Location => the_Program.attribute_Location (Name_2), Size => 3, data_Kind => Attribute.GL_FLOAT, Stride => lit_colored_skinned.Vertex'Size / 8, Offset => Sample.Normal (1)'Address - Sample.Site (1)'Address, Normalized => False); Attribute_3 := new_Attribute (Name => Name_3, gl_Location => the_Program.attribute_Location (Name_3), Size => 4, data_Kind => Attribute.GL_UNSIGNED_BYTE, Stride => lit_colored_skinned.Vertex'Size / 8, Offset => Sample.Color.Primary.Red'Address - Sample.Site (1) 'Address, Normalized => True); Attribute_4 := new_Attribute (Name => Name_4, gl_Location => the_Program.attribute_Location (Name_4), Size => 4, data_Kind => Attribute.GL_FLOAT, Stride => lit_colored_skinned.Vertex'Size / 8, Offset => Sample.bone_Ids (1)'Address - Sample.Site (1)'Address, Normalized => False); Attribute_5 := new_Attribute (Name => Name_5, gl_Location => the_Program.attribute_Location (Name_5), Size => 4, data_Kind => Attribute.GL_FLOAT, Stride => lit_colored_skinned.Vertex'Size / 8, Offset => Sample.bone_Ids (1)'Address - Sample.Site (1)'Address, Normalized => False); Attribute_6 := new_Attribute (Name => Name_6, gl_Location => the_Program.attribute_Location (Name_6), Size => 4, data_Kind => Attribute.GL_FLOAT, Stride => lit_colored_skinned.Vertex'Size / 8, Offset => Sample.bone_Weights (1)'Address - Sample.Site (1)'Address, Normalized => False); the_Program.add (Attribute_1); the_Program.add (Attribute_2); the_Program.add (Attribute_3); the_Program.add (Attribute_4); the_Program.add (Attribute_5); the_Program.add (Attribute_6); glBindAttribLocation (program => the_Program.gl_Program, index => the_Program.Attribute (named => Name_1).gl_Location, name => +Attribute_1_Name_ptr); Errors.log; glBindAttribLocation (program => the_Program.gl_Program, index => the_Program.Attribute (named => Name_2).gl_Location, name => +Attribute_2_Name_ptr); Errors.log; glBindAttribLocation (program => the_Program.gl_Program, index => the_Program.Attribute (named => Name_3).gl_Location, name => +Attribute_3_Name_ptr); Errors.log; glBindAttribLocation (program => the_Program.gl_Program, index => the_Program.Attribute (named => Name_4).gl_Location, name => +Attribute_4_Name_ptr); Errors.log; glBindAttribLocation (program => the_Program.gl_Program, index => the_Program.Attribute (named => Name_5).gl_Location, name => +Attribute_5_Name_ptr); Errors.log; glBindAttribLocation (program => the_Program.gl_Program, index => the_Program.Attribute (named => Name_6).gl_Location, name => +Attribute_6_Name_ptr); Errors.log; end define_Program; -------------- -- Attributes -- function Program return openGL.Program.lit.colored_skinned.view is begin return the_Program'Access; end Program; overriding procedure Indices_are (Self : in out Item; Now : in Indices; for_Facia : in Positive) is begin raise Error with "openGL.Geometry.lit_coloured_textured_skinned - 'Indices_are' ~ TODO"; end Indices_are; package openGL_Buffer_of_geometry_Vertices is new Buffer.general (base_Object => Buffer.array_Object, Index => long_Index_t, Element => Vertex, Element_Array => Vertex_array); procedure Vertices_are (Self : in out Item; Now : in Vertex_array) is use openGL_Buffer_of_geometry_Vertices.Forge; begin Self.Vertices := new openGL_Buffer_of_geometry_Vertices.object' (to_Buffer (Now, usage => Buffer.static_Draw)); Self.is_Transparent := Self.is_Transparent or is_Transparent (Now); -- Set the bounds. -- declare function get_Site (Index : in long_Index_t) return Vector_3 is (Now (Index).Site); function bounding_Box is new get_Bounds (long_Index_t, get_Site); begin Self.Bounds_are (bounding_Box (Count => Now'Length)); end; end Vertices_are; overriding procedure enable_Texture (Self : in Item) is begin null; end enable_Texture; end openGL.Geometry.lit_colored_skinned;
reznikmm/matreshka
Ada
3,497
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- SQL Database Access -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 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$ ------------------------------------------------------------------------------ package SQL is pragma Pure; SQL_Error : exception; type Parameter_Directions is (In_Parameter, Out_Parameter, In_Out_Parameter); end SQL;
reznikmm/matreshka
Ada
3,926
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- 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$ ------------------------------------------------------------------------------ limited with League.Objects.Impl; with Matreshka.Internals.Signals; package League.Signals.Emitters is type Emitter (Object : not null access League.Objects.Impl.Object_Impl'Class) is tagged limited private; not overriding function Signal (Self : in out Emitter) return Signal; not overriding procedure Emit (Self : in out Emitter); private type Emitter (Object : not null access League.Objects.Impl.Object_Impl'Class) is limited new Matreshka.Internals.Signals.Abstract_Emitter (Object) with null record; end League.Signals.Emitters;
valik351/completely-unscientific-benchmarks
Ada
935
ads
with Ada.Numerics.Discrete_Random; package Tree is type Node is private; type NodePtr is access Node; type Tree is private; procedure initialize; function hasValue(t: in out Tree; x: Integer) return Boolean; procedure insert(t: in out Tree; x: Integer); procedure erase(t: in out Tree; x: Integer); private function merge(lower, greater: NodePtr) return NodePtr; function merge(lower, equal, greater: NodePtr) return NodePtr; procedure split(orig: NodePtr; lower, greaterOrEqual: in out NodePtr; val: Integer); procedure split(orig: NodePtr; lower, equal, greater: in out NodePtr; val: Integer); procedure make_node(n: out NodePtr; x: Integer); type Tree is record root: NodePtr := null; end record; package Integer_Random is new Ada.Numerics.Discrete_Random(Integer); use Integer_Random; g: Generator; type Node is record left, right: NodePtr; x: Integer := 0; y: Integer := Random(g); end record; end Tree;
kontena/ruby-packer
Ada
3,458
ads
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Text_IO.Modular_IO -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998-2003,2009 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.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic type Num is mod <>; package Terminal_Interface.Curses.Text_IO.Modular_IO is Default_Width : Field := Num'Width; Default_Base : Number_Base := 10; procedure Put (Win : Window; Item : Num; Width : Field := Default_Width; Base : Number_Base := Default_Base); procedure Put (Item : Num; Width : Field := Default_Width; Base : Number_Base := Default_Base); private pragma Inline (Put); end Terminal_Interface.Curses.Text_IO.Modular_IO;
optikos/oasis
Ada
6,857
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Parameter_Specifications; with Program.Elements.Anonymous_Access_To_Procedures; with Program.Element_Visitors; package Program.Nodes.Anonymous_Access_To_Procedures is pragma Preelaborate; type Anonymous_Access_To_Procedure is new Program.Nodes.Node and Program.Elements.Anonymous_Access_To_Procedures .Anonymous_Access_To_Procedure and Program.Elements.Anonymous_Access_To_Procedures .Anonymous_Access_To_Procedure_Text with private; function Create (Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Access_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Protected_Token : Program.Lexical_Elements.Lexical_Element_Access; Procedure_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Parameters : Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access) return Anonymous_Access_To_Procedure; type Implicit_Anonymous_Access_To_Procedure is new Program.Nodes.Node and Program.Elements.Anonymous_Access_To_Procedures .Anonymous_Access_To_Procedure with private; function Create (Parameters : Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Not_Null : Boolean := False; Has_Protected : Boolean := False) return Implicit_Anonymous_Access_To_Procedure with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Anonymous_Access_To_Procedure is abstract new Program.Nodes.Node and Program.Elements.Anonymous_Access_To_Procedures .Anonymous_Access_To_Procedure with record Parameters : Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; end record; procedure Initialize (Self : aliased in out Base_Anonymous_Access_To_Procedure'Class); overriding procedure Visit (Self : not null access Base_Anonymous_Access_To_Procedure; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Parameters (Self : Base_Anonymous_Access_To_Procedure) return Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; overriding function Is_Anonymous_Access_To_Procedure_Element (Self : Base_Anonymous_Access_To_Procedure) return Boolean; overriding function Is_Anonymous_Access_Definition_Element (Self : Base_Anonymous_Access_To_Procedure) return Boolean; overriding function Is_Definition_Element (Self : Base_Anonymous_Access_To_Procedure) return Boolean; type Anonymous_Access_To_Procedure is new Base_Anonymous_Access_To_Procedure and Program.Elements.Anonymous_Access_To_Procedures .Anonymous_Access_To_Procedure_Text with record Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Access_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Protected_Token : Program.Lexical_Elements.Lexical_Element_Access; Procedure_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; end record; overriding function To_Anonymous_Access_To_Procedure_Text (Self : aliased in out Anonymous_Access_To_Procedure) return Program.Elements.Anonymous_Access_To_Procedures .Anonymous_Access_To_Procedure_Text_Access; overriding function Not_Token (Self : Anonymous_Access_To_Procedure) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Null_Token (Self : Anonymous_Access_To_Procedure) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Access_Token (Self : Anonymous_Access_To_Procedure) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Protected_Token (Self : Anonymous_Access_To_Procedure) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Procedure_Token (Self : Anonymous_Access_To_Procedure) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Left_Bracket_Token (Self : Anonymous_Access_To_Procedure) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Right_Bracket_Token (Self : Anonymous_Access_To_Procedure) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Has_Not_Null (Self : Anonymous_Access_To_Procedure) return Boolean; overriding function Has_Protected (Self : Anonymous_Access_To_Procedure) return Boolean; type Implicit_Anonymous_Access_To_Procedure is new Base_Anonymous_Access_To_Procedure with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; Has_Not_Null : Boolean; Has_Protected : Boolean; end record; overriding function To_Anonymous_Access_To_Procedure_Text (Self : aliased in out Implicit_Anonymous_Access_To_Procedure) return Program.Elements.Anonymous_Access_To_Procedures .Anonymous_Access_To_Procedure_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Anonymous_Access_To_Procedure) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Anonymous_Access_To_Procedure) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Anonymous_Access_To_Procedure) return Boolean; overriding function Has_Not_Null (Self : Implicit_Anonymous_Access_To_Procedure) return Boolean; overriding function Has_Protected (Self : Implicit_Anonymous_Access_To_Procedure) return Boolean; end Program.Nodes.Anonymous_Access_To_Procedures;
reznikmm/matreshka
Ada
3,789
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.Presentation_Display_Date_Time_Attributes is pragma Preelaborate; type ODF_Presentation_Display_Date_Time_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Presentation_Display_Date_Time_Attribute_Access is access all ODF_Presentation_Display_Date_Time_Attribute'Class with Storage_Size => 0; end ODF.DOM.Presentation_Display_Date_Time_Attributes;
stcarrez/ada-util
Ada
932
ads
-- -- Copyright (c) 2012 Tero Koskinen <[email protected]> -- -- Permission to use, copy, modify, and distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- with Ada.Strings.Bounded; package Ahven.Long_AStrings is new Ada.Strings.Bounded.Generic_Bounded_Length (Max => Max_Long_String_Len);
optikos/oasis
Ada
4,333
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Declarations; with Program.Lexical_Elements; with Program.Elements.Defining_Names; with Program.Elements.Parameter_Specifications; with Program.Elements.Parenthesized_Expressions; with Program.Elements.Aspect_Specifications; package Program.Elements.Function_Declarations is pragma Pure (Program.Elements.Function_Declarations); type Function_Declaration is limited interface and Program.Elements.Declarations.Declaration; type Function_Declaration_Access is access all Function_Declaration'Class with Storage_Size => 0; not overriding function Name (Self : Function_Declaration) return not null Program.Elements.Defining_Names.Defining_Name_Access is abstract; not overriding function Parameters (Self : Function_Declaration) return Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access is abstract; not overriding function Result_Subtype (Self : Function_Declaration) return not null Program.Elements.Element_Access is abstract; not overriding function Result_Expression (Self : Function_Declaration) return Program.Elements.Parenthesized_Expressions .Parenthesized_Expression_Access is abstract; not overriding function Aspects (Self : Function_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access is abstract; not overriding function Has_Not (Self : Function_Declaration) return Boolean is abstract; not overriding function Has_Overriding (Self : Function_Declaration) return Boolean is abstract; not overriding function Has_Abstract (Self : Function_Declaration) return Boolean is abstract; not overriding function Has_Not_Null (Self : Function_Declaration) return Boolean is abstract; type Function_Declaration_Text is limited interface; type Function_Declaration_Text_Access is access all Function_Declaration_Text'Class with Storage_Size => 0; not overriding function To_Function_Declaration_Text (Self : aliased in out Function_Declaration) return Function_Declaration_Text_Access is abstract; not overriding function Not_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Overriding_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Function_Token (Self : Function_Declaration_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Left_Bracket_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Right_Bracket_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Return_Token (Self : Function_Declaration_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Not_Token_2 (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Null_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Is_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Abstract_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function With_Token (Self : Function_Declaration_Text) return Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Semicolon_Token (Self : Function_Declaration_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Function_Declarations;
jhumphry/PRNG_Zoo
Ada
2,575
ads
-- -- PRNG Zoo -- Copyright (c) 2014 - 2018, James Humphry -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -- PERFORMANCE OF THIS SOFTWARE. package PRNG_Zoo.xoroshiro is type xoroshiro128 is abstract new PRNG_64Only with private; procedure Reset(G: in out xoroshiro128; S: in U64); -- Suggested for a 64 bit generator in Blackman and Vigna 2017 -- using parameters (a=24, b=16, c=37) in preference to the parameters -- (a=55, b=14, c=37) used in an early version proposed by B&V. type xoroshiro128_plus is new xoroshiro128 with private; function Strength(G: in xoroshiro128_plus) return PRNG_Strength is (Medium); function Constructor(Params : not null access PRNG_Parameters'Class) return xoroshiro128_plus; function Generate(G: in out xoroshiro128_plus) return U64 with inline; -- Suggested for a 64 bit generator in Blackman and Vigna 2017 type xoroshiro128_star_star is new xoroshiro128 with private; function Strength(G: in xoroshiro128_star_star) return PRNG_Strength is (High); function Constructor(Params : not null access PRNG_Parameters'Class) return xoroshiro128_star_star; function Generate(G: in out xoroshiro128_star_star) return U64 with inline; private type xoroshiro128 is abstract new PRNG_64Only with record s0, s1 : U64 ; end record; type xoroshiro128_plus is new xoroshiro128 with null record; function Constructor(Params : not null access PRNG_Parameters'Class) return xoroshiro128_plus is (xoroshiro128_plus'(xoroshiro128 with others => <>)); type xoroshiro128_star_star is new xoroshiro128 with null record; function Constructor(Params : not null access PRNG_Parameters'Class) return xoroshiro128_star_star is (xoroshiro128_star_star'(xoroshiro128 with others => <>)); end PRNG_Zoo.xoroshiro;
onox/orka
Ada
2,432
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2022 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. generic package Orka.Numerics.Kalman.UKF is pragma Preelaborate; use type Tensors.Tensor_Axis; use type Tensors.Element_Type; -- This package implements the state estimation form with additive noise -- of the Unscented Kalman Filter, Algorithm 8 from [1] -- -- (See package Orka.Numerics.Kalman.SPKF for reference [1]) function Weights (N : Positive; A, B, K : Tensors.Element_Type) return Weights_Type with Pre => A in 0.0 .. 1.0 and B >= 0.0 and K >= 0.0; -- Return a set of weights for the sigma points for the UKF -- -- A should be small to avoid non-local effects. B is used to reduce -- higher-order errors. For a Gaussian, use B = 2 and K = 3 - N. function Create_Filter (X : Vector; P, Q, R : Matrix; Weights : Weights_Type) return Filter with Pre => X.Axes = 1 and X.Rows = P.Rows and X.Rows = Weights.N and Q.Is_Square and P.Shape = Q.Shape and R.Is_Square, Post => Create_Filter'Result.Dimension_X = Q.Rows and Create_Filter'Result.Dimension_Z = R.Rows and Create_Filter'Result.State = X; function Create_Filter (Q, R : Matrix; Weights : Weights_Type) return Filter is (Create_Filter (X => Zeros (Weights.N), P => Identity (Weights.N), Q => Q, R => R, Weights => Weights)); procedure Predict_Update (Object : in out Filter; F : not null access function (Point : Vector; DT : Orka.Float_64) return Vector; H : not null access function (Point : Vector) return Vector; DT : Duration; Measurement : Vector); end Orka.Numerics.Kalman.UKF;
charlie5/lace
Ada
9,617
ads
with physics.Space, physics.Model; private with bullet_c, bullet_c.Pointers, bullet_Physics.Object, physics.Shape, physics.Object, physics.Joint.ball, physics.Joint.slider, physics.Joint.hinge, physics.Joint.cone_twist, physics.Joint.DoF6, ada.Containers.hashed_Maps; package bullet_Physics.Space -- -- Provides a Bullet3D implementation of a physical space. -- is type Item is new physics.Space.item with private; type View is access all Item'Class; -- TODO: Place this in a nested Forge package. function to_Space return Item; overriding function manifold_Count (Self : in Item) return Natural; overriding function Manifold (Self : access Item; Index : in Positive) return physics.space.a_Manifold; private function Hash (the_C_Object : in bullet_c.Pointers.Object_Pointer) return ada.Containers.Hash_type; use type bullet_c.Pointers.Object_pointer; use type bullet_Physics.Object.view; package c_Object_Maps_of_Object is new ada.Containers.hashed_Maps (Key_type => bullet_c.Pointers.Object_Pointer, Element_type => bullet_Physics.Object.view, Hash => Hash, equivalent_Keys => "=", "=" => "="); type Item is new physics.Space.item with record C : bullet_c.Pointers.Space_Pointer; object_Map : c_Object_Maps_of_Object.Map; end record; use Math; ---------------- --- Joint Cursor -- type joint_Cursor is new physics.Space.joint_Cursor with null record; overriding procedure next (Cursor : in out joint_Cursor); overriding function has_Element (Cursor : in joint_Cursor) return Boolean; overriding function Element (Cursor : in joint_Cursor) return physics.Joint.view; overriding function first_Joint (Self : in Item) return physics.Space.joint_Cursor'Class; ---------- --- Forge -- overriding procedure destruct (Self : in out Item); --------- --- Shape -- overriding function new_Shape (Self : access Item; Model : in physics.Model.view) return physics.Shape.view; overriding function new_sphere_Shape (Self : access Item; Radius : in Real := 0.5) return physics.Shape.view; overriding function new_box_Shape (Self : access Item; half_Extents : in Vector_3 := [0.5, 0.5, 0.5]) return physics.Shape.view; overriding function new_capsule_Shape (Self : access Item; Radius : in Real := 0.5; Height : in Real) return physics.Shape.view; overriding function new_cone_Shape (Self : access Item; Radius : in Real := 0.5; Height : in Real := 1.0) return physics.Shape.view; overriding function new_cylinder_Shape (Self : access Item; half_Extents : in Vector_3 := [0.5, 0.5, 0.5]) return physics.Shape.view; overriding function new_heightfield_Shape (Self : access Item; Heightfield : in out physics.Heightfield; Scale : in Vector_3) return physics.Shape.view; overriding function new_multisphere_Shape (Self : access Item; Sites : in physics.Vector_3_array; Radii : in Vector) return physics.Shape.view; overriding function new_plane_Shape (Self : access Item; Normal : in Vector_3 := [0.0, 1.0, 0.0]; Offset : in Real := 0.0) return physics.Shape.view; overriding function new_convex_hull_Shape (Self : access Item; Points : in physics.Vector_3_array) return physics.Shape.view; overriding function new_mesh_Shape (Self : access Item; Points : access Physics.Geometry_3D.a_Model) return physics.Shape.view; overriding function new_circle_Shape (Self : access Item; Radius : in Real := 0.5) return physics.Shape.view; overriding function new_polygon_Shape (Self : access Item; Vertices : in physics.Space.polygon_Vertices) return physics.Shape.view; ---------- --- Object -- overriding function new_Object (Self : access Item; of_Shape : in physics.Shape .view; of_Mass : in Real; Friction : in Real; Restitution : in Real; at_Site : in Vector_3; is_Kinematic : in Boolean) return physics.Object.view; overriding function object_Count (Self : in Item) return Natural; --------- --- Joint -- overriding function new_hinge_Joint (Self : access Item; Object_A, Object_B : in physics.Object.view; Anchor_in_A, Anchor_in_B : in Vector_3; pivot_Axis : in Vector_3; low_Limit, high_Limit : in Real; collide_Connected : in Boolean) return physics.Joint.hinge.view; overriding function new_hinge_Joint (Self : access Item; Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4; low_Limit, high_Limit : in Real; collide_Connected : in Boolean) return physics.Joint.hinge.view; overriding function new_hinge_Joint (Self : access Item; Object_A : in physics.Object.view; Frame_A : in Matrix_4x4) return physics.Joint.hinge.view; overriding function new_DoF6_Joint (Self : access Item; Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4) return physics.Joint.DoF6.view; overriding function new_ball_Joint (Self : access Item; Object_A, Object_B : in physics.Object.view; Pivot_in_A, Pivot_in_B : in Vector_3) return physics.Joint.ball.view; overriding function new_slider_Joint (Self : access Item; Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4) return physics.Joint.slider.view; overriding function new_cone_twist_Joint (Self : access Item; Object_A, Object_B : in physics.Object.view; Frame_A, Frame_B : in Matrix_4x4) return physics.Joint.cone_twist.view; --------------- --- Operations -- overriding procedure add (Self : in out Item; Object : in physics.Object.view); overriding procedure rid (Self : in out Item; Object : in physics.Object.view); overriding function cast_Ray (Self : access Item; From, To : in Vector_3) return physics.Space.ray_Collision; overriding procedure evolve (Self : in out Item; By : in Duration); overriding function Gravity (Self : in Item) return Vector_3; overriding procedure Gravity_is (Self : in out Item; Now : in Vector_3); overriding procedure add (Self : in out Item; Joint : in physics.Joint.view); overriding procedure rid (Self : in out Item; Joint : in physics.Joint.view); overriding procedure update_Bounds (Self : in out Item; of_Obect : in physics.Object.view); overriding procedure set_Joint_local_Anchor (Self : in out Item; the_Joint : in physics.Joint.view; is_Anchor_A : in Boolean; local_Anchor : in Vector_3); end bullet_Physics.Space;
reznikmm/matreshka
Ada
3,749
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$ ------------------------------------------------------------------------------ package Matreshka.ODF_Attributes.FO.Margin_Top is type FO_Margin_Top_Node is new Matreshka.ODF_Attributes.FO.FO_Node_Base with null record; type FO_Margin_Top_Access is access all FO_Margin_Top_Node'Class; overriding function Get_Local_Name (Self : not null access constant FO_Margin_Top_Node) return League.Strings.Universal_String; end Matreshka.ODF_Attributes.FO.Margin_Top;
kraileth/ravensource
Ada
812
adb
--- tools/configure/configure-tests-sqlite3.adb.orig 2021-08-30 10:37:26 UTC +++ tools/configure/configure-tests-sqlite3.adb @@ -87,7 +87,7 @@ package body Configure.Tests.SQLite3 is (SQLite3_Library_Options, +"""-L" & Self.Switches.Libdir - & """, ""-lsqlite3"""); + & """, ""-Lsqlite3"", ""-Wl,-rpath,@PREFIX@/lib"""); Self.Report_Status ("yes (command line)"); @@ -126,6 +126,7 @@ package body Configure.Tests.SQLite3 is Append (Opts, '"'); end loop; + Append (Opts, ", ""-Wl,-rpath,@PREFIX@/lib"""); Substitutions.Insert (SQLite3_Library_Options, Opts); Self.Report_Status (+Opts);
AaronC98/PlaneSystem
Ada
4,024
ads
------------------------------------------------------------------------------ -- Ada Web Server -- -- -- -- Copyright (C) 2007-2016, 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/>. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ------------------------------------------------------------------------------ -- An ready-to-use implementation of the stream API where the stream content -- is read from a pipe. with GNAT.OS_Lib; private with Ada.Strings.Unbounded; private with GNAT.Expect; package AWS.Resources.Streams.Pipe is use GNAT; type Stream_Type is new Streams.Stream_Type with private; type On_Error_Callback is access procedure (Status : Integer; Error : String); procedure Open (Pipe : out Stream_Type; Command : String; Args : OS_Lib.Argument_List; Timeout : Integer := 10_000; On_Error : On_Error_Callback := null); -- Open the pipe and connect it to the given command's output. Args are -- passed to the command. Timeout is given in milliseconds and corresponds -- to the time waiting for output data before timeout. This timeout must be -- adjusted to be compatible to the output activity of the Command process. overriding function End_Of_File (Resource : Stream_Type) return Boolean; overriding procedure Read (Resource : in out Stream_Type; Buffer : out Stream_Element_Array; Last : out Stream_Element_Offset); overriding procedure Close (Resource : in out Stream_Type); overriding procedure Reset (Resource : in out Stream_Type) is null; -- Does nothing as not supported on pipe streams overriding procedure Set_Index (Resource : in out Stream_Type; To : Stream_Element_Offset) is null; -- Does nothing as not supported on pipe streams private use Ada.Strings.Unbounded; type Stream_Type is new Streams.Stream_Type with record Pid : Expect.Process_Descriptor; Timeout : Integer; EOF : Boolean; Buffer : Unbounded_String; On_Error : On_Error_Callback; end record; end AWS.Resources.Streams.Pipe;
charlie5/cBound
Ada
1,572
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_destroy_subwindows_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; pad0 : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; window : aliased xcb.xcb_window_t; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_destroy_subwindows_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_destroy_subwindows_request_t.Item, Element_Array => xcb.xcb_destroy_subwindows_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_destroy_subwindows_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_destroy_subwindows_request_t.Pointer, Element_Array => xcb.xcb_destroy_subwindows_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_destroy_subwindows_request_t;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
148
ads
package STM32GD.Board_Variant is TX_PA_Boost : constant Boolean := False; Output_Power_dBm : constant Integer := 13; end STM32GD.Board_Variant;
reznikmm/matreshka
Ada
6,908
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_Presentation.Show_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Presentation_Show_Element_Node is begin return Self : Presentation_Show_Element_Node do Matreshka.ODF_Presentation.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Presentation_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Presentation_Show_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Presentation_Show (ODF.DOM.Presentation_Show_Elements.ODF_Presentation_Show_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Presentation_Show_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Show_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Presentation_Show_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Presentation_Show (ODF.DOM.Presentation_Show_Elements.ODF_Presentation_Show_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Presentation_Show_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Presentation_Show (Visitor, ODF.DOM.Presentation_Show_Elements.ODF_Presentation_Show_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Presentation_URI, Matreshka.ODF_String_Constants.Show_Element, Presentation_Show_Element_Node'Tag); end Matreshka.ODF_Presentation.Show_Elements;
reznikmm/matreshka
Ada
4,363
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ limited with AMF.UML.Literal_Specifications; package AMF.Utp.Literal_Any_Or_Nulls is pragma Preelaborate; type Utp_Literal_Any_Or_Null is limited interface; type Utp_Literal_Any_Or_Null_Access is access all Utp_Literal_Any_Or_Null'Class; for Utp_Literal_Any_Or_Null_Access'Storage_Size use 0; not overriding function Get_Base_Literal_Specification (Self : not null access constant Utp_Literal_Any_Or_Null) return AMF.UML.Literal_Specifications.UML_Literal_Specification_Access is abstract; -- Getter of LiteralAnyOrNull::base_LiteralSpecification. -- not overriding procedure Set_Base_Literal_Specification (Self : not null access Utp_Literal_Any_Or_Null; To : AMF.UML.Literal_Specifications.UML_Literal_Specification_Access) is abstract; -- Setter of LiteralAnyOrNull::base_LiteralSpecification. -- end AMF.Utp.Literal_Any_Or_Nulls;
alex-87/ConstraintEngine
Ada
1,006
adb
with Ada.Integer_Text_IO, Ada.Text_IO, Constraint_Engine; use Ada.Integer_Text_IO, Ada.Text_IO; procedure Example is package Test_Engine renames Constraint_Engine; use Test_Engine; P : Type_Problem; S : Var_Vector.Vector; begin P.Add_Var(Low_Interval => 0, Top_Interval => 400); P.Add_Var(Low_Interval => 0, Top_Interval => 500); P.Add_Constraint_Var_Multiple(V_All_Position => (1, 2), Rel => IS_INEQUAL); P.Add_Constraint_Var(V1_Position => 1, Rel => IS_MORE, V2_Position => 2); P.Add_Constraint_Int(V1_Position => 1, Rel => IS_MORE, V => 150); P := P.Find_Solution; S := P.Get_Var; Put("Solution : "); for Cursor in S.First_Index .. S.Last_Index loop Put( Integer'Image(S(Cursor).Curr_Solution) & ", "); end loop; New_Line; end Example;
michalkonecny/polypaver
Ada
968
adb
-- This file cannot be processed by the SPARK Examiner. with Ada.Numerics, Ada.Numerics.Elementary_Functions; package body PP_F_Rounded is function Plus (Prec : Integer; X,Y : Float) return Float is begin return X+Y; end Plus; function Minus (Prec : Integer; X,Y : Float) return Float is begin return X-Y; end Minus; function Multiply (Prec : Integer; X,Y : Float) return Float is begin return X*Y; end Multiply; function Divide (Prec : Integer; X,Y : Float) return Float is begin return X/Y; end Divide; function Pi(Prec : Integer) return Float is begin return Ada.Numerics.Pi; end Pi; function Sqrt (Prec : Integer; X : Float) return Float is begin return Ada.Numerics.Elementary_Functions.Sqrt(X); end Sqrt; function Exp (Prec : Integer; X : Float) return Float is begin return Ada.Numerics.Elementary_Functions.Exp(X); end Exp; end PP_F_Rounded;
reznikmm/matreshka
Ada
3,739
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.Draw_Start_Intensity_Attributes is pragma Preelaborate; type ODF_Draw_Start_Intensity_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Draw_Start_Intensity_Attribute_Access is access all ODF_Draw_Start_Intensity_Attribute'Class with Storage_Size => 0; end ODF.DOM.Draw_Start_Intensity_Attributes;
charlie5/lace
Ada
5,783
adb
with openGL.Primitive.indexed, openGL.Geometry.colored; package body openGL.Model.box.colored is --------- --- Forge -- function new_Box (Size : in Vector_3; Faces : in colored.Faces) return View is Self : constant View := new Item; begin Self.Faces := Faces; Self.Size := Size; return Self; end new_Box; -------------- --- Attributes -- overriding function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; Fonts : in Font.font_id_Map_of_font) return Geometry.views is pragma unreferenced (Textures, Fonts); use Geometry; the_Sites : constant box.Sites := Self.vertex_Sites; the_Indices : aliased constant Indices := [1, 2, 3, 4]; function new_Face (Vertices : access Geometry.colored.Vertex_array) return Geometry.colored.view is use Geometry.colored, Primitive; the_Geometry : constant Geometry.colored .view := Geometry.colored.new_Geometry; the_Primitive : constant Primitive.indexed.view := Primitive.indexed.new_Primitive (triangle_Fan, the_Indices); begin the_Geometry.Vertices_are (Vertices.all); the_Geometry.add (Primitive.view (the_Primitive)); the_Geometry.is_Transparent (now => False); return the_Geometry; end new_Face; front_Face : Geometry.colored.view; rear_Face : Geometry.colored.view; upper_Face : Geometry.colored.view; lower_Face : Geometry.colored.view; left_Face : Geometry.colored.view; right_Face : Geometry.colored.view; begin -- Front -- declare the_Vertices : aliased Geometry.colored.Vertex_array := [1 => (Site => the_Sites ( Left_Lower_Front), Color => +Self.Faces (Front).Colors (1)), 2 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Front).Colors (2)), 3 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Front).Colors (3)), 4 => (Site => the_Sites ( Left_Upper_Front), Color => +Self.Faces (Front).Colors (4))]; begin front_Face := new_Face (Vertices => the_Vertices'Access); end; -- Rear -- declare the_Vertices : aliased Geometry.colored.Vertex_array := [1 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Rear).Colors (1)), 2 => (Site => the_Sites ( Left_Lower_Rear), Color => +Self.Faces (Rear).Colors (2)), 3 => (Site => the_Sites ( Left_Upper_Rear), Color => +Self.Faces (Rear).Colors (3)), 4 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Rear).Colors (4))]; begin rear_Face := new_Face (Vertices => the_Vertices'Access); end; -- Upper -- declare the_Vertices : aliased Geometry.colored.Vertex_array := [1 => (Site => the_Sites ( Left_Upper_Front), Color => +Self.Faces (Upper).Colors (1)), 2 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Upper).Colors (2)), 3 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Upper).Colors (3)), 4 => (Site => the_Sites ( Left_Upper_Rear), Color => +Self.Faces (Upper).Colors (4))]; begin upper_Face := new_Face (Vertices => the_Vertices'Access); end; -- Lower -- declare the_Vertices : aliased Geometry.colored.Vertex_array := [1 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Lower).Colors (1)), 2 => (Site => the_Sites ( Left_Lower_Front), Color => +Self.Faces (Lower).Colors (2)), 3 => (Site => the_Sites ( Left_Lower_Rear), Color => +Self.Faces (Lower).Colors (3)), 4 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Lower).Colors (4))]; begin lower_Face := new_Face (Vertices => the_Vertices'Access); end; -- Left -- declare the_Vertices : aliased Geometry.colored.Vertex_array := [1 => (Site => the_Sites (Left_Lower_Rear), Color => +Self.Faces (Left).Colors (1)), 2 => (Site => the_Sites (Left_Lower_Front), Color => +Self.Faces (Left).Colors (2)), 3 => (Site => the_Sites (Left_Upper_Front), Color => +Self.Faces (Left).Colors (3)), 4 => (Site => the_Sites (Left_Upper_Rear), Color => +Self.Faces (Left).Colors (4))]; begin left_Face := new_Face (Vertices => the_Vertices'Access); end; -- Right -- declare the_Vertices : aliased Geometry.colored.Vertex_array := [1 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Right).Colors (1)), 2 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Right).Colors (2)), 3 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Right).Colors (3)), 4 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Right).Colors (4))]; begin right_Face := new_Face (Vertices => the_Vertices'Access); end; return [Geometry.view (front_Face), Geometry.view ( rear_Face), Geometry.view (upper_Face), Geometry.view (lower_Face), Geometry.view ( left_Face), Geometry.view (right_Face)]; end to_GL_Geometries; end openGL.Model.box.colored;
reznikmm/matreshka
Ada
10,969
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Testsuite Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-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 Ada.Wide_Wide_Text_IO; with Ada.Unchecked_Deallocation; with League.Strings; with League.Text_Codecs; with XML.SAX.Simple_Readers; with XML.SAX.String_Input_Sources; with Web_Services.SOAP.Message_Decoders; with Web_Services.SOAP.Message_Encoders; with Web_Services.SOAP.Messages; with Test_248_Decoders; procedure Test_248 is procedure Do_Test (Request : Wide_Wide_String; Reply : Wide_Wide_String); ------------- -- Do_Test -- ------------- procedure Do_Test (Request : Wide_Wide_String; Reply : Wide_Wide_String) is use type League.Strings.Universal_String; Source : aliased XML.SAX.String_Input_Sources.String_Input_Source; Decoder : aliased Web_Services.SOAP.Message_Decoders.SOAP_Message_Decoder; Reader : aliased XML.SAX.Simple_Readers.Simple_Reader; Encoder : Web_Services.SOAP.Message_Encoders.SOAP_Message_Encoder; Codec : League.Text_Codecs.Text_Codec := League.Text_Codecs.Codec (League.Strings.To_Universal_String ("utf-8")); Message : Web_Services.SOAP.Messages.SOAP_Message_Access; begin Source.Set_String (League.Strings.To_Universal_String (Request)); Reader.Set_Content_Handler (Decoder'Unchecked_Access); Reader.Set_Error_Handler (Decoder'Unchecked_Access); Reader.Parse (Source'Unchecked_Access); if Decoder.Success then raise Program_Error; end if; Message := Decoder.Message; if Codec.Decode (Encoder.Encode (Message.all).To_Stream_Element_Array) /= League.Strings.To_Universal_String (Reply) then Ada.Wide_Wide_Text_IO.Put_Line (Codec.Decode (Encoder.Encode (Message.all).To_Stream_Element_Array).To_Wide_Wide_String); raise Program_Error; end if; Web_Services.SOAP.Messages.Free (Message); end Do_Test; begin -- Empty string, XML reader must report fatal error. Do_Test ("", "<?xml version='1.0'?>" & "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'>" & "<env:Body>" & "<env:Fault>" & "<env:Code>" & "<env:Value>env:Sender</env:Value>" & "</env:Code>" & "<env:Reason>" & "<env:Text xml:lang='en-US'>XML error: syntax error</env:Text>" & "</env:Reason>" & "</env:Fault>" & "</env:Body>" & "</env:Envelope>"); -- Not wellformed XML. Do_Test ("<?xml version='1.0'?>" & "<SOAP-ENV:Envelope" & " xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'>" & "<SOAP-ENV:Body>" & "</SOAP-ENV:Envelope>", "<?xml version='1.0'?>" & "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'>" & "<env:Body>" & "<env:Fault>" & "<env:Code>" & "<env:Value>env:Sender</env:Value>" & "</env:Code>" & "<env:Reason>" & "<env:Text xml:lang='en-US'>" & "XML error: [3 WFC: Element Type Match] end tag name must match" & " start tag name" & "</env:Text>" & "</env:Reason>" & "</env:Fault>" & "</env:Body>" & "</env:Envelope>"); -- Body decoder for namespace of child element of SOAP:Body element was not -- registered. Do_Test ("<?xml version='1.0'?>" & "<SOAP-ENV:Envelope" & " xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'" & " xmlns:ns1='http://www.example.com/'>" & "<SOAP-ENV:Body>" & "<ns1:Operation/>" & "</SOAP-ENV:Body>" & "</SOAP-ENV:Envelope>", "<?xml version='1.0'?>" & "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'>" & "<env:Body>" & "<env:Fault>" & "<env:Code>" & "<env:Value>env:Sender</env:Value>" & "</env:Code>" & "<env:Reason>" & "<env:Text xml:lang='en-US'>" & "Unknown namespace URI 'http://www.example.com/'" & " of the child element of SOAP:Body" & "</env:Text>" & "</env:Reason>" & "</env:Fault>" & "</env:Body>" & "</env:Envelope>"); -- Error is reported by body decoder (start of root element). Do_Test ("<?xml version='1.0'?>" & "<SOAP-ENV:Envelope" & " xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'" & " xmlns:ns1='http://matreshka.forge.ada-ru.org/'>" & "<SOAP-ENV:Body>" & "<ns1:Error/>" & "</SOAP-ENV:Body>" & "</SOAP-ENV:Envelope>", "<?xml version='1.0'?>" & "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'>" & "<env:Body>" & "<env:Fault>" & "<env:Code>" & "<env:Value>env:Sender</env:Value>" & "</env:Code>" & "<env:Reason>" & "<env:Text xml:lang='en-US'>" & "Message body decoder reports error" & "</env:Text>" & "</env:Reason>" & "</env:Fault>" & "</env:Body>" & "</env:Envelope>"); -- Error is reported by body decoder (start of child element). Do_Test ("<?xml version='1.0'?>" & "<SOAP-ENV:Envelope" & " xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'" & " xmlns:ns1='http://matreshka.forge.ada-ru.org/'>" & "<SOAP-ENV:Body>" & "<ns1:Message>" & "<ns1:Error/>" & "</ns1:Message>" & "</SOAP-ENV:Body>" & "</SOAP-ENV:Envelope>", "<?xml version='1.0'?>" & "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'>" & "<env:Body>" & "<env:Fault>" & "<env:Code>" & "<env:Value>env:Sender</env:Value>" & "</env:Code>" & "<env:Reason>" & "<env:Text xml:lang='en-US'>" & "Message body decoder reports error" & "</env:Text>" & "</env:Reason>" & "</env:Fault>" & "</env:Body>" & "</env:Envelope>"); -- Error is reported by body decoder (end of element). Do_Test ("<?xml version='1.0'?>" & "<SOAP-ENV:Envelope" & " xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'" & " xmlns:ns1='http://matreshka.forge.ada-ru.org/'>" & "<SOAP-ENV:Body>" & "<ns1:EndError/>" & "</SOAP-ENV:Body>" & "</SOAP-ENV:Envelope>", "<?xml version='1.0'?>" & "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'>" & "<env:Body>" & "<env:Fault>" & "<env:Code>" & "<env:Value>env:Sender</env:Value>" & "</env:Code>" & "<env:Reason>" & "<env:Text xml:lang='en-US'>" & "Message body decoder reports error" & "</env:Text>" & "</env:Reason>" & "</env:Fault>" & "</env:Body>" & "</env:Envelope>"); -- Error is reported by body decoder (character data). Do_Test ("<?xml version='1.0'?>" & "<SOAP-ENV:Envelope" & " xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'" & " xmlns:ns1='http://matreshka.forge.ada-ru.org/'>" & "<SOAP-ENV:Body>" & "<ns1:Message>Error</ns1:Message>" & "</SOAP-ENV:Body>" & "</SOAP-ENV:Envelope>", "<?xml version='1.0'?>" & "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'>" & "<env:Body>" & "<env:Fault>" & "<env:Code>" & "<env:Value>env:Sender</env:Value>" & "</env:Code>" & "<env:Reason>" & "<env:Text xml:lang='en-US'>" & "Message body decoder reports error" & "</env:Text>" & "</env:Reason>" & "</env:Fault>" & "</env:Body>" & "</env:Envelope>"); end Test_248;
zhmu/ananas
Ada
3,908
ads
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P R E P C O M P -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package stores all preprocessing data for the compiler with Namet; use Namet; with Types; use Types; package Prepcomp is procedure Add_Dependency (S : Source_File_Index); -- Add a dependency on a non-source file. This is used internally for the -- preprocessing data file and the preprocessing definition file, and also -- externally for non-temporary configuration pragmas files. procedure Add_Dependencies; -- Add dependencies on the preprocessing data file and the preprocessing -- definition files, if any, and the non-temporary configuration pragmas -- files, if any. procedure Check_Symbols; -- Check if there are preprocessing symbols on the command line and set -- preprocessing if there are some: all files are preprocessed with these -- symbols. This procedure should not be called if there is a preprocessing -- data file specified on the command line. Instead a call should be made -- to Parse_Preprocessing_Data_File. procedure Parse_Preprocessing_Data_File (N : File_Name_Type); -- Parse a preprocessing data file, specified with a -gnatep= switch procedure Prepare_To_Preprocess (Source : File_Name_Type; Preprocessing_Needed : out Boolean); -- Prepare, if necessary, the preprocessor for a source file. If the source -- file needs to be preprocessed, Preprocessing_Needed is set to True. -- Otherwise, Preprocessing_Needed is set to False and no preprocessing -- needs to be done. procedure Process_Command_Line_Symbol_Definitions; -- Check symbol definitions that have been added by calls to procedure -- Add_Symbol_Definition and stored as pointers to string, and put them in -- a table. The reason the definitions were stored as pointer to strings is -- that the name table is not yest initialized when we process the command -- line switches. These symbol definitions will be later used in -- the call to Prepare_To_Preprocess. end Prepcomp;
stcarrez/ada-util
Ada
5,077
adb
----------------------------------------------------------------------- -- util-beans-objects-readers -- Datasets -- Copyright (C) 2017, 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. ----------------------------------------------------------------------- package body Util.Beans.Objects.Readers is use type Maps.Map_Bean_Access; use type Vectors.Vector_Bean_Access; -- Start a document. overriding procedure Start_Document (Handler : in out Reader) is begin Object_Stack.Clear (Handler.Context); end Start_Document; -- ----------------------- -- Start a new object associated with the given name. This is called when -- the '{' is reached. The reader must be updated so that the next -- <b>Set_Member</b> procedure will associate the name/value pair on the -- new object. -- ----------------------- overriding procedure Start_Object (Handler : in out Reader; Name : in String; Logger : in out Util.Log.Logging'Class) is pragma Unreferenced (Logger); Current : constant Object_Context_Access := Object_Stack.Current (Handler.Context); Next : Object_Context_Access; begin Object_Stack.Push (Handler.Context); Next := Object_Stack.Current (Handler.Context); Next.Map := new Maps.Map_Bean; Next.List := null; if Current = null then Handler.Root := To_Object (Next.Map, DYNAMIC); elsif Current.Map /= null then Current.Map.Include (Name, To_Object (Next.Map, DYNAMIC)); else Current.List.Append (To_Object (Next.Map, DYNAMIC)); end if; end Start_Object; -- ----------------------- -- Finish an object associated with the given name. The reader must be -- updated to be associated with the previous object. -- ----------------------- overriding procedure Finish_Object (Handler : in out Reader; Name : in String; Logger : in out Util.Log.Logging'Class) is pragma Unreferenced (Name, Logger); begin Object_Stack.Pop (Handler.Context); end Finish_Object; overriding procedure Start_Array (Handler : in out Reader; Name : in String; Logger : in out Util.Log.Logging'Class) is pragma Unreferenced (Logger); Current : constant Object_Context_Access := Object_Stack.Current (Handler.Context); Next : Object_Context_Access; begin Object_Stack.Push (Handler.Context); Next := Object_Stack.Current (Handler.Context); Next.List := new Vectors.Vector_Bean; Next.Map := null; if Current = null then Handler.Root := To_Object (Next.List, DYNAMIC); elsif Current.Map /= null then Current.Map.Include (Name, To_Object (Next.List, DYNAMIC)); else Current.List.Append (To_Object (Next.List, DYNAMIC)); end if; end Start_Array; overriding procedure Finish_Array (Handler : in out Reader; Name : in String; Count : in Natural; Logger : in out Util.Log.Logging'Class) is pragma Unreferenced (Name, Count, Logger); begin Object_Stack.Pop (Handler.Context); end Finish_Array; -- ----------------------- -- Set the name/value pair on the current object. For each active mapping, -- find whether a rule matches our name and execute it. -- ----------------------- overriding procedure Set_Member (Handler : in out Reader; Name : in String; Value : in Util.Beans.Objects.Object; Logger : in out Util.Log.Logging'Class; Attribute : in Boolean := False) is pragma Unreferenced (Logger, Attribute); Current : constant Object_Context_Access := Object_Stack.Current (Handler.Context); begin if Current = null then Handler.Root := Value; elsif Current.Map /= null then Current.Map.Set_Value (Name, Value); else Current.List.Append (Value); end if; end Set_Member; -- ----------------------- -- Get the root object. -- ----------------------- function Get_Root (Handler : in Reader) return Object is begin return Handler.Root; end Get_Root; end Util.Beans.Objects.Readers;
AdaCore/libadalang
Ada
30
adb
package body Pkg is end Pkg;
reznikmm/matreshka
Ada
4,081
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.Text_Use_Soft_Page_Breaks_Attributes; package Matreshka.ODF_Text.Use_Soft_Page_Breaks_Attributes is type Text_Use_Soft_Page_Breaks_Attribute_Node is new Matreshka.ODF_Text.Abstract_Text_Attribute_Node and ODF.DOM.Text_Use_Soft_Page_Breaks_Attributes.ODF_Text_Use_Soft_Page_Breaks_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Text_Use_Soft_Page_Breaks_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Text_Use_Soft_Page_Breaks_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Text.Use_Soft_Page_Breaks_Attributes;
DrenfongWong/tkm-rpc
Ada
4,475
adb
with Tkmrpc.Transport.Client; with Tkmrpc.Request.Cfg.Tkm_Version.Convert; with Tkmrpc.Request.Cfg.Tkm_Limits.Convert; with Tkmrpc.Request.Cfg.Tkm_Reset.Convert; with Tkmrpc.Response.Cfg.Tkm_Version.Convert; with Tkmrpc.Response.Cfg.Tkm_Limits.Convert; with Tkmrpc.Response.Cfg.Tkm_Reset.Convert; package body Tkmrpc.Clients.Cfg is ------------------------------------------------------------------------- procedure Init (Result : out Results.Result_Type; Address : Interfaces.C.Strings.chars_ptr) is separate; ------------------------------------------------------------------------- procedure Tkm_Limits (Result : out Results.Result_Type; Max_Active_Requests : out Types.Active_Requests_Type; Authag_Contexts : out Types.Authag_Id_Type; Cag_Contexts : out Types.Cag_Id_Type; Li_Contexts : out Types.Li_Id_Type; Ri_Contexts : out Types.Ri_Id_Type; Iag_Contexts : out Types.Iag_Id_Type; Eag_Contexts : out Types.Eag_Id_Type; Dhag_Contexts : out Types.Dhag_Id_Type; Sp_Contexts : out Types.Sp_Id_Type; Authp_Contexts : out Types.Authp_Id_Type; Dhp_Contexts : out Types.Dhp_Id_Type; Autha_Contexts : out Types.Autha_Id_Type; Ca_Contexts : out Types.Ca_Id_Type; Lc_Contexts : out Types.Lc_Id_Type; Ia_Contexts : out Types.Ia_Id_Type; Ea_Contexts : out Types.Ea_Id_Type; Dha_Contexts : out Types.Dha_Id_Type) is use type Tkmrpc.Results.Result_Type; Req : Request.Cfg.Tkm_Limits.Request_Type; Res : Response.Cfg.Tkm_Limits.Response_Type; Data : Response.Data_Type; begin Req := Request.Cfg.Tkm_Limits.Null_Request; Transport.Client.Send_Receive (Req_Data => Request.Cfg.Tkm_Limits.Convert.To_Request (S => Req), Res_Data => Data); Res := Response.Cfg.Tkm_Limits.Convert.From_Response (S => Data); Result := Res.Header.Result; if Result = Results.Ok then Max_Active_Requests := Res.Data.Max_Active_Requests; Authag_Contexts := Res.Data.Authag_Contexts; Cag_Contexts := Res.Data.Cag_Contexts; Li_Contexts := Res.Data.Li_Contexts; Ri_Contexts := Res.Data.Ri_Contexts; Iag_Contexts := Res.Data.Iag_Contexts; Eag_Contexts := Res.Data.Eag_Contexts; Dhag_Contexts := Res.Data.Dhag_Contexts; Sp_Contexts := Res.Data.Sp_Contexts; Authp_Contexts := Res.Data.Authp_Contexts; Dhp_Contexts := Res.Data.Dhp_Contexts; Autha_Contexts := Res.Data.Autha_Contexts; Ca_Contexts := Res.Data.Ca_Contexts; Lc_Contexts := Res.Data.Lc_Contexts; Ia_Contexts := Res.Data.Ia_Contexts; Ea_Contexts := Res.Data.Ea_Contexts; Dha_Contexts := Res.Data.Dha_Contexts; end if; end Tkm_Limits; ------------------------------------------------------------------------- procedure Tkm_Reset (Result : out Results.Result_Type) is Req : Request.Cfg.Tkm_Reset.Request_Type; Res : Response.Cfg.Tkm_Reset.Response_Type; Data : Response.Data_Type; begin Req := Request.Cfg.Tkm_Reset.Null_Request; Transport.Client.Send_Receive (Req_Data => Request.Cfg.Tkm_Reset.Convert.To_Request (S => Req), Res_Data => Data); Res := Response.Cfg.Tkm_Reset.Convert.From_Response (S => Data); Result := Res.Header.Result; end Tkm_Reset; ------------------------------------------------------------------------- procedure Tkm_Version (Result : out Results.Result_Type; Version : out Types.Version_Type) is use type Tkmrpc.Results.Result_Type; Req : Request.Cfg.Tkm_Version.Request_Type; Res : Response.Cfg.Tkm_Version.Response_Type; Data : Response.Data_Type; begin Req := Request.Cfg.Tkm_Version.Null_Request; Transport.Client.Send_Receive (Req_Data => Request.Cfg.Tkm_Version.Convert.To_Request (S => Req), Res_Data => Data); Res := Response.Cfg.Tkm_Version.Convert.From_Response (S => Data); Result := Res.Header.Result; if Result = Results.Ok then Version := Res.Data.Version; end if; end Tkm_Version; end Tkmrpc.Clients.Cfg;
stcarrez/atlas
Ada
10,054
adb
----------------------------------------------------------------------- -- atlas -- atlas applications ----------------------------------------------------------------------- -- Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 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 GNAT.MD5; with Util.Log.Loggers; with Util.Beans.Basic; with Util.Strings.Transforms; with EL.Functions; with ASF.Applications.Main; with ADO.Queries; with ADO.Sessions; with AWA.Services.Contexts; with Atlas.Applications.Models; -- with Atlas.XXX.Module; package body Atlas.Applications is package ASC renames AWA.Services.Contexts; use AWA.Applications; type User_Stat_Info_Access is access all Atlas.Applications.Models.User_Stat_Info; Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Atlas"); procedure Set_Functions (Mapper : in out EL.Functions.Function_Mapper'Class); function Create_User_Stat_Bean return Util.Beans.Basic.Readonly_Bean_Access; -- ------------------------------ -- Create the user statistics bean which indicates what feature the user has used. -- ------------------------------ function Create_User_Stat_Bean return Util.Beans.Basic.Readonly_Bean_Access is use type ASC.Service_Context_Access; Ctx : constant ASC.Service_Context_Access := ASC.Current; Result : User_Stat_Info_Access; begin if Ctx /= null then declare List : Atlas.Applications.Models.User_Stat_Info_List_Bean; Session : ADO.Sessions.Session := ASC.Get_Session (Ctx); User : constant ADO.Identifier := Ctx.Get_User_Identifier; Query : ADO.Queries.Context; begin Query.Set_Query (Atlas.Applications.Models.Query_User_Stat); Query.Bind_Param ("user_id", User); Atlas.Applications.Models.List (List, Session, Query); Result := new Atlas.Applications.Models.User_Stat_Info; Result.all := List.List.Element (1); end; else Result := new Atlas.Applications.Models.User_Stat_Info; Result.Post_Count := 0; Result.Document_Count := 0; Result.Question_Count := 0; Result.Answer_Count := 0; end if; return Result.all'Access; end Create_User_Stat_Bean; -- ------------------------------ -- Given an Email address, return the Gravatar link to the user image. -- (See http://en.gravatar.com/site/implement/hash/ and -- http://en.gravatar.com/site/implement/images/) -- ------------------------------ function Get_Gravatar_Link (Email : in String) return String is E : constant String := Util.Strings.Transforms.To_Lower_Case (Email); C : constant GNAT.MD5.Message_Digest := GNAT.MD5.Digest (E); begin return "http://www.gravatar.com/avatar/" & C; end Get_Gravatar_Link; -- ------------------------------ -- EL function to convert an Email address to a Gravatar image. -- ------------------------------ function To_Gravatar_Link (Email : in Util.Beans.Objects.Object) return Util.Beans.Objects.Object is Link : constant String := Get_Gravatar_Link (Util.Beans.Objects.To_String (Email)); begin return Util.Beans.Objects.To_Object (Link); end To_Gravatar_Link; procedure Set_Functions (Mapper : in out EL.Functions.Function_Mapper'Class) is begin Mapper.Set_Function (Name => "gravatar", Namespace => ATLAS_NS_URI, Func => To_Gravatar_Link'Access); end Set_Functions; -- ------------------------------ -- Initialize the ASF components provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the component factories used by the application. -- ------------------------------ overriding procedure Initialize_Components (App : in out Application) is procedure Register is new ASF.Applications.Main.Register_Functions (Set_Functions); begin App.Self := App'Unchecked_Access; App.Set_Global ("contextPath", CONTEXT_PATH); Register (App); AWA.Applications.Application (App).Initialize_Components; App.Add_Converter (Name => "smartDateConverter", Converter => App.Self.Rel_Date_Converter'Access); App.Add_Converter (Name => "sizeConverter", Converter => App.Self.Size_Converter'Access); App.Register_Class (Name => "Atlas.Applications.User_Stat_Bean", Handler => Create_User_Stat_Bean'Access); end Initialize_Components; -- ------------------------------ -- Initialize the servlets provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the application servlets. -- ------------------------------ overriding procedure Initialize_Servlets (App : in out Application) is begin Log.Info ("Initializing application servlets..."); AWA.Applications.Application (App).Initialize_Servlets; App.Add_Servlet (Name => "faces", Server => App.Self.Faces'Access); App.Add_Servlet (Name => "files", Server => App.Self.Files'Access); App.Add_Servlet (Name => "ajax", Server => App.Self.Ajax'Access); App.Add_Servlet (Name => "measures", Server => App.Self.Measures'Access); App.Add_Servlet (Name => "auth", Server => App.Self.Auth'Access); App.Add_Servlet (Name => "verify-auth", Server => App.Self.Verify_Auth'Access); end Initialize_Servlets; -- ------------------------------ -- Initialize the filters provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the application filters. -- ------------------------------ overriding procedure Initialize_Filters (App : in out Application) is begin Log.Info ("Initializing application filters..."); AWA.Applications.Application (App).Initialize_Filters; App.Add_Filter (Name => "dump", Filter => App.Self.Dump'Access); App.Add_Filter (Name => "measures", Filter => App.Self.Measures'Access); App.Add_Filter (Name => "service", Filter => App.Self.Service_Filter'Access); App.Add_Filter (Name => "no-cache", Filter => App.Self.No_Cache'Access); end Initialize_Filters; -- ------------------------------ -- Initialize the AWA modules provided by the application. -- This procedure is called by <b>Initialize</b>. -- It should register the modules used by the application. -- ------------------------------ overriding procedure Initialize_Modules (App : in out Application) is begin Log.Info ("Initializing application modules..."); Register (App => App.Self.all'Access, Name => AWA.Users.Modules.NAME, URI => "user", Module => App.User_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Workspaces.Modules.NAME, URI => "workspaces", Module => App.Workspace_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Mail.Modules.NAME, Module => App.Mail_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Counters.Modules.NAME, Module => App.Counter_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Jobs.Modules.NAME, Module => App.Job_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Tags.Modules.NAME, Module => App.Tag_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Comments.Modules.NAME, Module => App.Comment_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Blogs.Modules.NAME, Module => App.Blog_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Storages.Modules.NAME, Module => App.Storage_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Images.Modules.NAME, Module => App.Image_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Votes.Modules.NAME, Module => App.Vote_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Questions.Modules.NAME, Module => App.Question_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Wikis.Modules.NAME, Module => App.Wiki_Module'Access); Register (App => App.Self.all'Access, Name => AWA.Wikis.Previews.NAME, Module => App.Preview_Module'Access); Register (App => App.Self.all'Access, Name => Atlas.Microblog.Modules.NAME, Module => App.Microblog_Module'Access); Register (App => App.Self.all'Access, Name => Atlas.Reviews.Modules.NAME, Module => App.Review_Module'Access); end Initialize_Modules; end Atlas.Applications;
tum-ei-rcs/StratoX
Ada
46,328
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, 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 stm32f4xx_hal_tim.c -- -- @author MCD Application Team -- -- @version V1.1.0 -- -- @date 19-June-2014 -- -- @brief timers HAL module driver. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ package body STM32.Timers is --------------- -- Configure -- --------------- procedure Configure (This : in out Timer; Prescaler : Short; Period : Word) is begin This.ARR := Period; This.Prescaler := Prescaler; end Configure; --------------- -- Configure -- --------------- procedure Configure (This : in out Timer; Prescaler : Short; Period : Word; Clock_Divisor : Timer_Clock_Divisor; Counter_Mode : Timer_Counter_Alignment_Mode) is begin This.ARR := Period; This.Prescaler := Prescaler; This.CR1.Clock_Division := Clock_Divisor; This.CR1.Mode_And_Dir := Counter_Mode; end Configure; ---------------------- -- Set_Counter_Mode -- ---------------------- procedure Set_Counter_Mode (This : in out Timer; Value : Timer_Counter_Alignment_Mode) is begin This.CR1.Mode_And_Dir := Value; end Set_Counter_Mode; ------------------------ -- Set_Clock_Division -- ------------------------ procedure Set_Clock_Division (This : in out Timer; Value : Timer_Clock_Divisor) is begin This.CR1.Clock_Division := Value; end Set_Clock_Division; ---------------------------- -- Current_Clock_Division -- ---------------------------- function Current_Clock_Division (This : Timer) return Timer_Clock_Divisor is begin return This.CR1.Clock_Division; end Current_Clock_Division; --------------- -- Configure -- --------------- procedure Configure (This : in out Timer; Prescaler : Short; Period : Word; Clock_Divisor : Timer_Clock_Divisor; Counter_Mode : Timer_Counter_Alignment_Mode; Repetitions : Byte) is begin This.ARR := Period; This.Prescaler := Prescaler; This.CR1.Clock_Division := Clock_Divisor; This.CR1.Mode_And_Dir := Counter_Mode; This.RCR := Word (Repetitions); This.EGR := Immediate'Enum_Rep; end Configure; ------------ -- Enable -- ------------ procedure Enable (This : in out Timer) is begin This.CR1.Timer_Enabled := True; end Enable; ------------- -- Enabled -- ------------- function Enabled (This : Timer) return Boolean is begin return This.CR1.Timer_Enabled; end Enabled; ------------------------ -- No_Outputs_Enabled -- ------------------------ function No_Outputs_Enabled (This : Timer) return Boolean is begin for C in Channel_1 .. Channel_3 loop if This.CCER (C).CCxE = Enable or This.CCER (C).CCxNE = Enable then return False; end if; end loop; -- Channel_4 doesn't have the complementary enabler and polarity bits. -- If it did they would be in the reserved area, which is zero, so we -- could be tricky and pretend that they exist for this function but -- doing that would be unnecessarily subtle. The money is on clarity. if This.CCER (Channel_4).CCxE = Enable then return False; end if; return True; end No_Outputs_Enabled; ------------- -- Disable -- ------------- procedure Disable (This : in out Timer) is begin if No_Outputs_Enabled (This) then This.CR1.Timer_Enabled := False; end if; end Disable; ------------------------ -- Enable_Main_Output -- ------------------------ procedure Enable_Main_Output (This : in out Timer) is begin This.BDTR.Main_Output_Enabled := True; end Enable_Main_Output; ------------------------- -- Disable_Main_Output -- ------------------------- procedure Disable_Main_Output (This : in out Timer) is begin if No_Outputs_Enabled (This) then This.BDTR.Main_Output_Enabled := False; end if; end Disable_Main_Output; ------------------------- -- Main_Output_Enabled -- ------------------------- function Main_Output_Enabled (This : Timer) return Boolean is begin return This.BDTR.Main_Output_Enabled; end Main_Output_Enabled; ----------------- -- Set_Counter -- ----------------- procedure Set_Counter (This : in out Timer; Value : Short) is begin This.Counter := Word (Value); end Set_Counter; ----------------- -- Set_Counter -- ----------------- procedure Set_Counter (This : in out Timer; Value : Word) is begin This.Counter := Value; end Set_Counter; --------------------- -- Current_Counter -- --------------------- function Current_Counter (This : Timer) return Word is begin return This.Counter; end Current_Counter; -------------------- -- Set_Autoreload -- -------------------- procedure Set_Autoreload (This : in out Timer; Value : Word) is begin This.ARR := Value; end Set_Autoreload; ------------------------ -- Current_Autoreload -- ------------------------ function Current_Autoreload (This : Timer) return Word is begin return This.ARR; end Current_Autoreload; ---------------------- -- Enable_Interrupt -- ---------------------- procedure Enable_Interrupt (This : in out Timer; Source : Timer_Interrupt) is begin This.DIER := This.DIER or Source'Enum_Rep; end Enable_Interrupt; ---------------------- -- Enable_Interrupt -- ---------------------- procedure Enable_Interrupt (This : in out Timer; Sources : Timer_Interrupt_List) is begin for Source of Sources loop -- This.DIER := This.DIER or Source'Enum_Rep; This.DIER := This.DIER or Timer_Interrupt'Enum_Rep (Source); end loop; end Enable_Interrupt; ----------------------- -- Disable_Interrupt -- ----------------------- procedure Disable_Interrupt (This : in out Timer; Source : Timer_Interrupt) is begin This.DIER := This.DIER and not Source'Enum_Rep; end Disable_Interrupt; ----------------------------- -- Clear_Pending_Interrupt -- ----------------------------- procedure Clear_Pending_Interrupt (This : in out Timer; Source : Timer_Interrupt) is begin This.SR := not Source'Enum_Rep; -- We do not, and must not, use the read-modify-write pattern because -- it leaves a window of vulnerability open to changes to the state -- after the read but before the write. The hardware for this register -- is designed so that writing other bits will not change them. This is -- indicated by the "rc_w0" notation in the status register definition. -- See the RM, page 57 for that notation explanation. end Clear_Pending_Interrupt; ----------------------- -- Interrupt_Enabled -- ----------------------- function Interrupt_Enabled (This : Timer; Source : Timer_Interrupt) return Boolean is begin return (This.DIER and Source'Enum_Rep) = Source'Enum_Rep; end Interrupt_Enabled; ------------ -- Status -- ------------ function Status (This : Timer; Flag : Timer_Status_Flag) return Boolean is begin return (This.SR and Flag'Enum_Rep) = Flag'Enum_Rep; end Status; ------------------ -- Clear_Status -- ------------------ procedure Clear_Status (This : in out Timer; Flag : Timer_Status_Flag) is begin This.SR := not Flag'Enum_Rep; -- We do not, and must not, use the read-modify-write pattern because -- it leaves a window of vulnerability open to changes to the state -- after the read but before the write. The hardware for this register -- is designed so that writing other bits will not change them. This is -- indicated by the "rc_w0" notation in the status register definition. -- See the RM, page 57 for that notation explanation. end Clear_Status; ----------------------- -- Enable_DMA_Source -- ----------------------- procedure Enable_DMA_Source (This : in out Timer; Source : Timer_DMA_Source) is begin This.DIER := This.DIER or Source'Enum_Rep; end Enable_DMA_Source; ------------------------ -- Disable_DMA_Source -- ------------------------ procedure Disable_DMA_Source (This : in out Timer; Source : Timer_DMA_Source) is begin This.DIER := This.DIER and not Source'Enum_Rep; end Disable_DMA_Source; ------------------------ -- DMA_Source_Enabled -- ------------------------ function DMA_Source_Enabled (This : Timer; Source : Timer_DMA_Source) return Boolean is begin return (This.DIER and Source'Enum_Rep) = Source'Enum_Rep; end DMA_Source_Enabled; ------------------------- -- Configure_Prescaler -- ------------------------- procedure Configure_Prescaler (This : in out Timer; Prescaler : Short; Reload_Mode : Timer_Prescaler_Reload_Mode) is begin This.Prescaler := Prescaler; This.EGR := Reload_Mode'Enum_Rep; end Configure_Prescaler; ------------------- -- Configure_DMA -- ------------------- procedure Configure_DMA (This : in out Timer; Base_Address : Timer_DMA_Base_Address; Burst_Length : Timer_DMA_Burst_Length) is begin This.DCR.Base_Address := Base_Address; This.DCR.Burst_Length := Burst_Length; end Configure_DMA; -------------------------------- -- Enable_Capture_Compare_DMA -- -------------------------------- procedure Enable_Capture_Compare_DMA (This : in out Timer) -- TODO: note that the CCDS field description in the RM, page 550, seems -- to indicate other than simply enabled/disabled is begin This.CR2.Capture_Compare_DMA_Selection := True; end Enable_Capture_Compare_DMA; --------------------------------- -- Disable_Capture_Compare_DMA -- --------------------------------- procedure Disable_Capture_Compare_DMA (This : in out Timer) -- TODO: note that the CCDS field description in the RM, page 550, seems -- to indicate other than simply enabled/disabled is begin This.CR2.Capture_Compare_DMA_Selection := False; end Disable_Capture_Compare_DMA; ----------------------- -- Current_Prescaler -- ----------------------- function Current_Prescaler (This : Timer) return Short is begin return This.Prescaler; end Current_Prescaler; ----------------------- -- Set_UpdateDisable -- ----------------------- procedure Set_UpdateDisable (This : in out Timer; To : Boolean) is begin This.CR1.Update_Disable := To; end Set_UpdateDisable; ----------------------- -- Set_UpdateRequest -- ----------------------- procedure Set_UpdateRequest (This : in out Timer; Source : Timer_Update_Source) is begin This.CR1.Update_Request_Source := Source /= Global; end Set_UpdateRequest; --------------------------- -- Select_One_Pulse_Mode -- --------------------------- procedure Select_One_Pulse_Mode (This : in out Timer; Mode : Timer_One_Pulse_Mode) is begin This.CR1.One_Pulse_Mode := Mode; end Select_One_Pulse_Mode; ---------------------------- -- Set_Autoreload_Preload -- ---------------------------- procedure Set_Autoreload_Preload (This : in out Timer; To : Boolean) is begin This.CR1.ARPE := To; end Set_Autoreload_Preload; ----------------------- -- Counter_Direction -- ----------------------- function Current_Counter_Mode (This : Timer) return Timer_Counter_Alignment_Mode is begin if Basic_Timer (This) then return Up; else return This.CR1.Mode_And_Dir; end if; end Current_Counter_Mode; -------------------- -- Generate_Event -- -------------------- procedure Generate_Event (This : in out Timer; Source : Timer_Event_Source) is Temp_EGR : Word := This.EGR; begin Temp_EGR := Temp_EGR or Source'Enum_Rep; This.EGR := Temp_EGR; end Generate_Event; --------------------------- -- Select_Output_Trigger -- --------------------------- procedure Select_Output_Trigger (This : in out Timer; Source : Timer_Trigger_Output_Source) is begin This.CR2.Master_Mode_Selection := Source; end Select_Output_Trigger; ----------------------- -- Select_Slave_Mode -- ----------------------- procedure Select_Slave_Mode (This : in out Timer; Mode : Timer_Slave_Mode) is begin This.SMCR.Slave_Mode_Selection := Mode; end Select_Slave_Mode; ------------------------------ -- Enable_Master_Slave_Mode -- ------------------------------ procedure Enable_Master_Slave_Mode (This : in out Timer) is begin This.SMCR.Master_Slave_Mode := True; end Enable_Master_Slave_Mode; ------------------------------- -- Disable_Master_Slave_Mode -- ------------------------------- procedure Disable_Master_Slave_Mode (This : in out Timer) is begin This.SMCR.Master_Slave_Mode := False; end Disable_Master_Slave_Mode; -------------------------------- -- Configure_External_Trigger -- -------------------------------- procedure Configure_External_Trigger (This : in out Timer; Polarity : Timer_External_Trigger_Polarity; Prescaler : Timer_External_Trigger_Prescaler; Filter : Timer_External_Trigger_Filter) is begin This.SMCR.External_Trigger_Polarity := Polarity; This.SMCR.External_Trigger_Prescaler := Prescaler; This.SMCR.External_Trigger_Filter := Filter; end Configure_External_Trigger; --------------------------------- -- Configure_As_External_Clock -- --------------------------------- procedure Configure_As_External_Clock (This : in out Timer; Source : Timer_Internal_Trigger_Source) is begin Select_Input_Trigger (This, Source); Select_Slave_Mode (This, External_1); end Configure_As_External_Clock; --------------------------------- -- Configure_As_External_Clock -- --------------------------------- procedure Configure_As_External_Clock (This : in out Timer; Source : Timer_External_Clock_Source; Polarity : Timer_Input_Capture_Polarity; Filter : Timer_Input_Capture_Filter) is begin if Source = Filtered_Timer_Input_2 then Configure_Channel_Input (This, Channel_2, Polarity, Direct_TI, Div1, -- default prescalar zero value Filter); else Configure_Channel_Input (This, Channel_1, Polarity, Direct_TI, Div1, -- default prescalar zero value Filter); end if; Select_Input_Trigger (This, Source); Select_Slave_Mode (This, External_1); end Configure_As_External_Clock; ------------------------------------ -- Configure_External_Clock_Mode1 -- ------------------------------------ procedure Configure_External_Clock_Mode1 (This : in out Timer; Polarity : Timer_External_Trigger_Polarity; Prescaler : Timer_External_Trigger_Prescaler; Filter : Timer_External_Trigger_Filter) is begin Configure_External_Trigger (This, Polarity, Prescaler, Filter); Select_Slave_Mode (This, External_1); Select_Input_Trigger (This, External_Trigger_Input); end Configure_External_Clock_Mode1; ------------------------------------ -- Configure_External_Clock_Mode2 -- ------------------------------------ procedure Configure_External_Clock_Mode2 (This : in out Timer; Polarity : Timer_External_Trigger_Polarity; Prescaler : Timer_External_Trigger_Prescaler; Filter : Timer_External_Trigger_Filter) is begin Configure_External_Trigger (This, Polarity, Prescaler, Filter); This.SMCR.External_Clock_Enable := True; end Configure_External_Clock_Mode2; -------------------------- -- Select_Input_Trigger -- -------------------------- procedure Select_Input_Trigger (This : in out Timer; Source : Timer_Trigger_Input_Source) is begin This.SMCR.Trigger_Selection := Source; end Select_Input_Trigger; ------------------------------ -- Configure_Channel_Output -- ------------------------------ procedure Configure_Channel_Output (This : in out Timer; Channel : Timer_Channel; Mode : Timer_Output_Compare_And_PWM_Mode; State : Timer_Capture_Compare_State; Pulse : Word; Polarity : Timer_Output_Compare_Polarity) is begin -- first disable the channel This.CCER (Channel).CCxE := Disable; Set_Output_Compare_Mode (This, Channel, Mode); This.CCER (Channel).CCxE := State; This.CCER (Channel).CCxP := Polarity'Enum_Rep; This.CCR1_4 (Channel) := Pulse; -- Only timers 2 and 5 have 32-bit CCR registers. The others must -- maintain the upper half at zero. We use a precondition to ensure -- values greater than a half-word are only specified for the proper -- timers. end Configure_Channel_Output; ------------------------------ -- Configure_Channel_Output -- ------------------------------ procedure Configure_Channel_Output (This : in out Timer; Channel : Timer_Channel; Mode : Timer_Output_Compare_And_PWM_Mode; State : Timer_Capture_Compare_State; Pulse : Word; Polarity : Timer_Output_Compare_Polarity; Idle_State : Timer_Capture_Compare_State; Complementary_Polarity : Timer_Output_Compare_Polarity; Complementary_Idle_State : Timer_Capture_Compare_State) is begin -- first disable the channel This.CCER (Channel).CCxE := Disable; Set_Output_Compare_Mode (This, Channel, Mode); This.CCER (Channel).CCxE := State; This.CCER (Channel).CCxNP := Complementary_Polarity'Enum_Rep; This.CCER (Channel).CCxP := Polarity'Enum_Rep; case Channel is when Channel_1 => This.CR2.Channel_1_Output_Idle_State := Idle_State; This.CR2.Channel_1_Complementary_Output_Idle_State := Complementary_Idle_State; when Channel_2 => This.CR2.Channel_2_Output_Idle_State := Idle_State; This.CR2.Channel_2_Complementary_Output_Idle_State := Complementary_Idle_State; when Channel_3 => This.CR2.Channel_3_Output_Idle_State := Idle_State; This.CR2.Channel_3_Complementary_Output_Idle_State := Complementary_Idle_State; when Channel_4 => This.CR2.Channel_4_Output_Idle_State := Idle_State; end case; This.CCR1_4 (Channel) := Pulse; -- Only timers 2 and 5 have 32-bit CCR registers. The others must -- maintain the upper half at zero. We use a precondition to ensure -- values greater than a half-word are only specified for the proper -- timers. end Configure_Channel_Output; ----------------------- -- Set_Single_Output -- ----------------------- procedure Set_Single_Output (This : in out Timer; Channel : Timer_Channel; Mode : Timer_Output_Compare_And_PWM_Mode; OC_Clear_Enabled : Boolean; Preload_Enabled : Boolean; Fast_Enabled : Boolean) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; Description : Channel_Output_Descriptor; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 Description := (OCxMode => Mode, OCxFast_Enable => Fast_Enabled, OCxPreload_Enable => Preload_Enabled, OCxClear_Enable => OC_Clear_Enabled); Temp.Descriptors (Descriptor_Index) := (Output, Description); This.CCMR1_2 (CCMR_Index) := Temp; end Set_Single_Output; ----------------------------- -- Set_Output_Compare_Mode -- ----------------------------- procedure Set_Output_Compare_Mode (This : in out Timer; Channel : Timer_Channel; Mode : Timer_Output_Compare_And_PWM_Mode) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 if Temp.Descriptors (Descriptor_Index).CCxSelection /= Output then raise Timer_Channel_Access_Error; end if; Temp.Descriptors (Descriptor_Index).Compare.OCxMode := Mode; This.CCMR1_2 (CCMR_Index) := Temp; end Set_Output_Compare_Mode; ---------------------------------- -- Current_Capture_Compare_Mode -- ---------------------------------- function Current_Capture_Compare_Mode (This : Timer; Channel : Timer_Channel) return Timer_Capture_Compare_Modes is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 return Temp.Descriptors (Descriptor_Index).CCxSelection; end Current_Capture_Compare_Mode; ------------------------------ -- Set_Output_Forced_Action -- ------------------------------ procedure Set_Output_Forced_Action (This : in out Timer; Channel : Timer_Channel; Active : Boolean) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 if Temp.Descriptors (Descriptor_Index).CCxSelection /= Output then raise Timer_Channel_Access_Error; end if; if Active then Temp.Descriptors (Descriptor_Index).Compare.OCxMode := Force_Active; else Temp.Descriptors (Descriptor_Index).Compare.OCxMode := Force_Inactive; end if; This.CCMR1_2 (CCMR_Index) := Temp; end Set_Output_Forced_Action; ------------------------------- -- Set_Output_Preload_Enable -- ------------------------------- procedure Set_Output_Preload_Enable (This : in out Timer; Channel : Timer_Channel; Enabled : Boolean) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 Temp.Descriptors (Descriptor_Index).Compare.OCxPreload_Enable := Enabled; This.CCMR1_2 (CCMR_Index) := Temp; end Set_Output_Preload_Enable; ---------------------------- -- Set_Output_Fast_Enable -- ---------------------------- procedure Set_Output_Fast_Enable (This : in out Timer; Channel : Timer_Channel; Enabled : Boolean) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 Temp.Descriptors (Descriptor_Index).Compare.OCxFast_Enable := Enabled; This.CCMR1_2 (CCMR_Index) := Temp; end Set_Output_Fast_Enable; ----------------------- -- Set_Clear_Control -- ----------------------- procedure Set_Clear_Control (This : in out Timer; Channel : Timer_Channel; Enabled : Boolean) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 Temp.Descriptors (Descriptor_Index).Compare.OCxClear_Enable := Enabled; This.CCMR1_2 (CCMR_Index) := Temp; end Set_Clear_Control; -------------------- -- Enable_Channel -- -------------------- procedure Enable_Channel (This : in out Timer; Channel : Timer_Channel) is Temp_EGR : Word := This.EGR; begin This.CCER (Channel).CCxE := Enable; -- Trigger an event to initialize preload register Temp_EGR := Temp_EGR or (2 ** (Timer_Channel'Pos (Channel) + 1)); This.EGR := Temp_EGR; end Enable_Channel; ------------------------- -- Set_Output_Polarity -- ------------------------- procedure Set_Output_Polarity (This : in out Timer; Channel : Timer_Channel; Polarity : Timer_Output_Compare_Polarity) is begin This.CCER (Channel).CCxP := Polarity'Enum_Rep; end Set_Output_Polarity; --------------------------------------- -- Set_Output_Complementary_Polarity -- --------------------------------------- procedure Set_Output_Complementary_Polarity (This : in out Timer; Channel : Timer_Channel; Polarity : Timer_Output_Compare_Polarity) is begin This.CCER (Channel).CCxNP := Polarity'Enum_Rep; end Set_Output_Complementary_Polarity; --------------------- -- Disable_Channel -- --------------------- procedure Disable_Channel (This : in out Timer; Channel : Timer_Channel) is begin This.CCER (Channel).CCxE := Disable; end Disable_Channel; --------------------- -- Channel_Enabled -- --------------------- function Channel_Enabled (This : Timer; Channel : Timer_Channel) return Boolean is begin return This.CCER (Channel).CCxE = Enable; end Channel_Enabled; ---------------------------------- -- Enable_Complementary_Channel -- ---------------------------------- procedure Enable_Complementary_Channel (This : in out Timer; Channel : Timer_Channel) is begin This.CCER (Channel).CCxNE := Enable; end Enable_Complementary_Channel; ----------------------------------- -- Disable_Complementary_Channel -- ----------------------------------- procedure Disable_Complementary_Channel (This : in out Timer; Channel : Timer_Channel) is begin This.CCER (Channel).CCxNE := Disable; end Disable_Complementary_Channel; ----------------------------------- -- Complementary_Channel_Enabled -- ----------------------------------- function Complementary_Channel_Enabled (This : Timer; Channel : Timer_Channel) return Boolean is begin return This.CCER (Channel).CCxNE = Enable; end Complementary_Channel_Enabled; ----------------------- -- Set_Compare_Value -- ----------------------- procedure Set_Compare_Value (This : in out Timer; Channel : Timer_Channel; Word_Value : Word) is begin This.CCR1_4 (Channel) := Word_Value; -- Timers 2 and 5 really do have 32-bit capture/compare registers so we -- don't need to require half-words as inputs. end Set_Compare_Value; ----------------------- -- Set_Compare_Value -- ----------------------- procedure Set_Compare_Value (This : in out Timer; Channel : Timer_Channel; Value : Short) is begin This.CCR1_4 (Channel) := Word (Value); -- These capture/compare registers are really only 15-bits wide, except -- for those of timers 2 and 5. For the sake of simplicity we represent -- all of them with full words, but only write word values when -- appropriate. The caller has to treat them as half-word values, since -- that's the type for the formal parameter, therefore our casting up to -- a word value will retain the reserved upper half-word value of zero. end Set_Compare_Value; --------------------------- -- Current_Capture_Value -- --------------------------- function Current_Capture_Value (This : Timer; Channel : Timer_Channel) return Word is begin return This.CCR1_4 (Channel); end Current_Capture_Value; --------------------------- -- Current_Capture_Value -- --------------------------- function Current_Capture_Value (This : Timer; Channel : Timer_Channel) return Short is begin return Short (This.CCR1_4 (Channel)); end Current_Capture_Value; ------------------------------------- -- Write_Channel_Input_Description -- ------------------------------------- procedure Write_Channel_Input_Description (This : in out Timer; Channel : Timer_Channel; Kind : Timer_Input_Capture_Selection; Description : Channel_Input_Descriptor) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; New_Value : IO_Descriptor; begin case Kind is when Direct_TI => New_Value := (CCxSelection => Direct_TI, Capture => Description); when Indirect_TI => New_Value := (CCxSelection => Indirect_TI, Capture => Description); when TRC => New_Value := (CCxSelection => TRC, Capture => Description); end case; case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 Temp.Descriptors (Descriptor_Index) := New_Value; This.CCMR1_2 (CCMR_Index) := Temp; end Write_Channel_Input_Description; ------------------------- -- Set_Input_Prescaler -- ------------------------- procedure Set_Input_Prescaler (This : in out Timer; Channel : Timer_Channel; Value : Timer_Input_Capture_Prescaler) is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 Temp.Descriptors (Descriptor_Index).Capture.ICxPrescaler := Value; This.CCMR1_2 (CCMR_Index) := Temp; end Set_Input_Prescaler; ----------------------------- -- Current_Input_Prescaler -- ----------------------------- function Current_Input_Prescaler (This : Timer; Channel : Timer_Channel) return Timer_Input_Capture_Prescaler is CCMR_Index : CCMRx_Index; Descriptor_Index : Lower_Half_Index; Temp : TIMx_CCMRx; begin case Channel is when Channel_1 => CCMR_Index := 1; Descriptor_Index := 1; when Channel_2 => CCMR_Index := 1; Descriptor_Index := 2; when Channel_3 => CCMR_Index := 2; Descriptor_Index := 1; when Channel_4 => CCMR_Index := 2; Descriptor_Index := 2; end case; Temp := This.CCMR1_2 (CCMR_Index); -- effectively get CCMR1 or CCMR2 return Temp.Descriptors (Descriptor_Index).Capture.ICxPrescaler; end Current_Input_Prescaler; ----------------------------- -- Configure_Channel_Input -- ----------------------------- procedure Configure_Channel_Input (This : in out Timer; Channel : Timer_Channel; Polarity : Timer_Input_Capture_Polarity; Selection : Timer_Input_Capture_Selection; Prescaler : Timer_Input_Capture_Prescaler; Filter : Timer_Input_Capture_Filter) is Input : Channel_Input_Descriptor; begin -- first disable the channel This.CCER (Channel).CCxE := Disable; Input := (ICxFilter => Filter, ICxPrescaler => Prescaler); Write_Channel_Input_Description (This => This, Channel => Channel, Kind => Selection, Description => Input); case Polarity is when Rising => This.CCER (Channel).CCxNP := 0; This.CCER (Channel).CCxP := 0; when Falling => This.CCER (Channel).CCxNP := 0; This.CCER (Channel).CCxP := 1; when Both_Edges => This.CCER (Channel).CCxNP := 1; This.CCER (Channel).CCxP := 1; end case; This.CCER (Channel).CCxE := Enable; end Configure_Channel_Input; --------------------------------- -- Configure_Channel_Input_PWM -- --------------------------------- procedure Configure_Channel_Input_PWM (This : in out Timer; Channel : Timer_Channel; Selection : Timer_Input_Capture_Selection; Polarity : Timer_Input_Capture_Polarity; Prescaler : Timer_Input_Capture_Prescaler; Filter : Timer_Input_Capture_Filter) is Opposite_Polarity : Timer_Input_Capture_Polarity; Opposite_Selection : Timer_Input_Capture_Selection; begin Disable_Channel (This, Channel); if Polarity = Rising then Opposite_Polarity := Falling; else Opposite_Polarity := Rising; end if; if Selection = Indirect_TI then Opposite_Selection := Direct_TI; else Opposite_Selection := Indirect_TI; end if; if Channel = Channel_1 then Configure_Channel_Input (This, Channel_1, Polarity, Selection, Prescaler, Filter); Configure_Channel_Input (This, Channel_2, Opposite_Polarity, Opposite_Selection, Prescaler, Filter); else Configure_Channel_Input (This, Channel_2, Polarity, Selection, Prescaler, Filter); Configure_Channel_Input (This, Channel_1, Opposite_Polarity, Opposite_Selection, Prescaler, Filter); end if; Enable_Channel (This, Channel); end Configure_Channel_Input_PWM; ------------------------------- -- Enable_CC_Preload_Control -- ------------------------------- procedure Enable_CC_Preload_Control (This : in out Timer) is begin This.CR2.Capture_Compare_Preloaded_Control := True; end Enable_CC_Preload_Control; -------------------------------- -- Disable_CC_Preload_Control -- -------------------------------- procedure Disable_CC_Preload_Control (This : in out Timer) is begin This.CR2.Capture_Compare_Preloaded_Control := False; end Disable_CC_Preload_Control; ------------------------ -- Select_Commutation -- ------------------------ procedure Select_Commutation (This : in out Timer) is begin This.CR2.Capture_Compare_Control_Update_Selection := True; end Select_Commutation; -------------------------- -- Deselect_Commutation -- -------------------------- procedure Deselect_Commutation (This : in out Timer) is begin This.CR2.Capture_Compare_Control_Update_Selection := False; end Deselect_Commutation; -------------------- -- Configure_BDTR -- -------------------- procedure Configure_BDTR (This : in out Timer; Automatic_Output_Enabled : Boolean; Break_Polarity : Timer_Break_Polarity; Break_Enabled : Boolean; Off_State_Selection_Run_Mode : Bit; Off_State_Selection_Idle_Mode : Bit; Lock_Configuration : Timer_Lock_Level; Deadtime_Generator : Byte) is begin This.BDTR.Automatic_Output_Enabled := Automatic_Output_Enabled; This.BDTR.Break_Polarity := Break_Polarity; This.BDTR.Break_Enable := Break_Enabled; This.BDTR.Off_State_Selection_Run_Mode := Off_State_Selection_Run_Mode; This.BDTR.Off_State_Selection_Idle_Mode := Off_State_Selection_Idle_Mode; This.BDTR.Lock := Lock_Configuration; This.BDTR.Deadtime_Generator := Deadtime_Generator; end Configure_BDTR; --------------------------------- -- Configure_Timer_2_Remapping -- --------------------------------- procedure Configure_Timer_2_Remapping (This : in out Timer; Option : Timer_2_Remapping_Options) is begin This.Options.ITR1_RMP := Option; end Configure_Timer_2_Remapping; --------------------------------- -- Configure_Timer_5_Remapping -- --------------------------------- procedure Configure_Timer_5_Remapping (This : in out Timer; Option : Timer_5_Remapping_Options) is begin This.Options.TI4_RMP := Option; end Configure_Timer_5_Remapping; ---------------------------------- -- Configure_Timer_11_Remapping -- ---------------------------------- procedure Configure_Timer_11_Remapping (This : in out Timer; Option : Timer_11_Remapping_Options) is begin This.Options.TI1_RMP := Option; end Configure_Timer_11_Remapping; --------------------------------- -- Configure_Encoder_Interface -- --------------------------------- procedure Configure_Encoder_Interface (This : in out Timer; Mode : Timer_Encoder_Mode; IC1_Polarity : Timer_Input_Capture_Polarity; IC2_Polarity : Timer_Input_Capture_Polarity) is begin This.SMCR.Slave_Mode_Selection := Mode; Write_Channel_Input_Description (This, Channel => Channel_1, Kind => Direct_TI, Description => Channel_Input_Descriptor'(ICxFilter => 0, ICxPrescaler => Div1)); Write_Channel_Input_Description (This, Channel => Channel_2, Kind => Direct_TI, Description => Channel_Input_Descriptor'(ICxFilter => 0, ICxPrescaler => Div1)); case IC1_Polarity is when Rising => This.CCER (Channel_1).CCxNP := 0; This.CCER (Channel_1).CCxP := 0; when Falling => This.CCER (Channel_1).CCxNP := 0; This.CCER (Channel_1).CCxP := 1; when Both_Edges => This.CCER (Channel_1).CCxNP := 1; This.CCER (Channel_1).CCxP := 1; end case; case IC2_Polarity is when Rising => This.CCER (Channel_2).CCxNP := 0; This.CCER (Channel_2).CCxP := 0; when Falling => This.CCER (Channel_2).CCxNP := 0; This.CCER (Channel_2).CCxP := 1; when Both_Edges => This.CCER (Channel_2).CCxNP := 1; This.CCER (Channel_2).CCxP := 1; end case; end Configure_Encoder_Interface; ------------------------ -- Enable_Hall_Sensor -- ------------------------ procedure Enable_Hall_Sensor (This : in out Timer) is begin This.CR2.TI1_Selection := True; end Enable_Hall_Sensor; ------------------------- -- Disable_Hall_Sensor -- ------------------------- procedure Disable_Hall_Sensor (This : in out Timer) is begin This.CR2.TI1_Selection := False; end Disable_Hall_Sensor; end STM32.Timers;
Rodeo-McCabe/orka
Ada
1,459
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Interfaces.C.Pointers; package Orka.Types.Pointers is pragma Preelaborate; package Single_Vector4_Pointers is new Interfaces.C.Pointers (GL.Types.Size, Singles.Vector4, Singles.Vector4_Array, Singles.Vector4'(others => 0.0)); package Single_Matrix4_Pointers is new Interfaces.C.Pointers (GL.Types.Size, Singles.Matrix4, Singles.Matrix4_Array, Singles.Matrix4'(others => (others => 0.0))); package Double_Vector4_Pointers is new Interfaces.C.Pointers (GL.Types.Size, Doubles.Vector4, Doubles.Vector4_Array, Doubles.Vector4'(others => 0.0)); package Double_Matrix4_Pointers is new Interfaces.C.Pointers (GL.Types.Size, Doubles.Matrix4, Doubles.Matrix4_Array, Doubles.Matrix4'(others => (others => 0.0))); end Orka.Types.Pointers;
AdaCore/libadalang
Ada
132
adb
separate (Test) procedure Foo is procedure Bar is begin J := 15; end Bar; begin null; end Foo; pragma Test_Block;
rogermc2/GA_Ada
Ada
830
adb
-- Program Circle -- Author Roger Mc Murtrie -- Created 16 November 2017 with Ada.Exceptions; use Ada.Exceptions; with Ada.Text_IO; use Ada.Text_IO; with Glfw; with Glfw.Windows; with Initialize; with Main_Loop; procedure Circle is Main_Window : Glfw.Windows.Window; Window_Title : constant String := "GA for Computer Scientists Example 1.1 An Example in Geometric Algebra"; begin Glfw.Init; Initialize (Main_Window, Window_Title); Main_Loop (Main_Window); Glfw.Shutdown; exception when anError : Constraint_Error => Put ("Circle returned constraint error: "); Put_Line (Exception_Information (anError)); when anError : others => Put_Line ("An exception occurred in Circle."); Put_Line (Exception_Information (anError)); end Circle;
AdaCore/Ada_Drivers_Library
Ada
7,963
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 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. -- -- -- ------------------------------------------------------------------------------ with HAL; with RISCV.Types; use RISCV.Types; with RISCV.CSR_Generic; use RISCV.CSR_Generic; package RISCV.CSR is -- Machine Information -- package Mvendorid is new CSR_RO_Pck ("mvendorid", Unsigned_XLEN); package Marchid is new CSR_RO_Pck ("marchid", Unsigned_XLEN); package Mimpid is new CSR_RO_Pck ("mimpid", Unsigned_XLEN); package Mhardid is new CSR_RO_Pck ("mhardid", Unsigned_XLEN); -- Machine Trap Setup -- package Mstatus is new CSR_RW_Pck ("mstatus", Unsigned_XLEN); package Misa is new CSR_RW_Pck ("misa", Unsigned_XLEN); package Medeleg is new CSR_RW_Pck ("medeleg", Unsigned_XLEN); package Mideleg is new CSR_RW_Pck ("mideleg", Unsigned_XLEN); package Mie is new CSR_RW_Pck ("mie", Unsigned_XLEN); package Mtvec is new CSR_RW_Pck ("mtvec", Unsigned_XLEN); package Mcounteren is new CSR_RW_Pck ("mcounteren", Unsigned_XLEN); -- Machine Trap Handling -- package Mscratch is new CSR_RW_Pck ("mscratch", Unsigned_XLEN); package Mepc is new CSR_RW_Pck ("mepc", Unsigned_XLEN); package Mcause is new CSR_RW_Pck ("mcause", Unsigned_XLEN); package Mtval is new CSR_RW_Pck ("mtval", Unsigned_XLEN); package Mip is new CSR_RW_Pck ("mip", Unsigned_XLEN); -- Machine Counter / Timers -- package Mcycle is new CSR_RW_64_Pck ("mcycle"); package Minstret is new CSR_RW_64_Pck ("minstret"); package Mhpmcounter3 is new CSR_RW_64_Pck ("mhpmcounter3"); package Mhpmcounter4 is new CSR_RW_64_Pck ("mhpmcounter4"); package Mhpmcounter5 is new CSR_RW_64_Pck ("mhpmcounter5"); package Mhpmcounter6 is new CSR_RW_64_Pck ("mhpmcounter6"); package Mhpmcounter7 is new CSR_RW_64_Pck ("mhpmcounter7"); package Mhpmcounter8 is new CSR_RW_64_Pck ("mhpmcounter8"); package Mhpmcounter9 is new CSR_RW_64_Pck ("mhpmcounter9"); package Mhpmcounter10 is new CSR_RW_64_Pck ("mhpmcounter10"); package Mhpmcounter11 is new CSR_RW_64_Pck ("mhpmcounter11"); package Mhpmcounter12 is new CSR_RW_64_Pck ("mhpmcounter12"); package Mhpmcounter13 is new CSR_RW_64_Pck ("mhpmcounter13"); package Mhpmcounter14 is new CSR_RW_64_Pck ("mhpmcounter14"); package Mhpmcounter15 is new CSR_RW_64_Pck ("mhpmcounter15"); package Mhpmcounter16 is new CSR_RW_64_Pck ("mhpmcounter16"); package Mhpmcounter17 is new CSR_RW_64_Pck ("mhpmcounter17"); package Mhpmcounter18 is new CSR_RW_64_Pck ("mhpmcounter18"); package Mhpmcounter19 is new CSR_RW_64_Pck ("mhpmcounter19"); package Mhpmcounter20 is new CSR_RW_64_Pck ("mhpmcounter20"); package Mhpmcounter21 is new CSR_RW_64_Pck ("mhpmcounter21"); package Mhpmcounter22 is new CSR_RW_64_Pck ("mhpmcounter22"); package Mhpmcounter23 is new CSR_RW_64_Pck ("mhpmcounter23"); package Mhpmcounter24 is new CSR_RW_64_Pck ("mhpmcounter24"); package Mhpmcounter25 is new CSR_RW_64_Pck ("mhpmcounter25"); package Mhpmcounter26 is new CSR_RW_64_Pck ("mhpmcounter26"); package Mhpmcounter27 is new CSR_RW_64_Pck ("mhpmcounter27"); package Mhpmcounter28 is new CSR_RW_64_Pck ("mhpmcounter28"); package Mhpmcounter29 is new CSR_RW_64_Pck ("mhpmcounter29"); package Mhpmcounter30 is new CSR_RW_64_Pck ("mhpmcounter30"); package Mhpmcounter31 is new CSR_RW_64_Pck ("mhpmcounter31"); -- Machine Counter Setup -- package Mcountinhibit is new CSR_RW_Pck ("mcountinhibit", HAL.UInt32); package Mhpmevent3 is new CSR_RW_Pck ("mhpmevent3", Unsigned_XLEN); package Mhpmevent4 is new CSR_RW_Pck ("mhpmevent4", Unsigned_XLEN); package Mhpmevent5 is new CSR_RW_Pck ("mhpmevent5", Unsigned_XLEN); package Mhpmevent6 is new CSR_RW_Pck ("mhpmevent6", Unsigned_XLEN); package Mhpmevent7 is new CSR_RW_Pck ("mhpmevent7", Unsigned_XLEN); package Mhpmevent8 is new CSR_RW_Pck ("mhpmevent8", Unsigned_XLEN); package Mhpmevent9 is new CSR_RW_Pck ("mhpmevent9", Unsigned_XLEN); package Mhpmevent10 is new CSR_RW_Pck ("mhpmevent10", Unsigned_XLEN); package Mhpmevent11 is new CSR_RW_Pck ("mhpmevent11", Unsigned_XLEN); package Mhpmevent12 is new CSR_RW_Pck ("mhpmevent12", Unsigned_XLEN); package Mhpmevent13 is new CSR_RW_Pck ("mhpmevent13", Unsigned_XLEN); package Mhpmevent14 is new CSR_RW_Pck ("mhpmevent14", Unsigned_XLEN); package Mhpmevent15 is new CSR_RW_Pck ("mhpmevent15", Unsigned_XLEN); package Mhpmevent16 is new CSR_RW_Pck ("mhpmevent16", Unsigned_XLEN); package Mhpmevent17 is new CSR_RW_Pck ("mhpmevent17", Unsigned_XLEN); package Mhpmevent18 is new CSR_RW_Pck ("mhpmevent18", Unsigned_XLEN); package Mhpmevent19 is new CSR_RW_Pck ("mhpmevent19", Unsigned_XLEN); package Mhpmevent20 is new CSR_RW_Pck ("mhpmevent20", Unsigned_XLEN); package Mhpmevent21 is new CSR_RW_Pck ("mhpmevent21", Unsigned_XLEN); package Mhpmevent22 is new CSR_RW_Pck ("mhpmevent22", Unsigned_XLEN); package Mhpmevent23 is new CSR_RW_Pck ("mhpmevent23", Unsigned_XLEN); package Mhpmevent24 is new CSR_RW_Pck ("mhpmevent24", Unsigned_XLEN); package Mhpmevent25 is new CSR_RW_Pck ("mhpmevent25", Unsigned_XLEN); package Mhpmevent26 is new CSR_RW_Pck ("mhpmevent26", Unsigned_XLEN); package Mhpmevent27 is new CSR_RW_Pck ("mhpmevent27", Unsigned_XLEN); package Mhpmevent28 is new CSR_RW_Pck ("mhpmevent28", Unsigned_XLEN); package Mhpmevent29 is new CSR_RW_Pck ("mhpmevent29", Unsigned_XLEN); package Mhpmevent30 is new CSR_RW_Pck ("mhpmevent30", Unsigned_XLEN); package Mhpmevent31 is new CSR_RW_Pck ("mhpmevent31", Unsigned_XLEN); end RISCV.CSR;
mikequentel/c2ada
Ada
6,120
ads
-- $Source: /home/CVSROOT/c2ada/gccs-ops.ads,v $ -- $Revision: 1.1.1.1 $ $Date: 1999/02/02 12:01:51 $ with Ada.Unchecked_Conversion; package gccs.Ops is subtype Uchar is gccs.Unsigned_Char; subtype Ushort is gccs.Unsigned_Short; subtype Uint is gccs.Unsigned_Int; subtype Ulong is gccs.Unsigned_Long; -- unchecked conversions between signed and unsigned types -------------- function To_Unsigned is new Ada.Unchecked_Conversion (Char, UChar); function To_Unsigned is new Ada.Unchecked_Conversion (Short, Ushort); function To_Unsigned is new Ada.Unchecked_Conversion (Int, Uint); function To_Unsigned is new Ada.Unchecked_Conversion (Long, Ulong); function To_Signed is new Ada.Unchecked_Conversion (UChar, Char); function To_Signed is new Ada.Unchecked_Conversion (UShort, Short); function To_Signed is new Ada.Unchecked_Conversion (UInt, Int); function To_Signed is new Ada.Unchecked_Conversion (ULong, Long); -- and, or, xor, not ----------------------------------------------------- function "and" (I1, I2: Uchar) return Uchar renames Interfaces.C."and"; function "and" (I1, I2: Ushort) return Ushort renames Interfaces.C."and"; function "and" (I1, I2: Uint) return Uint renames Interfaces.C."and"; function "and" (I1, I2: Ulong) return Ulong renames Interfaces.C."and"; function "and" (I1, I2: Char) return Char; pragma Inline("and"); function "and" (I1, I2: Short) return Short; pragma Inline("and"); function "and" (I1, I2: Int) return Int; pragma Inline("and"); function "and" (I1, I2: Long) return Long; pragma Inline("and"); function "or" (I1, I2: Uchar) return Uchar renames Interfaces.C."or"; function "or" (I1, I2: Ushort) return Ushort renames Interfaces.C."or"; function "or" (I1, I2: Uint) return Uint renames Interfaces.C."or"; function "or" (I1, I2: Ulong) return Ulong renames Interfaces.C."or"; function "or" (I1, I2: Char) return Char; pragma Inline("or"); function "or" (I1, I2: Short) return Short; pragma Inline("or"); function "or" (I1, I2: Int) return Int; pragma Inline("or"); function "or" (I1, I2: Long) return Long; pragma Inline("or"); function "xor" (I1, I2: Uchar) return Uchar renames Interfaces.C."xor"; function "xor" (I1, I2: Ushort) return Ushort renames Interfaces.C."xor"; function "xor" (I1, I2: Uint) return Uint renames Interfaces.C."xor"; function "xor" (I1, I2: Ulong) return Ulong renames Interfaces.C."xor"; function "xor" (I1, I2: Char) return Char; pragma Inline("xor"); function "xor" (I1, I2: Short) return Short; pragma Inline("xor"); function "xor" (I1, I2: Int) return Int; pragma Inline("xor"); function "xor" (I1, I2: Long) return Long; pragma Inline("xor"); function "not" (I1: Uchar) return Uchar renames Interfaces.C."not"; function "not" (I1: Ushort) return Ushort renames Interfaces.C."not"; function "not" (I1: Uint) return Uint renames Interfaces.C."not"; function "not" (I1: Ulong) return Ulong renames Interfaces.C."not"; function "not" (I1: Char) return Char; pragma Inline("not"); function "not" (I1: Short) return Short; pragma Inline("not"); function "not" (I1: Int) return Int; pragma Inline("not"); function "not" (I1: Long) return Long; pragma Inline("not"); -- Shift left and right --------------------------------------------------- function Shift_Left (Value: Uchar; Amount: Natural) return Uchar; pragma Inline(Shift_Left); function Shift_Left (Value: Ushort; Amount: Natural) return Ushort; pragma Inline(Shift_Left); function Shift_Left (Value: Uint; Amount: Natural) return Uint; pragma Inline(Shift_Left); function Shift_Left (Value: Ulong; Amount: Natural) return Ulong; pragma Inline(Shift_Left); function Shift_Left (Value: Char; Amount: Natural) return Char; pragma Inline(Shift_Left); function Shift_Left (Value: Short; Amount: Natural) return Short; pragma Inline(Shift_Left); function Shift_Left (Value: Int; Amount: Natural) return Int; pragma Inline(Shift_Left); function Shift_Left (Value: Long; Amount: Natural) return Long; pragma Inline(Shift_Left); function Shift_Right (Value: Uchar; Amount: Natural) return Uchar; pragma Inline(Shift_Right); function Shift_Right (Value: Ushort; Amount: Natural) return Ushort; pragma Inline(Shift_Right); function Shift_Right (Value: Uint; Amount: Natural) return Uint; pragma Inline(Shift_Right); function Shift_Right (Value: Ulong; Amount: Natural) return Ulong; pragma Inline(Shift_Right); function Shift_Right (Value: Char; Amount: Natural) return Char; pragma Inline(Shift_Right); function Shift_Right (Value: Short; Amount: Natural) return Short; pragma Inline(Shift_Right); function Shift_Right (Value: Int; Amount: Natural) return Int; pragma Inline(Shift_Right); function Shift_Right (Value: Long; Amount: Natural) return Long; pragma Inline(Shift_Right); function Shift_Right_Arithmetic (Value: Uchar; Amount: Natural) return Uchar; pragma Inline(Shift_Right_Arithmetic); function Shift_Right_Arithmetic (Value: Ushort; Amount: Natural) return Ushort; pragma Inline(Shift_Right_Arithmetic); function Shift_Right_Arithmetic (Value: Uint; Amount: Natural) return Uint; pragma Inline(Shift_Right_Arithmetic); function Shift_Right_Arithmetic (Value: Ulong; Amount: Natural) return Ulong; pragma Inline(Shift_Right_Arithmetic); function Shift_Right_Arithmetic (Value: Char; Amount: Natural) return Char; pragma Inline(Shift_Right_Arithmetic); function Shift_Right_Arithmetic (Value: Short; Amount: Natural) return Short; pragma Inline(Shift_Right_Arithmetic); function Shift_Right_Arithmetic (Value: Int; Amount: Natural) return Int; pragma Inline(Shift_Right_Arithmetic); function Shift_Right_Arithmetic (Value: Long; Amount: Natural) return Long; pragma Inline(Shift_Right_Arithmetic); end gccs.Ops;
Black-Photon/Programming-Language-of-the-Month
Ada
286
adb
package body signal is protected body Handler is entry Wait when Call_Count > 0 is begin Call_Count := Call_Count - 1; end Wait; procedure Handle is begin Call_Count := Call_Count + 1; end Handle; end Handler; end signal;
reznikmm/matreshka
Ada
4,664
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_Style.Print_Page_Order_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Print_Page_Order_Attribute_Node is begin return Self : Style_Print_Page_Order_Attribute_Node do Matreshka.ODF_Style.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Style_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Print_Page_Order_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Print_Page_Order_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Style_URI, Matreshka.ODF_String_Constants.Print_Page_Order_Attribute, Style_Print_Page_Order_Attribute_Node'Tag); end Matreshka.ODF_Style.Print_Page_Order_Attributes;
stcarrez/ada-asf
Ada
12,829
adb
----------------------------------------------------------------------- -- asf-views-facelets -- Facelets representation and management -- Copyright (C) 2009, 2010, 2011, 2014, 2015, 2017, 2019, 2020, 2021 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.Exceptions; with Ada.Directories; with Ada.Unchecked_Deallocation; with ASF.Views.Nodes.Reader; with Input_Sources.File; with Sax.Readers; with EL.Contexts.Default; with Util.Files; with Util.Log.Loggers; package body ASF.Views.Facelets is use ASF.Views.Nodes; use Util.Log; -- The logger Log : constant Loggers.Logger := Loggers.Create ("ASF.Views.Facelets"); procedure Free is new Ada.Unchecked_Deallocation (Object => ASF.Views.File_Info, Name => ASF.Views.File_Info_Access); procedure Free is new Ada.Unchecked_Deallocation (Object => Facelet_Type, Name => Facelet_Access); -- Find in the factory for the facelet with the given name. procedure Find (Factory : in out Facelet_Factory; Name : in String; Result : out Facelet); -- Load the facelet node tree by reading the facelet XHTML file. procedure Load (Factory : in out Facelet_Factory; Name : in String; Context : in ASF.Contexts.Facelets.Facelet_Context'Class; Result : out Facelet; Ignore : in Boolean); -- Update the factory to store the facelet node tree procedure Update (Factory : in out Facelet_Factory; Facelet : in Facelet_Access); -- ------------------------------ -- Returns True if the facelet is null/empty. -- ------------------------------ function Is_Null (F : Facelet) return Boolean is begin return F.Facelet = null; end Is_Null; -- ------------------------------ -- Get the facelet identified by the given name. If the facelet is already -- loaded, the cached value is returned. The facelet file is searched in -- a set of directories configured in the facelet factory. -- ------------------------------ procedure Find_Facelet (Factory : in out Facelet_Factory; Name : in String; Context : in ASF.Contexts.Facelets.Facelet_Context'Class; Result : out Facelet; Ignore : in Boolean := False) is begin Log.Debug ("Find facelet {0}", Name); Find (Factory, Name, Result); if Result.Facelet = null then Load (Factory, Name, Context, Result, Ignore); if Result.Facelet = null then return; end if; Update (Factory, Result.Facelet); end if; end Find_Facelet; -- ------------------------------ -- Create the component tree from the facelet view. -- ------------------------------ procedure Build_View (View : in Facelet; Context : in out ASF.Contexts.Facelets.Facelet_Context'Class; Root : in ASF.Components.Base.UIComponent_Access) is Old : Unbounded_String; begin if View.Facelet /= null then Context.Set_Relative_Path (Path => ASF.Views.Relative_Path (View.Facelet.File.all), Previous => Old); View.Facelet.Root.Build_Children (Parent => Root, Context => Context); Context.Set_Relative_Path (Path => Old); end if; end Build_View; -- ------------------------------ -- Initialize the facelet factory. -- Set the search directories for facelet files. -- Set the ignore white space configuration when reading XHTML files. -- Set the ignore empty lines configuration when reading XHTML files. -- Set the escape unknown tags configuration when reading XHTML files. -- ------------------------------ procedure Initialize (Factory : in out Facelet_Factory; Components : access ASF.Factory.Component_Factory; Paths : in String; Ignore_White_Spaces : in Boolean; Ignore_Empty_Lines : in Boolean; Escape_Unknown_Tags : in Boolean) is begin Log.Info ("Set facelet search directory to: '{0}'", Paths); Factory.Factory := Components; Factory.Paths := To_Unbounded_String (Paths); Factory.Ignore_White_Spaces := Ignore_White_Spaces; Factory.Ignore_Empty_Lines := Ignore_Empty_Lines; Factory.Escape_Unknown_Tags := Escape_Unknown_Tags; end Initialize; -- ------------------------------ -- Find the facelet file in one of the facelet directories. -- Returns the path to be used for reading the facelet file. -- ------------------------------ function Find_Facelet_Path (Factory : Facelet_Factory; Name : String) return String is begin return Util.Files.Find_File_Path (Name, To_String (Factory.Paths)); end Find_Facelet_Path; -- ------------------------------ -- Find in the factory for the facelet with the given name. -- ------------------------------ procedure Find (Factory : in out Facelet_Factory; Name : in String; Result : out Facelet) is use Ada.Directories; use Ada.Calendar; begin Result.Facelet := Factory.Map.Find (Name); if Result.Facelet /= null then declare Now : constant Ada.Calendar.Time := Ada.Calendar.Clock; begin if Result.Facelet.Check_Time < Now then if Modification_Time (Result.Facelet.File.Path) > Result.Facelet.Modify_Time then Log.Info ("Ignoring cache because file '{0}' was modified", Result.Facelet.File.Path); Result.Facelet := null; else Result.Facelet.Check_Time := Now + CHECK_FILE_DELAY; end if; end if; end; end if; end Find; -- ------------------------------ -- Load the facelet node tree by reading the facelet XHTML file. -- ------------------------------ procedure Load (Factory : in out Facelet_Factory; Name : in String; Context : in ASF.Contexts.Facelets.Facelet_Context'Class; Result : out Facelet; Ignore : in Boolean) is Path : constant String := Find_Facelet_Path (Factory, Name); begin if Path = "" or else not Ada.Directories.Exists (Path) then if not Ignore then Log.Warn ("Cannot read '{0}': file does not exist", Path); else Log.Debug ("No default navigation file for '{0}'", Path); end if; Result.Facelet := null; return; end if; declare use type Ada.Calendar.Time; Pos : constant Integer := Path'Last - Name'Length + 1; Now : constant Ada.Calendar.Time := Ada.Calendar.Clock + CHECK_FILE_DELAY; File : File_Info_Access; Reader : ASF.Views.Nodes.Reader.Xhtml_Reader; Read : Input_Sources.File.File_Input; Mtime : Ada.Calendar.Time; Ctx : aliased EL.Contexts.Default.Default_Context; Root : ASF.Views.Nodes.Tag_Node_Access; begin if Pos <= Path'First then File := Create_File_Info (Path, Path'First); else File := Create_File_Info (Path, Pos); end if; Log.Info ("Loading facelet: '{0}' - {1} - {2}", Path, Name, Natural'Image (File.Relative_Pos)); Ctx.Set_Function_Mapper (Context.Get_Function_Mapper); Mtime := Ada.Directories.Modification_Time (Path); Input_Sources.File.Open (Path, Read); -- If True, xmlns:* attributes will be reported in Start_Element Reader.Set_Feature (Sax.Readers.Namespace_Prefixes_Feature, False); Reader.Set_Feature (Sax.Readers.Validation_Feature, False); Reader.Set_Ignore_White_Spaces (Factory.Ignore_White_Spaces); Reader.Set_Escape_Unknown_Tags (Factory.Escape_Unknown_Tags); Reader.Set_Ignore_Empty_Lines (Factory.Ignore_Empty_Lines); begin Reader.Parse (File, Read, Factory.Factory, Ctx'Unchecked_Access); exception when ASF.Views.Nodes.Reader.Parsing_Error => Free (File); when E : others => Free (File); Log.Error ("Unexpected exception while reading: '{0}': {1}: {2}", Path, Ada.Exceptions.Exception_Name (E), Ada.Exceptions.Exception_Message (E)); end; Root := Reader.Get_Root; if File = null then if Root /= null then Root.Delete; end if; Result.Facelet := null; else Result.Facelet := new Facelet_Type '(Util.Refs.Ref_Entity with Len => Name'Length, Root => Root, File => File, Modify_Time => Mtime, Check_Time => Now, Name => Name); end if; Input_Sources.File.Close (Read); end; end Load; -- ------------------------------ -- Update the factory to store the facelet node tree -- ------------------------------ procedure Update (Factory : in out Facelet_Factory; Facelet : in Facelet_Access) is begin Factory.Map.Insert (Facelet); end Update; -- ------------------------------ -- Clear the facelet cache -- ------------------------------ procedure Clear_Cache (Factory : in out Facelet_Factory) is begin Log.Info ("Clearing facelet cache"); Factory.Map.Clear; end Clear_Cache; protected body Facelet_Cache is -- ------------------------------ -- Find the facelet entry associated with the given name. -- ------------------------------ function Find (Name : in String) return Facelet_Access is Key : aliased Facelet_Type := Facelet_Type '(Util.Refs.Ref_Entity with Len => Name'Length, Name => Name, others => <>); Pos : constant Facelet_Sets.Cursor := Map.Find (Key'Unchecked_Access); begin if Facelet_Sets.Has_Element (Pos) then return Element (Pos); else return null; end if; end Find; -- ------------------------------ -- Insert or replace the facelet entry associated with the given name. -- ------------------------------ procedure Insert (Facelet : in Facelet_Access) is begin Map.Include (Facelet); end Insert; -- ------------------------------ -- Clear the cache. -- ------------------------------ procedure Clear is begin loop declare Pos : Facelet_Sets.Cursor := Map.First; Node : Facelet_Access; begin exit when not Has_Element (Pos); Node := Element (Pos); Map.Delete (Pos); Free (Node.File); ASF.Views.Nodes.Destroy (Node.Root); Free (Node); end; end loop; end Clear; end Facelet_Cache; -- ------------------------------ -- Free the storage held by the factory cache. -- ------------------------------ overriding procedure Finalize (Factory : in out Facelet_Factory) is begin Factory.Clear_Cache; end Finalize; end ASF.Views.Facelets;
zhmu/ananas
Ada
14,035
ads
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ C H 7 -- -- -- -- S p e c -- -- -- -- 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Namet; use Namet; with Types; use Types; package Exp_Ch7 is procedure Expand_N_Package_Body (N : Node_Id); procedure Expand_N_Package_Declaration (N : Node_Id); ----------------------------- -- Finalization Management -- ----------------------------- procedure Build_Anonymous_Master (Ptr_Typ : Entity_Id); -- Build a finalization master for an anonymous access-to-controlled type -- denoted by Ptr_Typ. The master is inserted in the declarations of the -- current unit. procedure Build_Controlling_Procs (Typ : Entity_Id); -- Typ is a record, and array type having controlled components. -- Create the procedures Deep_Initialize, Deep_Adjust and Deep_Finalize -- that take care of finalization management at run-time. -- Support of exceptions from user finalization procedures -- There is a specific mechanism to handle these exceptions, continue -- finalization and then raise PE. This mechanism is used by this package -- but also by exp_intr for Ada.Unchecked_Deallocation. -- There are 3 subprograms to use this mechanism, and the type -- Finalization_Exception_Data carries internal data between these -- subprograms: -- -- 1. Build_Object_Declaration: create the variables for the next two -- subprograms. -- 2. Build_Exception_Handler: create the exception handler for a call -- to a user finalization procedure. -- 3. Build_Raise_Stmt: create code to potentially raise a PE exception -- if an exception was raise in a user finalization procedure. type Finalization_Exception_Data is record Loc : Source_Ptr; -- Sloc for the added nodes Abort_Id : Entity_Id; -- Boolean variable set to true if the finalization was triggered by -- an abort. E_Id : Entity_Id; -- Variable containing the exception occurrence raised by user code Raised_Id : Entity_Id; -- Boolean variable set to true if an exception was raised in user code end record; function Build_Exception_Handler (Data : Finalization_Exception_Data; For_Library : Boolean := False) return Node_Id; -- Subsidiary to Build_Finalizer, Make_Deep_Array_Body and Make_Deep_Record -- _Body. Create an exception handler of the following form: -- -- when others => -- if not Raised_Id then -- Raised_Id := True; -- Save_Occurrence (E_Id, Get_Current_Excep.all.all); -- end if; -- -- If flag For_Library is set (and not in restricted profile): -- -- when others => -- if not Raised_Id then -- Raised_Id := True; -- Save_Library_Occurrence (Get_Current_Excep.all); -- end if; -- -- E_Id denotes the defining identifier of a local exception occurrence. -- Raised_Id is the entity of a local boolean flag. Flag For_Library is -- used when operating at the library level, when enabled the current -- exception will be saved to a global location. procedure Build_Finalization_Master (Typ : Entity_Id; For_Lib_Level : Boolean := False; For_Private : Boolean := False; Context_Scope : Entity_Id := Empty; Insertion_Node : Node_Id := Empty); -- Build a finalization master for an access type. The designated type may -- not necessarily be controlled or need finalization actions depending on -- the context. Flag For_Lib_Level must be set when creating a master for a -- build-in-place function call access result type. Flag For_Private must -- be set when the designated type contains a private component. Parameters -- Context_Scope and Insertion_Node must be used in conjunction with flag -- For_Private. Context_Scope is the scope of the context where the -- finalization master must be analyzed. Insertion_Node is the insertion -- point before which the master is to be inserted. procedure Build_Late_Proc (Typ : Entity_Id; Nam : Name_Id); -- Build one controlling procedure when a late body overrides one of the -- controlling operations. procedure Build_Object_Declarations (Data : out Finalization_Exception_Data; Decls : List_Id; Loc : Source_Ptr; For_Package : Boolean := False); -- Subsidiary to Make_Deep_Array_Body and Make_Deep_Record_Body. Create the -- list List containing the object declarations of boolean flag Abort_Id, -- the exception occurrence E_Id and boolean flag Raised_Id. -- -- Abort_Id : constant Boolean := -- Exception_Identity (Get_Current_Excep.all) = -- Standard'Abort_Signal'Identity; -- <or> -- Abort_Id : constant Boolean := False; -- no abort or For_Package -- -- E_Id : Exception_Occurrence; -- Raised_Id : Boolean := False; function Build_Raise_Statement (Data : Finalization_Exception_Data) return Node_Id; -- Subsidiary to routines Build_Finalizer, Make_Deep_Array_Body and Make_ -- Deep_Record_Body. Generate the following conditional raise statement: -- -- if Raised_Id and then not Abort_Id then -- Raise_From_Controlled_Operation (E_Id); -- end if; -- -- Abort_Id is a local boolean flag which is set when the finalization was -- triggered by an abort, E_Id denotes the defining identifier of a local -- exception occurrence, Raised_Id is the entity of a local boolean flag. function Make_Adjust_Call (Obj_Ref : Node_Id; Typ : Entity_Id; Skip_Self : Boolean := False) return Node_Id; -- Create a call to either Adjust or Deep_Adjust depending on the structure -- of type Typ. Obj_Ref is an expression with no side effects (not required -- to have been previously analyzed) that references the object to be -- adjusted. Typ is the expected type of Obj_Ref. When Skip_Self is set, -- only the components (if any) are adjusted. Return Empty if Adjust or -- Deep_Adjust is not available, possibly due to previous errors. function Make_Final_Call (Obj_Ref : Node_Id; Typ : Entity_Id; Skip_Self : Boolean := False) return Node_Id; -- Create a call to either Finalize or Deep_Finalize, depending on the -- structure of type Typ. Obj_Ref is an expression (with no side effects -- and is not required to have been previously analyzed) that references -- the object to be finalized. Typ is the expected type of Obj_Ref. When -- Skip_Self is set, only the components (if any) are finalized. Return -- Empty if Finalize or Deep_Finalize is not available, possibly due to -- previous errors. procedure Make_Finalize_Address_Body (Typ : Entity_Id); -- Create the body of TSS routine Finalize_Address if Typ is controlled and -- does not have a TSS entry for Finalize_Address. The procedure converts -- an address into a pointer and subsequently calls Deep_Finalize on the -- dereference. function Make_Init_Call (Obj_Ref : Node_Id; Typ : Entity_Id) return Node_Id; -- Create a call to either Initialize or Deep_Initialize, depending on the -- structure of type Typ. Obj_Ref is an expression with no side effects -- (not required to have been previously analyzed) that references the -- object to be initialized. Typ is the expected type of Obj_Ref. Return -- Empty if Initialize or Deep_Initialize is not available, possibly due to -- previous errors. function Make_Handler_For_Ctrl_Operation (Loc : Source_Ptr) return Node_Id; -- Generate an implicit exception handler with an 'others' choice, -- converting any occurrence to a raise of Program_Error. function Make_Local_Deep_Finalize (Typ : Entity_Id; Nam : Entity_Id) return Node_Id; -- Create a special version of Deep_Finalize with identifier Nam. The -- routine has state information and can perform partial finalization. function Make_Set_Finalize_Address_Call (Loc : Source_Ptr; Ptr_Typ : Entity_Id) return Node_Id; -- Associate the Finalize_Address primitive of the designated type with the -- finalization master of access type Ptr_Typ. The returned call is: -- -- Set_Finalize_Address -- (<Ptr_Typ>FM, <Desig_Typ>FD'Unrestricted_Access); -------------------------------------------- -- Task and Protected Object finalization -- -------------------------------------------- function Cleanup_Array (N : Node_Id; Obj : Node_Id; Typ : Entity_Id) return List_Id; -- Generate loops to finalize any tasks or simple protected objects that -- are subcomponents of an array. function Cleanup_Protected_Object (N : Node_Id; Ref : Node_Id) return Node_Id; -- Generate code to finalize a protected object without entries function Cleanup_Record (N : Node_Id; Obj : Node_Id; Typ : Entity_Id) return List_Id; -- For each subcomponent of a record that contains tasks or simple -- protected objects, generate the appropriate finalization call. function Cleanup_Task (N : Node_Id; Ref : Node_Id) return Node_Id; -- Generate code to finalize a task function Has_Simple_Protected_Object (T : Entity_Id) return Boolean; -- Check whether composite type contains a simple protected component function Is_Simple_Protected_Type (T : Entity_Id) return Boolean; -- Determine whether T denotes a protected type without entries whose -- _object field is of type System.Tasking.Protected_Objects.Protection. -- Something wrong here, implementation was changed to test Lock_Free -- but this spec does not mention that ??? -------------------------------- -- Transient Scope Management -- -------------------------------- procedure Expand_Cleanup_Actions (N : Node_Id); -- Expand the necessary stuff into a scope to enable finalization of local -- objects and deallocation of transient data when exiting the scope. N is -- a "scope node" that is to say one of the following: N_Block_Statement, -- N_Subprogram_Body, N_Task_Body, N_Entry_Body. procedure Establish_Transient_Scope (N : Node_Id; Manage_Sec_Stack : Boolean); -- Push a new transient scope on the scope stack. N is the node which must -- be serviced by the transient scope. Set Manage_Sec_Stack when the scope -- must mark and release the secondary stack. function Node_To_Be_Wrapped return Node_Id; -- Return the node to be wrapped if the current scope is transient procedure Store_Before_Actions_In_Scope (L : List_Id); -- Append the list L of actions to the end of the before-actions store in -- the top of the scope stack (also analyzes these actions). procedure Store_After_Actions_In_Scope (L : List_Id); -- Prepend the list L of actions to the beginning of the after-actions -- stored in the top of the scope stack (also analyzes these actions). -- -- Note that we are prepending here rather than appending. This means that -- if several calls are made to this procedure for the same scope, the -- actions will be executed in reverse order of the calls (actions for the -- last call executed first). Within the list L for a single call, the -- actions are executed in the order in which they appear in this list. procedure Store_Cleanup_Actions_In_Scope (L : List_Id); -- Prepend the list L of actions to the beginning of the cleanup-actions -- store in the top of the scope stack. procedure Wrap_Transient_Declaration (N : Node_Id); -- N is an object declaration. Expand the finalization calls after the -- declaration and make the outer scope being the transient one. procedure Wrap_Transient_Expression (N : Node_Id); -- N is a sub-expression. Expand a transient block around an expression procedure Wrap_Transient_Statement (N : Node_Id); -- N is a statement. Expand a transient block around an instruction end Exp_Ch7;
eqcola/ada-ado
Ada
13,020
adb
----------------------------------------------------------------------- -- ADO Sequences -- Database sequence generator -- Copyright (C) 2009, 2010, 2011, 2012, 2015, 2017 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.Exceptions; with Ada.Calendar; with ADO.Statements; with ADO.Objects; with ADO.Sessions; with ADO.Utils; with Regtests; with Regtests.Simple.Model; with Regtests.Images.Model; with Util.Assertions; with Util.Measures; with Util.Log; with Util.Log.Loggers; with Util.Beans.Objects; with Util.Test_Caller; package body ADO.Tests is use Ada.Exceptions; use ADO.Statements; use type Regtests.Simple.Model.User_Ref; use type Regtests.Simple.Model.Allocate_Ref; Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ADO.Tests"); package Caller is new Util.Test_Caller (Test, "ADO"); procedure Assert_Has_Message (T : in Test; E : in Exception_Occurrence); procedure Assert_Has_Message (T : in Test; E : in Exception_Occurrence) is Message : constant String := Exception_Message (E); begin Log.Info ("Exception: {0}", Message); T.Assert (Message'Length > 0, "Exception " & Exception_Name (E) & " does not have any message"); end Assert_Has_Message; procedure Set_Up (T : in out Test) is begin null; end Set_Up; -- ------------------------------ -- Check: -- Object_Ref.Load -- Object_Ref.Is_Null -- ------------------------------ procedure Test_Load (T : in out Test) is DB : ADO.Sessions.Session := Regtests.Get_Database; Object : Regtests.Simple.Model.User_Ref; begin T.Assert (Object.Is_Null, "Object_Ref.Is_Null: Empty object must be null"); Object.Load (DB, -1); T.Assert (False, "Object_Ref.Load: Load must raise NOT_FOUND exception"); exception when ADO.Objects.NOT_FOUND => T.Assert (Object.Is_Null, "Object_Ref.Load: Must not change the object"); end Test_Load; -- ------------------------------ -- Check: -- Object_Ref.Load -- Object_Ref.Save -- <Model>.Set_xxx (Unbounded_String) -- <Model>.Create -- ------------------------------ procedure Test_Create_Load (T : in out Test) is DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; Object : Regtests.Simple.Model.User_Ref; Check : Regtests.Simple.Model.User_Ref; begin -- Initialize and save an object Object.Set_Name ("A simple test name"); Object.Save (DB); T.Assert (Object.Get_Id > 0, "Saving an object did not allocate an identifier"); -- Load the object Check.Load (DB, Object.Get_Id); T.Assert (not Check.Is_Null, "Object_Ref.Load: Loading the object failed"); end Test_Create_Load; -- ------------------------------ -- Check: -- Various error checks on database connections -- -- Master_Connection.Rollback -- ------------------------------ procedure Test_Not_Open (T : in out Test) is DB : ADO.Sessions.Master_Session; begin begin DB.Rollback; T.Fail ("Master_Connection.Rollback should raise an exception"); exception when E : ADO.Sessions.NOT_OPEN => Assert_Has_Message (T, E); end; begin DB.Commit; T.Fail ("Master_Connection.Commit should raise an exception"); exception when E : ADO.Sessions.NOT_OPEN => Assert_Has_Message (T, E); end; end Test_Not_Open; -- ------------------------------ -- Check id generation -- ------------------------------ procedure Test_Allocate (T : in out Test) is DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; Key : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => Regtests.Simple.Model.ALLOCATE_TABLE); PrevId : Identifier := NO_IDENTIFIER; S : Util.Measures.Stamp; begin for I in 1 .. 200 loop declare Obj : Regtests.Simple.Model.Allocate_Ref; begin Obj.Save (DB); Key := Obj.Get_Key; if PrevId /= NO_IDENTIFIER then T.Assert (Objects.Get_Value (Key) = PrevId + 1, "Invalid allocated identifier: " & Objects.To_String (Key) & " previous=" & Identifier'Image (PrevId)); end if; PrevId := Objects.Get_Value (Key); end; end loop; Util.Measures.Report (S, "Allocate 200 ids"); end Test_Allocate; -- ------------------------------ -- Check: -- Object.Save (with creation) -- Object.Find -- Object.Save (update) -- ------------------------------ procedure Test_Create_Save (T : in out Test) is use ADO.Objects; use type ADO.Sessions.Connection_Status; DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; Ref : Regtests.Simple.Model.Allocate_Ref; Ref2 : Regtests.Simple.Model.Allocate_Ref; begin T.Assert (DB.Get_Status = ADO.Sessions.OPEN, "The database connection is open"); Ref.Set_Name ("Testing the allocation"); Ref.Save (DB); T.Assert (Ref.Get_Id > 0, "Object must have an id"); Ref.Set_Name ("Testing the allocation: update"); Ref.Save (DB); Ref2.Load (DB, Ref.Get_Id); end Test_Create_Save; -- ------------------------------ -- Check: -- Object.Save (with creation) -- ------------------------------ procedure Test_Perf_Create_Save (T : in out Test) is use ADO.Objects; DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; S : Util.Measures.Stamp; begin DB.Begin_Transaction; for I in 1 .. 1_000 loop declare Ref : Regtests.Simple.Model.Allocate_Ref; begin Ref.Set_Name ("Testing the allocation"); Ref.Save (DB); T.Assert (Ref.Get_Id > 0, "Object must have an id"); end; end loop; DB.Commit; Util.Measures.Report (S, "Create 1000 rows"); end Test_Perf_Create_Save; procedure Test_Delete_All (T : in out Test) is DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; Stmt : ADO.Statements.Delete_Statement := DB.Create_Statement (Regtests.Simple.Model.ALLOCATE_TABLE); Result : Natural; begin DB.Begin_Transaction; Stmt.Execute (Result); Log.Info ("Deleted {0} rows", Natural'Image (Result)); DB.Commit; T.Assert (Result > 100, "Too few rows were deleted"); end Test_Delete_All; -- ------------------------------ -- Test string insert. -- ------------------------------ procedure Test_String (T : in out Test) is use ADO.Objects; use Ada.Strings.Unbounded; DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; User : Regtests.Simple.Model.User_Ref; Usr2 : Regtests.Simple.Model.User_Ref; Name : Unbounded_String; begin for I in 1 .. 127 loop Append (Name, Character'Val (I)); end loop; Append (Name, ' '); Append (Name, ' '); Append (Name, ' '); Append (Name, ' '); DB.Begin_Transaction; User.Set_Name (Name); User.Save (DB); DB.Commit; -- Check that we can load the image and the blob. Usr2.Load (DB, User.Get_Id); Util.Tests.Assert_Equals (T, To_String (Name), String '(Usr2.Get_Name), "Invalid name inserted for user"); end Test_String; -- ------------------------------ -- Test blob insert. -- ------------------------------ procedure Test_Blob (T : in out Test) is use ADO.Objects; use Ada.Streams; procedure Assert_Equals is new Util.Assertions.Assert_Equals_T (Ada.Streams.Stream_Element); DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; Img : Regtests.Images.Model.Image_Ref; Size : constant Natural := 100; Data : ADO.Blob_Ref := ADO.Create_Blob (Size); Img2 : Regtests.Images.Model.Image_Ref; begin for I in 1 .. Size loop Data.Value.Data (Ada.Streams.Stream_Element_Offset (I)) := Integer'Pos ((64 + I) mod 255); end loop; DB.Begin_Transaction; Img.Set_Image (Data); Img.Set_Create_Date (Ada.Calendar.Clock); Img.Save (DB); DB.Commit; -- Check that we can load the image and the blob. Img2.Load (DB, Img.Get_Id); T.Assert (Img2.Get_Image.Is_Null = False, "No image blob loaded"); -- And verify that the blob data matches what we inserted. Util.Tests.Assert_Equals (T, Size, Integer (Img2.Get_Image.Value.Len), "Invalid blob length"); for I in 1 .. Data.Value.Len loop Assert_Equals (T, Data.Value.Data (I), Img2.Get_Image.Value.Data (I), "Invalid blob content at " & Stream_Element_Offset'Image (I)); end loop; -- Create a blob initialized with a file content. Data := ADO.Create_Blob ("Makefile"); T.Assert (not Data.Is_Null, "Null blob returned by Create_Blob"); T.Assert (Data.Value.Len > 100, "Blob length initialized from file is too small"); declare Content : Ada.Streams.Stream_Element_Array (1 .. 10); Img3 : Regtests.Images.Model.Image_Ref; begin for I in Content'Range loop Content (I) := Ada.Streams.Stream_Element_Offset'Pos (I + 30); end loop; Data := ADO.Create_Blob (Content); T.Assert (not Data.Is_Null, "Null blob returned by Create_Blob (Stream_Element_Array)"); T.Assert (Data.Value.Len = 10, "Blob length initialized from array is too small"); DB.Begin_Transaction; Img3.Set_Image (Data); Img3.Set_Create_Date (Ada.Calendar.Clock); Img3.Save (DB); DB.Commit; -- Check that we can load the image and the blob. Img2.Load (DB, Img3.Get_Id); T.Assert (Img2.Get_Image.Is_Null = False, "No image blob loaded"); Img2.Set_Image (ADO.Null_Blob); Img2.Save (DB); DB.Commit; end; end Test_Blob; -- ------------------------------ -- Test the To_Object and To_Identifier operations. -- ------------------------------ procedure Test_Identifier_To_Object (T : in out Test) is Val : Util.Beans.Objects.Object := ADO.Utils.To_Object (ADO.NO_IDENTIFIER); begin T.Assert (Util.Beans.Objects.Is_Null (Val), "To_Object must return null for ADO.NO_IDENTIFIER"); T.Assert (ADO.Utils.To_Identifier (Val) = ADO.NO_IDENTIFIER, "To_Identifier must return ADO.NO_IDENTIFIER for null"); Val := ADO.Utils.To_Object (1); T.Assert (not Util.Beans.Objects.Is_Null (Val), "To_Object must not return null for a valid Identifier"); T.Assert (ADO.Utils.To_Identifier (Val) = 1, "To_Identifier must return the correct identifier"); end Test_Identifier_To_Object; procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Object_Ref.Load", Test_Load'Access); Caller.Add_Test (Suite, "Test Object_Ref.Save", Test_Create_Load'Access); Caller.Add_Test (Suite, "Test Master_Connection init error", Test_Not_Open'Access); Caller.Add_Test (Suite, "Test Sequences.Factory", Test_Allocate'Access); Caller.Add_Test (Suite, "Test Object_Ref.Save/Create/Update", Test_Create_Save'Access); Caller.Add_Test (Suite, "Test Object_Ref.Create (DB Insert)", Test_Perf_Create_Save'Access); Caller.Add_Test (Suite, "Test Statement.Delete_Statement (delete all)", Test_Delete_All'Access); Caller.Add_Test (Suite, "Test insert string", Test_String'Access); Caller.Add_Test (Suite, "Test insert blob", Test_Blob'Access); Caller.Add_Test (Suite, "Test ADO.Utils.To_Object/To_Identifier", Test_Identifier_To_Object'Access); end Add_Tests; end ADO.Tests;
reznikmm/matreshka
Ada
6,767
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.DG.Canvases; with AMF.DG.Circles; with AMF.DG.Clip_Paths; with AMF.DG.Ellipses; with AMF.DG.Groups; with AMF.DG.Images; with AMF.DG.Linear_Gradients; with AMF.DG.Lines; with AMF.DG.Marked_Elements; with AMF.DG.Markers; with AMF.DG.Paths; with AMF.DG.Patterns; with AMF.DG.Polygons; with AMF.DG.Polylines; with AMF.DG.Radial_Gradients; with AMF.DG.Rectangles; with AMF.DG.Styles; with AMF.DG.Texts; package AMF.Factories.DG_Factories is pragma Preelaborate; type DG_Factory is limited interface and AMF.Factories.Factory; type DG_Factory_Access is access all DG_Factory'Class; for DG_Factory_Access'Storage_Size use 0; not overriding function Create_Canvas (Self : not null access DG_Factory) return AMF.DG.Canvases.DG_Canvas_Access is abstract; not overriding function Create_Circle (Self : not null access DG_Factory) return AMF.DG.Circles.DG_Circle_Access is abstract; not overriding function Create_Clip_Path (Self : not null access DG_Factory) return AMF.DG.Clip_Paths.DG_Clip_Path_Access is abstract; not overriding function Create_Ellipse (Self : not null access DG_Factory) return AMF.DG.Ellipses.DG_Ellipse_Access is abstract; not overriding function Create_Group (Self : not null access DG_Factory) return AMF.DG.Groups.DG_Group_Access is abstract; not overriding function Create_Image (Self : not null access DG_Factory) return AMF.DG.Images.DG_Image_Access is abstract; not overriding function Create_Line (Self : not null access DG_Factory) return AMF.DG.Lines.DG_Line_Access is abstract; not overriding function Create_Linear_Gradient (Self : not null access DG_Factory) return AMF.DG.Linear_Gradients.DG_Linear_Gradient_Access is abstract; not overriding function Create_Marked_Element (Self : not null access DG_Factory) return AMF.DG.Marked_Elements.DG_Marked_Element_Access is abstract; not overriding function Create_Marker (Self : not null access DG_Factory) return AMF.DG.Markers.DG_Marker_Access is abstract; not overriding function Create_Path (Self : not null access DG_Factory) return AMF.DG.Paths.DG_Path_Access is abstract; not overriding function Create_Pattern (Self : not null access DG_Factory) return AMF.DG.Patterns.DG_Pattern_Access is abstract; not overriding function Create_Polygon (Self : not null access DG_Factory) return AMF.DG.Polygons.DG_Polygon_Access is abstract; not overriding function Create_Polyline (Self : not null access DG_Factory) return AMF.DG.Polylines.DG_Polyline_Access is abstract; not overriding function Create_Radial_Gradient (Self : not null access DG_Factory) return AMF.DG.Radial_Gradients.DG_Radial_Gradient_Access is abstract; not overriding function Create_Rectangle (Self : not null access DG_Factory) return AMF.DG.Rectangles.DG_Rectangle_Access is abstract; not overriding function Create_Style (Self : not null access DG_Factory) return AMF.DG.Styles.DG_Style_Access is abstract; not overriding function Create_Text (Self : not null access DG_Factory) return AMF.DG.Texts.DG_Text_Access is abstract; end AMF.Factories.DG_Factories;
stcarrez/ada-el
Ada
6,597
adb
----------------------------------------------------------------------- -- el-contexts-tests - Tests the EL contexts -- Copyright (C) 2011, 2015, 2022, 2023 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Test_Caller; with Util.Properties; with Util.Beans.Objects; with EL.Expressions; with EL.Contexts.Properties; with EL.Contexts.Default; with EL.Contexts.TLS; with EL.Variables.Default; package body EL.Contexts.Tests is use Util.Tests; package Caller is new Util.Test_Caller (Test, "EL.Contexts"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test EL.Contexts.Properties.Get_Value", Test_Context_Properties'Access); Caller.Add_Test (Suite, "Test EL.Contexts.TLS.Current", Test_Context_TLS'Access); Caller.Add_Test (Suite, "Test EL.Contexts.Guarded_Context", Test_Guarded_Context'Access); Caller.Add_Test (Suite, "Test EL.Contexts.Default_Resolver", Test_Resolver_Context'Access); end Add_Tests; -- ------------------------------ -- Test Add_Parameter -- ------------------------------ procedure Test_Context_Properties (T : in out Test) is function Eval (Item : in String) return String; Context : EL.Contexts.Default.Default_Context; Prop_Resolver : aliased EL.Contexts.Properties.Property_Resolver; Props : Util.Properties.Manager; function Eval (Item : in String) return String is Expr : constant Expressions.Expression := EL.Expressions.Create_Expression (Item, Context); Result : constant Util.Beans.Objects.Object := Expr.Get_Value (Context); begin return Util.Beans.Objects.To_String (Result); end Eval; begin Props.Set ("user", "joe"); Props.Set ("home", "/home/joe"); Prop_Resolver.Set_Properties (Props); Context.Set_Resolver (Prop_Resolver'Unchecked_Access); Assert_Equals (T, "joe", Eval ("#{user}"), "Invalid evaluation of #{user}"); Assert_Equals (T, "/home/joe", Eval ("#{home}"), "Invalid evaluation of #{home}"); end Test_Context_Properties; -- ------------------------------ -- Test the thread local EL context. -- ------------------------------ procedure Test_Context_TLS (T : in out Test) is begin T.Assert (EL.Contexts.TLS.Current = null, "The TLS expression context must be null"); declare C1 : EL.Contexts.TLS.TLS_Context; T1 : EL.Contexts.ELContext_Access; begin T1 := EL.Contexts.TLS.Current; T.Assert (T1 /= null, "The TLS expression context must not be null"); T.Assert (C1.Get_Variable_Mapper = T1.Get_Variable_Mapper, "The TLS expression context is not valid"); declare C2 : EL.Contexts.TLS.TLS_Context; T2 : EL.Contexts.ELContext_Access; begin T2 := EL.Contexts.TLS.Current; T.Assert (T2 /= null, "The TLS expression context must not be null"); T.Assert (C2.Get_Variable_Mapper = T2.Get_Variable_Mapper, "The TLS expression context is not valid"); T.Assert (T1 /= T2, "The TLS expression context must be changed"); end; T.Assert (T1 = EL.Contexts.TLS.Current, "The TLS expression context must be restored"); end; T.Assert (EL.Contexts.TLS.Current = null, "The TLS expression context must be null"); end Test_Context_TLS; -- ------------------------------ -- Test the EL guarded context. -- ------------------------------ procedure Test_Guarded_Context (T : in out Test) is procedure Handle_Exception (E : in Ada.Exceptions.Exception_Occurrence); function Eval (Item : in String) return String; Count : Natural := 0; procedure Handle_Exception (E : in Ada.Exceptions.Exception_Occurrence) is pragma Unreferenced (E); begin Count := Count + 1; end Handle_Exception; Ctx : aliased EL.Contexts.Default.Default_Context; Var : aliased EL.Variables.Default.Default_Variable_Mapper; Context : EL.Contexts.Default.Guarded_Context (Handle_Exception'Access, Ctx'Unchecked_Access); function Eval (Item : in String) return String is Expr : constant Expressions.Expression := EL.Expressions.Create_Expression (Item, Context); Result : constant Util.Beans.Objects.Object := Expr.Get_Value (Context); begin return Util.Beans.Objects.To_String (Result); end Eval; begin Ctx.Set_Variable_Mapper (Var'Unchecked_Access); Assert_Equals (T, "null", Eval ("#{- bob}"), "Invalid evaluation of #{- bob}"); Assert_Equals (T, 1, Count, "No exception raised"); end Test_Guarded_Context; -- ------------------------------ -- Test the default EL resolver. -- ------------------------------ procedure Test_Resolver_Context (T : in out Test) is use EL.Expressions; Resolver : aliased EL.Contexts.Default.Default_ELResolver; Ctx : aliased EL.Contexts.Default.Default_Context; begin Ctx.Set_Resolver (Resolver'Unchecked_Access); Resolver.Register (To_Unbounded_String ("user"), Util.Beans.Objects.To_Object (Integer (123))); begin declare VE : constant Value_Expression := Create_Expression ("#{user.age}", Ctx); begin VE.Set_Value (Context => Ctx, Value => EL.Objects.To_Object (Integer (2))); T.Fail ("No Invalid_Variable exception was raised"); end; exception when Invalid_Variable => null; end; end Test_Resolver_Context; end EL.Contexts.Tests;
yannickmoy/spat
Ada
2,382
adb
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. ([email protected]) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hocevar. See the LICENSE file for more details. ------------------------------------------------------------------------------ pragma License (Unrestricted); ------------------------------------------------------------------------------ -- -- SPARK Proof Analysis Tool -- -- S.P.A.T. - Main program - separate Print_Summary -- ------------------------------------------------------------------------------ with Ada.Text_IO; with SPAT.Strings; separate (Run_SPAT) ------------------------------------------------------------------------------ -- Print_Summary ------------------------------------------------------------------------------ procedure Print_Summary (Info : in SPAT.Spark_Info.T; Sort_By : in SPAT.Spark_Info.Sorting_Criterion) is Files : constant SPAT.Strings.File_Names := Info.List_All_Files (Sort_By => Sort_By); Second_Column : Ada.Text_IO.Count := 0; Third_Column : Ada.Text_IO.Count; use type Ada.Text_IO.Count; begin for File of Files loop Second_Column := Ada.Text_IO.Count'Max (Second_Column, Ada.Directories.Simple_Name (Name => SPAT.To_String (File))'Length); end loop; Second_Column := Second_Column + 2; Third_Column := Second_Column + 4; for File of Files loop SPAT.Log.Message (Message => Ada.Directories.Simple_Name (Name => SPAT.To_String (Source => File)), New_Line => False); Ada.Text_IO.Set_Col (File => Ada.Text_IO.Standard_Output, To => Second_Column); SPAT.Log.Message (Message => "=> (Flow => " & Image (Value => Info.Flow_Time (File => File)) & ",", New_Line => False); Ada.Text_IO.Set_Col (File => Ada.Text_IO.Standard_Output, To => Third_Column); SPAT.Log.Message (Message => "Proof => " & Image (Value => Info.Proof_Time (File => File)) & ")"); end loop; end Print_Summary;
SSOCsoft/Log_Reporter
Ada
1,198
adb
Package Body Config is -- Return the slice (1..Item.LENGTH). Function "+"( Item : Pascal_String ) return String is Begin Return Result : Constant String := (Item.Text(1..Natural(Item.Length))); End "+"; -- Return Item concatenated with the padding to make the result-length 255. Function "+"( Item : String ) return Pascal_String is Subtype Tail is Natural range Natural'Succ(Item'Length)..Max_String_255'Last; Begin Return Result : Constant Pascal_String := (Text => Item & (Tail => ASCII.NUL), Length => Item'Length); End "+"; --------- -- GET -- --------- function Host return Pascal_String is (mailhost); function User return Pascal_String is (mailuser); function Password return Pascal_String is (mailpassword); --------- -- SET -- --------- procedure Host( Item : String ) is Begin mailhost:= +Item; End; procedure User( Item : String ) is Begin mailuser:= +Item; End; procedure Password(Item : String) is Begin mailpassword:= +Item; End; End Config;
stcarrez/ada-awa
Ada
48,053
adb
----------------------------------------------------------------------- -- AWA.Counters.Models -- AWA.Counters.Models ----------------------------------------------------------------------- -- File generated by Dynamo DO NOT MODIFY -- Template used: templates/model/package-body.xhtml -- Ada Generator: https://github.com/stcarrez/dynamo Version 1.4.0 ----------------------------------------------------------------------- -- Copyright (C) 2023 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- pragma Warnings (Off); with Ada.Unchecked_Deallocation; with Util.Beans.Objects.Time; with ASF.Events.Faces.Actions; pragma Warnings (On); package body AWA.Counters.Models is pragma Style_Checks ("-mrIu"); pragma Warnings (Off, "formal parameter * is not referenced"); pragma Warnings (Off, "use clause for type *"); pragma Warnings (Off, "use clause for private type *"); use type ADO.Objects.Object_Record_Access; use type ADO.Objects.Object_Ref; function Counter_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => COUNTER_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Counter_Key; function Counter_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => COUNTER_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Counter_Key; function "=" (Left, Right : Counter_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out Counter_Ref'Class; Impl : out Counter_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Counter_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Counter_Ref) is Impl : Counter_Access; begin Impl := new Counter_Impl; Impl.Object_Id := ADO.NO_IDENTIFIER; Impl.Date := ADO.DEFAULT_TIME; Impl.Counter := 0; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Counter -- ---------------------------------------- procedure Set_Object_Id (Object : in out Counter_Ref; Value : in ADO.Identifier) is Impl : Counter_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Identifier (Impl.all, 1, Impl.Object_Id, Value); end Set_Object_Id; function Get_Object_Id (Object : in Counter_Ref) return ADO.Identifier is Impl : constant Counter_Access := Counter_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Object_Id; end Get_Object_Id; procedure Set_Date (Object : in out Counter_Ref; Value : in Ada.Calendar.Time) is Impl : Counter_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Time (Impl.all, 2, Impl.Date, Value); end Set_Date; function Get_Date (Object : in Counter_Ref) return Ada.Calendar.Time is Impl : constant Counter_Access := Counter_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Date; end Get_Date; procedure Set_Counter (Object : in out Counter_Ref; Value : in Integer) is Impl : Counter_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Integer (Impl.all, 3, Impl.Counter, Value); end Set_Counter; function Get_Counter (Object : in Counter_Ref) return Integer is Impl : constant Counter_Access := Counter_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Counter; end Get_Counter; procedure Set_Definition_Id (Object : in out Counter_Ref; Value : in ADO.Identifier) is Impl : Counter_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 4, Value); end Set_Definition_Id; function Get_Definition_Id (Object : in Counter_Ref) return ADO.Identifier is Impl : constant Counter_Access := Counter_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Definition_Id; -- Copy of the object. procedure Copy (Object : in Counter_Ref; Into : in out Counter_Ref) is Result : Counter_Ref; begin if not Object.Is_Null then declare Impl : constant Counter_Access := Counter_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Counter_Access := new Counter_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Object_Id := Impl.Object_Id; Copy.Date := Impl.Date; Copy.Counter := Impl.Counter; end; end if; Into := Result; end Copy; overriding procedure Find (Object : in out Counter_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Counter_Access := new Counter_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out Counter_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Counter_Access := new Counter_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("definition_id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out Counter_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Counter_Access := new Counter_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("definition_id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; overriding procedure Save (Object : in out Counter_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new Counter_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; overriding procedure Delete (Object : in out Counter_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- overriding procedure Destroy (Object : access Counter_Impl) is type Counter_Impl_Ptr is access all Counter_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Counter_Impl, Counter_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Counter_Impl_Ptr := Counter_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; overriding procedure Find (Object : in out Counter_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, COUNTER_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out Counter_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("definition_id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; overriding procedure Save (Object : in out Counter_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (COUNTER_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_1_NAME, -- object_id Value => Object.Object_Id); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_1_NAME, -- date Value => Object.Date); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_1_NAME, -- counter Value => Object.Counter); Object.Clear_Modified (3); end if; if Object.Is_Modified (4) then Stmt.Save_Field (Name => COL_3_1_NAME, -- definition_id Value => Object.Get_Key); Object.Clear_Modified (4); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "definition_id = ? AND object_id = ? AND date = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Add_Param (Value => Object.Object_Id); Stmt.Add_Param (Value => Object.Date); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; overriding procedure Create (Object : in out Counter_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (COUNTER_DEF'Access); Result : Integer; begin Query.Save_Field (Name => COL_0_1_NAME, -- object_id Value => Object.Object_Id); Query.Save_Field (Name => COL_1_1_NAME, -- date Value => Object.Date); Query.Save_Field (Name => COL_2_1_NAME, -- counter Value => Object.Counter); Query.Save_Field (Name => COL_3_1_NAME, -- definition_id Value => Object.Get_Key); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; overriding procedure Delete (Object : in out Counter_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (COUNTER_DEF'Access); begin Stmt.Set_Filter (Filter => "definition_id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; -- ------------------------------ -- Get the bean attribute identified by the name. -- ------------------------------ overriding function Get_Value (From : in Counter_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : ADO.Objects.Object_Record_Access; Impl : access Counter_Impl; begin if From.Is_Null then return Util.Beans.Objects.Null_Object; end if; Obj := From.Get_Load_Object; Impl := Counter_Impl (Obj.all)'Access; if Name = "object_id" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Object_Id)); elsif Name = "date" then return Util.Beans.Objects.Time.To_Object (Impl.Date); elsif Name = "counter" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Counter)); elsif Name = "definition_id" then return ADO.Objects.To_Object (Impl.Get_Key); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Counter_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Object_Id := Stmt.Get_Identifier (0); Object.Date := Stmt.Get_Time (1); Object.Counter := Stmt.Get_Integer (2); Object.Set_Key_Value (Stmt.Get_Identifier (3)); ADO.Objects.Set_Created (Object); end Load; function Counter_Definition_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => COUNTER_DEFINITION_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Counter_Definition_Key; function Counter_Definition_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => COUNTER_DEFINITION_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Counter_Definition_Key; function "=" (Left, Right : Counter_Definition_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out Counter_Definition_Ref'Class; Impl : out Counter_Definition_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Counter_Definition_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Counter_Definition_Ref) is Impl : Counter_Definition_Access; begin Impl := new Counter_Definition_Impl; Impl.Entity_Type.Is_Null := True; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Counter_Definition -- ---------------------------------------- procedure Set_Name (Object : in out Counter_Definition_Ref; Value : in String) is Impl : Counter_Definition_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 1, Impl.Name, Value); end Set_Name; procedure Set_Name (Object : in out Counter_Definition_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String) is Impl : Counter_Definition_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Unbounded_String (Impl.all, 1, Impl.Name, Value); end Set_Name; function Get_Name (Object : in Counter_Definition_Ref) return String is begin return Ada.Strings.Unbounded.To_String (Object.Get_Name); end Get_Name; function Get_Name (Object : in Counter_Definition_Ref) return Ada.Strings.Unbounded.Unbounded_String is Impl : constant Counter_Definition_Access := Counter_Definition_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Name; end Get_Name; procedure Set_Id (Object : in out Counter_Definition_Ref; Value : in ADO.Identifier) is Impl : Counter_Definition_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 2, Value); end Set_Id; function Get_Id (Object : in Counter_Definition_Ref) return ADO.Identifier is Impl : constant Counter_Definition_Access := Counter_Definition_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Id; procedure Set_Entity_Type (Object : in out Counter_Definition_Ref; Value : in ADO.Nullable_Entity_Type) is Impl : Counter_Definition_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Entity_Type (Impl.all, 3, Impl.Entity_Type, Value); end Set_Entity_Type; function Get_Entity_Type (Object : in Counter_Definition_Ref) return ADO.Nullable_Entity_Type is Impl : constant Counter_Definition_Access := Counter_Definition_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Entity_Type; end Get_Entity_Type; -- Copy of the object. procedure Copy (Object : in Counter_Definition_Ref; Into : in out Counter_Definition_Ref) is Result : Counter_Definition_Ref; begin if not Object.Is_Null then declare Impl : constant Counter_Definition_Access := Counter_Definition_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Counter_Definition_Access := new Counter_Definition_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Name := Impl.Name; Copy.Entity_Type := Impl.Entity_Type; end; end if; Into := Result; end Copy; overriding procedure Find (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Counter_Definition_Access := new Counter_Definition_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Counter_Definition_Access := new Counter_Definition_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Counter_Definition_Access := new Counter_Definition_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; overriding procedure Save (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new Counter_Definition_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; overriding procedure Delete (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- overriding procedure Destroy (Object : access Counter_Definition_Impl) is type Counter_Definition_Impl_Ptr is access all Counter_Definition_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Counter_Definition_Impl, Counter_Definition_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Counter_Definition_Impl_Ptr := Counter_Definition_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; overriding procedure Find (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, COUNTER_DEFINITION_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; overriding procedure Save (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (COUNTER_DEFINITION_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_2_NAME, -- name Value => Object.Name); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_2_NAME, -- id Value => Object.Get_Key); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_2_NAME, -- entity_type Value => Object.Entity_Type); Object.Clear_Modified (3); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; overriding procedure Create (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (COUNTER_DEFINITION_DEF'Access); Result : Integer; begin Query.Save_Field (Name => COL_0_2_NAME, -- name Value => Object.Name); Session.Allocate (Id => Object); Query.Save_Field (Name => COL_1_2_NAME, -- id Value => Object.Get_Key); Query.Save_Field (Name => COL_2_2_NAME, -- entity_type Value => Object.Entity_Type); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; overriding procedure Delete (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (COUNTER_DEFINITION_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; -- ------------------------------ -- Get the bean attribute identified by the name. -- ------------------------------ overriding function Get_Value (From : in Counter_Definition_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : ADO.Objects.Object_Record_Access; Impl : access Counter_Definition_Impl; begin if From.Is_Null then return Util.Beans.Objects.Null_Object; end if; Obj := From.Get_Load_Object; Impl := Counter_Definition_Impl (Obj.all)'Access; if Name = "name" then return Util.Beans.Objects.To_Object (Impl.Name); elsif Name = "id" then return ADO.Objects.To_Object (Impl.Get_Key); elsif Name = "entity_type" then if Impl.Entity_Type.Is_Null then return Util.Beans.Objects.Null_Object; else return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Entity_Type.Value)); end if; end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Counter_Definition_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Name := Stmt.Get_Unbounded_String (0); Object.Set_Key_Value (Stmt.Get_Identifier (1)); Object.Entity_Type := Stmt.Get_Nullable_Entity_Type (2); ADO.Objects.Set_Created (Object); end Load; function Visit_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => VISIT_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Visit_Key; function Visit_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => VISIT_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Visit_Key; function "=" (Left, Right : Visit_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out Visit_Ref'Class; Impl : out Visit_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Visit_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Visit_Ref) is Impl : Visit_Access; begin Impl := new Visit_Impl; Impl.Object_Id := ADO.NO_IDENTIFIER; Impl.Counter := 0; Impl.Date := ADO.DEFAULT_TIME; Impl.User := ADO.NO_IDENTIFIER; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Visit -- ---------------------------------------- procedure Set_Object_Id (Object : in out Visit_Ref; Value : in ADO.Identifier) is Impl : Visit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Identifier (Impl.all, 1, Impl.Object_Id, Value); end Set_Object_Id; function Get_Object_Id (Object : in Visit_Ref) return ADO.Identifier is Impl : constant Visit_Access := Visit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Object_Id; end Get_Object_Id; procedure Set_Counter (Object : in out Visit_Ref; Value : in Integer) is Impl : Visit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Integer (Impl.all, 2, Impl.Counter, Value); end Set_Counter; function Get_Counter (Object : in Visit_Ref) return Integer is Impl : constant Visit_Access := Visit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Counter; end Get_Counter; procedure Set_Date (Object : in out Visit_Ref; Value : in Ada.Calendar.Time) is Impl : Visit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Time (Impl.all, 3, Impl.Date, Value); end Set_Date; function Get_Date (Object : in Visit_Ref) return Ada.Calendar.Time is Impl : constant Visit_Access := Visit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Date; end Get_Date; procedure Set_User (Object : in out Visit_Ref; Value : in ADO.Identifier) is Impl : Visit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Identifier (Impl.all, 4, Impl.User, Value); end Set_User; function Get_User (Object : in Visit_Ref) return ADO.Identifier is Impl : constant Visit_Access := Visit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.User; end Get_User; procedure Set_Definition_Id (Object : in out Visit_Ref; Value : in ADO.Identifier) is Impl : Visit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 5, Value); end Set_Definition_Id; function Get_Definition_Id (Object : in Visit_Ref) return ADO.Identifier is Impl : constant Visit_Access := Visit_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Definition_Id; -- Copy of the object. procedure Copy (Object : in Visit_Ref; Into : in out Visit_Ref) is Result : Visit_Ref; begin if not Object.Is_Null then declare Impl : constant Visit_Access := Visit_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Visit_Access := new Visit_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Object_Id := Impl.Object_Id; Copy.Counter := Impl.Counter; Copy.Date := Impl.Date; Copy.User := Impl.User; end; end if; Into := Result; end Copy; overriding procedure Find (Object : in out Visit_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Visit_Access := new Visit_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out Visit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Visit_Access := new Visit_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("definition_id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out Visit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Visit_Access := new Visit_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("definition_id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; overriding procedure Save (Object : in out Visit_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new Visit_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; overriding procedure Delete (Object : in out Visit_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- overriding procedure Destroy (Object : access Visit_Impl) is type Visit_Impl_Ptr is access all Visit_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Visit_Impl, Visit_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Visit_Impl_Ptr := Visit_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; overriding procedure Find (Object : in out Visit_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, VISIT_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out Visit_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("definition_id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; overriding procedure Save (Object : in out Visit_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (VISIT_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_3_NAME, -- object_id Value => Object.Object_Id); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_3_NAME, -- counter Value => Object.Counter); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_3_NAME, -- date Value => Object.Date); Object.Clear_Modified (3); end if; if Object.Is_Modified (4) then Stmt.Save_Field (Name => COL_3_3_NAME, -- user Value => Object.User); Object.Clear_Modified (4); end if; if Object.Is_Modified (5) then Stmt.Save_Field (Name => COL_4_3_NAME, -- definition_id Value => Object.Get_Key); Object.Clear_Modified (5); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "definition_id = ? AND object_id = ? AND user = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Add_Param (Value => Object.Object_Id); Stmt.Add_Param (Value => Object.User); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; overriding procedure Create (Object : in out Visit_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (VISIT_DEF'Access); Result : Integer; begin Query.Save_Field (Name => COL_0_3_NAME, -- object_id Value => Object.Object_Id); Query.Save_Field (Name => COL_1_3_NAME, -- counter Value => Object.Counter); Query.Save_Field (Name => COL_2_3_NAME, -- date Value => Object.Date); Query.Save_Field (Name => COL_3_3_NAME, -- user Value => Object.User); Query.Save_Field (Name => COL_4_3_NAME, -- definition_id Value => Object.Get_Key); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; overriding procedure Delete (Object : in out Visit_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (VISIT_DEF'Access); begin Stmt.Set_Filter (Filter => "definition_id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; -- ------------------------------ -- Get the bean attribute identified by the name. -- ------------------------------ overriding function Get_Value (From : in Visit_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : ADO.Objects.Object_Record_Access; Impl : access Visit_Impl; begin if From.Is_Null then return Util.Beans.Objects.Null_Object; end if; Obj := From.Get_Load_Object; Impl := Visit_Impl (Obj.all)'Access; if Name = "object_id" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Object_Id)); elsif Name = "counter" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Counter)); elsif Name = "date" then return Util.Beans.Objects.Time.To_Object (Impl.Date); elsif Name = "user" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.User)); elsif Name = "definition_id" then return ADO.Objects.To_Object (Impl.Get_Key); end if; return Util.Beans.Objects.Null_Object; end Get_Value; procedure List (Object : in out Visit_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, VISIT_DEF'Access); begin Stmt.Execute; Visit_Vectors.Clear (Object); while Stmt.Has_Elements loop declare Item : Visit_Ref; Impl : constant Visit_Access := new Visit_Impl; begin Impl.Load (Stmt, Session); ADO.Objects.Set_Object (Item, Impl.all'Access); Object.Append (Item); end; Stmt.Next; end loop; end List; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Visit_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Object_Id := Stmt.Get_Identifier (0); Object.Counter := Stmt.Get_Integer (1); Object.Date := Stmt.Get_Time (2); Object.User := Stmt.Get_Identifier (3); Object.Set_Key_Value (Stmt.Get_Identifier (4)); ADO.Objects.Set_Created (Object); end Load; -- ------------------------------ -- Get the bean attribute identified by the name. -- ------------------------------ overriding function Get_Value (From : in Stat_Info; Name : in String) return Util.Beans.Objects.Object is begin if Name = "date" then return Util.Beans.Objects.Time.To_Object (From.Date); elsif Name = "count" then return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Count)); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Set the value identified by the name -- ------------------------------ overriding procedure Set_Value (Item : in out Stat_Info; Name : in String; Value : in Util.Beans.Objects.Object) is begin if Name = "date" then Item.Date := Util.Beans.Objects.Time.To_Time (Value); elsif Name = "count" then Item.Count := Util.Beans.Objects.To_Integer (Value); end if; end Set_Value; -- -------------------- -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. -- -------------------- procedure List (Object : in out Stat_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class) is begin List (Object.List, Session, Context); end List; -- -------------------- -- The month statistics. -- -------------------- procedure List (Object : in out Stat_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class) is procedure Read (Into : in out Stat_Info); Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Context); Pos : Positive := 1; procedure Read (Into : in out Stat_Info) is begin Into.Date := Stmt.Get_Time (0); Into.Count := Stmt.Get_Natural (1); end Read; begin Stmt.Execute; Stat_Info_Vectors.Clear (Object); while Stmt.Has_Elements loop Object.Insert_Space (Before => Pos); Object.Update_Element (Index => Pos, Process => Read'Access); Pos := Pos + 1; Stmt.Next; end loop; end List; procedure Op_Load (Bean : in out Stat_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String); procedure Op_Load (Bean : in out Stat_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is begin Stat_List_Bean'Class (Bean).Load (Outcome); end Op_Load; package Binding_Stat_List_Bean_1 is new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Stat_List_Bean, Method => Op_Load, Name => "load"); Binding_Stat_List_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array := (1 => Binding_Stat_List_Bean_1.Proxy'Access ); -- ------------------------------ -- This bean provides some methods that can be used in a Method_Expression. -- ------------------------------ overriding function Get_Method_Bindings (From : in Stat_List_Bean) return Util.Beans.Methods.Method_Binding_Array_Access is pragma Unreferenced (From); begin return Binding_Stat_List_Bean_Array'Access; end Get_Method_Bindings; -- ------------------------------ -- Get the bean attribute identified by the name. -- ------------------------------ overriding function Get_Value (From : in Stat_List_Bean; Name : in String) return Util.Beans.Objects.Object is begin if Name = "entity_type" then return Util.Beans.Objects.To_Object (From.Entity_Type); elsif Name = "first_date" then return Util.Beans.Objects.To_Object (From.First_Date); elsif Name = "last_date" then return Util.Beans.Objects.To_Object (From.Last_Date); elsif Name = "entity_id" then return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Entity_Id)); elsif Name = "counter_name" then return Util.Beans.Objects.To_Object (From.Counter_Name); elsif Name = "query_name" then return Util.Beans.Objects.To_Object (From.Query_Name); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Set the value identified by the name -- ------------------------------ overriding procedure Set_Value (Item : in out Stat_List_Bean; Name : in String; Value : in Util.Beans.Objects.Object) is begin if Name = "entity_type" then Item.Entity_Type := Util.Beans.Objects.To_Unbounded_String (Value); elsif Name = "first_date" then Item.First_Date := Util.Beans.Objects.To_Unbounded_String (Value); elsif Name = "last_date" then Item.Last_Date := Util.Beans.Objects.To_Unbounded_String (Value); elsif Name = "entity_id" then Item.Entity_Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value)); elsif Name = "counter_name" then Item.Counter_Name := Util.Beans.Objects.To_Unbounded_String (Value); elsif Name = "query_name" then Item.Query_Name := Util.Beans.Objects.To_Unbounded_String (Value); end if; end Set_Value; end AWA.Counters.Models;