repo_name
stringlengths 9
74
| language
stringclasses 1
value | length_bytes
int64 11
9.34M
| extension
stringclasses 2
values | content
stringlengths 11
9.34M
|
---|---|---|---|---|
zhmu/ananas | Ada | 2,511 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . D I M . M K S . O T H E R _ P R E F I X E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2011-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Dim.Generic_Mks.Generic_Other_Prefixes;
package System.Dim.Mks.Other_Prefixes is
new System.Dim.Mks.Generic_Other_Prefixes;
|
reznikmm/matreshka | Ada | 3,609 | 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.Literal_Exps.Hash is
new AMF.Elements.Generic_Hash (OCL_Literal_Exp, OCL_Literal_Exp_Access);
|
Tim-Tom/project-euler | Ada | 1,602 | adb | with Ada.Integer_Text_IO;
with Ada.Text_IO;
package body Problem_24 is
package IO renames Ada.Text_IO;
package I_IO renames Ada.Integer_Text_IO;
procedure Solve is
subtype digit is Natural range 0 .. 9;
chosen : Array (digit) of Boolean;
unchosen : digit := 9;
remaining : Natural := 1_000_000;
function Factorial(n : in Natural) return Natural is
result : Natural := 1;
begin
for num in 2 .. n loop
result := result * num;
end loop;
return result;
end Factorial;
begin
for index in chosen'Range loop
chosen(index) := False;
end loop;
while remaining > 0 and unchosen > 0 loop
declare
subPermutations : constant Natural := factorial(unchosen);
choice : digit := remaining / subPermutations;
begin
remaining := remaining mod subPermutations;
for index in chosen'Range loop
if not chosen(index) then
if choice = 0 then
chosen(index) := True;
I_IO.Put(index, 1);
unchosen := unchosen - 1;
exit;
end if;
choice := choice - 1;
end if;
end loop;
end;
end loop;
for index in chosen'Range loop
exit when unchosen = 0;
if not chosen(index) then
I_IO.Put(index, 1);
unchosen := unchosen - 1;
end if;
end loop;
IO.New_Line;
end Solve;
end Problem_24;
|
rogermc2/OpenGLAda | Ada | 6,102 | ads | -- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
with System;
with Glfw.Input.Mouse;
with Glfw.Input.Keys;
with Glfw.Monitors;
private with Ada.Finalization;
package Glfw.Windows is
type Window is tagged private;
type Window_Reference is not null access all Window;
Creation_Error : exception;
package Callbacks is
-- avoid pollution of Glfw.Windows package with symbols
type Kind is (Position, Size, Close, Refresh, Focus, Iconify,
Framebuffer_Size, Mouse_Button, Mouse_Position,
Mouse_Scroll, Mouse_Enter, Key, Char);
end Callbacks;
subtype Coordinate is Interfaces.C.int;
-- throws Creation_Error if the window cannot be created
procedure Init (Object : not null access Window;
Width, Height : Size;
Title : String; -- interpreted as UTF-8
Monitor : Monitors.Monitor := Monitors.No_Monitor;
Share_Resources_With : access Window'Class := null);
function Initialized (Object : not null access Window) return Boolean;
procedure Destroy (Object : not null access Window);
procedure Show (Object : not null access Window);
procedure Hide (Object : not null access Window);
procedure Set_Title (Object : not null access Window; Value : String);
procedure Get_OpenGL_Version (Object : not null access Window;
Major, Minor, Revision : out Natural);
function Key_State (Object : not null access Window; Key : Input.Keys.Key)
return Input.Button_State;
function Mouse_Button_State (Object : not null access Window;
Button : Input.Mouse.Button)
return Input.Button_State;
procedure Set_Input_Toggle (Object : not null access Window;
Kind : Input.Sticky_Toggle;
Value : Boolean);
function Get_Cursor_Mode (Object : not null access Window)
return Input.Mouse.Cursor_Mode;
procedure Set_Cursor_Mode (Object : not null access Window;
Mode : Input.Mouse.Cursor_Mode);
procedure Get_Cursor_Pos (Object : not null access Window;
X, Y : out Input.Mouse.Coordinate);
procedure Set_Cursor_Pos (Object : not null access Window;
X, Y : Input.Mouse.Coordinate);
procedure Get_Position (Object : not null access Window;
X, Y : out Coordinate);
procedure Set_Position (Object : not null access Window;
X, Y : Coordinate);
procedure Get_Size (Object : not null access Window;
Width, Height : out Size);
procedure Set_Size (Object : not null access Window;
Width, Height : Size);
procedure Get_Framebuffer_Size (Object : not null access Window;
Width, Height : out Size);
function Visible (Object : not null access Window) return Boolean;
function Iconified (Object : not null access Window) return Boolean;
function Focused (Object : not null access Window) return Boolean;
function Should_Close (Object : not null access Window) return Boolean;
procedure Set_Should_Close (Object : not null access Window;
Value : Boolean);
-----------------------------------------------------------------------------
-- Event API
-----------------------------------------------------------------------------
procedure Enable_Callback (Object : not null access Window;
Subject : Callbacks.Kind);
procedure Disable_Callback (Object : not null access Window;
Subject : Callbacks.Kind);
procedure Position_Changed (Object : not null access Window;
X, Y : Integer) is null;
procedure Size_Changed (Object : not null access Window;
Width, Height : Natural) is null;
procedure Close_Requested (Object : not null access Window) is null;
procedure Refresh (Object : not null access Window) is null;
procedure Focus_Changed (Object : not null access Window;
Focused : Boolean) is null;
procedure Iconification_Changed (Object : not null access Window;
Iconified : Boolean) is null;
procedure Framebuffer_Size_Changed (Object : not null access Window;
Width, Height : Natural) is null;
procedure Mouse_Button_Changed (Object : not null access Window;
Button : Input.Mouse.Button;
State : Input.Button_State;
Mods : Input.Keys.Modifiers) is null;
procedure Mouse_Position_Changed (Object : not null access Window;
X, Y : Input.Mouse.Coordinate) is null;
procedure Mouse_Scrolled (Object : not null access Window;
X, Y : Input.Mouse.Scroll_Offset) is null;
procedure Mouse_Entered (Object : not null access Window;
Action : Input.Mouse.Enter_Action) is null;
procedure Key_Changed (Object : not null access Window;
Key : Input.Keys.Key;
Scancode : Input.Keys.Scancode;
Action : Input.Keys.Action;
Mods : Input.Keys.Modifiers) is null;
procedure Character_Entered (Object : not null access Window;
Char : Wide_Wide_Character) is null;
private
type Window is new Ada.Finalization.Controlled with record
Handle : System.Address := System.Null_Address;
end record;
function Window_Ptr (Raw : System.Address)
return not null access Window'Class;
end Glfw.Windows;
|
redparavoz/ada-wiki | Ada | 5,465 | adb | -----------------------------------------------------------------------
-- wiki-nodes -- Wiki Document Internal representation
-- Copyright (C) 2016 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.Unchecked_Deallocation;
package body Wiki.Nodes is
-- ------------------------------
-- Append a node to the tag node.
-- ------------------------------
procedure Append (Into : in Node_Type_Access;
Node : in Node_Type_Access) is
begin
if Into.Children = null then
Into.Children := new Node_List;
Into.Children.Current := Into.Children.First'Access;
end if;
Append (Into.Children.all, Node);
end Append;
-- ------------------------------
-- Append a node to the node list.
-- ------------------------------
procedure Append (Into : in out Node_List;
Node : in Node_Type_Access) is
Block : Node_List_Block_Access := Into.Current;
begin
if Block.Last = Block.Max then
Block.Next := new Node_List_Block (Block.Max * 2);
Block := Block.Next;
Into.Current := Block;
end if;
Block.Last := Block.Last + 1;
Block.List (Block.Last) := Node;
Into.Length := Into.Length + 1;
end Append;
-- ------------------------------
-- Finalize the node list to release the allocated memory.
-- ------------------------------
overriding
procedure Finalize (List : in out Node_List) is
procedure Free is
new Ada.Unchecked_Deallocation (Node_List_Block, Node_List_Block_Access);
procedure Free is
new Ada.Unchecked_Deallocation (Node_Type, Node_Type_Access);
procedure Free is
new Ada.Unchecked_Deallocation (Node_List, Node_List_Access);
procedure Release (List : in Node_List_Block_Access);
procedure Free_Block (Block : in out Node_List_Block);
procedure Free_Block (Block : in out Node_List_Block) is
begin
for I in 1 .. Block.Last loop
if Block.List (I).Kind = N_TAG_START and then Block.List (I).Children /= null then
Finalize (Block.List (I).Children.all);
Free (Block.List (I).Children);
end if;
Free (Block.List (I));
end loop;
end Free_Block;
procedure Release (List : in Node_List_Block_Access) is
Next : Node_List_Block_Access := List;
Block : Node_List_Block_Access;
begin
while Next /= null loop
Block := Next;
Free_Block (Block.all);
Next := Next.Next;
Free (Block);
end loop;
end Release;
begin
Release (List.First.Next);
Free_Block (List.First);
end Finalize;
-- ------------------------------
-- Iterate over the nodes of the list and call the <tt>Process</tt> procedure with
-- each node instance.
-- ------------------------------
procedure Iterate (List : in Node_List_Access;
Process : not null access procedure (Node : in Node_Type)) is
Block : Node_List_Block_Access := List.First'Access;
begin
loop
for I in 1 .. Block.Last loop
Process (Block.List (I).all);
end loop;
Block := Block.Next;
exit when Block = null;
end loop;
end Iterate;
-- ------------------------------
-- Append a node to the node list.
-- ------------------------------
procedure Append (Into : in out Node_List_Ref;
Node : in Node_Type_Access) is
begin
if Into.Is_Null then
Node_List_Refs.Ref (Into) := Node_List_Refs.Create;
Into.Value.Current := Into.Value.First'Access;
end if;
Append (Into.Value.all, Node);
end Append;
-- ------------------------------
-- Iterate over the nodes of the list and call the <tt>Process</tt> procedure with
-- each node instance.
-- ------------------------------
procedure Iterate (List : in Node_List_Ref;
Process : not null access procedure (Node : in Node_Type)) is
begin
if not List.Is_Null then
Iterate (List.Value, Process);
end if;
end Iterate;
-- ------------------------------
-- Returns True if the list reference is empty.
-- ------------------------------
function Is_Empty (List : in Node_List_Ref) return Boolean is
begin
return List.Is_Null;
end Is_Empty;
-- ------------------------------
-- Get the number of nodes in the list.
-- ------------------------------
function Length (List : in Node_List_Ref) return Natural is
begin
if List.Is_Null then
return 0;
else
return List.Value.Length;
end if;
end Length;
end Wiki.Nodes;
|
AdaCore/libadalang | Ada | 387 | ads | pragma Warnings (Off, "unrecognized pragma");
package B is
type Typ is private;
function "and" (L, R : Typ) return Typ is (L);
function Wat (L, R : Typ) return Typ is (L);
private
type Typ is array (1 .. 2) of Integer;
I1 : Typ := (1, 2);
Inst : Typ := I1 and (3, 4);
pragma Test_Statement;
Inst2 : Typ := Wat (I1, (3, 4));
pragma Test_Statement;
end B;
|
AdaCore/langkit | Ada | 1,830 | adb | with Ada.Exceptions; use Ada.Exceptions;
with Ada.Text_IO; use Ada.Text_IO;
with Langkit_Support.Diagnostics; use Langkit_Support.Diagnostics;
with Libfoolang.Analysis; use Libfoolang.Analysis;
with Libfoolang.Common; use Libfoolang.Common;
procedure Main is
Ctx : constant Analysis_Context := Create_Context;
Unit : constant Analysis_Unit :=
Get_From_Buffer (Ctx, "foo.txt", Buffer => "example");
Example_Node : Example;
begin
if Has_Diagnostics (Unit) then
for D of Diagnostics (Unit) loop
Put_Line (To_Pretty_String (D));
end loop;
raise Program_Error;
end if;
Discard_Errors_In_Populate_Lexical_Env (Ctx, False);
Example_Node := Root (Unit).As_Example;
Put_Line ("Calling P_Prop1...");
for I in 1 .. 3 loop
declare
Dummy : Boolean;
begin
Dummy := Example_Node.P_Prop1;
exception
when Exc : Property_Error =>
Put_Line ("Got an exception!");
Put_Line (Exception_Name (Exc) & ": " & Exception_Message (Exc));
end;
end loop;
Put_Line ("Calling P_Prop2...");
for I in 1 .. 3 loop
declare
Dummy : Boolean;
begin
Dummy := Example_Node.P_Prop2;
exception
when Exc : Property_Error =>
Put_Line ("Got an exception!");
Put_Line (Exception_Name (Exc) & ": " & Exception_Message (Exc));
end;
end loop;
Put_Line ("Calling P_Prop3...");
for I in 1 .. 3 loop
declare
Dummy : Boolean;
begin
Dummy := Example_Node.P_Prop3;
exception
when Exc : Property_Error | Precondition_Failure =>
Put_Line ("Got an exception!");
Put_Line (Exception_Name (Exc) & ": " & Exception_Message (Exc));
end;
end loop;
end Main;
|
reznikmm/matreshka | Ada | 3,679 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Elements;
package ODF.DOM.Db_Index_Columns_Elements is
pragma Preelaborate;
type ODF_Db_Index_Columns is limited interface
and XML.DOM.Elements.DOM_Element;
type ODF_Db_Index_Columns_Access is
access all ODF_Db_Index_Columns'Class
with Storage_Size => 0;
end ODF.DOM.Db_Index_Columns_Elements;
|
reznikmm/gela | Ada | 1,948 | adb | with Gela.Symbol_Sets;
procedure Gela.Plain_Environments.Debug
(Self : access Environment_Set;
Index : Gela.Semantic_Types.Env_Index)
is
procedure Puts (X : String);
pragma Import (C, Puts, "puts");
procedure Print_Region
(Index : Region_Enum; List : Region_Item_List);
procedure Print (Item : Region_Item);
procedure Print (Item : Region_Item) is
use type Gela.Elements.Defining_Names.Defining_Name_Access;
procedure Print_Item
(Symbol : Gela.Lexical_Types.Symbol;
Name : Gela.Elements.Defining_Names.Defining_Name_Access);
Set : Gela.Symbol_Sets.Symbol_Set_Access;
Symbol : Gela.Lexical_Types.Symbol;
procedure Print_Item
(Symbol : Gela.Lexical_Types.Symbol;
Name : Gela.Elements.Defining_Names.Defining_Name_Access)
is
pragma Unreferenced (Name);
begin
Puts (" " & Set.Image (Symbol).To_UTF_8_String & ASCII.NUL);
end Print_Item;
begin
Set := Self.Context.Symbols;
if Item.Name = null then
Symbol := 0;
else
Symbol := Item.Name.Full_Name;
end if;
Puts (" begin region " &
Set.Image (Symbol).To_UTF_8_String & ASCII.NUL);
Self.Names.For_Each (Item.Local, Print_Item'Access);
Puts (" end region" & ASCII.NUL);
end Print;
------------------
-- Print_Region --
------------------
procedure Print_Region (Index : Region_Enum; List : Region_Item_List) is
begin
Puts (Region_Enum'Image (Index) & ASCII.NUL);
Self.Region.For_Each (List, Print'Access);
end Print_Region;
Env : Env_Item;
begin
Puts ("begin Debug" & ASCII.NUL);
if Index in Env_Item_Index then
Env := Self.Env.Element (Index);
for J in Env.Region_List'Range loop
Print_Region (J, Env.Region_List (J));
end loop;
end if;
Puts ("end Debug" & ASCII.NUL);
end Gela.Plain_Environments.Debug;
|
MinimSecure/unum-sdk | Ada | 912 | adb | -- Copyright 2008-2016 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Foo is
My_String : constant String := "Hello World";
begin
First := ASCII.NUL;
Last := ASCII.NUL;
Length := -1;
Call_Me (My_String); -- STOP
end Foo;
|
zhmu/ananas | Ada | 5,489 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . G L O B A L _ L O C K S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Soft_Links;
package body System.Global_Locks is
type String_Access is access String;
Dir_Separator : Character;
pragma Import (C, Dir_Separator, "__gnat_dir_separator");
type Lock_File_Entry is record
Dir : String_Access;
File : String_Access;
end record;
Last_Lock : Lock_Type := Null_Lock;
Lock_Table : array (Lock_Type range 1 .. 15) of Lock_File_Entry;
procedure Lock_File
(Dir : String;
File : String;
Wait : Duration := 0.1;
Retries : Natural := Natural'Last);
-- Create a lock file File in directory Dir. If the file cannot be
-- locked because someone already owns the lock, this procedure
-- waits Wait seconds and retries at most Retries times. If the file
-- still cannot be locked, Lock_Error is raised. The default is to try
-- every second, almost forever (Natural'Last times).
------------------
-- Acquire_Lock --
------------------
procedure Acquire_Lock (Lock : in out Lock_Type) is
begin
Lock_File
(Lock_Table (Lock).Dir.all,
Lock_Table (Lock).File.all);
end Acquire_Lock;
-----------------
-- Create_Lock --
-----------------
procedure Create_Lock (Lock : out Lock_Type; Name : String) is
L : Lock_Type;
begin
System.Soft_Links.Lock_Task.all;
Last_Lock := Last_Lock + 1;
L := Last_Lock;
System.Soft_Links.Unlock_Task.all;
if L > Lock_Table'Last then
raise Lock_Error;
end if;
for J in reverse Name'Range loop
if Name (J) = Dir_Separator then
Lock_Table (L).Dir := new String'(Name (Name'First .. J - 1));
Lock_Table (L).File := new String'(Name (J + 1 .. Name'Last));
exit;
end if;
end loop;
if Lock_Table (L).Dir = null then
Lock_Table (L).Dir := new String'(".");
Lock_Table (L).File := new String'(Name);
end if;
Lock := L;
end Create_Lock;
---------------
-- Lock_File --
---------------
procedure Lock_File
(Dir : String;
File : String;
Wait : Duration := 0.1;
Retries : Natural := Natural'Last)
is
C_Dir : aliased String := Dir & ASCII.NUL;
C_File : aliased String := File & ASCII.NUL;
function Try_Lock (Dir, File : System.Address) return Integer;
pragma Import (C, Try_Lock, "__gnat_try_lock");
begin
for I in 0 .. Retries loop
if Try_Lock (C_Dir'Address, C_File'Address) = 1 then
return;
end if;
exit when I = Retries;
delay Wait;
end loop;
raise Lock_Error;
end Lock_File;
------------------
-- Release_Lock --
------------------
procedure Release_Lock (Lock : in out Lock_Type) is
S : aliased String :=
Lock_Table (Lock).Dir.all & Dir_Separator &
Lock_Table (Lock).File.all & ASCII.NUL;
procedure unlink (A : System.Address);
pragma Import (C, unlink, "unlink");
begin
unlink (S'Address);
end Release_Lock;
end System.Global_Locks;
|
mirror/ncurses | Ada | 6,343 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- Sample.Curses_Demo --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright 2020 Thomas E. Dickey --
-- Copyright 1998-2004,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
-- $Revision: 1.18 $
-- $Date: 2020/02/02 23:34:34 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
with Terminal_Interface.Curses.Menus; use Terminal_Interface.Curses.Menus;
with Terminal_Interface.Curses.Mouse; use Terminal_Interface.Curses.Mouse;
with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels;
with Terminal_Interface.Curses.Panels.User_Data;
with Sample.Manifest; use Sample.Manifest;
with Sample.Helpers; use Sample.Helpers;
with Sample.Function_Key_Setting; use Sample.Function_Key_Setting;
with Sample.Explanation; use Sample.Explanation;
with Sample.Menu_Demo.Handler;
with Sample.Curses_Demo.Mouse;
with Sample.Curses_Demo.Attributes;
package body Sample.Curses_Demo is
type User_Data is new Integer;
type User_Data_Access is access all User_Data;
package PUD is new Panels.User_Data (User_Data, User_Data_Access);
-- We use above instantiation of the generic User_Data package to
-- demonstrate and test the use of the user data mechanism.
procedure Demo
is
function My_Driver (M : Menu;
K : Key_Code;
Pan : Panel) return Boolean;
package Mh is new Sample.Menu_Demo.Handler (My_Driver);
Itm : Item_Array_Access := new Item_Array'
(New_Item ("Attributes Demo"),
New_Item ("Mouse Demo"),
Null_Item);
M : Menu := New_Menu (Itm);
U1 : constant User_Data_Access := new User_Data'(4711);
U2 : User_Data_Access;
function My_Driver (M : Menu;
K : Key_Code;
Pan : Panel) return Boolean
is
Idx : constant Positive := Get_Index (Current (M));
Result : Boolean := False;
begin
PUD.Set_User_Data (Pan, U1); -- set some user data, just for fun
if K in User_Key_Code'Range then
if K = QUIT then
Result := True;
elsif K = SELECT_ITEM then
if Idx in Itm'Range then
Hide (Pan);
Update_Panels;
end if;
case Idx is
when 1 => Sample.Curses_Demo.Attributes.Demo;
when 2 => Sample.Curses_Demo.Mouse.Demo;
when others => Not_Implemented;
end case;
if Idx in Itm'Range then
Top (Pan);
Show (Pan);
Update_Panels;
Update_Screen;
end if;
end if;
end if;
PUD.Get_User_Data (Pan, U2); -- get the user data
pragma Assert (U1.all = U2.all and then U1 = U2);
return Result;
end My_Driver;
begin
if (1 + Item_Count (M)) /= Itm'Length then
raise Constraint_Error;
end if;
if not Has_Mouse then
declare
O : Item_Option_Set;
begin
Get_Options (Itm.all (2), O);
O.Selectable := False;
Set_Options (Itm.all (2), O);
end;
end if;
Push_Environment ("CURSES00");
Notepad ("CURSES-PAD00");
Default_Labels;
Refresh_Soft_Label_Keys_Without_Update;
Mh.Drive_Me (M, " Demo ");
Pop_Environment;
Delete (M);
Free (Itm, True);
end Demo;
end Sample.Curses_Demo;
|
AdaCore/libadalang | Ada | 184 | ads | package Foo is
type T is (A, B, C);
--% node.p_get_enum_representation_clause()
X : Integer; -- something in the middle
for T use (A => 1, B => 42, C => 666);
end Foo;
|
optikos/oasis | Ada | 595 | ads | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Definitions;
package Program.Elements.Formal_Type_Definitions is
pragma Pure (Program.Elements.Formal_Type_Definitions);
type Formal_Type_Definition is
limited interface and Program.Elements.Definitions.Definition;
type Formal_Type_Definition_Access is
access all Formal_Type_Definition'Class with Storage_Size => 0;
end Program.Elements.Formal_Type_Definitions;
|
AdaCore/Ada_Drivers_Library | Ada | 5,263 | ads | ------------------------------------------------------------------------------
-- --
-- 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 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. --
-- --
------------------------------------------------------------------------------
-- The Floating-point unit (FPU) provides IEEE754-compliant operations on
-- single precision, 32-bit, floating-point values.
-- Of particular interest may be the Sqrt function, implemented as a single
-- machine code instruction.
-- See ST Micro Application Note AN4044: "Using floating-point unit (FPU) with
-- STM32F405/07xx and STM32F415/417xx microcontrollers" March 2012, Doc ID
-- 022737 Rev 1, file "DM00047230.pdf"
-- See ST Micro Programming manual PM0214:
-- "STM32F3 and STM32F4 Series Cortex-M4 programming manual"
-- May 2014 DocID022708 Rev 4, file "DM00046982.pdf"
-- especially section 4.6.4
with HAL; use HAL;
package Cortex_M.FPU is
function Sqrt (X : Float) return Float;
type Rounding_Mode is
(To_Nearest,
To_Plus_Infinity,
To_Minus_Infinity,
To_Zero);
type Bits_1 is mod 2**1 with Size => 1;
type Bits_2 is mod 2**2 with Size => 2;
type Bits_6 is mod 2**6 with Size => 6;
type Status_Control_Register is record
-- negative condition flag
N : Boolean;
-- zero condition flag
Z : Boolean;
-- carry condition flag
C : Boolean;
-- overflow condition flag
V : Boolean;
Reserved1 : Bits_1;
-- Alternative Half-Precision format
AHP : Boolean;
-- Default NaN mode
DN : Boolean;
-- Flush-to-zero mode
FZ : Boolean;
-- rounding mode
RM : Rounding_Mode;
Reserved2 : Bits_6;
Reserved3 : UInt8;
-- flush to zero
IDC : Boolean;
Reserved4 : Bits_2;
-- inexact result: the rounded (and returned) value is different from
-- the mathematically exact result of the operation
IXC : Boolean;
-- underflow, result is a denorm
UFC : Boolean;
-- overflow, result depends on rounding mode
OFC : Boolean;
-- division by zero
DZC : Boolean;
-- invalid operation, result is a NaN
IOC : Boolean;
end record
with Atomic, Size => 32;
for Status_Control_Register use record
N at 0 range 31 .. 31;
Z at 0 range 30 .. 30;
C at 0 range 29 .. 29;
V at 0 range 28 .. 28;
Reserved1 at 0 range 27 .. 27;
AHP at 0 range 26 .. 26;
DN at 0 range 25 .. 25;
FZ at 0 range 24 .. 24;
RM at 0 range 22 .. 23;
Reserved2 at 0 range 16 .. 21;
Reserved3 at 0 range 8 .. 15;
IDC at 0 range 7 .. 7;
Reserved4 at 0 range 5 .. 6;
IXC at 0 range 4 .. 4;
UFC at 0 range 3 .. 3;
OFC at 0 range 2 .. 2;
DZC at 0 range 1 .. 1;
IOC at 0 range 0 .. 0;
end record;
function FPSCR return Status_Control_Register;
end Cortex_M.FPU;
|
smithros/kpi-stuff | Ada | 3,063 | adb | with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;
package body Data is
procedure Input (V : out Vector; Value : Integer) is
begin
for I in 1..N loop
V(I):= Value;
end loop;
end Input;
procedure Input (MA : out Matrix; Value : Integer) is
begin
for I in 1..N loop
for J in 1..N loop
MA(I)(J):= Value;
end loop;
end loop;
end Input;
procedure Output (V : in Vector) is
begin
New_Line;
for I in 1..V'Last loop
Put(Item => V(I), Width => 6);
end loop;
New_Line;
end Output;
procedure Output (MA : in Matrix) is
begin
New_Line;
for I in 1..MA'Last loop
for J in 1..N loop
Put(Item => MA(i)(j), Width => 6);
end loop;
New_line;
end loop;
New_Line;
end Output;
procedure FindMaxZ (V : in VectorH; maxZi : out Integer) is
maxBuf : Integer;
begin
maxBuf :=-99999;
for i in 1..H loop
if(maxBuf < V(i)) then
maxBuf := V(i);
end if;
end loop;
maxZi:=maxBuf;
end FindMaxZ;
procedure FindMinZ (V : in VectorH; minZi : out Integer) is
minBuf : Integer;
begin
minBuf := 99999;
for i in 1..H loop
if(minBuf > V(i)) then
minBuf := V(i);
end if;
end loop;
minZi:=minBuf;
end FindMinZ;
function Max (A, B: Integer) return Integer is
begin
if A >= B then
return A;
else
return B;
end if;
end Max;
function Min (A, B: Integer) return Integer is
begin
if A <= B then
return A;
else
return B;
end if;
end Min;
function CalcSumX(A, B: Integer) return Integer is
begin
return A+B;
end CalcSumX;
function CalcX(A, B: Vector) return Integer is
sum1: Integer := 0;
begin
for I in 1..H loop
sum1 := sum1 + A(I)*B(I);
end loop;
return sum1;
end CalcX;
function Calculation (x : in Integer;
a : in Integer;
MZ : in MatrixH;
MX : in MatrixN;
MC : in MatrixH) return MatrixH is
MQ: MatrixH;
MB: MatrixH;
MA: MatrixH;
begin
for j in 1 .. H loop
for i in 1 .. N loop
MQ (j) (i) := 0;
for k in 1 .. N loop
MQ (j) (i) := MQ (j) (i) + MX (k) (i) * MC (j) (k);
end loop;
end loop;
end loop;
for j in 1 .. H loop
for i in 1 .. N loop
MQ (j) (i) := MQ (j) (i) * a;
MB (j) (i) := MZ (j) (i) * x;
end loop;
end loop;
for j in 1 ..H loop
for i in 1 .. N loop
MA (j) (i) := MB (j) (i) + MQ (j) (i);
end loop;
end loop;
return MA;
end Calculation;
end Data;
|
oddek/DCS3101-1_Cybersecurity | Ada | 370 | adb | with Ada.Text_IO; use Ada.Text_IO;
procedure main is
function GCD(a : Integer; b : Integer) return Integer is
a1 : Integer := Integer'max(a,b);
b1 : Integer := Integer'min(a,b);
begin
if b = 0 then
return a;
else
return GCD(b, a mod b);
end if;
end GCD;
begin
Put_Line(Integer'Image(GCD(9, 27)));
Put_Line(Integer'Image(GCD(1275, 2261)));
end main;
|
Fabien-Chouteau/AGATE | Ada | 2,961 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018, Fabien Chouteau --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package AGATE.API is
procedure Start
with No_Return;
-- Tasking --
procedure Yield;
function Clock return Time;
procedure Delay_Until (Wakeup_Time : Time);
-- Semaphores --
procedure Wait_For_Signal (ID : Semaphore_ID);
procedure Signal (ID : Semaphore_ID);
-- Mutexes --
procedure Wait_Lock (ID : Mutex_ID);
function Try_Lock (ID : Mutex_ID) return Boolean;
procedure Release (ID : Mutex_ID);
-- System --
procedure Shutdown_System;
-- IO --
procedure Print (Str : String);
procedure Print_Line (Str : String);
end AGATE.API;
|
zhmu/ananas | Ada | 6,246 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 5 5 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_55 is
subtype Bit_Order is System.Bit_Order;
Reverse_Bit_Order : constant Bit_Order :=
Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order));
subtype Ofs is System.Storage_Elements.Storage_Offset;
subtype Uns is System.Unsigned_Types.Unsigned;
subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7;
use type System.Storage_Elements.Storage_Offset;
use type System.Unsigned_Types.Unsigned;
type Cluster is record
E0, E1, E2, E3, E4, E5, E6, E7 : Bits_55;
end record;
for Cluster use record
E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1;
E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1;
E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1;
E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1;
E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1;
E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1;
E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1;
E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1;
end record;
for Cluster'Size use Bits * 8;
for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment,
1 +
1 * Boolean'Pos (Bits mod 2 = 0) +
2 * Boolean'Pos (Bits mod 4 = 0));
-- Use maximum possible alignment, given the bit field size, since this
-- will result in the most efficient code possible for the field.
type Cluster_Ref is access Cluster;
type Rev_Cluster is new Cluster
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_Cluster_Ref is access Rev_Cluster;
------------
-- Get_55 --
------------
function Get_55
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_55
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end Get_55;
------------
-- Set_55 --
------------
procedure Set_55
(Arr : System.Address;
N : Natural;
E : Bits_55;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end Set_55;
end System.Pack_55;
|
mitchelhaan/ncurses | Ada | 4,117 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Forms.Field_Types.IntField --
-- --
-- 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.3 $
-- Binding Version 00.93
------------------------------------------------------------------------------
with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.IntField is
use type Interfaces.C.Int;
procedure Set_Field_Type (Fld : in Field;
Typ : in Integer_Field)
is
C_Integer_Field_Type : C_Field_Type;
pragma Import (C, C_Integer_Field_Type, "TYPE_INTEGER");
function Set_Fld_Type (F : Field := Fld;
Cft : C_Field_Type := C_Integer_Field_Type;
Arg1 : C_Int;
Arg2 : C_Long_Int;
Arg3 : C_Long_Int) return C_Int;
pragma Import (C, Set_Fld_Type, "set_field_type");
Res : Eti_Error;
begin
Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision),
Arg2 => C_Long_Int (Typ.Lower_Limit),
Arg3 => C_Long_Int (Typ.Upper_Limit));
if Res /= E_Ok then
Eti_Exception (Res);
end if;
Wrap_Builtin (Fld, Typ);
end Set_Field_Type;
end Terminal_Interface.Curses.Forms.Field_Types.IntField;
|
io7m/coreland-sqlite3-ada | Ada | 57 | ads | package SQLite3 is
pragma Pure (SQLite3);
end SQLite3;
|
AdaCore/training_material | Ada | 188 | ads | pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
package sgxintrin_h is
-- skipped func _encls_u32
-- skipped func _enclu_u32
end sgxintrin_h;
|
willbr/gameboy-tests | Ada | 1,278 | adb | M:main
F:G$main$0_0$0({2}DF,SV:S),C,0,0,0,0,0
S:G$tiles$0_0$0({1}SC:U),E,0,0
S:G$bgmap$0_0$0({1}SC:U),E,0,0
S:G$NR52$0_0$0({1}SC:U),I,0,0
S:G$LCDC$0_0$0({1}SC:U),I,0,0
S:G$STAT$0_0$0({1}SC:U),I,0,0
S:G$SCY$0_0$0({1}SC:U),I,0,0
S:G$SCX$0_0$0({1}SC:U),I,0,0
S:G$LY$0_0$0({1}SC:U),I,0,0
S:G$LYC$0_0$0({1}SC:U),I,0,0
S:G$BGP$0_0$0({1}SC:U),I,0,0
S:G$memccpy$0_0$0({2}DF,DG,SV:S),C,0,0
S:G$memcpy$0_0$0({2}DF,DG,SV:S),C,0,0
S:G$memmove$0_0$0({2}DF,DG,SV:S),C,0,0
S:G$strcpy$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strncpy$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strcat$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strncat$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strdup$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strndup$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$memcmp$0_0$0({2}DF,SI:S),C,0,0
S:G$strcmp$0_0$0({2}DF,SI:S),C,0,0
S:G$strncmp$0_0$0({2}DF,SI:S),C,0,0
S:G$strxfrm$0_0$0({2}DF,SI:U),C,0,0
S:G$memchr$0_0$0({2}DF,DG,SV:S),C,0,0
S:G$strchr$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strcspn$0_0$0({2}DF,SI:U),C,0,0
S:G$strpbrk$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strrchr$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strspn$0_0$0({2}DF,SI:U),C,0,0
S:G$strstr$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$strtok$0_0$0({2}DF,DG,SC:U),C,0,0
S:G$memset$0_0$0({2}DF,DG,SV:S),C,0,0
S:G$strlen$0_0$0({2}DF,SI:U),C,0,0
S:G$__memcpy$0_0$0({2}DF,DG,SV:S),C,0,0
S:G$main$0_0$0({2}DF,SV:S),C,0,0
|
stcarrez/dynamo | Ada | 3,431 | ads | ------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- A 4 G . S P A N _ E N D --
-- --
-- S p e c --
-- --
-- Copyright (c) 1995-1999, Free Software Foundation, Inc. --
-- --
-- ASIS-for-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 --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. ASIS-for-GNAT is distributed in the hope that it will be use- --
-- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
-- CHANTABILITY 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 ASIS-for-GNAT; see file --
-- COPYING. If not, write to the Free Software Foundation, 59 Temple Place --
-- - Suite 330, Boston, MA 02111-1307, USA. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the --
-- Software Engineering Laboratory of the Swiss Federal Institute of --
-- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the --
-- Scientific Research Computer Center of Moscow State University (SRCC --
-- MSU), Russia, with funding partially provided by grants from the Swiss --
-- National Science Foundation and the Swiss Academy of Engineering --
-- Sciences. ASIS-for-GNAT is now maintained by Ada Core Technologies Inc --
-- (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
with Asis; use Asis;
with Types; use Types;
package A4G.Span_End is
-- This package encapsulates queries needed to find the end of Element's
-- Span (as the pointer to the Source Buffer).
function Set_Image_End (E : Asis.Element) return Source_Ptr;
-- This is the main function in this package. It returns the pointer
-- to the last character of the given element in the Source Buffer
end A4G.Span_End;
|
zhmu/ananas | Ada | 317 | ads | package Opt86_Pkg is
type Enum is (Val0, Val1, Val2, Val3, Val4, Val5, Val6, Val7,
Val8, Val9, Val10, Val11, Val12, Val13, Val14, Val15,
Val16, Val17, Val18, Val19, Val20, Val21, Val22, Val23,
Val24, Val25, Val26, Val27, Val28, Val29, Val30, Val31);
end Opt86_Pkg;
|
reznikmm/matreshka | Ada | 3,782 | 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.Draw.Shadow_Offset_X is
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Draw_Shadow_Offset_X_Node)
return League.Strings.Universal_String is
begin
return ODF.Constants.Shadow_Offset_X_Name;
end Get_Local_Name;
end Matreshka.ODF_Attributes.Draw.Shadow_Offset_X;
|
AdaCore/libadalang | Ada | 457 | adb | procedure Test is
package Abs_Pkg is
type T is abstract tagged null record;
procedure Foo (X : T) is null;
end Abs_Pkg;
package C_Pkg is
type U is new Abs_Pkg.T with null record;
overriding procedure Foo (X : U) is null;
end C_Pkg;
procedure Main is
X : C_Pkg.U;
use C_Pkg;
use Abs_Pkg;
begin
Foo (X);
--% node.f_call.p_is_dispatching_call()
end Main;
begin
Main;
end Test;
|
osannolik/ada-canopen | Ada | 1,844 | ads | with System;
private with Ada.Synchronous_Task_Control;
private with ACO.Utils.DS.Generic_Queue;
generic
type Item_Type is private;
Maximum_Nof_Items : Positive;
package ACO.Utils.DS.Generic_Protected_Queue is
-- A protected queue
pragma Preelaborate;
type Protected_Queue
(Ceiling : System.Priority)
is tagged limited private;
procedure Put_Blocking
(This : in out Protected_Queue;
Item : in Item_Type);
procedure Put
(This : in out Protected_Queue;
Item : in Item_Type;
Success : out Boolean);
procedure Get_Blocking
(This : in out Protected_Queue;
Item : out Item_Type);
procedure Get
(This : in out Protected_Queue;
Item : out Item_Type)
with Pre => not This.Is_Empty;
function Count
(This : Protected_Queue)
return Natural;
function Is_Empty
(This : Protected_Queue)
return Boolean;
function Is_Full
(This : Protected_Queue)
return Boolean;
private
package Q is new ACO.Utils.DS.Generic_Queue (Item_Type);
protected type Buffer_Type
(Ceiling : System.Priority)
is
procedure Put
(Item : in Item_Type;
Success : out Boolean);
procedure Get
(Item : out Item_Type;
Success : out Boolean);
function Nof_Items return Natural;
private
pragma Priority (Ceiling);
Queue : Q.Queue (Max_Nof_Items => Maximum_Nof_Items);
end Buffer_Type;
type Protected_Queue
(Ceiling : System.Priority)
is tagged limited record
Buffer : Buffer_Type (Ceiling);
Non_Full : Ada.Synchronous_Task_Control.Suspension_Object;
Non_Empty : Ada.Synchronous_Task_Control.Suspension_Object;
end record;
end ACO.Utils.DS.Generic_Protected_Queue;
|
AdaCore/gpr | Ada | 40 | adb | procedure main is
begin
null;
end;l
|
sungyeon/drake | Ada | 4,389 | adb | with Ada.Text_IO.Formatting;
with System.Formatting.Decimal;
with System.Formatting.Float;
with System.Formatting.Literals.Float;
package body Ada.Text_IO.Decimal_IO is
procedure Put_To_Field (
To : out String;
Fore_Last, Last : out Natural;
Item : Num;
Aft : Field;
Exp : Field);
procedure Put_To_Field (
To : out String;
Fore_Last, Last : out Natural;
Item : Num;
Aft : Field;
Exp : Field)
is
Triming_Sign_Marks : constant System.Formatting.Sign_Marks :=
('-', System.Formatting.No_Sign, System.Formatting.No_Sign);
begin
if Exp /= 0 then
-- decimal version should be implemented...
System.Formatting.Float.Image (
Long_Long_Float (Item),
To,
Fore_Last,
Last,
Signs => Triming_Sign_Marks,
Aft_Width => Field'Max (1, Aft),
Exponent_Digits_Width => Exp - 1); -- excluding '.'
else
System.Formatting.Decimal.Image (
Long_Long_Integer'Integer_Value (Item),
To,
Fore_Last,
Last,
Num'Scale,
Signs => Triming_Sign_Marks,
Aft_Width => Aft);
end if;
end Put_To_Field;
procedure Get_From_Field (
From : String;
Item : out Num;
Last : out Positive);
procedure Get_From_Field (
From : String;
Item : out Num;
Last : out Positive)
is
Base_Item : Long_Long_Float;
Error : Boolean;
begin
-- decimal version should be implemented...
System.Formatting.Literals.Float.Get_Literal (
From,
Last,
Base_Item,
Error => Error);
if Error
or else Base_Item not in
Long_Long_Float (Num'First) .. Long_Long_Float (Num'Last)
then
raise Data_Error;
end if;
Item := Num (Base_Item);
end Get_From_Field;
-- implementation
procedure Get (
File : File_Type;
Item : out Num;
Width : Field := 0) is
begin
if Width /= 0 then
declare
S : String (1 .. Width);
Last_1 : Natural;
Last_2 : Natural;
begin
Formatting.Get_Field (File, S, Last_1); -- checking the predicate
Get_From_Field (S (1 .. Last_1), Item, Last_2);
if Last_2 /= Last_1 then
raise Data_Error;
end if;
end;
else
declare
S : constant String :=
Formatting.Get_Numeric_Literal (
File, -- checking the predicate
Real => True);
Last : Natural;
begin
Get_From_Field (S, Item, Last);
if Last /= S'Last then
raise Data_Error;
end if;
end;
end if;
end Get;
procedure Get (
Item : out Num;
Width : Field := 0) is
begin
Get (Current_Input.all, Item, Width);
end Get;
procedure Put (
File : File_Type;
Item : Num;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
S : String (
1 ..
Integer'Max (Num'Width, Long_Long_Float'Width) + Aft + Exp);
Fore_Last, Last : Natural;
begin
Put_To_Field (S, Fore_Last, Last, Item, Aft, Exp);
Formatting.Tail (
File, -- checking the predicate
S (1 .. Last),
Last - Fore_Last + Fore);
end Put;
procedure Put (
Item : Num;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp) is
begin
Put (Current_Output.all, Item, Fore, Aft, Exp);
end Put;
procedure Get (
From : String;
Item : out Num;
Last : out Positive) is
begin
Formatting.Get_Tail (From, First => Last);
Get_From_Field (From (Last .. From'Last), Item, Last);
end Get;
procedure Put (
To : out String;
Item : Num;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
S : String (
1 ..
Integer'Max (Num'Width, Long_Long_Float'Width) + Aft + Exp);
Fore_Last, Last : Natural;
begin
Put_To_Field (S, Fore_Last, Last, Item, Aft, Exp);
Formatting.Tail (To, S (1 .. Last));
end Put;
end Ada.Text_IO.Decimal_IO;
|
charlie5/cBound | Ada | 2,041 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with swig;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_render_composite_glyphs_16_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;
op : aliased Interfaces.Unsigned_8;
pad0 : aliased swig.int8_t_Array (0 .. 2);
src : aliased xcb.xcb_render_picture_t;
dst : aliased xcb.xcb_render_picture_t;
mask_format : aliased xcb.xcb_render_pictformat_t;
glyphset : aliased xcb.xcb_render_glyphset_t;
src_x : aliased Interfaces.Integer_16;
src_y : aliased Interfaces.Integer_16;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_render_composite_glyphs_16_request_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_composite_glyphs_16_request_t.Item,
Element_Array => xcb.xcb_render_composite_glyphs_16_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_render_composite_glyphs_16_request_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_composite_glyphs_16_request_t.Pointer,
Element_Array =>
xcb.xcb_render_composite_glyphs_16_request_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_render_composite_glyphs_16_request_t;
|
reznikmm/matreshka | Ada | 4,929 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A literal string is a specification of a string value.
------------------------------------------------------------------------------
with AMF.UML.Literal_Specifications;
with League.Strings;
package AMF.UML.Literal_Strings is
pragma Preelaborate;
type UML_Literal_String is limited interface
and AMF.UML.Literal_Specifications.UML_Literal_Specification;
type UML_Literal_String_Access is
access all UML_Literal_String'Class;
for UML_Literal_String_Access'Storage_Size use 0;
not overriding function Get_Value
(Self : not null access constant UML_Literal_String)
return AMF.Optional_String is abstract;
-- Getter of LiteralString::value.
--
-- The specified String value.
not overriding procedure Set_Value
(Self : not null access UML_Literal_String;
To : AMF.Optional_String) is abstract;
-- Setter of LiteralString::value.
--
-- The specified String value.
overriding function Is_Computable
(Self : not null access constant UML_Literal_String)
return Boolean is abstract;
-- Operation LiteralString::isComputable.
--
-- The query isComputable() is redefined to be true.
not overriding function String_Value
(Self : not null access constant UML_Literal_String)
return League.Strings.Universal_String is abstract;
-- Operation LiteralString::stringValue.
--
-- The query stringValue() gives the value.
end AMF.UML.Literal_Strings;
|
reznikmm/matreshka | Ada | 3,744 | 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_Auto_Grow_Height_Attributes is
pragma Preelaborate;
type ODF_Draw_Auto_Grow_Height_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Draw_Auto_Grow_Height_Attribute_Access is
access all ODF_Draw_Auto_Grow_Height_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Draw_Auto_Grow_Height_Attributes;
|
sungyeon/drake | Ada | 2,373 | ads | pragma License (Unrestricted);
-- extended unit
package Ada.Containers.Composites is
-- There are tiny generic functions for ease to make comparator or more.
pragma Pure;
-- comparators
generic
type Element_Type (<>) is limited private;
with function "<" (Left, Right : Element_Type) return Boolean is <>;
function LE (Left, Right : Element_Type) return Boolean;
generic
type Element_Type (<>) is limited private;
with function "<" (Left, Right : Element_Type) return Boolean is <>;
function GT (Left, Right : Element_Type) return Boolean;
generic
type Element_Type (<>) is limited private;
with function "<" (Left, Right : Element_Type) return Boolean is <>;
function GE (Left, Right : Element_Type) return Boolean;
generic
type Element_Type (<>) is limited private;
with function "<" (Left, Right : Element_Type) return Boolean is <>;
function Compare (Left, Right : Element_Type) return Integer;
-- composite function
generic
type A_Type (<>) is limited private;
type Q_Type (<>) is limited private;
type R_Type (<>) is limited private;
with function F1 (A : A_Type) return Q_Type;
with function F2 (Q : Q_Type) return R_Type;
function Composite (A : A_Type) return R_Type;
-- X means in
-- Y means in out
-- Z means out
-- R means return
generic
type A1_Type (<>) is limited private;
type A2_Type (<>) is limited private;
type R_Type (<>) is limited private;
with function F (A1 : A1_Type; A2 : A2_Type) return R_Type;
A1 : A1_Type;
function XXR_Bind_1st (A2 : A2_Type) return R_Type;
generic
type A1_Type (<>) is limited private;
type A2_Type (<>) is limited private;
type R_Type (<>) is limited private;
with function F (A1 : A1_Type; A2 : A2_Type) return R_Type;
A2 : A2_Type;
function XXR_Bind_2nd (A1 : A1_Type) return R_Type;
generic
type A1_Type (<>) is limited private;
with function F (A1 : A1_Type) return Boolean;
function XR_Not (A1 : A1_Type) return Boolean;
generic
type A1_Type (<>) is limited private;
type A2_Type (<>) is limited private;
with procedure P (A1 : A1_Type; A2 : out A2_Type);
procedure XZ_Inout_1st (A1 : in out A1_Type; A2 : out A2_Type);
end Ada.Containers.Composites;
|
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.Presentation_Effect_Attributes;
package Matreshka.ODF_Presentation.Effect_Attributes is
type Presentation_Effect_Attribute_Node is
new Matreshka.ODF_Presentation.Abstract_Presentation_Attribute_Node
and ODF.DOM.Presentation_Effect_Attributes.ODF_Presentation_Effect_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Presentation_Effect_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Presentation_Effect_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Presentation.Effect_Attributes;
|
reznikmm/gela | Ada | 14,235 | adb | with Ada.Containers.Hashed_Maps;
with Gela.Element_Cloners;
with Gela.Element_Visiters;
with Gela.Elements.Component_Declarations;
with Gela.Elements.Component_Items;
with Gela.Elements.Composite_Subtype_Indications;
with Gela.Elements.Defining_Identifiers;
with Gela.Elements.Defining_Names;
with Gela.Elements.Full_Type_Declarations;
with Gela.Elements.Identifiers;
with Gela.Elements.Record_Definitions;
with Gela.Elements.Record_Type_Definitions;
with Gela.Elements.Scalar_Subtype_Indications;
with Gela.Elements.Selected_Components;
with Gela.Elements.Subtype_Indications;
with Gela.Elements.Subtype_Marks;
with Gela.Environments;
with Gela.Interpretations;
with Gela.Lexical_Types;
with Gela.Property_Getters;
with Gela.Property_Resets;
with Gela.Property_Setters;
with Gela.Property_Visiters;
package body Gela.Inheritance is
function Hash (Self : Gela.Elements.Defining_Names.Defining_Name_Access)
return Ada.Containers.Hash_Type;
----------
-- Hash --
----------
function Hash (Self : Gela.Elements.Defining_Names.Defining_Name_Access)
return Ada.Containers.Hash_Type is
begin
return Self.Hash;
end Hash;
package Name_Maps is new Ada.Containers.Hashed_Maps
(Key_Type => Gela.Elements.Defining_Names.Defining_Name_Access,
Element_Type => Gela.Elements.Defining_Names.Defining_Name_Access,
Hash => Hash,
Equivalent_Keys => Gela.Elements.Defining_Names."=",
"=" => Gela.Elements.Defining_Names."=");
package Cloners is
type Property_Getter is limited new Gela.Property_Getters.Getter with
record
Visiter : Gela.Property_Visiters.Visiter
(Property_Getter'Unchecked_Access);
end record;
type Cloner is new Gela.Element_Cloners.Cloner with record
Map : Name_Maps.Map;
Getter : Property_Getter;
end record;
overriding function Clone
(Self : in out Cloner;
Element : access Gela.Elements.Element'Class)
return Gela.Elements.Element_Access;
end Cloners;
package Setters is
type Property_Setter
(Source : Gela.Elements.Element_Access;
Cloner : access Cloners.Cloner)
is new Gela.Property_Resets.Property_Reset with null record;
overriding procedure On_Defining_Name
(Self : in out Property_Setter;
Element : Gela.Elements.Element_Access;
Value : out Gela.Elements.Defining_Names.
Defining_Name_Access);
overriding procedure On_Full_Name
(Self : in out Property_Setter;
Element : Gela.Elements.Element_Access;
Value : out Gela.Lexical_Types.Symbol);
overriding procedure On_Chosen_Interpretation
(Self : in out Property_Setter;
Element : Gela.Elements.Element_Access;
Value : out Gela.Interpretations.Interpretation_Kinds);
end Setters;
package body Cloners is
overriding function Clone
(Self : in out Cloner;
Element : access Gela.Elements.Element'Class)
return Gela.Elements.Element_Access
is
Result : Gela.Elements.Element_Access;
Setter : aliased Setters.Property_Setter
(Element, Self'Unchecked_Access);
Visiter : Gela.Property_Setters.Visiter (Setter'Access);
begin
if Element.Assigned then
Result := Gela.Element_Cloners.Cloner (Self).Clone (Element);
Result.Set_Part_Of_Inherited;
Result.Visit (Visiter);
end if;
return Result;
end Clone;
end Cloners;
package body Setters is
overriding procedure On_Chosen_Interpretation
(Self : in out Property_Setter;
Element : Gela.Elements.Element_Access;
Value : out Gela.Interpretations.Interpretation_Kinds)
is
pragma Unreferenced (Element);
begin
Self.Source.Visit (Self.Cloner.Getter.Visiter);
Value := Self.Cloner.Getter.Chosen_Interpretation;
Self.Cloner.Getter.Chosen_Interpretation :=
Self.Chosen_Interpretation;
end On_Chosen_Interpretation;
overriding procedure On_Defining_Name
(Self : in out Property_Setter;
Element : Gela.Elements.Element_Access;
Value : out Gela.Elements.Defining_Names.
Defining_Name_Access)
is
pragma Unreferenced (Element);
Cursor : Name_Maps.Cursor;
begin
Self.Source.Visit (Self.Cloner.Getter.Visiter);
Value := Self.Cloner.Getter.Defining_Name;
Self.Cloner.Getter.Defining_Name := null;
if Value.Assigned then
Cursor := Self.Cloner.Map.Find (Value);
if Name_Maps.Has_Element (Cursor) then
Value := Name_Maps.Element (Cursor);
end if;
end if;
end On_Defining_Name;
------------------
-- On_Full_Name --
------------------
overriding procedure On_Full_Name
(Self : in out Property_Setter;
Element : Gela.Elements.Element_Access;
Value : out Gela.Lexical_Types.Symbol)
is
pragma Unreferenced (Element);
begin
Self.Source.Visit (Self.Cloner.Getter.Visiter);
Value := Self.Cloner.Getter.Full_Name;
Self.Cloner.Getter.Full_Name := Self.Full_Name;
end On_Full_Name;
end Setters;
package Update_Env is
type Visiter is new Gela.Element_Visiters.Visiter with record
Set : Gela.Environments.Environment_Set_Access;
Env : Gela.Semantic_Types.Env_Index;
end record;
overriding procedure Component_Declaration
(Self : in out Visiter;
Node : not null Gela.Elements.Component_Declarations.
Component_Declaration_Access);
overriding procedure Defining_Identifier
(Self : in out Visiter;
Node : not null Gela.Elements.Defining_Identifiers.
Defining_Identifier_Access);
end Update_Env;
package body Update_Env is
overriding procedure Component_Declaration
(Self : in out Visiter;
Node : not null Gela.Elements.Component_Declarations.
Component_Declaration_Access)
is
Cursor : Gela.Elements.Defining_Identifiers.
Defining_Identifier_Sequence_Cursor := Node.Names.First;
begin
while Cursor.Has_Element loop
Cursor.Element.Visit (Self);
Cursor.Next;
end loop;
end Component_Declaration;
overriding procedure Defining_Identifier
(Self : in out Visiter;
Node : not null Gela.Elements.Defining_Identifiers.
Defining_Identifier_Access) is
begin
Self.Env := Self.Set.Add_Defining_Name
(Self.Env, Node.Full_Name, Node.all'Access);
end Defining_Identifier;
end Update_Env;
-----------------------
-- Copy_Declarations --
-----------------------
procedure Copy_Declarations
(Comp : Gela.Compilations.Compilation_Access;
Env : Gela.Semantic_Types.Env_Index;
Node : not null Gela.Elements.Derived_Type_Definitions.
Derived_Type_Definition_Access;
Inherited : out Gela.Elements.Element_Sequence_Access)
is
pragma Unreferenced (Env);
-- Put in the map (parent type name -> derived type name) to
-- replace possible T'Unchecked_Access.
-- If there is known discriminants put in the map
-- (old discriminant -> new discriminant) for each discriminant
-- according to constraint in subtype_indication.
-- Else clone known discriminants from parent if any.
-- Then clone components, entries and protected subprograms.
Parent : constant
Gela.Elements.Subtype_Indications.Subtype_Indication_Access :=
Node.Parent_Subtype_Indication;
package Each is
type Visiter is new Gela.Element_Visiters.Visiter with record
Parent_Name : Gela.Elements.Defining_Names.Defining_Name_Access;
Parent_Declaration : Gela.Elements.Element_Access;
Components : Gela.Elements.Component_Items.
Component_Item_Sequence_Access;
end record;
overriding procedure Composite_Subtype_Indication
(Self : in out Visiter;
Node : not null Gela.Elements.Composite_Subtype_Indications.
Composite_Subtype_Indication_Access);
overriding procedure Scalar_Subtype_Indication
(Self : in out Visiter;
Node : not null Gela.Elements.Scalar_Subtype_Indications.
Scalar_Subtype_Indication_Access);
overriding procedure Identifier
(Self : in out Visiter;
Node : not null Gela.Elements.Identifiers.
Identifier_Access);
overriding procedure Selected_Component
(Self : in out Visiter;
Node : not null Gela.Elements.Selected_Components.
Selected_Component_Access);
overriding procedure Full_Type_Declaration
(Self : in out Visiter;
Node : not null Gela.Elements.Full_Type_Declarations.
Full_Type_Declaration_Access);
overriding procedure Record_Definition
(Self : in out Visiter;
Node : not null Gela.Elements.Record_Definitions.
Record_Definition_Access);
overriding procedure Record_Type_Definition
(Self : in out Visiter;
Node : not null Gela.Elements.Record_Type_Definitions.
Record_Type_Definition_Access);
overriding procedure Component_Declaration
(Self : in out Visiter;
Node : not null Gela.Elements.Component_Declarations.
Component_Declaration_Access);
end Each;
package body Each is
overriding procedure Component_Declaration
(Self : in out Visiter;
Node : not null Gela.Elements.Component_Declarations.
Component_Declaration_Access)
is
Cloner : Cloners.Cloner (Node.Enclosing_Compilation.Factory);
Item : Gela.Elements.Component_Items.Component_Item_Access;
begin
Node.Visit (Cloner);
Item := Gela.Elements.Component_Items.Component_Item_Access
(Cloner.Result);
Self.Components.Append (Item);
end Component_Declaration;
overriding procedure Composite_Subtype_Indication
(Self : in out Visiter;
Node : not null Gela.Elements.Composite_Subtype_Indications.
Composite_Subtype_Indication_Access) is
begin
Node.Subtype_Mark.Visit (Self);
end Composite_Subtype_Indication;
overriding procedure Full_Type_Declaration
(Self : in out Visiter;
Node : not null Gela.Elements.Full_Type_Declarations.
Full_Type_Declaration_Access) is
begin
Node.Type_Declaration_View.Visit (Self);
end Full_Type_Declaration;
overriding procedure Identifier
(Self : in out Visiter;
Node : not null Gela.Elements.Identifiers.
Identifier_Access) is
begin
Self.Parent_Name := Node.Defining_Name;
if Self.Parent_Name.Assigned then
Self.Parent_Declaration := Self.Parent_Name.Enclosing_Element;
Self.Parent_Declaration.Visit (Self);
end if;
end Identifier;
overriding procedure Record_Definition
(Self : in out Visiter;
Node : not null Gela.Elements.Record_Definitions.
Record_Definition_Access) is
begin
Self.Components := Comp.Factory.Component_Item_Sequence;
for J in Node.Record_Components.Each_Element loop
J.Element.Visit (Self);
end loop;
end Record_Definition;
overriding procedure Record_Type_Definition
(Self : in out Visiter;
Node : not null Gela.Elements.Record_Type_Definitions.
Record_Type_Definition_Access) is
begin
Node.Record_Definition.Visit (Self);
end Record_Type_Definition;
overriding procedure Scalar_Subtype_Indication
(Self : in out Visiter;
Node : not null Gela.Elements.Scalar_Subtype_Indications.
Scalar_Subtype_Indication_Access) is
begin
Node.Subtype_Mark.Visit (Self);
end Scalar_Subtype_Indication;
overriding procedure Selected_Component
(Self : in out Visiter;
Node : not null Gela.Elements.Selected_Components.
Selected_Component_Access) is
begin
Node.Selector.Visit (Self);
end Selected_Component;
end Each;
V : Each.Visiter;
begin
Inherited := Node.Inh_List;
if Inherited not in null then
return;
end if;
Parent.Visit (V);
Inherited := Gela.Elements.Element_Sequence_Access (V.Components);
end Copy_Declarations;
-----------------
-- Environment --
-----------------
procedure Environment
(Comp : Gela.Compilations.Compilation_Access;
Node : not null Gela.Elements.Derived_Type_Definitions.
Derived_Type_Definition_Access;
Env_In : Gela.Semantic_Types.Env_Index;
Env_Out : out Gela.Semantic_Types.Env_Index)
is
Inherited : Gela.Elements.Element_Sequence_Access := Node.Inh_List;
begin
if Inherited in null then
Copy_Declarations (Comp, Env_In, Node, Inherited);
Node.Set_Inh_List (Inherited);
end if;
if Inherited not in null then
declare
Visiter : Update_Env.Visiter;
begin
Visiter.Set := Comp.Context.Environment_Set;
Visiter.Env := Env_In;
for Cursor in Inherited.Each_Element loop
Cursor.Element.Visit (Visiter);
end loop;
Env_Out := Visiter.Env;
end;
else
Env_Out := Env_In;
end if;
end Environment;
end Gela.Inheritance;
|
reznikmm/matreshka | Ada | 4,911 | 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.
------------------------------------------------------------------------------
-- Edge is a diagram element that renders as a polyline, connecting a source
-- diagram element to a target diagram element, and is positioned relative to
-- the origin of the diagram.
------------------------------------------------------------------------------
limited with AMF.DC;
with AMF.DI.Diagram_Elements;
package AMF.DI.Edges is
pragma Preelaborate;
type DI_Edge is limited interface
and AMF.DI.Diagram_Elements.DI_Diagram_Element;
type DI_Edge_Access is
access all DI_Edge'Class;
for DI_Edge_Access'Storage_Size use 0;
not overriding function Get_Source
(Self : not null access constant DI_Edge)
return AMF.DI.Diagram_Elements.DI_Diagram_Element_Access is abstract;
-- Getter of Edge::source.
--
-- the edge's source diagram element, i.e. where the edge starts from.
not overriding function Get_Target
(Self : not null access constant DI_Edge)
return AMF.DI.Diagram_Elements.DI_Diagram_Element_Access is abstract;
-- Getter of Edge::target.
--
-- the edge's target diagram element, i.e. where the edge ends at.
not overriding function Get_Waypoint
(Self : not null access constant DI_Edge)
return AMF.DC.Sequence_Of_DC_Point is abstract;
-- Getter of Edge::waypoint.
--
-- an optional list of points relative to the origin of the nesting
-- diagram that specifies the connected line segments of the edge
end AMF.DI.Edges;
|
reznikmm/matreshka | Ada | 4,640 | 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_Table.Selected_Page_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Table_Selected_Page_Attribute_Node is
begin
return Self : Table_Selected_Page_Attribute_Node do
Matreshka.ODF_Table.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Table_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Table_Selected_Page_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Selected_Page_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Table_URI,
Matreshka.ODF_String_Constants.Selected_Page_Attribute,
Table_Selected_Page_Attribute_Node'Tag);
end Matreshka.ODF_Table.Selected_Page_Attributes;
|
kleopatra999/sdlada | Ada | 7,326 | ads | --------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2014 Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Events.Joysticks
--
-- Joystick specific events.
--------------------------------------------------------------------------------------------------------------------
with Interfaces;
package SDL.Events.Joysticks is
-- Joystick events.
Axis_Motion : constant Event_Types := 16#0000_0600#;
Ball_Motion : constant Event_Types := Axis_Motion + 1;
Hat_Motion : constant Event_Types := Axis_Motion + 2;
Button_Down : constant Event_Types := Axis_Motion + 3;
Button_Up : constant Event_Types := Axis_Motion + 4;
Device_Added : constant Event_Types := Axis_Motion + 5;
Device_Removed : constant Event_Types := Axis_Motion + 6;
type IDs is range -2 ** 31 .. 2 ** 31 - 1 with
Convention => C,
Size => 32;
type Axes is range 0 .. 255 with
Convention => C,
Size => 8;
type Axes_Values is range -32768 .. 32767 with
Convention => C,
Size => 16;
type Axis_Events is
record
Event_Type : Event_Types; -- Will be set to Axis_Motion.
Time_Stamp : Time_Stamps;
Which : IDs;
Axis : Axes;
Padding_1 : Padding_8;
Padding_2 : Padding_8;
Padding_3 : Padding_8;
Value : Axes_Values;
Padding_4 : Padding_16;
end record with
Convention => C;
type Balls is range 0 .. 255 with
Convention => C,
Size => 8;
type Ball_Values is range -32768 .. 32767 with
Convention => C,
Size => 16;
type Ball_Events is
record
Event_Type : Event_Types; -- Will be set to Ball_Motion.
Time_Stamp : Time_Stamps;
Which : IDs;
Ball : Balls;
Padding_1 : Padding_8;
Padding_2 : Padding_8;
Padding_3 : Padding_8;
X_Relative : Ball_Values;
Y_Relative : Ball_Values;
end record with
Convention => C;
type Hats is range 0 .. 255 with
Convention => C,
Size => 8;
type Hat_Positions is mod 2 ** 8 with
Convention => C,
Size => 8;
Hat_Centred : constant Hat_Positions := 0;
Hat_Up : constant Hat_Positions := 1;
Hat_Right : constant Hat_Positions := 2;
Hat_Down : constant Hat_Positions := 4;
Hat_Left : constant Hat_Positions := 8;
Hat_Right_Up : constant Hat_Positions := Hat_Right or Hat_Up;
Hat_Right_Down : constant Hat_Positions := Hat_Right or Hat_Down;
Hat_Left_Up : constant Hat_Positions := Hat_Left or Hat_Up;
Hat_Left_Down : constant Hat_Positions := Hat_Left or Hat_Down;
type Hat_Events is
record
Event_Type : Event_Types; -- Will be set to Hat_Motion.
Time_Stamp : Time_Stamps;
Which : IDs;
Hat : Hats;
Position : Hat_Positions;
Padding_1 : Padding_8;
Padding_2 : Padding_8;
end record with
Convention => C;
type Buttons is range 0 .. 255 with
Convention => C,
Size => 8;
type Button_Events is
record
Event_Type : Event_Types; -- Will be set to Button_Down or Button_Up.
Time_Stamp : Time_Stamps;
Which : IDs;
Button : Buttons;
State : Button_State;
Padding_1 : Padding_8;
Padding_2 : Padding_8;
end record with
Convention => C;
type Device_Events is
record
Event_Type : Event_Types; -- Will be set to Device_Added or Device_Removed.
Time_Stamp : Time_Stamps;
Which : IDs;
end record with
Convention => C;
-- Update the joystick event data. This is called by the event loop.
procedure Update with
Import => True,
Convention => C,
External_Name => "SDL_JoystickUpdate";
function Is_Polling_Enabled return Boolean;
procedure Enable_Polling with
Inline => True;
procedure Disable_Polling with
Inline => True;
private
for Axis_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Which at 2 * SDL.Word range 0 .. 31;
Axis at 3 * SDL.Word range 0 .. 7;
Padding_1 at 3 * SDL.Word range 8 .. 15;
Padding_2 at 3 * SDL.Word range 16 .. 23;
Padding_3 at 3 * SDL.Word range 24 .. 31;
Value at 4 * SDL.Word range 0 .. 15;
Padding_4 at 4 * SDL.Word range 16 .. 31;
end record;
for Ball_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Which at 2 * SDL.Word range 0 .. 31;
Ball at 3 * SDL.Word range 0 .. 7;
Padding_1 at 3 * SDL.Word range 8 .. 15;
Padding_2 at 3 * SDL.Word range 16 .. 23;
Padding_3 at 3 * SDL.Word range 24 .. 31;
X_Relative at 4 * SDL.Word range 0 .. 15;
Y_Relative at 4 * SDL.Word range 16 .. 31;
end record;
for Hat_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Which at 2 * SDL.Word range 0 .. 31;
Hat at 3 * SDL.Word range 0 .. 7;
Position at 3 * SDL.Word range 8 .. 15;
Padding_1 at 3 * SDL.Word range 16 .. 23;
Padding_2 at 3 * SDL.Word range 24 .. 31;
end record;
for Button_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Which at 2 * SDL.Word range 0 .. 31;
Button at 3 * SDL.Word range 0 .. 7;
State at 3 * SDL.Word range 8 .. 15;
Padding_1 at 3 * SDL.Word range 16 .. 23;
Padding_2 at 3 * SDL.Word range 24 .. 31;
end record;
for Device_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Which at 2 * SDL.Word range 0 .. 31;
end record;
end SDL.Events.Joysticks;
|
stcarrez/ada-util | Ada | 4,291 | ads | -----------------------------------------------------------------------
-- util-beans-basic -- Interface Definition with Getter and Setters
-- Copyright (C) 2009, 2010, 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 Util.Beans.Objects;
-- == Bean Interface ==
-- An Ada Bean is an object which implements the `Util.Beans.Basic.Readonly_Bean` or the
-- `Util.Beans.Basic.Bean` interface. By implementing these interface, the object provides
-- a behavior that is close to the Java Beans: a getter and a setter operation are available.
--
package Util.Beans.Basic is
pragma Preelaborate;
-- ------------------------------
-- Read-only Bean interface.
-- ------------------------------
-- The ''Readonly_Bean'' interface allows to plug a complex
-- runtime object to the expression resolver. This interface
-- must be implemented by any tagged record that should be
-- accessed as a variable for an expression.
--
-- For example, if 'foo' is bound to an object implementing that
-- interface, expressions like 'foo.name' will resolve to 'foo'
-- and the 'Get_Value' method will be called with 'name'.
--
type Readonly_Bean is limited interface;
type Readonly_Bean_Access is access all Readonly_Bean'Class;
-- Get the value identified by the name.
-- If the name cannot be found, the method should return the Null object.
function Get_Value (From : in Readonly_Bean;
Name : in String) return Util.Beans.Objects.Object is abstract;
-- ------------------------------
-- Bean interface.
-- ------------------------------
-- The ''Bean'' interface allows to modify a property value.
type Bean is limited interface and Readonly_Bean;
-- Set the value identified by the name.
-- If the name cannot be found, the method should raise the No_Value
-- exception.
procedure Set_Value (From : in out Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is abstract;
-- ------------------------------
-- List of objects
-- ------------------------------
-- The <b>List_Bean</b> interface gives access to a list of objects.
type List_Bean is limited interface and Readonly_Bean;
type List_Bean_Access is access all List_Bean'Class;
-- Get the number of elements in the list.
function Get_Count (From : in List_Bean) return Natural is abstract;
-- Set the current row index. Valid row indexes start at 1.
procedure Set_Row_Index (From : in out List_Bean;
Index : in Natural) is abstract;
-- Get the element at the current row index.
function Get_Row (From : in List_Bean) return Util.Beans.Objects.Object is abstract;
-- ------------------------------
-- Arrays of objects
-- ------------------------------
-- The <tt>Array_Bean</tt> interface gives access to an array of objects.
-- Unlike the <tt>List_Bean</tt> interface, it does not maintain any current position.
-- The drawback is that there is no current row concept and a position must be specified
-- to return a given row.
type Array_Bean is limited interface and Readonly_Bean;
type Array_Bean_Access is access all Array_Bean'Class;
-- Get the number of elements in the array.
function Get_Count (From : in Array_Bean) return Natural is abstract;
-- Get the element at the given position.
function Get_Row (From : in Array_Bean;
Position : in Natural) return Util.Beans.Objects.Object is abstract;
end Util.Beans.Basic;
|
reznikmm/webidl | Ada | 22,764 | adb | -- SPDX-FileCopyrightText: 2021 Max Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with League.Strings;
with WebIDL.Arguments;
with WebIDL.Constructors;
with WebIDL.Definitions;
with WebIDL.Enumerations;
with WebIDL.Interface_Members;
with WebIDL.Interfaces;
with WebIDL.Types;
package body WebIDL.Parsers is
function "+" (Text : Wide_Wide_String)
return League.Strings.Universal_String
renames League.Strings.To_Universal_String;
-----------
-- Parse --
-----------
procedure Parse
(Self : in out Parser'Class;
Lexer : in out Abstract_Lexer'Class;
Factory : in out WebIDL.Factories.Factory'Class;
Errors : out League.String_Vectors.Universal_String_Vector)
is
pragma Unreferenced (Self);
use all type WebIDL.Tokens.Token_Kind;
Next : WebIDL.Tokens.Token;
procedure Expect
(Kind : WebIDL.Tokens.Token_Kind;
Ok : in out Boolean)
with Inline;
procedure Argument
(Result : out WebIDL.Arguments.Argument_Access;
Ok : in out Boolean);
procedure ArgumentList
(Result : out WebIDL.Factories.Argument_Vector_Access;
Ok : in out Boolean);
procedure ArgumentName
(Result : out League.Strings.Universal_String;
Ok : in out Boolean);
procedure CallbackOrInterfaceOrMixin
(Result : out WebIDL.Definitions.Definition_Access;
Ok : in out Boolean);
procedure Constructor
(Result : out WebIDL.Constructors.Constructor_Access;
Ok : in out Boolean);
procedure Definition
(Result : out WebIDL.Definitions.Definition_Access;
Ok : in out Boolean);
procedure Enum
(Result : out WebIDL.Enumerations.Enumeration_Access;
Ok : in out Boolean);
procedure EnumValueList
(Result : out League.String_Vectors.Universal_String_Vector;
Ok : in out Boolean);
procedure Inheritance
(Result : out League.Strings.Universal_String;
Ok : in out Boolean);
procedure InterfaceMembers
(Result : out WebIDL.Factories.Interface_Member_Vector_Access;
Ok : in out Boolean);
procedure InterfaceMember
(Result : out WebIDL.Interface_Members.Interface_Member_Access;
Ok : in out Boolean);
procedure InterfaceOrMixin
(Result : out WebIDL.Definitions.Definition_Access;
Ok : in out Boolean);
procedure InterfaceRest
(Result : out WebIDL.Interfaces.Interface_Access;
Ok : in out Boolean);
procedure PromiseType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure DistinguishableType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure UnionType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure UnionMemberType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure SingleType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure ParseType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure RecordType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure UnrestrictedFloatType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
procedure UnsignedIntegerType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean);
--------------
-- Argument --
--------------
procedure Argument
(Result : out WebIDL.Arguments.Argument_Access;
Ok : in out Boolean)
is
Name : League.Strings.Universal_String;
Type_Def : WebIDL.Types.Type_Access;
Opt : Boolean := False;
Ellipsis : Boolean := False;
begin
if not Ok then
return;
elsif Next.Kind = Optional_Token then
Opt := True;
raise Program_Error;
else
ParseType (Type_Def, Ok);
if Next.Kind = Ellipsis_Token then
Expect (Ellipsis_Token, Ok);
Ellipsis := True;
end if;
ArgumentName (Name, Ok);
end if;
Result := Factory.Argument
(Type_Def => Type_Def,
Name => Name,
Is_Options => Opt,
Has_Ellipsis => Ellipsis);
end Argument;
------------------
-- ArgumentList --
------------------
procedure ArgumentList
(Result : out WebIDL.Factories.Argument_Vector_Access;
Ok : in out Boolean) is
begin
Result := Factory.Arguments;
loop
declare
Item : WebIDL.Arguments.Argument_Access;
begin
Argument (Item, Ok);
exit when not Ok;
Result.Append (Item);
exit when Next.Kind /= ',';
Expect (',', Ok);
end;
end loop;
Ok := True;
end ArgumentList;
------------------
-- ArgumentName --
------------------
procedure ArgumentName
(Result : out League.Strings.Universal_String;
Ok : in out Boolean) is
begin
Expect (Identifier_Token, Ok);
Result := Next.Text;
end ArgumentName;
-----------------
-- Constructor --
-----------------
procedure Constructor
(Result : out WebIDL.Constructors.Constructor_Access;
Ok : in out Boolean)
is
Args : WebIDL.Factories.Argument_Vector_Access;
begin
if not Ok then
return;
end if;
Expect (Constructor_Token, Ok);
Expect ('(', Ok);
ArgumentList (Args, Ok);
Expect (')', Ok);
Expect (';', Ok);
Result := Factory.Constructor (Args);
end Constructor;
--------------------------------
-- CallbackOrInterfaceOrMixin --
--------------------------------
procedure CallbackOrInterfaceOrMixin
(Result : out WebIDL.Definitions.Definition_Access;
Ok : in out Boolean) is
begin
case Next.Kind is
when Callback_Token =>
-- Expect (Callback_Token, Ok);
raise Program_Error;
when Interface_Token =>
Expect (Interface_Token, Ok);
InterfaceOrMixin (Result, Ok);
when others =>
Ok := False;
end case;
end CallbackOrInterfaceOrMixin;
----------------
-- Definition --
----------------
procedure Definition
(Result : out WebIDL.Definitions.Definition_Access;
Ok : in out Boolean) is
begin
case Next.Kind is
when Callback_Token | Interface_Token =>
CallbackOrInterfaceOrMixin (Result, Ok);
when Enum_Token =>
declare
Node : WebIDL.Enumerations.Enumeration_Access;
begin
Enum (Node, Ok);
Result := WebIDL.Definitions.Definition_Access (Node);
end;
when others =>
Ok := False;
end case;
end Definition;
-------------------------
-- DistinguishableType --
-------------------------
procedure DistinguishableType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean) is
begin
case Next.Kind is
when Short_Token | Long_Token | Unsigned_Token =>
UnsignedIntegerType (Result, Ok);
when Unrestricted_Token | Float_Token | Double_Token =>
UnrestrictedFloatType (Result, Ok);
when Undefined_Token =>
Expect (Undefined_Token, Ok);
Result := Factory.Undefined;
when Boolean_Token =>
Expect (Boolean_Token, Ok);
Result := Factory.Bool;
when Byte_Token =>
Expect (Byte_Token, Ok);
Result := Factory.Byte;
when Octet_Token =>
Expect (Octet_Token, Ok);
Result := Factory.Octet;
when Bigint_Token =>
Expect (Bigint_Token, Ok);
Result := Factory.BigInt;
when DOMString_Token =>
Expect (DOMString_Token, Ok);
Result := Factory.DOMString;
when ByteString_Token =>
Expect (ByteString_Token, Ok);
Result := Factory.ByteString;
when USVString_Token =>
Expect (USVString_Token, Ok);
Result := Factory.USVString;
when Identifier_Token =>
raise Program_Error;
when Sequence_Token =>
declare
T : WebIDL.Types.Type_Access;
begin
Expect (Sequence_Token, Ok);
Expect ('<', Ok);
ParseType (T, Ok);
Expect ('>', Ok);
if Ok then
Result := Factory.Sequence (T);
end if;
end;
when Object_Token =>
Expect (Object_Token, Ok);
Result := Factory.Object;
when Symbol_Token =>
Expect (Symbol_Token, Ok);
Result := Factory.Symbol;
when ArrayBuffer_Token |
DataView_Token |
Int8Array_Token |
Int16Array_Token |
Int32Array_Token |
Uint8Array_Token |
Uint16Array_Token |
Uint32Array_Token |
Uint8ClampedArray_Token |
Float32Array_Token |
Float64Array_Token =>
Result := Factory.Buffer_Related_Type (Next.Text);
Expect (Next.Kind, Ok);
when FrozenArray_Token =>
declare
T : WebIDL.Types.Type_Access;
begin
Expect (FrozenArray_Token, Ok);
Expect ('<', Ok);
ParseType (T, Ok);
Expect ('>', Ok);
if Ok then
Result := Factory.Frozen_Array (T);
end if;
end;
when ObservableArray_Token =>
declare
T : WebIDL.Types.Type_Access;
begin
Expect (ObservableArray_Token, Ok);
Expect ('<', Ok);
ParseType (T, Ok);
Expect ('>', Ok);
if Ok then
Result := Factory.Observable_Array (T);
end if;
end;
when Record_Token =>
RecordType (Result, Ok);
when others =>
raise Program_Error;
end case;
if Ok and Next.Kind = '?' then
Expect ('?', Ok);
Result := Factory.Nullable (Result);
end if;
end DistinguishableType;
----------
-- Enum --
----------
procedure Enum
(Result : out WebIDL.Enumerations.Enumeration_Access;
Ok : in out Boolean)
is
Name : League.Strings.Universal_String;
Values : League.String_Vectors.Universal_String_Vector;
begin
if not Ok then
return;
end if;
Expect (Enum_Token, Ok);
Expect (Identifier_Token, Ok);
Name := Next.Text;
Expect ('{', Ok);
EnumValueList (Values, Ok);
Expect ('}', Ok);
Expect (';', Ok);
if Ok then
Result := Factory.Enumeration (Name, Values);
end if;
end Enum;
procedure EnumValueList
(Result : out League.String_Vectors.Universal_String_Vector;
Ok : in out Boolean) is
begin
if not Ok then
return;
end if;
Expect (String_Token, Ok);
Result.Append (Next.Text);
while Ok and Next.Kind = ',' loop
Expect (',', Ok);
Expect (String_Token, Ok);
Result.Append (Next.Text);
end loop;
end EnumValueList;
------------
-- Expect --
------------
procedure Expect
(Kind : WebIDL.Tokens.Token_Kind;
Ok : in out Boolean) is
begin
if Ok and Next.Kind = Kind then
Lexer.Next_Token (Next);
elsif Ok then
Errors.Append (+"Expecing ");
Errors.Append (+Kind'Wide_Wide_Image);
Ok := False;
end if;
end Expect;
procedure Inheritance
(Result : out League.Strings.Universal_String;
Ok : in out Boolean) is
begin
if Next.Kind = ':' then
Expect (':', Ok);
Expect (Identifier_Token, Ok);
Result := Next.Text;
end if;
end Inheritance;
---------------------
-- InterfaceMember --
---------------------
procedure InterfaceMember
(Result : out WebIDL.Interface_Members.Interface_Member_Access;
Ok : in out Boolean) is
pragma Unreferenced (Result);
begin
case Next.Kind is
when Constructor_Token =>
declare
Item : WebIDL.Constructors.Constructor_Access;
begin
Constructor (Item, Ok);
Result := WebIDL.Interface_Members.Interface_Member_Access
(Item);
end;
when others =>
Ok := False;
end case;
end InterfaceMember;
----------------------
-- InterfaceMembers --
----------------------
procedure InterfaceMembers
(Result : out WebIDL.Factories.Interface_Member_Vector_Access;
Ok : in out Boolean)
is
begin
Result := Factory.Interface_Members;
while Ok loop
declare
Item : WebIDL.Interface_Members.Interface_Member_Access;
begin
InterfaceMember (Item, Ok);
if Ok then
Result.Append (Item);
end if;
end;
end loop;
Ok := True;
end InterfaceMembers;
----------------------
-- InterfaceOrMixin --
----------------------
procedure InterfaceOrMixin
(Result : out WebIDL.Definitions.Definition_Access;
Ok : in out Boolean) is
begin
if Next.Kind = Mixin_Token then
raise Program_Error;
else
declare
Value : WebIDL.Interfaces.Interface_Access;
begin
InterfaceRest (Value, Ok);
Result := WebIDL.Definitions.Definition_Access (Value);
end;
end if;
end InterfaceOrMixin;
-------------------
-- InterfaceRest --
-------------------
procedure InterfaceRest
(Result : out WebIDL.Interfaces.Interface_Access;
Ok : in out Boolean)
is
Name : League.Strings.Universal_String;
Parent : League.Strings.Universal_String;
Members : WebIDL.Factories.Interface_Member_Vector_Access;
begin
if not Ok then
return;
end if;
Expect (Identifier_Token, Ok);
Name := Next.Text;
Inheritance (Parent, Ok);
Expect ('{', Ok);
InterfaceMembers (Members, Ok);
Expect ('}', Ok);
Expect (';', Ok);
if Ok then
Result := Factory.New_Interface
(Name => Name,
Parent => Parent,
Members => Members);
end if;
end InterfaceRest;
procedure ParseType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean)
is
begin
if Next.Kind = '(' then
UnionType (Result, Ok);
if Ok and Next.Kind = '?' then
Expect ('?', Ok);
Result := Factory.Nullable (Result);
end if;
else
SingleType (Result, Ok);
end if;
end ParseType;
procedure PromiseType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean)
is
T : WebIDL.Types.Type_Access;
begin
Expect (Promise_Token, Ok);
Expect ('<', Ok);
ParseType (T, Ok);
Expect ('>', Ok);
if Ok then
Result := Factory.Promise (T);
end if;
end PromiseType;
procedure RecordType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean)
is
Key : WebIDL.Types.Type_Access;
Value : WebIDL.Types.Type_Access;
begin
Expect (Record_Token, Ok);
Expect ('<', Ok);
ParseType (Key, Ok);
Expect (',', Ok);
ParseType (Value, Ok);
Expect ('>', Ok);
if Ok then
Result := Factory.Record_Type (Key, Value);
end if;
end RecordType;
procedure SingleType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean) is
begin
case Next.Kind is
when Short_Token | Long_Token | Unsigned_Token |
Unrestricted_Token | Float_Token | Double_Token |
Undefined_Token |
Boolean_Token |
Byte_Token |
Octet_Token |
Bigint_Token |
DOMString_Token |
ByteString_Token |
USVString_Token |
Identifier_Token |
Sequence_Token |
Object_Token |
Symbol_Token |
ArrayBuffer_Token |
DataView_Token |
Int8Array_Token |
Int16Array_Token |
Int32Array_Token |
Uint8Array_Token |
Uint16Array_Token |
Uint32Array_Token |
Uint8ClampedArray_Token |
Float32Array_Token |
Float64Array_Token |
FrozenArray_Token |
ObservableArray_Token |
Record_Token =>
DistinguishableType (Result, Ok);
when Any_Token =>
Expect (Any_Token, Ok);
Result := Factory.Any;
when Promise_Token =>
PromiseType (Result, Ok);
when others =>
raise Program_Error;
end case;
end SingleType;
---------------------
-- UnionMemberType --
---------------------
procedure UnionMemberType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean) is
begin
if not Ok then
return;
end if;
case Next.Kind is
when '(' =>
UnionType (Result, Ok);
if Ok and Next.Kind = '?' then
Expect ('?', Ok);
Result := Factory.Nullable (Result);
end if;
when others =>
DistinguishableType (Result, Ok);
end case;
end UnionMemberType;
---------------
-- UnionType --
---------------
procedure UnionType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean)
is
Item : WebIDL.Types.Type_Access;
Vector : constant WebIDL.Factories.Union_Member_Vector_Access :=
Factory.Union_Members;
begin
Expect ('(', Ok);
UnionMemberType (Item, Ok);
if Ok then
Vector.Append (Item);
end if;
Expect (Or_Token, Ok);
UnionMemberType (Item, Ok);
if Ok then
Vector.Append (Item);
end if;
while Next.Kind = Or_Token loop
Expect (Or_Token, Ok);
UnionMemberType (Item, Ok);
if Ok then
Vector.Append (Item);
else
exit;
end if;
end loop;
Expect (')', Ok);
if Ok then
Result := Factory.Union (Vector);
end if;
end UnionType;
---------------------------
-- UnrestrictedFloatType --
---------------------------
procedure UnrestrictedFloatType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean)
is
Restricted : Boolean := True;
Double : Boolean := False;
begin
if Next.Kind = Unrestricted_Token then
Expect (Unrestricted_Token, Ok);
Restricted := False;
end if;
if Next.Kind = Float_Token then
Expect (Float_Token, Ok);
else
Expect (Double_Token, Ok);
Double := True;
end if;
if Ok then
Result := Factory.Float (Restricted, Double);
end if;
end UnrestrictedFloatType;
procedure UnsignedIntegerType
(Result : out WebIDL.Types.Type_Access;
Ok : in out Boolean)
is
Unsigned : Boolean := False;
Long : Natural := 0;
begin
if Next.Kind = Unsigned_Token then
Unsigned := True;
Expect (Unsigned_Token, Ok);
end if;
case Next.Kind is
when Short_Token =>
Expect (Short_Token, Ok);
when others =>
Expect (Long_Token, Ok);
Long := Boolean'Pos (Ok);
if Ok and Next.Kind = Long_Token then
Expect (Long_Token, Ok);
Long := 2;
end if;
end case;
if Ok then
Result := Factory.Integer (Unsigned, Long);
end if;
end UnsignedIntegerType;
begin
Lexer.Next_Token (Next);
loop
declare
Ok : Boolean := True;
Result : WebIDL.Definitions.Definition_Access;
begin
Definition (Result, Ok);
exit when not Ok;
end;
end loop;
if Next.Kind /= End_Of_Stream_Token then
Errors.Append (+"EOF expected");
end if;
end Parse;
end WebIDL.Parsers;
|
AdaCore/libadalang | Ada | 242 | adb | procedure Test is
begin
null;
exception
when A =>
--% node.p_relative_name
--% node.p_relative_name_text
null;
when B : C =>
--% node.p_relative_name
--% node.p_relative_name_text
null;
end Test;
|
reznikmm/matreshka | Ada | 4,474 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Asis.Definitions;
with Properties.Tools;
package body Properties.Definitions.Variant_Part is
------------
-- Assign --
------------
function Assign
(Engine : access Engines.Contexts.Context;
Element : Asis.Association;
Name : Engines.Text_Property)
return League.Strings.Universal_String
is
Text : League.Strings.Universal_String;
Down : League.Strings.Universal_String;
begin
Text.Append ("switch (src.");
Down := Engine.Text.Get_Property
(Asis.Definitions.Discriminant_Direct_Name (Element),
Engines.Code);
Text.Append (Down);
Text.Append ("){");
declare
List : constant Asis.Variant_List :=
Asis.Definitions.Variants (Element);
begin
Down := Engine.Text.Get_Property
(List => List,
Name => Name,
Empty => League.Strings.Empty_Universal_String,
Sum => Properties.Tools.Join'Access);
Text.Append (Down);
end;
Text.Append ("}");
return Text;
end Assign;
end Properties.Definitions.Variant_Part;
|
reznikmm/matreshka | Ada | 4,592 | 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_Table.Comment_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Table_Comment_Attribute_Node is
begin
return Self : Table_Comment_Attribute_Node do
Matreshka.ODF_Table.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Table_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Table_Comment_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Comment_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Table_URI,
Matreshka.ODF_String_Constants.Comment_Attribute,
Table_Comment_Attribute_Node'Tag);
end Matreshka.ODF_Table.Comment_Attributes;
|
reznikmm/matreshka | Ada | 18,887 | 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.Start_Classifier_Behavior_Actions;
with AMF.UML.String_Expressions;
with AMF.UML.Structured_Activity_Nodes;
with AMF.Visitors;
package AMF.Internals.UML_Start_Classifier_Behavior_Actions is
type UML_Start_Classifier_Behavior_Action_Proxy is
limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
and AMF.UML.Start_Classifier_Behavior_Actions.UML_Start_Classifier_Behavior_Action with null record;
overriding function Get_Object
(Self : not null access constant UML_Start_Classifier_Behavior_Action_Proxy)
return AMF.UML.Input_Pins.UML_Input_Pin_Access;
-- Getter of StartClassifierBehaviorAction::object.
--
-- Holds the object on which to start the owned behavior.
overriding procedure Set_Object
(Self : not null access UML_Start_Classifier_Behavior_Action_Proxy;
To : AMF.UML.Input_Pins.UML_Input_Pin_Access);
-- Setter of StartClassifierBehaviorAction::object.
--
-- Holds the object on which to start the owned behavior.
overriding function Get_Context
(Self : not null access constant UML_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_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_Start_Classifier_Behavior_Actions;
|
kontena/ruby-packer | Ada | 4,085 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Text_IO.Enumeration_IO --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- 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.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Terminal_Interface.Curses.Text_IO.Aux;
package body Terminal_Interface.Curses.Text_IO.Enumeration_IO is
package Aux renames Terminal_Interface.Curses.Text_IO.Aux;
package EIO is new Ada.Text_IO.Enumeration_IO (Enum);
procedure Put
(Win : Window;
Item : Enum;
Width : Field := Default_Width;
Set : Type_Set := Default_Setting)
is
Buf : String (1 .. Field'Last);
Tset : Ada.Text_IO.Type_Set;
begin
if Set /= Mixed_Case then
Tset := Ada.Text_IO.Type_Set'Val (Type_Set'Pos (Set));
else
Tset := Ada.Text_IO.Lower_Case;
end if;
EIO.Put (Buf, Item, Tset);
if Set = Mixed_Case then
Buf (Buf'First) := To_Upper (Buf (Buf'First));
end if;
Aux.Put_Buf (Win, Buf, Width, True, True);
end Put;
procedure Put
(Item : Enum;
Width : Field := Default_Width;
Set : Type_Set := Default_Setting)
is
begin
Put (Get_Window, Item, Width, Set);
end Put;
end Terminal_Interface.Curses.Text_IO.Enumeration_IO;
|
shintakezou/langkit | Ada | 5,894 | ads | --
-- Copyright (C) 2014-2022, AdaCore
-- SPDX-License-Identifier: Apache-2.0
--
with Langkit_Support.Adalog.Logic_Var;
generic
with package Logic_Vars is new Langkit_Support.Adalog.Logic_Var (<>);
package Langkit_Support.Adalog.Solver_Interface is
use Logic_Vars;
-------------------
-- Functor types --
-------------------
-- The solver contains a number of abstract functor types, that are meant
-- to be derived by the client to provide functionality.
--
-- The reason functor types are exposed is if you need to store state along
-- with your function. If you don't, there are convenience constructors
-- that take access to functions.
type Base_Functor_Type is abstract tagged record
Ref_Count : Natural;
-- Functors are generally dynamically allocated and handled through
-- access types. This tracks the number of references to a functor, so
-- that we know when to deallocate it.
end record;
procedure Destroy (Self : in out Base_Functor_Type) is null;
--------------------
-- Predicate_Type --
--------------------
type Predicate_Type is abstract new Base_Functor_Type with record
Cache_Set : Boolean;
Cache_Key : Value_Type;
Cache_Value : Boolean;
end record;
function Call
(Self : Predicate_Type; Val : Value_Type) return Boolean is abstract;
-- Derived types must override this to implement the predicate
function Call_Wrapper
(Self : in out Predicate_Type'Class; Val : Value_Type) return Boolean;
-- Converter users must call this instead of ``Convert`` to use the cache
function Image (Self : Predicate_Type) return String is ("");
function Full_Image
(Self : Predicate_Type; Dummy_Var : Logic_Vars.Logic_Var) return String
is ("");
-- A predicate encapsulates the logic of applying a boolean predicate to a
-- value, returning whether the predicate succeeds.
----------------------
-- N_Predicate_Type --
----------------------
type N_Predicate_Type (N : Positive) is
abstract new Base_Functor_Type with
record
Cache_Set : Boolean;
Cache_Key : Value_Array (1 .. N);
Cache_Value : Boolean;
end record;
-- A predicate encapsulates the logic of applying a boolean predicate to a
-- list of values, returning whether the predicate succeeds.
function Call
(Self : N_Predicate_Type; Vals : Logic_Vars.Value_Array) return Boolean
is abstract;
-- Derived types must override this to implement the predicate
function Call_Wrapper
(Self : in out N_Predicate_Type'Class;
Vals : Logic_Vars.Value_Array) return Boolean;
-- Converter users must call this instead of ``Convert`` to use the cache
function Image (Self : N_Predicate_Type) return String is ("");
function Full_Image
(Self : N_Predicate_Type; Dummy_Vars : Logic_Var_Array) return String
is ("");
--------------------
-- Converter_Type --
--------------------
type Converter_Type is abstract new Base_Functor_Type with record
Cache_Set : Boolean;
Cache_Key, Cache_Value : Value_Type;
end record;
-- Type to convert one value to another
function Convert
(Self : Converter_Type; From : Value_Type) return Value_Type
is abstract;
-- Derived types must override this to implement the conversion
function Convert_Wrapper
(Self : in out Converter_Type; From : Value_Type) return Value_Type;
-- Converter users must call this instead of ``Convert`` to use the cache
function Image (Self : Converter_Type) return String is ("");
function No_Converter return Converter_Type'Class;
-- Return a special converter that just raises a ``Program_Error`` when
-- called.
function Is_No_Converter (Self : Converter_Type'Class) return Boolean;
-- Return whether ``Self`` comes from ``No_Converter``
-------------------
-- Combiner_Type --
-------------------
type Combiner_Type (N : Positive) is
abstract new Base_Functor_Type with
record
Cache_Set : Boolean;
Cache_Key : Value_Array (1 .. N);
Cache_Value : Value_Type;
end record;
-- Type to compute a value from multiple input values
function Combine
(Self : Combiner_Type;
Vals : Logic_Vars.Value_Array) return Value_Type is abstract;
-- Derived types must overide this to implement the value computation
function Combine_Wrapper
(Self : in out Combiner_Type'Class;
Vals : Logic_Vars.Value_Array) return Value_Type;
-- Combiner users must call this instead of ``Combine`` to use the cache
function Image (Self : Combiner_Type) return String is ("");
-------------------------------------
-- Stateless functors constructors --
-------------------------------------
-- Those constructors are a shortcut to avoid creating custom functor types
-- when you have no state to store.
function Predicate
(Pred : access function (V : Value_Type) return Boolean;
Pred_Name : String := "Predicate")
return Predicate_Type'Class;
-- Create a Predicate relation. A Predicate relation will solve
-- successfully if the ``Predicate`` applied to the value of
-- ``Logic_Var`` yields ``True``.
function N_Predicate
(Pred : access function (V : Value_Array) return Boolean;
Arity : Positive;
Pred_Name : String := "N_Predicate") return N_Predicate_Type'Class;
function Converter
(Pred : access function (V : Value_Type) return Value_Type;
Pred_Name : String := "Converter") return Converter_Type'Class;
function Combiner
(Comb : access function (V : Value_Array) return Value_Type;
Arity : Positive;
Comb_Name : String := "Combiner") return Combiner_Type'Class;
end Langkit_Support.Adalog.Solver_Interface;
|
reznikmm/matreshka | Ada | 3,955 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Table_End_Attributes;
package Matreshka.ODF_Table.End_Attributes is
type Table_End_Attribute_Node is
new Matreshka.ODF_Table.Abstract_Table_Attribute_Node
and ODF.DOM.Table_End_Attributes.ODF_Table_End_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Table_End_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Table_End_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Table.End_Attributes;
|
skill-lang/adaCommon | Ada | 22,975 | adb | -- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ file parser implementation --
-- |___/_|\_\_|_|____| by: Timm Felden --
-- --
pragma Ada_2012;
with Ada.Characters.Latin_1;
with Ada.Containers.Doubly_Linked_Lists;
with Ada.Containers.Hashed_Maps;
with Ada.Containers.Hashed_Sets;
with Ada.Text_IO;
with Ada.Unchecked_Conversion;
with Interfaces;
with Skill.Containers.Vectors;
with Skill.Files;
with Skill.Types;
with Skill.Streams.Reader;
with Skill.Errors;
with Skill.String_Pools;
with Skill.Types.Pools;
with Skill.Internal.Parts;
with Skill.Hashes;
with Skill.Equals;
with Skill.Field_Declarations;
with Skill.Field_Restrictions;
with Skill.Field_Types;
with Skill.Field_Types.Builtin;
-- documentation can be found in java common
package body Skill.Internal.File_Parsers is
use type Interfaces.Integer_32;
use type Interfaces.Integer_64;
use type Types.Annotation;
use Skill;
use type Types.String_Access;
use type Types.Pools.Pool;
function Read
(Input : Skill.Streams.Reader.Input_Stream;
Mode : Skill.Files.Write_Mode) return Result
is
-- begin error reporting
Block_Counter : Positive := 1;
package A3 is new Ada.Containers.Hashed_Sets
(Types.String_Access, Hashes.Hash, Equals.Equals);
Seen_Types : A3.Set;
-- end error reporting
-- preliminary file
Strings : String_Pools.Pool := String_Pools.Create (Input);
String_Type : Field_Types.Builtin.String_Type_P.Field_Type :=
Field_Types.Builtin.String_Type_P.Make(Strings);
Type_Vector : Types.Pools.Type_Vector :=
Types.Pools.P_Type_Vector.Empty_Vector;
Types_By_Name : Skill.Types.Pools.Type_Map :=
Skill.Types.Pools.P_Type_Map.Empty_Map;
Annotation_Type : Field_Types.Builtin.Annotation_Type_P.Field_Type :=
Field_Types.Builtin.Annotation(Type_Vector);
-- parser state --
-- deferred pool resize requests
Resize_Queue : Types.Pools.Type_Vector :=
Types.Pools.P_Type_Vector.Empty_Vector;
-- entries of local fields
type LF_Entry is record
Pool : Types.Pools.Pool_Dyn;
Count : Types.V64;
end record;
package A2 is new Containers.Vectors(Natural, LF_Entry);
-- pool -> local field count
Local_Fields : A2.Vector := A2.Empty_Vector;
-- field data updates: pool x fieldID
type FD_Entry is record
Pool : Types.Pools.Pool_Dyn;
ID : Positive;
end record;
package A4 is new Containers.Vectors (Natural, FD_Entry);
-- field data updates: pool x fieldID
Field_Data_Queue : A4.Vector := A4.Empty_Vector;
-- read an entire string block
procedure String_Block is
Count : Types.v64 := Input.V64;
begin
if 0 = Count then
return;
end if;
-- read offsets
declare
Last : Types.i32 := 0;
Off : Types.i32;
type Offset_Array is
array (Types.v64 range 0 .. Count - 1) of Types.i32;
Offsets : Offset_Array;
begin
for I in Offset_Array'Range loop
Off := Input.I32;
Offsets (I) := Off;
Input.Check_Offset(Types.V64(Off));
end loop;
for I in Offset_Array'Range loop
Off := Offsets (I);
Strings.AddPosition
(Input.Position + Types.v64 (Last), Off - Last);
Last := Off;
end loop;
Input.Jump (Input.Position + Types.v64 (Last));
end;
exception
when E : others =>
raise Skill.Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, E, "corrupted string block");
end String_Block;
-- read an entire type block
procedure Type_Block is
Offset : Types.v64 := 0;
Type_Count : Types.v64 := Input.V64;
-- reads a single type declaration
procedure Type_Definition is
Name : constant Types.String_Access := Strings.Get (Input.V64);
procedure Type_Restriction is
Count : Types.v64 := Input.V64;
Id : Types.V64;
begin
for I in 1 .. Count loop
Id := Input.V64;
case Id is
when 0 =>
-- unique
null;
when 1 =>
-- singleton
null;
when 2 =>
-- monotone
null;
when others =>
if Id <= 5 or else 1 = (id mod 2) then
raise Skill.Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter,
"Found unknown type restriction " &
Integer'Image (Integer (Id)) &
". Please regenerate your binding, if possible.");
end if;
Ada.Text_IO.Put_Line
("Skiped unknown skippable type restriction." &
" Please update the SKilL implementation.");
end case;
end loop;
-- TODO result creation!!
end Type_Restriction;
begin
if null = Name then
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, "corrupted file: nullptr in typename");
end if;
-- type duplication error detection
if Seen_Types.Contains (Name) then
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, "Duplicate definition of type "& Name.all);
end if;
Seen_Types.Include (Name);
-- try to parse the type definition
declare
Block : Skill.Internal.Parts.Block;
Definition : Types.Pools.Pool;
Super_Pool : Types.Pools.Pool;
Super_Id : Integer;
begin
Block.Dynamic_Count := Types.Skill_ID_T(Input.V64);
Block.Static_Count := Block.Dynamic_Count;
if Types_By_Name.Contains (Name) then
Definition := Types_By_Name.Element (Name);
Super_Pool := Definition.Super;
else
-- type restrictions
-- TODO use the result!
Type_Restriction;
-- super
Super_Id := Integer (Input.V64);
if 0 = Super_Id then
Super_Pool := null;
else
if Super_Id > Natural(Type_Vector.Length) then
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, "Type " &
Name.all &
" refers to an ill-formed super type." &
Ada.Characters.Latin_1.LF &
" found: " &
Integer'Image (Super_Id) &
"; current number of other types " &
Integer'Image (Natural(Type_Vector.Length)));
else
Super_Pool := Type_Vector.Element (Super_Id - 1);
pragma Assert (null /= Super_Pool);
end if;
end if;
-- allocate pool
-- TODO add restrictions as parameter
-- definition = newPool(name, superDef, rest);
Definition := New_Pool
(Natural(Type_Vector.Length) + 32, Name, Super_Pool);
Type_Vector.Append (Definition);
Types_By_Name.Include (Name, Definition);
end if;
-- bpo
if 0 /= Block.Dynamic_Count and then null /= Definition.Super then
Block.Bpo := Definition.Base.Data'Length + Types.Skill_ID_T(Input.V64);
elsif null /= Definition.Super and then Seen_Types.Contains (Definition.Super.Skill_Name) then
Block.Bpo := Definition.Super.Blocks.Last_Element.Bpo;
else
Block.Bpo := Definition.Base.Data'Length;
end if;
pragma Assert(Definition /= null);
-- store block info and prepare resize
Definition.Blocks.Append (Block);
Resize_Queue.Append (Definition); -- <-TODO hier nur base pools einfügen!
Local_Fields.Append (LF_Entry'(Definition.Dynamic, Input.V64));
-- fix parent static count
if 0 /= Block.Dynamic_Count and then null /= Super_Pool then
-- calculate static count of our parent
declare
Sb : Internal.Parts.Block := Super_Pool.Blocks.Last_Element;
-- assumed static instances, minus what static instances would be, if p were the first sub pool.
Diff : constant Types.Skill_ID_T := sb.Static_Count -
(Block.bpo - sb.bpo);
begin
-- if positive, then we have to subtract it from the assumed static count (local and global)
if Diff > 0 then
Sb.Static_Count := Sb.Static_Count - Diff;
Super_Pool.Blocks.Replace_Element
(Super_Pool.Blocks.Length-1, Sb);
end if;
end;
end if;
end;
exception
when E : Constraint_Error =>
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, E, "unexpected corruption of parse state");
when E : Storage_Error =>
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, E, "unexpected end of file");
end Type_Definition;
function Parse_Field_Type return Skill.Field_Types.Field_Type is
ID : Natural := Natural (Input.V64);
function Convert is new Ada.Unchecked_Conversion
(Source => Types.Pools.Pool,
Target => Field_Types.Field_Type);
begin
case Id is
when 0 =>
return new Field_Types.Builtin.Constant_I8.Field_Type'
(Value => Input.I8);
when 1 =>
return new Field_Types.Builtin.Constant_I16.Field_Type'
(Value => Input.I16);
when 2 =>
return new Field_Types.Builtin.Constant_I32.Field_Type'
(Value => Input.I32);
when 3 =>
return new Field_Types.Builtin.Constant_I64.Field_Type'
(Value => Input.I64);
when 4 =>
return new Field_Types.Builtin.Constant_V64.Field_Type'
(Value => Input.V64);
when 5 =>
return Field_Types.Field_Type(Annotation_Type);
when 6 =>
return Field_Types.Builtin.Bool;
when 7 =>
return Field_Types.Builtin.I8;
when 8 =>
return Field_Types.Builtin.I16;
when 9 =>
return Field_Types.Builtin.I32;
when 10 =>
return Field_Types.Builtin.I64;
when 11 =>
return Field_Types.Builtin.V64;
when 12 =>
return Field_Types.Builtin.F32;
when 13 =>
return Field_Types.Builtin.F64;
when 14 =>
return Field_Types.Field_Type(String_Type);
when 15 =>
declare
Length : Types.V64 := Input.V64;
T : Field_Types.Field_Type := Parse_Field_Type;
begin
return Field_Types.Builtin.Const_Array(Length, T);
end;
when 17 =>
return Field_Types.Builtin.Var_Array (Parse_Field_Type);
when 18 =>
return Skill.Field_Types.Builtin.List_Type(Parse_Field_Type);
when 19 =>
return Skill.Field_Types.Builtin.Set_Type (Parse_Field_Type);
when 20 =>
declare
K : Field_Types.Field_Type := Parse_Field_Type;
V : Field_Types.Field_Type := Parse_Field_Type;
begin
return Skill.Field_Types.Builtin.Map_Type (K, V);
end;
when others =>
if ID >= 32 and Id < Natural(Type_Vector.Length) + 32 then
return Convert (Type_Vector.Element (ID - 32));
end if;
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter,
"Invalid type ID: " & Natural'Image (ID) & " largest is: "
& Natural'Image (Natural(Type_Vector.Length) + 32));
end case;
end Parse_Field_Type;
procedure Parse_Fields (E : LF_Entry) is
Legal_Field_ID_Barrier : Positive :=
1 + Natural(E.Pool.Data_Fields.Length);
Last_Block : Skill.Internal.Parts.Block :=
E.Pool.Blocks.Last_Element;
End_Offset : Types.V64;
begin
for Field_Counter in 1 .. E.Count loop
declare
Id : Integer := Integer (Input.V64);
begin
if Id <= 0 or else Legal_Field_ID_Barrier < ID then
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter,
"Found an illegal field ID: " & Integer'Image (ID));
end if;
if Id = Legal_Field_ID_Barrier then
Legal_Field_ID_Barrier := Legal_Field_ID_Barrier + 1;
-- new field
declare
Field_Name : Types.String_Access := Strings.Get
(Input.V64);
T : Field_Types.Field_Type;
Restrictions : Field_Restrictions.Vector;
function Field_Restriction return Field_Restrictions.Vector
Is
Count : Types.v64 := Input.V64;
Id : Types.V64;
Rval : Field_Restrictions.Vector :=
Field_Restrictions.Vector_P.Empty_Vector;
B : Types.Box;
L : Types.V64;
begin
for I in 1 .. Count loop
Id := Input.V64;
case Id is
when 0 =>
-- nonnull
Rval.Append (Field_Restrictions.Nonnull);
when 1 =>
-- default
if 5 = T.ID or else T.Id >= 32 then
-- via type ID
L := Input.V64;
else
-- via value
B := T.Read_Box (Input.To);
end if;
null;
when 3 =>
-- range
B := T.Read_Box (Input.To);
B := T.Read_Box (Input.To);
when 5 =>
-- coding
Rval.Append (new Field_Restrictions.Coding_T'(
Name => Strings.Get(Input.V64)));
when 7 =>
Rval.Append
(Field_Restrictions.Constant_Length_Pointer);
when 9 =>
-- one of
for I in 1 .. Input.V64 loop
-- type IDs
L := Input.V64;
end loop;
when others =>
if Id <= 9 or else 1 = (Id mod 2) then
raise Skill.Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter,
"Found unknown field restriction " &
Integer'Image (Integer (Id)) &
". Please regenerate your binding, if possible.");
end if;
Ada.Text_IO.Put_Line
("Skiped unknown skippable field restriction." &
" Please update the SKilL implementation.");
end case;
end loop;
return Rval;
end Field_Restriction;
begin
if null = Field_Name then
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter,
"corrupted file: nullptr in fieldname");
end if;
T := Parse_Field_Type;
Restrictions := Field_Restriction;
End_Offset := Input.V64;
declare
-- TODO restrictions
F : Field_Declarations.Field_Declaration :=
E.Pool.Add_Field (ID, T, Field_Name, Restrictions);
begin
F.Add_Chunk
(new Internal.Parts.Bulk_Chunk'
(Offset,
End_Offset,
E.Pool.Size,
E.Pool.Blocks.Length)
);
exception
when E : Errors.Skill_Error =>
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, E,
"failed to add field");
end;
end;
else
-- field already seen
End_Offset := Input.V64;
E.Pool.Data_Fields.Element (ID).Add_Chunk
(new Internal.Parts.Simple_Chunk'
(Offset,
End_Offset,
Last_Block.Dynamic_Count,
Last_Block.Bpo));
end if;
Offset := End_Offset;
Field_Data_Queue.Append (FD_Entry'(E.Pool, ID));
end;
end loop;
end;
begin
-- reset counters and queues
-- seenTypes.clear();
Seen_Types := A3.Empty_Set;
Resize_Queue.Clear;
Local_Fields.Clear;
Field_Data_Queue.Clear;
-- parse types
for I in 1 .. Type_Count loop
Type_Definition;
end loop;
-- resize pools
declare
Index : Natural := Natural'First;
procedure Resize (E : Skill.Types.Pools.Pool) is
begin
E.Dynamic.Resize_Pool;
end;
begin
Resize_Queue.Foreach (Resize'Access);
end;
-- parse fields
Local_Fields.Foreach(Parse_Fields'Access);
-- update field data information, so that it can be read in parallel or
-- even lazy
-- Process Field Data
declare
-- We Have To Add The File Offset To all Begins and Ends We Encounter
File_Offset : constant Types.V64 := Input.Position;
Data_End : Types.V64 := File_Offset;
begin
-- process field data declarations in order of appearance and update
-- offsets to absolute positions
while not Field_Data_Queue.Is_Empty loop
declare
use type Skill.Field_Declarations.Field_Declaration;
E : FD_Entry := Field_Data_Queue.Pop;
F : Skill.Field_Declarations.Field_Declaration :=
E.Pool.Data_Fields.Element (E.ID);
pragma Assert (F /= null);
-- make begin/end absolute
End_Offset : Types.V64 :=
F.Add_Offset_To_Last_Chunk (Input, File_Offset);
begin
if Data_End < End_Offset then
Data_End := End_Offset;
end if;
end;
end loop;
Input.Jump (Data_End);
end;
end Type_Block;
procedure Free_State is
begin
Local_Fields.Free;
Field_Data_Queue.Free;
Resize_Queue.Free;
end;
begin
while not Input.Eof loop
String_Block;
Type_Block;
Block_Counter := Block_Counter + 1;
end loop;
Free_State;
return Make_State
(Input.Path,
Mode,
Strings,
String_Type,
Annotation_Type,
Type_Vector,
Types_By_Name);
exception
when E : Storage_Error =>
raise Errors.Skill_Error
with Input.Parse_Exception
(Block_Counter, E, "unexpected end of file");
end Read;
end Skill.Internal.File_Parsers;
|
apple-oss-distributions/old_ncurses | Ada | 11,813 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Forms.Field_Types --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer <[email protected]> 1996
-- Version Control:
-- $Revision: 1.1.1.1 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
with Ada.Unchecked_Deallocation;
with Ada.Unchecked_Conversion;
-- |
-- |=====================================================================
-- | man page form_fieldtype.3x
-- |=====================================================================
-- |
package body Terminal_Interface.Curses.Forms.Field_Types is
use type Interfaces.C.int;
use type System.Address;
function To_Argument_Access is new Ada.Unchecked_Conversion
(System.Address, Argument_Access);
function Get_Fieldtype (F : Field) return C_Field_Type;
pragma Import (C, Get_Fieldtype, "field_type");
function Get_Arg (F : Field) return System.Address;
pragma Import (C, Get_Arg, "field_arg");
-- |
-- |=====================================================================
-- | man page form_field_validation.3x
-- |=====================================================================
-- |
-- |
-- |
function Get_Type (Fld : in Field) return Field_Type_Access
is
Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
Arg : Argument_Access;
begin
if Low_Level = Null_Field_Type then
return null;
else
if Low_Level = M_Builtin_Router or else
Low_Level = M_Generic_Type or else
Low_Level = M_Choice_Router or else
Low_Level = M_Generic_Choice then
Arg := To_Argument_Access (Get_Arg (Fld));
if Arg = null then
raise Form_Exception;
else
return Arg.Typ;
end if;
else
raise Form_Exception;
end if;
end if;
end Get_Type;
function Make_Arg (Args : System.Address) return System.Address
is
-- Actually args is a double indirected pointer to the arguments
-- of a C variable argument list. In theory it is now quite
-- complicated to write portable routine that reads the arguments,
-- because one has to know the growth direction of the stack and
-- the sizes of the individual arguments.
-- Fortunately we are only interested in the first argument (#0),
-- we know its size and for the first arg we don't care about
-- into which stack direction we have to proceed. We simply
-- resolve the double indirection and thats it.
type V is access all System.Address;
function To_Access is new Ada.Unchecked_Conversion (System.Address,
V);
begin
return To_Access (To_Access (Args).all).all;
end Make_Arg;
function Copy_Arg (Usr : System.Address) return System.Address
is
begin
return Usr;
end Copy_Arg;
procedure Free_Arg (Usr : in System.Address)
is
procedure Free_Type is new Ada.Unchecked_Deallocation
(Field_Type'Class, Field_Type_Access);
procedure Freeargs is new Ada.Unchecked_Deallocation
(Argument, Argument_Access);
To_Be_Free : Argument_Access := To_Argument_Access (Usr);
Low_Level : C_Field_Type;
begin
if To_Be_Free /= null then
if To_Be_Free.Usr /= System.Null_Address then
Low_Level := To_Be_Free.Cft;
if Low_Level.Freearg /= null then
Low_Level.Freearg (To_Be_Free.Usr);
end if;
end if;
if To_Be_Free.Typ /= null then
Free_Type (To_Be_Free.Typ);
end if;
Freeargs (To_Be_Free);
end if;
end Free_Arg;
procedure Wrap_Builtin (Fld : Field;
Typ : Field_Type'Class;
Cft : C_Field_Type := C_Builtin_Router)
is
Usr_Arg : System.Address := Get_Arg (Fld);
Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
Arg : Argument_Access;
Res : Eti_Error;
function Set_Fld_Type (F : Field := Fld;
Cf : C_Field_Type := Cft;
Arg1 : Argument_Access) return C_Int;
pragma Import (C, Set_Fld_Type, "set_field_type");
begin
pragma Assert (Low_Level /= Null_Field_Type);
if Cft /= C_Builtin_Router and then Cft /= C_Choice_Router then
raise Form_Exception;
else
Arg := new Argument'(Usr => System.Null_Address,
Typ => new Field_Type'Class'(Typ),
Cft => Get_Fieldtype (Fld));
if Usr_Arg /= System.Null_Address then
if Low_Level.Copyarg /= null then
Arg.Usr := Low_Level.Copyarg (Usr_Arg);
else
Arg.Usr := Usr_Arg;
end if;
end if;
Res := Set_Fld_Type (Arg1 => Arg);
if Res /= E_Ok then
Eti_Exception (Res);
end if;
end if;
end Wrap_Builtin;
function Field_Check_Router (Fld : Field;
Usr : System.Address) return C_Int
is
Arg : constant Argument_Access := To_Argument_Access (Usr);
begin
pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
and then Arg.Typ /= null);
if Arg.Cft.Fcheck /= null then
return Arg.Cft.Fcheck (Fld, Arg.Usr);
else
return 1;
end if;
end Field_Check_Router;
function Char_Check_Router (Ch : C_Int;
Usr : System.Address) return C_Int
is
Arg : constant Argument_Access := To_Argument_Access (Usr);
begin
pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
and then Arg.Typ /= null);
if Arg.Cft.Ccheck /= null then
return Arg.Cft.Ccheck (Ch, Arg.Usr);
else
return 1;
end if;
end Char_Check_Router;
function Next_Router (Fld : Field;
Usr : System.Address) return C_Int
is
Arg : constant Argument_Access := To_Argument_Access (Usr);
begin
pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
and then Arg.Typ /= null);
if Arg.Cft.Next /= null then
return Arg.Cft.Next (Fld, Arg.Usr);
else
return 1;
end if;
end Next_Router;
function Prev_Router (Fld : Field;
Usr : System.Address) return C_Int
is
Arg : constant Argument_Access := To_Argument_Access (Usr);
begin
pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
and then Arg.Typ /= null);
if Arg.Cft.Prev /= null then
return Arg.Cft.Prev (Fld, Arg.Usr);
else
return 1;
end if;
end Prev_Router;
-- -----------------------------------------------------------------------
--
function C_Builtin_Router return C_Field_Type
is
Res : Eti_Error;
T : C_Field_Type;
begin
if M_Builtin_Router = Null_Field_Type then
T := New_Fieldtype (Field_Check_Router'Access,
Char_Check_Router'Access);
if T = Null_Field_Type then
raise Form_Exception;
else
Res := Set_Fieldtype_Arg (T,
Make_Arg'Access,
Copy_Arg'Access,
Free_Arg'Access);
if Res /= E_Ok then
Eti_Exception (Res);
end if;
end if;
M_Builtin_Router := T;
end if;
pragma Assert (M_Builtin_Router /= Null_Field_Type);
return M_Builtin_Router;
end C_Builtin_Router;
-- -----------------------------------------------------------------------
--
function C_Choice_Router return C_Field_Type
is
Res : Eti_Error;
T : C_Field_Type;
begin
if M_Choice_Router = Null_Field_Type then
T := New_Fieldtype (Field_Check_Router'Access,
Char_Check_Router'Access);
if T = Null_Field_Type then
raise Form_Exception;
else
Res := Set_Fieldtype_Arg (T,
Make_Arg'Access,
Copy_Arg'Access,
Free_Arg'Access);
if Res /= E_Ok then
Eti_Exception (Res);
end if;
Res := Set_Fieldtype_Choice (T,
Next_Router'Access,
Prev_Router'Access);
if Res /= E_Ok then
Eti_Exception (Res);
end if;
end if;
M_Choice_Router := T;
end if;
pragma Assert (M_Choice_Router /= Null_Field_Type);
return M_Choice_Router;
end C_Choice_Router;
end Terminal_Interface.Curses.Forms.Field_Types;
|
stcarrez/ada-awa | Ada | 1,436 | ads | -----------------------------------------------------------------------
-- awa-counters-definition -- Counter definition
-- Copyright (C) 2015 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.
-----------------------------------------------------------------------
-- The <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition.
generic
Table : ADO.Schemas.Class_Mapping_Access;
Field : String := "";
package AWA.Counters.Definition is
Def_Name : aliased constant String := Field;
-- Get the counter definition index.
function Index return Counter_Index_Type;
private
package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access));
-- Get the counter definition index.
function Index return Counter_Index_Type renames Def.Kind;
end AWA.Counters.Definition;
|
AdaCore/Ada_Drivers_Library | Ada | 3,230 | adb | ------------------------------------------------------------------------------
-- --
-- Copyright © AdaCore and other contributors, 2018-2020 --
-- See https://github.com/AdaCore/Ada_Drivers_Library/graphs/contributors --
-- for more information --
-- --
-- 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 NRF52_DK.Buttons; use NRF52_DK.Buttons;
with NRF52_DK.LEDs; use NRF52_DK.LEDs;
with NRF52_DK.Time;
procedure Main is
begin
Initialize_LEDs;
loop
Turn_Off (LED1);
Turn_Off (LED2);
Turn_Off (LED3);
Turn_Off (LED4);
if NRF52_DK.Buttons.State (Button_1) = Pressed then
Turn_On (LED1);
end if;
if NRF52_DK.Buttons.State (Button_2) = Pressed then
Turn_On (LED2);
end if;
if NRF52_DK.Buttons.State (Button_3) = Pressed then
Turn_On (LED3);
end if;
if NRF52_DK.Buttons.State (Button_4) = Pressed then
Turn_On (LED4);
end if;
NRF52_DK.Time.Delay_Ms (200);
end loop;
end Main;
|
Fabien-Chouteau/GESTE | Ada | 32,888 | ads | package GESTE_Fonts.FreeMono12pt7b is
Font : constant Bitmap_Font_Ref;
private
FreeMono12pt7bBitmaps : aliased constant Font_Bitmap := (
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#0C#, 16#00#, 16#30#, 16#00#, 16#C0#, 16#03#, 16#00#, 16#0C#, 16#00#,
16#30#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#30#, 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#3B#, 16#80#, 16#CE#,
16#03#, 16#38#, 16#0C#, 16#C0#, 16#33#, 16#00#, 16#C4#, 16#03#, 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#09#, 16#00#, 16#24#, 16#01#, 16#10#, 16#04#,
16#40#, 16#12#, 16#01#, 16#FF#, 16#01#, 16#20#, 16#04#, 16#80#, 16#12#,
16#03#, 16#FF#, 16#01#, 16#20#, 16#04#, 16#80#, 16#12#, 16#00#, 16#48#,
16#01#, 16#20#, 16#04#, 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#04#, 16#00#, 16#7A#, 16#02#, 16#18#, 16#18#, 16#20#, 16#40#, 16#01#,
16#80#, 16#03#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#80#, 16#01#, 16#00#,
16#04#, 16#10#, 16#20#, 16#61#, 16#81#, 16#7C#, 16#00#, 16#40#, 16#01#,
16#00#, 16#04#, 16#00#, 16#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#01#, 16#10#,
16#04#, 16#20#, 16#10#, 16#80#, 16#44#, 16#00#, 16#E0#, 16#00#, 16#0C#,
16#01#, 16#C0#, 16#78#, 16#00#, 16#1C#, 16#00#, 16#88#, 16#02#, 16#10#,
16#08#, 16#40#, 16#22#, 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#07#,
16#C0#, 16#30#, 16#00#, 16#80#, 16#02#, 16#00#, 16#04#, 16#00#, 16#30#,
16#01#, 16#22#, 16#04#, 16#50#, 16#11#, 16#40#, 16#43#, 16#01#, 16#1C#,
16#03#, 16#D8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#38#, 16#00#, 16#C0#, 16#03#, 16#00#, 16#0C#, 16#00#,
16#30#, 16#00#, 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#80#, 16#02#,
16#00#, 16#10#, 16#00#, 16#C0#, 16#02#, 16#00#, 16#08#, 16#00#, 16#60#,
16#01#, 16#80#, 16#06#, 16#00#, 16#18#, 16#00#, 16#60#, 16#01#, 16#80#,
16#02#, 16#00#, 16#08#, 16#00#, 16#30#, 16#00#, 16#40#, 16#01#, 16#00#,
16#02#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#03#, 16#00#, 16#04#,
16#00#, 16#10#, 16#00#, 16#60#, 16#00#, 16#80#, 16#02#, 16#00#, 16#08#,
16#00#, 16#20#, 16#00#, 16#80#, 16#02#, 16#00#, 16#08#, 16#00#, 16#60#,
16#01#, 16#00#, 16#0C#, 16#00#, 16#20#, 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#10#, 16#00#, 16#40#, 16#11#, 16#00#, 16#7F#, 16#80#,
16#30#, 16#00#, 16#A0#, 16#04#, 16#80#, 16#21#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#,
16#01#, 16#00#, 16#FF#, 16#E0#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#,
16#04#, 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#07#, 16#00#, 16#18#, 16#00#, 16#E0#,
16#03#, 16#00#, 16#0C#, 16#00#, 16#60#, 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#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#0E#, 16#00#, 16#78#, 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#10#, 16#00#, 16#80#, 16#02#, 16#00#, 16#10#, 16#00#,
16#40#, 16#02#, 16#00#, 16#08#, 16#00#, 16#40#, 16#01#, 16#00#, 16#08#,
16#00#, 16#20#, 16#01#, 16#80#, 16#04#, 16#00#, 16#10#, 16#00#, 16#80#,
16#02#, 16#00#, 16#10#, 16#00#, 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#1E#, 16#00#, 16#C4#, 16#02#, 16#08#, 16#10#, 16#20#, 16#40#, 16#81#,
16#01#, 16#04#, 16#04#, 16#10#, 16#10#, 16#40#, 16#41#, 16#01#, 16#04#,
16#0C#, 16#10#, 16#20#, 16#20#, 16#80#, 16#C4#, 16#01#, 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#30#,
16#01#, 16#40#, 16#09#, 16#00#, 16#44#, 16#00#, 16#10#, 16#00#, 16#40#,
16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#,
16#04#, 16#00#, 16#10#, 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#1E#, 16#00#, 16#84#, 16#04#, 16#08#, 16#00#,
16#20#, 16#00#, 16#80#, 16#02#, 16#00#, 16#10#, 16#00#, 16#C0#, 16#06#,
16#00#, 16#30#, 16#01#, 16#80#, 16#08#, 16#00#, 16#40#, 16#82#, 16#02#,
16#0F#, 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#1E#, 16#01#, 16#86#, 16#00#, 16#08#, 16#00#, 16#20#, 16#00#, 16#80#,
16#06#, 16#00#, 16#E0#, 16#00#, 16#40#, 16#00#, 16#80#, 16#01#, 16#00#,
16#04#, 16#00#, 16#10#, 16#00#, 16#81#, 16#86#, 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#03#, 16#00#, 16#14#,
16#00#, 16#50#, 16#02#, 16#40#, 16#11#, 16#00#, 16#44#, 16#02#, 16#10#,
16#08#, 16#40#, 16#41#, 16#01#, 16#04#, 16#07#, 16#F8#, 16#00#, 16#40#,
16#01#, 16#00#, 16#04#, 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#3F#, 16#80#, 16#80#, 16#02#, 16#00#, 16#08#,
16#00#, 16#20#, 16#00#, 16#FC#, 16#02#, 16#18#, 16#00#, 16#20#, 16#00#,
16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#80#, 16#81#, 16#86#,
16#01#, 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#03#, 16#C0#, 16#30#, 16#01#, 16#80#, 16#0C#, 16#00#, 16#20#, 16#00#,
16#80#, 16#04#, 16#F0#, 16#16#, 16#20#, 16#60#, 16#41#, 16#81#, 16#04#,
16#04#, 16#08#, 16#10#, 16#20#, 16#40#, 16#42#, 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#7F#, 16#81#, 16#02#,
16#04#, 16#08#, 16#00#, 16#20#, 16#00#, 16#80#, 16#04#, 16#00#, 16#10#,
16#00#, 16#40#, 16#02#, 16#00#, 16#08#, 16#00#, 16#20#, 16#01#, 16#80#,
16#04#, 16#00#, 16#10#, 16#00#, 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#1E#, 16#00#, 16#84#, 16#04#, 16#08#, 16#10#,
16#20#, 16#40#, 16#81#, 16#02#, 16#02#, 16#10#, 16#07#, 16#80#, 16#21#,
16#81#, 16#02#, 16#04#, 16#04#, 16#10#, 16#10#, 16#40#, 16#80#, 16#86#,
16#01#, 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#0E#, 16#00#, 16#C6#, 16#02#, 16#08#, 16#10#, 16#10#, 16#40#, 16#41#,
16#01#, 16#02#, 16#0C#, 16#0C#, 16#50#, 16#1E#, 16#40#, 16#01#, 16#00#,
16#04#, 16#00#, 16#20#, 16#01#, 16#00#, 16#18#, 16#07#, 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#38#, 16#01#, 16#E0#,
16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#0E#, 16#00#, 16#78#, 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#70#, 16#01#, 16#C0#, 16#07#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#E0#,
16#03#, 16#80#, 16#0C#, 16#00#, 16#30#, 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#30#, 16#03#, 16#00#,
16#18#, 16#01#, 16#80#, 16#18#, 16#00#, 16#C0#, 16#00#, 16#C0#, 16#00#,
16#C0#, 16#00#, 16#C0#, 16#01#, 16#80#, 16#01#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#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#FE#,
16#00#, 16#00#, 16#00#, 16#07#, 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#30#,
16#00#, 16#30#, 16#00#, 16#30#, 16#00#, 16#30#, 16#00#, 16#60#, 16#00#,
16#C0#, 16#0C#, 16#00#, 16#60#, 16#06#, 16#00#, 16#60#, 16#02#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#06#, 16#18#, 16#10#, 16#10#, 16#00#, 16#40#,
16#02#, 16#00#, 16#18#, 16#00#, 16#C0#, 16#04#, 16#00#, 16#10#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 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#1E#, 16#00#, 16#C4#,
16#06#, 16#08#, 16#10#, 16#20#, 16#40#, 16#81#, 16#0E#, 16#04#, 16#C8#,
16#12#, 16#20#, 16#48#, 16#81#, 16#22#, 16#04#, 16#78#, 16#10#, 16#00#,
16#40#, 16#01#, 16#00#, 16#03#, 16#00#, 16#07#, 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#03#, 16#F0#, 16#00#, 16#C0#, 16#04#,
16#80#, 16#12#, 16#00#, 16#44#, 16#02#, 16#10#, 16#08#, 16#40#, 16#40#,
16#81#, 16#FE#, 16#04#, 16#08#, 16#20#, 16#10#, 16#80#, 16#42#, 16#01#,
16#3E#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#FC#, 16#04#, 16#08#, 16#10#, 16#10#, 16#40#, 16#41#,
16#01#, 16#04#, 16#08#, 16#1F#, 16#C0#, 16#40#, 16#C1#, 16#01#, 16#84#,
16#02#, 16#10#, 16#08#, 16#40#, 16#21#, 16#01#, 16#1F#, 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#7D#,
16#06#, 16#0C#, 16#10#, 16#10#, 16#80#, 16#42#, 16#00#, 16#08#, 16#00#,
16#20#, 16#00#, 16#80#, 16#02#, 16#00#, 16#08#, 16#00#, 16#20#, 16#00#,
16#40#, 16#20#, 16#C3#, 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#07#, 16#F8#, 16#08#, 16#18#, 16#20#,
16#20#, 16#80#, 16#42#, 16#01#, 16#08#, 16#04#, 16#20#, 16#10#, 16#80#,
16#42#, 16#01#, 16#08#, 16#04#, 16#20#, 16#10#, 16#80#, 16#82#, 16#06#,
16#1F#, 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#07#, 16#FF#, 16#04#, 16#04#, 16#10#, 16#10#, 16#40#, 16#01#,
16#00#, 16#04#, 16#40#, 16#1F#, 16#00#, 16#44#, 16#01#, 16#00#, 16#04#,
16#00#, 16#10#, 16#10#, 16#40#, 16#41#, 16#01#, 16#1F#, 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#07#, 16#FF#,
16#04#, 16#04#, 16#10#, 16#10#, 16#40#, 16#01#, 16#00#, 16#04#, 16#40#,
16#1F#, 16#00#, 16#44#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#,
16#40#, 16#01#, 16#00#, 16#1F#, 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#7D#, 16#02#, 16#0C#, 16#10#,
16#10#, 16#80#, 16#42#, 16#00#, 16#08#, 16#00#, 16#20#, 16#00#, 16#80#,
16#02#, 16#0F#, 16#88#, 16#04#, 16#20#, 16#10#, 16#40#, 16#41#, 16#81#,
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#03#, 16#C7#, 16#84#, 16#08#, 16#10#, 16#20#, 16#40#, 16#81#,
16#02#, 16#04#, 16#08#, 16#1F#, 16#E0#, 16#40#, 16#81#, 16#02#, 16#04#,
16#08#, 16#10#, 16#20#, 16#40#, 16#81#, 16#02#, 16#1F#, 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#01#, 16#FF#,
16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#,
16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#,
16#04#, 16#00#, 16#10#, 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#3F#, 16#C0#, 16#08#, 16#00#,
16#20#, 16#00#, 16#80#, 16#02#, 16#00#, 16#08#, 16#00#, 16#20#, 16#00#,
16#82#, 16#02#, 16#08#, 16#08#, 16#20#, 16#20#, 16#81#, 16#81#, 16#8C#,
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#07#, 16#C7#, 16#84#, 16#0C#, 16#10#, 16#40#, 16#42#, 16#01#,
16#10#, 16#04#, 16#80#, 16#17#, 16#00#, 16#66#, 16#01#, 16#0C#, 16#04#,
16#10#, 16#10#, 16#20#, 16#40#, 16#81#, 16#03#, 16#1F#, 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#03#, 16#F0#,
16#02#, 16#00#, 16#08#, 16#00#, 16#20#, 16#00#, 16#80#, 16#02#, 16#00#,
16#08#, 16#00#, 16#20#, 16#00#, 16#80#, 16#02#, 16#02#, 16#08#, 16#08#,
16#20#, 16#20#, 16#80#, 16#8F#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#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#01#, 16#CC#, 16#0A#, 16#28#,
16#28#, 16#A1#, 16#A2#, 16#84#, 16#89#, 16#12#, 16#24#, 16#88#, 16#8A#,
16#22#, 16#30#, 16#88#, 16#42#, 16#20#, 16#08#, 16#80#, 16#22#, 16#00#,
16#BE#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#07#, 16#8E#, 16#04#, 16#28#, 16#10#, 16#90#, 16#42#,
16#41#, 16#08#, 16#84#, 16#23#, 16#10#, 16#84#, 16#42#, 16#09#, 16#08#,
16#24#, 16#20#, 16#50#, 16#81#, 16#42#, 16#03#, 16#1F#, 16#0C#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#06#, 16#18#, 16#10#, 16#30#, 16#80#, 16#42#, 16#00#, 16#90#, 16#02#,
16#40#, 16#09#, 16#00#, 16#24#, 16#00#, 16#88#, 16#02#, 16#20#, 16#10#,
16#40#, 16#C1#, 16#86#, 16#01#, 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#07#, 16#FC#, 16#04#, 16#18#, 16#10#,
16#30#, 16#40#, 16#41#, 16#01#, 16#04#, 16#0C#, 16#10#, 16#60#, 16#7E#,
16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#,
16#1F#, 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#78#, 16#06#, 16#18#, 16#10#, 16#30#, 16#80#, 16#42#,
16#00#, 16#90#, 16#02#, 16#40#, 16#09#, 16#00#, 16#24#, 16#00#, 16#88#,
16#02#, 16#20#, 16#10#, 16#40#, 16#C1#, 16#86#, 16#01#, 16#E0#, 16#06#,
16#00#, 16#3E#, 16#20#, 16#87#, 16#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#FC#,
16#04#, 16#18#, 16#10#, 16#30#, 16#40#, 16#41#, 16#01#, 16#04#, 16#0C#,
16#10#, 16#60#, 16#7E#, 16#01#, 16#0C#, 16#04#, 16#18#, 16#10#, 16#20#,
16#40#, 16#41#, 16#01#, 16#1F#, 16#03#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#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#02#, 16#1C#, 16#10#,
16#30#, 16#40#, 16#41#, 16#00#, 16#06#, 16#00#, 16#07#, 16#00#, 16#03#,
16#80#, 16#01#, 16#00#, 16#04#, 16#20#, 16#10#, 16#C0#, 16#43#, 16#86#,
16#09#, 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#03#, 16#FF#, 16#88#, 16#42#, 16#21#, 16#08#, 16#04#, 16#00#,
16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#,
16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 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#07#, 16#C7#,
16#88#, 16#04#, 16#20#, 16#10#, 16#80#, 16#42#, 16#01#, 16#08#, 16#04#,
16#20#, 16#10#, 16#80#, 16#42#, 16#01#, 16#08#, 16#04#, 16#10#, 16#10#,
16#40#, 16#80#, 16#86#, 16#01#, 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#0F#, 16#87#, 16#C8#, 16#02#, 16#20#,
16#10#, 16#40#, 16#41#, 16#02#, 16#04#, 16#08#, 16#08#, 16#20#, 16#21#,
16#00#, 16#84#, 16#01#, 16#10#, 16#04#, 16#80#, 16#1A#, 16#00#, 16#30#,
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#0F#, 16#87#, 16#C8#, 16#02#, 16#20#, 16#08#, 16#8C#, 16#22#,
16#30#, 16#88#, 16#A4#, 16#22#, 16#90#, 16#92#, 16#42#, 16#49#, 16#09#,
16#14#, 16#18#, 16#50#, 16#61#, 16#41#, 16#85#, 16#06#, 16#08#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#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#87#,
16#84#, 16#0C#, 16#18#, 16#20#, 16#21#, 16#00#, 16#4C#, 16#00#, 16#A0#,
16#03#, 16#00#, 16#0C#, 16#00#, 16#68#, 16#01#, 16#10#, 16#08#, 16#60#,
16#40#, 16#83#, 16#01#, 16#1E#, 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#07#, 16#87#, 16#84#, 16#04#, 16#18#,
16#20#, 16#21#, 16#00#, 16#44#, 16#01#, 16#A0#, 16#03#, 16#80#, 16#04#,
16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#,
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#01#, 16#FE#, 16#04#, 16#08#, 16#10#, 16#60#, 16#41#, 16#00#,
16#08#, 16#00#, 16#60#, 16#01#, 16#00#, 16#08#, 16#00#, 16#40#, 16#01#,
16#04#, 16#08#, 16#10#, 16#40#, 16#43#, 16#01#, 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#07#, 16#80#, 16#10#,
16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#,
16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#,
16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#,
16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#10#, 16#00#, 16#40#, 16#00#, 16#80#, 16#02#, 16#00#, 16#04#,
16#00#, 16#10#, 16#00#, 16#20#, 16#00#, 16#80#, 16#03#, 16#00#, 16#04#,
16#00#, 16#10#, 16#00#, 16#20#, 16#00#, 16#80#, 16#01#, 16#00#, 16#04#,
16#00#, 16#08#, 16#00#, 16#20#, 16#00#, 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#3C#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#,
16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#,
16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#,
16#00#, 16#04#, 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#04#, 16#00#, 16#30#,
16#01#, 16#20#, 16#0C#, 16#40#, 16#60#, 16#81#, 16#01#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#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#C0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#08#, 16#00#,
16#30#, 16#00#, 16#60#, 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#01#, 16#F8#, 16#00#, 16#18#,
16#00#, 16#20#, 16#00#, 16#80#, 16#FE#, 16#0C#, 16#08#, 16#20#, 16#20#,
16#80#, 16#82#, 16#0E#, 16#07#, 16#CE#, 16#00#, 16#00#, 16#00#, 16#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#02#, 16#00#, 16#08#, 16#00#, 16#20#,
16#00#, 16#80#, 16#02#, 16#3C#, 16#0B#, 16#08#, 16#30#, 16#10#, 16#C0#,
16#23#, 16#00#, 16#88#, 16#02#, 16#30#, 16#08#, 16#C0#, 16#42#, 16#C3#,
16#19#, 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#7D#, 16#02#, 16#0C#, 16#10#, 16#10#, 16#80#, 16#42#, 16#00#, 16#08#,
16#00#, 16#20#, 16#00#, 16#40#, 16#01#, 16#81#, 16#81#, 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#01#, 16#C0#, 16#01#,
16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#F9#, 16#06#, 16#14#,
16#30#, 16#30#, 16#80#, 16#42#, 16#01#, 16#08#, 16#04#, 16#20#, 16#10#,
16#80#, 16#C1#, 16#87#, 16#03#, 16#E7#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#FC#, 16#06#, 16#18#, 16#20#, 16#10#, 16#80#,
16#43#, 16#FF#, 16#08#, 16#00#, 16#20#, 16#00#, 16#C0#, 16#01#, 16#83#,
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#07#, 16#E0#, 16#30#, 16#00#, 16#80#, 16#02#, 16#00#, 16#08#, 16#01#,
16#FF#, 16#00#, 16#80#, 16#02#, 16#00#, 16#08#, 16#00#, 16#20#, 16#00#,
16#80#, 16#02#, 16#00#, 16#08#, 16#00#, 16#20#, 16#07#, 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#F9#, 16#84#, 16#14#,
16#20#, 16#30#, 16#80#, 16#C2#, 16#01#, 16#08#, 16#0C#, 16#20#, 16#30#,
16#80#, 16#C1#, 16#8D#, 16#03#, 16#E4#, 16#00#, 16#10#, 16#00#, 16#80#,
16#06#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#01#, 16#C0#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#,
16#00#, 16#40#, 16#01#, 16#3C#, 16#07#, 16#18#, 16#18#, 16#20#, 16#40#,
16#81#, 16#02#, 16#04#, 16#08#, 16#10#, 16#20#, 16#40#, 16#81#, 16#02#,
16#1F#, 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#0C#, 16#00#, 16#30#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#01#,
16#F0#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#,
16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 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#02#, 16#00#, 16#08#,
16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#10#,
16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#,
16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#,
16#0C#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#C0#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#,
16#00#, 16#40#, 16#01#, 16#1F#, 16#04#, 16#20#, 16#11#, 16#00#, 16#48#,
16#01#, 16#E0#, 16#06#, 16#C0#, 16#11#, 16#80#, 16#43#, 16#01#, 16#06#,
16#0C#, 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#7C#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#,
16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#,
16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 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#0E#, 16#E7#, 16#0C#, 16#E6#,
16#21#, 16#08#, 16#84#, 16#22#, 16#10#, 16#88#, 16#42#, 16#21#, 16#08#,
16#84#, 16#22#, 16#10#, 16#BC#, 16#63#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#3C#, 16#07#, 16#18#, 16#10#, 16#20#, 16#40#,
16#41#, 16#01#, 16#04#, 16#04#, 16#10#, 16#10#, 16#40#, 16#41#, 16#01#,
16#1F#, 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#7C#, 16#06#, 16#18#, 16#30#, 16#10#, 16#80#, 16#42#, 16#00#, 16#88#,
16#02#, 16#20#, 16#10#, 16#C0#, 16#41#, 16#86#, 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#06#, 16#7C#, 16#0B#, 16#0C#,
16#30#, 16#10#, 16#C0#, 16#22#, 16#00#, 16#88#, 16#02#, 16#30#, 16#08#,
16#C0#, 16#42#, 16#C2#, 16#08#, 16#F0#, 16#20#, 16#00#, 16#80#, 16#02#,
16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#F9#, 16#C6#, 16#1C#, 16#20#, 16#30#, 16#80#,
16#42#, 16#01#, 16#08#, 16#04#, 16#20#, 16#10#, 16#80#, 16#C1#, 16#85#,
16#03#, 16#E4#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#3F#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#C7#, 16#01#, 16#62#, 16#06#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#,
16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#0F#, 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#7A#, 16#06#, 16#18#,
16#10#, 16#20#, 16#60#, 16#00#, 16#78#, 16#00#, 16#18#, 16#00#, 16#10#,
16#80#, 16#43#, 16#82#, 16#09#, 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#01#, 16#00#, 16#04#, 16#00#, 16#10#,
16#00#, 16#40#, 16#07#, 16#FC#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#,
16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#00#, 16#83#,
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#07#,
16#0F#, 16#04#, 16#04#, 16#10#, 16#10#, 16#40#, 16#41#, 16#01#, 16#04#,
16#04#, 16#10#, 16#10#, 16#40#, 16#C1#, 16#85#, 16#03#, 16#E6#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#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#C7#, 16#C4#, 16#04#,
16#10#, 16#20#, 16#60#, 16#80#, 16#84#, 16#02#, 16#10#, 16#04#, 16#40#,
16#12#, 16#00#, 16#28#, 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#07#, 16#83#, 16#C8#, 16#04#, 16#20#, 16#10#, 16#8C#,
16#41#, 16#31#, 16#04#, 16#A4#, 16#14#, 16#A0#, 16#52#, 16#81#, 16#46#,
16#02#, 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#03#,
16#C7#, 16#86#, 16#08#, 16#0C#, 16#40#, 16#1A#, 16#00#, 16#30#, 16#00#,
16#E0#, 16#04#, 16#C0#, 16#21#, 16#81#, 16#03#, 16#1F#, 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#07#, 16#87#, 16#84#, 16#04#,
16#10#, 16#20#, 16#20#, 16#80#, 16#84#, 16#01#, 16#10#, 16#04#, 16#80#,
16#0A#, 16#00#, 16#30#, 16#00#, 16#40#, 16#02#, 16#00#, 16#08#, 16#00#,
16#40#, 16#1F#, 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#01#, 16#FE#, 16#04#, 16#08#, 16#00#, 16#40#, 16#02#,
16#00#, 16#10#, 16#00#, 16#80#, 16#04#, 16#00#, 16#20#, 16#01#, 16#81#,
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#03#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#,
16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#08#, 16#00#, 16#C0#, 16#00#,
16#80#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#,
16#00#, 16#04#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#,
16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#,
16#01#, 16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#,
16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#04#, 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#18#, 16#00#, 16#20#, 16#00#, 16#40#, 16#01#,
16#00#, 16#04#, 16#00#, 16#10#, 16#00#, 16#40#, 16#01#, 16#00#, 16#06#,
16#00#, 16#0E#, 16#00#, 16#60#, 16#01#, 16#00#, 16#04#, 16#00#, 16#10#,
16#00#, 16#40#, 16#01#, 16#00#, 16#08#, 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#0E#, 16#00#, 16#4C#, 16#C2#, 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#);
Font_D : aliased constant Bitmap_Font :=
(
Bytes_Per_Glyph => 42,
Glyph_Width => 14,
Glyph_Height => 24,
Data => FreeMono12pt7bBitmaps'Access);
Font : constant Bitmap_Font_Ref := Font_D'Access;
end GESTE_Fonts.FreeMono12pt7b;
|
reznikmm/matreshka | Ada | 4,110 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- 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$
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Extents.Collections;
with AMF.URI_Stores;
package AMF.Facility is
procedure Initialize;
-- Initialize facility.
function Create_URI_Store
(Context_URI : League.Strings.Universal_String)
return AMF.URI_Stores.URI_Store_Access;
-- Creates empty URIStore.
function Resolve_URI
(Href : League.Strings.Universal_String;
Base : League.Strings.Universal_String
:= League.Strings.Empty_Universal_String)
return AMF.Elements.Element_Access;
-- Dereferences the supplied URI down to an element (if possible) which is
-- returned.
function Extent return AMF.Extents.Collections.Set_Of_Extent;
-- Returns the set of Extents that the workspace provides access to.
end AMF.Facility;
|
albinjal/Ada_Project | Ada | 19,158 | adb | -- graphics
with TJa.Window.Text; use TJa.Window.Text;
with TJa.Window.Elementary; use TJa.Window.Elementary;
with TJa.Window.Graphic; use TJa.Window.Graphic;
with TJa.Keyboard; use TJa.Keyboard;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
package body Yatzy_graphics_package is
-- Colors
bg_color : String := "[48;5;22m";
protocoll_frame_bg : String := "[48;5;232m";
logo_frame_bg : String := "[48;5;232m";
message_frame_color1 : String := "[48;5;178m";
message_frame_color2 : String := "[48;5;220m";
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure place (avail_points : in Protocoll_Type; select_place : out Integer) is
Coord_Config_X : Integer := 120;
Coord_Config_Y : Integer := 5;
Curr_Index_Selected : Integer := 0;
Key: Key_Type;
temp_arraysize: Integer := 0;
temp_array_index: Integer := 0;
type dynamic_array is array(Integer range <>) of Integer;
procedure goto_prev is
begin
-- Clear screen
for X in 1..17 loop
Goto_XY(Coord_Config_X, Coord_Config_Y + X * 2);
Put(ASCII.ESC & bg_color);
Put(" ");
Goto_XY(1000,1000);
end loop;
if Curr_Index_Selected = 1 then
Curr_Index_Selected := 16;
end if;
loop
Curr_Index_Selected := Curr_Index_Selected - 1;
if avail_points(Curr_Index_Selected) >= 0 then
exit;
end if;
end loop;
if Curr_Index_Selected > 6 then
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2 + 4);
else
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2);
end if;
Put("->");
Goto_XY(1000,1000);
end goto_prev;
procedure goto_next is
begin
-- Clear screen
for X in 1..17 loop
Goto_XY(Coord_Config_X, Coord_Config_Y + X * 2);
Put(ASCII.ESC & bg_color);
Put(" ");
Goto_XY(1000,1000);
end loop;
if Curr_Index_Selected = 15 then
Curr_Index_Selected := 0;
end if;
loop
Curr_Index_Selected := Curr_Index_Selected + 1;
if avail_points(Curr_Index_Selected) >= 0 then
exit;
end if;
if Curr_Index_Selected = 15 then
Curr_Index_Selected := 0;
end if;
end loop;
if Curr_Index_Selected > 6 then
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2 + 4);
else
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2);
end if;
Put("->");
Goto_XY(1000,1000);
end goto_next;
begin
Put("a1"); -- DEBUG
-- Build array of available slots
for x in 1..15 loop
if avail_points(x) >= 0 then
temp_arraysize := temp_arraysize + 1;
end if;
end loop;
New_Line; Put("a2"); -- DEBUG
declare
test_array : dynamic_array(0..temp_arraysize);
begin
for x in 1..15 loop
if avail_points(x) >= 0 then
test_array(temp_array_index) := temp_array_index * 2;
temp_array_index := temp_array_index + 1;
end if;
end loop;
end;
New_Line; Put("a3"); -- DEBUG
New_Line; Put("Arraystorlek: "); Put(temp_arraysize,0); -- DEBUG
Set_Buffer_Mode(Off);
Set_Echo_Mode(Off);
goto_next;
loop
Get_Immediate(Key);
Goto_XY(Coord_Config_X,Coord_Config_Y);
if Is_Up_Arrow(Key) then
goto_prev;
elsif Is_Down_Arrow(Key) then
goto_next;
elsif Is_Return(Key) then
Put("Index "); Put(Curr_Index_Selected,0); Put(" was selected.");
select_place := Curr_Index_Selected;
exit;
end if;
end loop;
Set_Buffer_Mode(On);
Set_Echo_Mode(On);
end place_graphics;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure background is
begin
-- Skriver ut bakgrundsfärgen för hela terminalen
for X in 1..300 loop
for Y in 1..50 loop
Put(ASCII.ESC & bg_color);
goto_xy(X, Y);
Put(' ');
end loop;
end loop;
end background;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure protocoll_background (X_Start, Y_Start: in Integer) is
begin
-- Skriver ut ramen kring protokollet
for X in 1..31 loop
for Y in 1..41 loop
Put(ASCII.ESC & protocoll_frame_bg);
goto_xy((X_Start - 3 + X), (Y_Start - 2 + Y));
Put(' ');
end loop;
end loop;
-- Skriver ut protokollets bakgrund
for X in 1..25 loop
for Y in 1..38 loop
Put(ASCII.ESC & "[48;5;15m");
goto_xy(X_Start + X, Y_Start + Y);
Put(' ');
end loop;
end loop;
end protocoll_background;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure update_protocoll(X_Start, Y_Start: in Integer; prot1, prot2: in Protocoll_Type) is
x : Integer := X_Start;
y : Integer := Y_Start;
widthcol1 : constant Integer := 13;
widthcol2 : constant Integer := 5;
widthcol3 : constant Integer := 5;
height: constant Integer := 39;
text_width: constant Integer := 12;
points_width: constant Integer := 5;
begin
-- Frame
Set_Background_Colour(White);
Set_Foreground_Colour(Black);
-- Skriver ut horisontella linjer
while y < Y_Start + height loop
Goto_XY(X_Start + 1, y);
Put(Horisontal_Line, Times => widthcol1);
Goto_XY(X_Start + 2 + widthcol1, y);
Put(Horisontal_Line, Times => widthcol2);
Goto_XY(X_Start + 3 + widthcol1 + widthcol2, y);
Put(Horisontal_Line, Times => widthcol3);
Goto_XY(X_Start + 4 + widthcol1 + widthcol2 + widthcol3, y);
y := y + 2;
end loop;
for I in Y_Start..(Y_Start+height -1) loop
Goto_XY(X_Start,I);
if (I + Y_Start) mod 2 /= 0 then
Put(Vertical_Line);
Goto_XY(X_Start + 1 + widthcol1,I);
Put(Vertical_Line);
Goto_XY(X_Start + 2 + widthcol1 + widthcol2,I);
Put(Vertical_Line);
Goto_XY(X_Start + 3 + widthcol1 + widthcol2 + widthcol3,I);
Put(Vertical_Line);
else
if I = Y_Start then
Put(Upper_Left_Corner);
Goto_XY(X_Start + 1 + widthcol1,I);
Put(Horisontal_Down);
Goto_XY(X_Start + 2 + widthcol1 + widthcol2,I);
Put(Horisontal_Down);
Goto_XY(X_Start + 3 + widthcol1 + widthcol2 + widthcol3,I);
Put(Upper_Right_Corner);
elsif I = Y_Start+height - 1 then
Put(Lower_Left_Corner);
Goto_XY(X_Start + 1 + widthcol1,I);
Put(Horisontal_Up);
Goto_XY(X_Start + 2 + widthcol1 + widthcol2,I);
Put(Horisontal_Up);
Goto_XY(X_Start + 3 + widthcol1 + widthcol2 + widthcol3,I);
Put(Lower_Right_Corner);
else
Put(Vertical_Right);
Goto_XY(X_Start + 1 + widthcol1,I);
Put(Cross);
Goto_XY(X_Start + 2 + widthcol1 + widthcol2,I);
Put(Cross);
Goto_XY(X_Start + 3 + widthcol1 + widthcol2 + widthcol3,I);
Put(Vertical_Left);
end if;
end if;
end loop;
Set_Graphical_Mode(Off);
For I in 1..19 loop
Goto_XY(X_Start + 2, Y_Start - 1 + I * 2);
--Set_Background_Colour(Blue);
case I is
when 1 => Set_Text_Modes(On, Off, Off); Put("Spelare:"); Set_Text_Modes(Off, Off, On);
when 2 => Put("Ettor");
when 3 => Put("Tvåor");
when 4 => Put("Treor");
when 5 => Put("Fyror");
when 6 => Put("Femmor");
when 7 => Put("Sexor"); Set_Text_Modes(On, Off, Off);
when 8 => Put("Summa:");
when 9 => Put("BONUS"); Set_Text_Modes(Off, Off, On);
when 10 => Put("Par");
when 11 => Put("Två par");
when 12 => Put("Triss");
when 13 => Put("Fyrtal");
when 14 => Put("Kåk");
when 15 => Put("Liten stege");
when 16 => Put("Stor stege");
when 17 => Put("Chans");
when 18 => Put("Yatzy"); Set_Text_Modes(On, Off, Off);
when 19 => Put("Summa:");
when others => null;
end case;
end loop;
For I in 1..19 loop
Goto_XY(X_Start + 2 + widthcol1, Y_Start - 1 + I * 2);
case I is
when 1 => Set_Text_Modes(Off, Off, Off); Put("P1"); Set_Text_Modes(Off, Off, On);
when 2..7 => if Prot1(I - 1) /= -1 then Put(Prot1(I - 1), 1 + widthcol2 / 2); end if;
when 8 => Put("Sum:");
when 9 => Put("BON");
when 10..18 => if Prot1(I - 3) /= -1 then Put(Prot1(I - 3), 1 + widthcol2 / 2); end if;
when 19 => Put("Sum:");
when others => null;
end case;
end loop;
For I in 1..19 loop
Goto_XY(X_Start + 3 + widthcol1 + widthcol2, Y_Start - 1 + I * 2);
case I is
when 1 => Set_Text_Modes(Off, Off, Off); Put("P1"); Set_Text_Modes(Off, Off, On);
when 2..7 => if Prot2(I - 1) /= -1 then Put(Prot2(I - 1), 1 + widthcol2 / 2); end if;
when 8 => Put("Sum:");
when 9 => Put("BON");
when 10..18 => if Prot2(I - 3) /= -1 then Put(Prot2(I - 3), 1 + widthcol2 / 2); end if;
when 19 => Put("Sum:");
when others => null;
end case;
end loop;
end update_protocoll;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure dice (A, X_Start, Y_Start: in Integer) is
begin
Goto_XY(X_Start, Y_Start);
for I in 1..5 loop
--Set_Background_Colour(White);
if I = 1 then
Put(Upper_Left_Corner);
Put(Horisontal_Very_High_Line, Times => 9);
Put(Upper_Right_Corner);
Goto_XY(X_Start, Y_Start + I);
elsif I = 5 then
Put(Lower_Left_Corner);
Put(Horisontal_Very_Low_Line, Times => 9);
Put(Lower_Right_Corner);
else
case A is
when 1 =>
Put(Vertical_Line);
if I = 3 then
Put(" • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 2 or I = 4 then
Put(" ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
end if;
when 2 =>
Put(Vertical_Line);
if I = 2 then
Put(" • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 3 then
Put(" ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 4 then
Put(" • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
end if;
when 3 =>
Put(Vertical_Line);
if I = 2 then
Put(" • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 3 then
Put(" • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 4 then
Put(" • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
end if;
when 4 =>
Put(Vertical_Line);
if I = 2 then
Put(" • • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 3 then
Put(" ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 4 then
Put(" • • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
end if;
when 5 =>
Put(Vertical_Line);
if I = 2 then
Put(" • • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 3 then
Put(" • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
elsif I = 4 then
Put(" • • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
end if;
when 6 =>
Put(Vertical_Line);
Put(" • • ");
Put(Vertical_Line);
Goto_XY(X_Start, Y_Start + I);
when others => null;
end case;
end if;
end loop;
end dice;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure dice_placement (D1, D2, D3, D4, D5 : in Integer) is
begin
-- Only update dice if input is bigger than 0
if D1 > 0 then Dice(D1, 8 + 15 * 1, 38); end if;
if D2 > 0 then Dice(D2, 8 + 15 * 2, 38); end if;
if D3 > 0 then Dice(D3, 8 + 15 * 3, 38); end if;
if D4 > 0 then Dice(D4, 8 + 15 * 4, 38); end if;
if D5 > 0 then Dice(D5, 8 + 15 * 5, 38); end if;
end dice_placement;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
Procedure logo_background (X_Start, Y_Start : in Integer) is
begin
for X in 1..76 loop
for Y in 1..9 loop
Put(ASCII.ESC & logo_frame_bg);
goto_xy((X_Start - 3 + X), (Y_Start - 2 + Y));
Put(' ');
end loop;
end loop;
end logo_background;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
Procedure logo (X_Start, Y_Start : in Integer) is
begin
Set_Background_Colour(White);
Set_Foreground_Colour(Blue);
Set_Bold_Mode(on);
goto_xy(X_Start, Y_Start);
Put(" ____ ____ __ _________ ________ ____ ____ ");
goto_xy(X_Start, Y_Start + 1);
Put(' ');
Put(Vertical_Line);
Put("_ _");
Put(Vertical_Line, Times => 2);
Put("_ _");
Put(Vertical_Line);
Put(" / \ ");
Put(Vertical_Line);
Put(" _ _ ");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put(" __ __");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("_ _");
Put(Vertical_Line, Times => 2);
Put("_ _");
Put(Vertical_Line);
goto_xy(X_Start, Y_Start + 2);
Put(" \ \ / / / /\ \ ");
Put(Vertical_Line);
Put("_/ ");
Put(Vertical_Line);
Put(' ');
Put(Vertical_Line);
Put(" \_");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("_/ / / \ \ / / ");
goto_xy(X_Start, Y_Start + 3);
Put(" \ \/ / / ____ \ ");
Put(Vertical_Line);
Put(' ');
Put(Vertical_Line);
Put(" / / _ \ \/ / ");
goto_xy(X_Start, Y_Start + 4);
Put(" _");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("_ _/ / \ \_ _");
Put(Vertical_Line);
Put(' ');
Put(Vertical_Line);
Put("_ / /__/ ");
Put(Vertical_Line);
Put(" _");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("_ ");
goto_xy(X_Start, Y_Start + 5);
Put(" ");
Put(Vertical_Line);
Put("______");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("____");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("____");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("_____");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("_______");
Put(Vertical_Line);
Put(" ");
Put(Vertical_Line);
Put("______");
Put(Vertical_Line);
Put(" ");
goto_xy(X_Start, Y_Start + 6);
Put(" ");
-- ____ ____ __ _________ ________ ____ ____
-- |_ _||_ _| / \ | _ _ | | __ __| |_ _||_ _|
-- \ \ / / / /\ \ |_/ | | \_| |_/ / / \ \ / /
-- \ \/ / / ____ \ | | / / _ \ \/ /
-- _| |_ _/ / \ \_ _| |_ / /__/ | _| |_
-- |______| |____| |____| |_____| |_______| |______|
end logo;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure message (X_Start, Y_Start : in Integer; S : in String) is
begin
Set_Graphical_Mode(Off);
for Y in 1..11 loop
for X in 1..55 loop
-- om inte första eller inte sista raden
if Y = 1 OR Y = 11 then
if X mod 2 = 0 then
Put(ASCII.ESC & message_frame_color1);
else
Put(ASCII.ESC & message_frame_color2);
end if;
else
if X = 1 OR X = 55 then
if Y mod 2 = 0 then
Put(ASCII.ESC & message_frame_color1);
else
Put(ASCII.ESC & message_frame_color2);
end if;
else
if Y mod 2 = 0 then
Put(ASCII.ESC & message_frame_color2);
else
Put(ASCII.ESC & message_frame_color1);
end if;
end if;
end if;
goto_xy((X_Start - 2 + X), (Y_Start - 1 + Y));
Put(' ');
end loop;
end loop;
-- White inner frame
for X in 1..51 loop
for Y in 1..9 loop
Put(ASCII.ESC & "[48;5;15m");
goto_xy((X_Start + X), (Y_Start + Y));
Put(' ');
end loop;
end loop;
goto_xy(X_Start + 3, Y_Start + 5);
Set_Foreground_Colour(Black);
Put(S);
end message;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
end; |
stcarrez/ada-asf | Ada | 1,882 | ads | -----------------------------------------------------------------------
-- asf-beans-globals -- Bean giving access to the global init parameters
-- Copyright (C) 2012 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Beans.Basic;
with Util.Beans.Objects;
package ASF.Beans.Globals is
-- Context variable giving access to the global init parameters.
INIT_PARAM_ATTRIBUTE_NAME : constant String := "initParam";
-- ------------------------------
-- Init Parameter Bean
-- ------------------------------
-- The <b>Global_Bean</b> gives access to the global init parameters.
-- The bean instance is global to the application.
type Global_Bean is new Util.Beans.Basic.Readonly_Bean with private;
-- Get the init parameter identified by the given name.
-- Returns Null_Object if the application does not define such parameter.
overriding
function Get_Value (Bean : in Global_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Return the Param_Bean instance.
function Instance return Util.Beans.Objects.Object;
private
type Global_Bean is new Util.Beans.Basic.Readonly_Bean with null record;
end ASF.Beans.Globals;
|
ohenley/ada-util | Ada | 7,256 | adb | -----------------------------------------------------------------------
-- util-encoders-hmac-sha1 -- Compute HMAC-SHA256 authentication code
-- Copyright (C) 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 Util.Encoders.Base16;
with Util.Encoders.Base64;
package body Util.Encoders.HMAC.SHA256 is
-- ------------------------------
-- Sign the data string with the key and return the HMAC-SHA256 code in binary.
-- ------------------------------
function Sign (Key : in String;
Data : in String) return Util.Encoders.SHA256.Hash_Array is
Ctx : Context;
Result : Util.Encoders.SHA256.Hash_Array;
begin
Set_Key (Ctx, Key);
Update (Ctx, Data);
Finish (Ctx, Result);
return Result;
end Sign;
-- ------------------------------
-- Sign the data string with the key and return the HMAC-SHA256 code as hexadecimal string.
-- ------------------------------
function Sign (Key : in String;
Data : in String) return Util.Encoders.SHA256.Digest is
Ctx : Context;
Result : Util.Encoders.SHA256.Digest;
begin
Set_Key (Ctx, Key);
Update (Ctx, Data);
Finish (Ctx, Result);
return Result;
end Sign;
-- ------------------------------
-- Sign the data string with the key and return the HMAC-SHA256 code as base64 string.
-- When <b>URL</b> is True, use the base64 URL alphabet to encode in base64.
-- ------------------------------
function Sign_Base64 (Key : in String;
Data : in String;
URL : in Boolean := False) return Util.Encoders.SHA256.Base64_Digest is
Ctx : Context;
Result : Util.Encoders.SHA256.Base64_Digest;
begin
Set_Key (Ctx, Key);
Update (Ctx, Data);
Finish_Base64 (Ctx, Result, URL);
return Result;
end Sign_Base64;
-- ------------------------------
-- Set the hmac private key. The key must be set before calling any <b>Update</b>
-- procedure.
-- ------------------------------
procedure Set_Key (E : in out Context;
Key : in String) is
Buf : Ada.Streams.Stream_Element_Array (1 .. Key'Length);
for Buf'Address use Key'Address;
pragma Import (Ada, Buf);
begin
Set_Key (E, Buf);
end Set_Key;
IPAD : constant Ada.Streams.Stream_Element := 16#36#;
OPAD : constant Ada.Streams.Stream_Element := 16#5c#;
-- ------------------------------
-- Set the hmac private key. The key must be set before calling any <b>Update</b>
-- procedure.
-- ------------------------------
procedure Set_Key (E : in out Context;
Key : in Ada.Streams.Stream_Element_Array) is
use type Ada.Streams.Stream_Element_Offset;
use type Ada.Streams.Stream_Element;
begin
-- Reduce the key
if Key'Length > 64 then
Util.Encoders.SHA256.Update (E.SHA, Key);
Util.Encoders.SHA256.Finish (E.SHA, E.Key (0 .. 31));
E.Key_Len := 31;
else
E.Key_Len := Key'Length - 1;
E.Key (0 .. E.Key_Len) := Key;
end if;
-- Hash the key in the SHA256 context.
declare
Block : Ada.Streams.Stream_Element_Array (0 .. 63);
begin
for I in 0 .. E.Key_Len loop
Block (I) := IPAD xor E.Key (I);
end loop;
for I in E.Key_Len + 1 .. 63 loop
Block (I) := IPAD;
end loop;
Util.Encoders.SHA256.Update (E.SHA, Block);
end;
end Set_Key;
-- ------------------------------
-- Update the hash with the string.
-- ------------------------------
procedure Update (E : in out Context;
S : in String) is
begin
Util.Encoders.SHA256.Update (E.SHA, S);
end Update;
-- ------------------------------
-- Update the hash with the string.
-- ------------------------------
procedure Update (E : in out Context;
S : in Ada.Streams.Stream_Element_Array) is
begin
Util.Encoders.SHA256.Update (E.SHA, S);
end Update;
-- ------------------------------
-- Computes the HMAC-SHA256 with the private key and the data collected by
-- the <b>Update</b> procedures. Returns the raw binary hash in <b>Hash</b>.
-- ------------------------------
procedure Finish (E : in out Context;
Hash : out Util.Encoders.SHA256.Hash_Array) is
use type Ada.Streams.Stream_Element;
use type Ada.Streams.Stream_Element_Offset;
begin
Util.Encoders.SHA256.Finish (E.SHA, Hash);
-- Hash the key in the SHA256 context.
declare
Block : Ada.Streams.Stream_Element_Array (0 .. 63);
begin
for I in 0 .. E.Key_Len loop
Block (I) := OPAD xor E.Key (I);
end loop;
if E.Key_Len < 63 then
for I in E.Key_Len + 1 .. 63 loop
Block (I) := OPAD;
end loop;
end if;
Util.Encoders.SHA256.Update (E.SHA, Block);
end;
Util.Encoders.SHA256.Update (E.SHA, Hash);
Util.Encoders.SHA256.Finish (E.SHA, Hash);
end Finish;
-- ------------------------------
-- Computes the HMAC-SHA256 with the private key and the data collected by
-- the <b>Update</b> procedures. Returns the hexadecimal hash in <b>Hash</b>.
-- ------------------------------
procedure Finish (E : in out Context;
Hash : out Util.Encoders.SHA256.Digest) is
H : Util.Encoders.SHA256.Hash_Array;
B : Util.Encoders.Base16.Encoder;
begin
Finish (E, H);
B.Convert (H, Hash);
end Finish;
-- ------------------------------
-- Computes the HMAC-SHA256 with the private key and the data collected by
-- the <b>Update</b> procedures. Returns the base64 hash in <b>Hash</b>.
-- When <b>URL</b> is True, use the base64 URL alphabet to encode in base64.
-- ------------------------------
procedure Finish_Base64 (E : in out Context;
Hash : out Util.Encoders.SHA256.Base64_Digest;
URL : in Boolean := False) is
H : Util.Encoders.SHA256.Hash_Array;
B : Util.Encoders.Base64.Encoder;
begin
Finish (E, H);
B.Set_URL_Mode (URL);
B.Convert (H, Hash);
end Finish_Base64;
-- Initialize the SHA-1 context.
overriding
procedure Initialize (E : in out Context) is
begin
null;
end Initialize;
end Util.Encoders.HMAC.SHA256;
|
reznikmm/matreshka | Ada | 4,089 | 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.Presentation_Stay_On_Top_Attributes;
package Matreshka.ODF_Presentation.Stay_On_Top_Attributes is
type Presentation_Stay_On_Top_Attribute_Node is
new Matreshka.ODF_Presentation.Abstract_Presentation_Attribute_Node
and ODF.DOM.Presentation_Stay_On_Top_Attributes.ODF_Presentation_Stay_On_Top_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Presentation_Stay_On_Top_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Presentation_Stay_On_Top_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Presentation.Stay_On_Top_Attributes;
|
onox/orka | Ada | 3,389 | ads | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2013 Felix Krause <[email protected]>
-- 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 GL.Types;
private with GL.Low_Level;
package GL.Viewports is
pragma Preelaborate;
use GL.Types;
-----------------------------------------------------------------------------
-- Viewports --
-----------------------------------------------------------------------------
type Viewport is record
X, Y, Width, Height : Single;
end record;
type Depth_Range is record
Near, Far : Double;
end record;
type Scissor_Rectangle is record
Left, Bottom : Int;
Width, Height : Size;
end record;
type Viewport_List is array (UInt range <>) of Viewport
with Convention => C;
type Depth_Range_List is array (UInt range <>) of Depth_Range
with Convention => C;
type Scissor_Rectangle_List is array (UInt range <>) of Scissor_Rectangle
with Convention => C;
function Maximum_Viewports return Size
with Post => Maximum_Viewports'Result >= 16;
function Viewport_Subpixel_Bits return Size;
function Origin_Range return Singles.Vector2;
-- Return the minimum and maximum X and Y of the origin (lower left
-- corner) of a viewport
function Maximum_Extent return Singles.Vector2;
-- Return the maximum width and height of a viewport
procedure Set_Viewports (List : Viewport_List);
procedure Set_Depth_Ranges (List : Depth_Range_List);
procedure Set_Scissor_Rectangles (List : Scissor_Rectangle_List);
-----------------------------------------------------------------------------
-- Clipping --
-----------------------------------------------------------------------------
type Viewport_Origin is (Lower_Left, Upper_Left);
type Depth_Mode is (Negative_One_To_One, Zero_To_One);
procedure Set_Clipping (Origin : Viewport_Origin; Depth : Depth_Mode);
-- Set the origin of the viewport and the range of the clip planes
--
-- Controls how clip space is mapped to window space. Both Direct3D and
-- OpenGL expect a vertex position of (-1, -1) to map to the lower-left
-- corner of the viewport.
--
-- Direct3D expects the UV coordinate of (0, 0) to correspond to the
-- upper-left corner of a randered image, while OpenGL expects it in
-- the lower-left corner.
private
for Viewport_Origin use
(Lower_Left => 16#8CA1#,
Upper_Left => 16#8CA2#);
for Viewport_Origin'Size use Low_Level.Enum'Size;
for Depth_Mode use
(Negative_One_To_One => 16#935E#,
Zero_To_One => 16#935F#);
for Depth_Mode'Size use Low_Level.Enum'Size;
end GL.Viewports;
|
reznikmm/matreshka | Ada | 4,679 | 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.Animations_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Presentation_Animations_Attribute_Node is
begin
return Self : Presentation_Animations_Attribute_Node do
Matreshka.ODF_Presentation.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Presentation_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Presentation_Animations_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Animations_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Presentation_URI,
Matreshka.ODF_String_Constants.Animations_Attribute,
Presentation_Animations_Attribute_Node'Tag);
end Matreshka.ODF_Presentation.Animations_Attributes;
|
reznikmm/matreshka | Ada | 3,808 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2016-2017, 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 WUI.Events.Mouse.Click is
pragma Preelaborate;
type Click_Event is
new WUI.Events.Mouse.Abstract_Mouse_Event with private;
package Constructors is
procedure Initialize
(Self : in out Click_Event'Class;
Event : not null access WebAPI.UI_Events.Mouse.Mouse_Event'Class);
end Constructors;
private
type Click_Event is
new WUI.Events.Mouse.Abstract_Mouse_Event with null record;
end WUI.Events.Mouse.Click;
|
reznikmm/matreshka | Ada | 3,754 | 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.Chart_Reverse_Direction_Attributes is
pragma Preelaborate;
type ODF_Chart_Reverse_Direction_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Chart_Reverse_Direction_Attribute_Access is
access all ODF_Chart_Reverse_Direction_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Chart_Reverse_Direction_Attributes;
|
reznikmm/matreshka | Ada | 4,455 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with League.Characters.Latin;
package body AWF.Internals.Java_Script_Registry is
Shared_Code : League.Strings.Universal_String;
----------------------
-- Java_Script_Code --
----------------------
function Java_Script_Code return League.Strings.Universal_String is
begin
return Shared_Code;
end Java_Script_Code;
-------------------------------
-- Java_Script_Resource_Path --
-------------------------------
function Java_Script_Resource_Path
return League.String_Vectors.Universal_String_Vector is
begin
return Result : League.String_Vectors.Universal_String_Vector do
Result.Append (League.Strings.To_Universal_String ("javascript"));
Result.Append (League.Strings.To_Universal_String ("awf.js"));
end return;
end Java_Script_Resource_Path;
--------------
-- Register --
--------------
procedure Register (Code : League.Strings.Universal_String) is
begin
Shared_Code.Append (League.Characters.Latin.Line_Feed);
Shared_Code.Append (Code);
end Register;
end AWF.Internals.Java_Script_Registry;
|
reznikmm/matreshka | Ada | 3,598 | adb | ------------------------------------------------------------------------------
-- --
-- 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$
------------------------------------------------------------------------------
package body Matreshka.XML_Schema.AST is
--------------
-- Is_Empty --
--------------
function Is_Empty (Self : Qualified_Name) return Boolean is
begin
return Self.Local_Name.Is_Empty;
end Is_Empty;
end Matreshka.XML_Schema.AST;
|
tsoding/ada-probe | Ada | 564 | adb | with Ada.Text_IO; use Ada.Text_IO;
with AWS.Default;
with AWS.Server;
with Hello_World_CB;
procedure Server is
WS : AWS.Server.HTTP;
Port : Positive := AWS.Default.Server_Port;
begin
Put_Line("Call me on port"
& Positive'Image(Port)
& ", I will stop if you press Q.");
AWS.Server.Start(WS, "Hello, World",
Max_Connection => 1,
Port => Port,
Callback => Hello_World_CB.HW_CB'Access);
AWS.Server.Wait(AWS.Server.Q_Key_Pressed);
AWS.Server.Shutdown(WS);
end;
|
Fabien-Chouteau/GESTE | Ada | 207,868 | ads | with GESTE;
pragma Style_Checks (Off);
package Game_Assets.Tileset_Collisions is
Tiles : aliased constant GESTE.Tile_Collisions_Array :=
(
1 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
2 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
3 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
4 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
5 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,False,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,False,False)),
6 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,False),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,False),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,False,False,False,False,False,False,False,False,False),
(True,True,True,True,True,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,True,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,True,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False)),
7 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
8 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
9 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
10 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
11 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
12 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
13 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
14 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
15 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
16 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
17 => ((False,False,False,False,False,False,False,True,True,True,False,False,False,False,False,False),
(False,False,False,False,False,False,True,True,True,True,True,False,False,False,False,False),
(False,False,False,False,False,False,True,True,True,True,True,True,False,False,False,False),
(False,False,False,False,False,False,True,True,True,True,True,True,False,False,False,False),
(False,False,False,False,False,True,True,True,True,True,True,True,False,False,False,False),
(False,False,False,False,False,True,True,True,True,True,True,True,False,False,False,False),
(False,False,False,False,True,True,True,True,True,True,True,False,False,False,False,False),
(False,False,False,False,True,True,True,True,True,True,True,True,False,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,True,True,True,True,True,True,False,False,False,True,True,True,True),
(False,False,False,True,True,True,True,True,True,False,False,False,True,True,True,True),
(False,False,False,True,True,True,True,True,True,False,False,False,True,True,True,True),
(False,False,False,False,False,True,True,True,True,False,False,False,True,True,True,True),
(False,False,False,False,False,False,False,False,False,False,False,False,False,True,True,False)),
18 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,True,True,True,False,False,False,False,False,False),
(False,False,False,False,False,False,True,True,True,True,True,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,True,False,False,False,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,False,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,False,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,False,True,True,True),
(False,False,True,True,True,True,False,False,False,False,False,False,False,False,False,False),
(False,False,False,True,True,True,False,False,False,False,False,False,False,False,False,False)),
19 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
20 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
21 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
22 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
23 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
24 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
25 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
26 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
27 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
28 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,True,True,True,True,False,False,False,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(False,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(False,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False)),
29 => ((True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False)),
30 => ((True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(False,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(False,False,False,True,True,True,True,True,True,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
31 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,True,True),
(False,False,False,False,False,False,False,False,False,False,False,True,True,True,True,True),
(False,False,False,False,False,False,False,False,True,True,True,True,True,True,True,True),
(False,False,False,False,False,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True)),
32 => ((False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True)),
33 => ((False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,False,False,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,False,False,False,False,False,True,True,True,True,True)),
34 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
35 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
36 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
37 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True)),
38 => ((False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True)),
39 => ((False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
40 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
41 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
42 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
43 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
44 => ((True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False)),
45 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
46 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
47 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
48 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
49 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
50 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
51 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
52 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
53 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
54 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
55 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
56 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
57 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
58 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
59 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
60 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
61 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
62 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
63 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
64 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
65 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
66 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
67 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
68 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
69 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
70 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
71 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
72 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
73 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
74 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
75 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
76 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
77 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
78 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
79 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
80 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
81 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
82 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
83 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
84 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
85 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
86 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
87 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
88 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
89 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
90 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
91 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
92 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
93 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
94 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,True,True),
(False,False,False,False,False,False,False,False,False,False,False,True,True,True,True,True),
(False,False,False,False,False,False,False,False,True,True,True,True,True,True,True,True),
(False,False,False,False,False,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True)),
95 => ((False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True)),
96 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,True,True,True,True,False,False,False,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(False,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(False,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False)),
97 => ((False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,True,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,False,False,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,False,False,False,False,False,True,True,True,True,True)),
98 => ((True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False)),
99 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
100 => ((True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,False,False,False,False),
(False,True,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,False,False,False,False,False,False),
(False,False,False,True,True,True,True,True,True,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
101 => ((True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False)),
102 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
103 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
104 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
105 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,True,True,True,False,False,False,False,False,False),
(False,False,False,False,False,False,True,True,True,True,True,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,True,False,False,False,False,False),
(False,False,True,True,True,True,True,True,True,True,True,False,False,False,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,False,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,False,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,True,True,True,True),
(False,False,True,True,True,True,True,True,True,True,True,False,False,True,True,True),
(False,False,True,True,True,True,False,False,False,False,False,False,False,False,False,False),
(False,False,False,True,True,True,False,False,False,False,False,False,False,False,False,False)),
106 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True)),
107 => ((False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True)),
108 => ((False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,True,True,True,True,True,True,True,True,True,True),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
109 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
110 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
111 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
112 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
113 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
114 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
115 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
116 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
117 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
118 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
119 => ((True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True)),
120 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,False,False,False,False,False,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,False,False,False,False,False,False,False,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,False,False),
(True,True,True,True,True,True,True,True,True,True,True,True,True,True,False,False)),
121 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)),
122 => ((False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False),
(False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False)));
end Game_Assets.Tileset_Collisions;
|
MinimSecure/unum-sdk | Ada | 1,149 | ads | -- Copyright 2014-2016 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pack is
type Interactive_Command is abstract tagged null record;
type Interactive_Command_Access is access all Interactive_Command'Class;
type String_Access is access all String;
type My_Command is new Interactive_Command with record
menu_name : String_Access;
end record;
function New_Command return Interactive_Command_Access;
procedure Id (C : in out Interactive_Command_Access);
end Pack;
|
zhangkaizhao/completely-unscientific-benchmarks | Ada | 739 | adb | with Ada.Integer_Text_IO;
with Ada.Text_IO;
with Tree_Naive_Pointers; use Tree_Naive_Pointers;
procedure Main_Naive_Pointers is
t: Tree_Naive_Pointers.Tree;
cur: Integer := 5;
res: Integer := 0;
mode: Integer;
procedure PutI(item: Integer; width: Natural := 0; base: Natural := 10)
renames Ada.Integer_Text_IO.Put;
procedure New_Line(spacing: Ada.Text_IO.Positive_Count := 1) renames Ada.Text_IO.New_Line;
begin
initialize;
for i in 1..999999 loop
mode := i mod 3;
cur := (cur * 57 + 43) mod 10007;
if mode = 0 then insert(t, cur);
elsif mode = 1 then erase(t, cur);
else res := res + (if hasValue(t, cur) then 1 else 0);
end if;
end loop;
PutI(res); New_Line(1);
end Main_Naive_Pointers;
|
AdaCore/Ada_Drivers_Library | Ada | 5,953 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of 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; use HAL;
with HAL.DSI; use HAL.DSI;
with HAL.Time;
package OTM8009A is
-- List of OTM8009A commands
-- Detailed in OTM8009A data Sheet
CMD_NOP : constant := 16#00#;
CMD_SWRESET : constant := 16#01#;
CMD_RDDMADCTL : constant := 16#0B#; -- Read memory display access ctrl
CMD_RDDCOLMOD : constant := 16#0C#; -- Read display pixel format
CMD_SLPIN : constant := 16#10#; -- Sleep In command
CMD_SLPOUT : constant := 16#11#; -- Sleep Out command
CMD_PTLON : constant := 16#12#; -- Partial mode On command
CMD_DISPOFF : constant := 16#28#; -- Display OFF command
CMD_DISPON : constant := 16#29#; -- Display OFF command
CMD_CASET : constant := 16#2A#; -- Column address set command
CMD_PASET : constant := 16#2B#; -- Page address set command
CMD_RAMWR : constant := 16#2C#; -- Memory (GRAM) write command
CMD_RAMRD : constant := 16#2E#; -- Memory (GRAM) read command
CMD_PLTAR : constant := 16#30#; -- Partial area command (4 parameters)
CMD_TEOFF : constant := 16#34#; -- Tearing Effect Line off command
CMD_TEEON : constant := 16#35#; -- Tearing Effect Line on command
-- Parameter for CMD_TEEON
TEEON_VBLANKING_INFO_ONLY : constant := 0;
TEEON_VBLANKING_AND_HBLANKING_INFO : constant := 1;
CMD_MADCTR : constant := 16#36#; -- Memory Access write control command
-- Parameter for MADCTR
MADCTR_MODE_PORTRAIT : constant := 16#00#;
MADCTR_MODE_LANDSCAPE : constant := 16#60#;
CMD_IDMOFF : constant := 16#38#; -- Idle mode Off command
CMD_IDMON : constant := 16#39#; -- Idle mode On command
CMD_COLMOD : constant := 16#3A#; -- Interface pixel format command
COLMOD_RGB565 : constant := 16#55#;
COLMOD_RGB888 : constant := 16#77#;
CMD_RAMWRC : constant := 16#3C#; -- Memory write continue command
CMD_RAMRDC : constant := 16#3E#; -- Memory read continue command
CMD_WRTESCN : constant := 16#44#; -- Write Tearing Effect Scan line
CMD_RDSCNL : constant := 16#45#; -- Read Tearing Effect Scan line
CMD_WRDISBV : constant := 16#51#; -- Write Display Brightness command
CMD_WRCTRLD : constant := 16#53#; -- Write CTRL Display command
CMD_WRCABC : constant := 16#55#; -- Write Content Adaptive Brightness
CMD_WRCABCMB : constant := 16#5E#; -- Write CABC minimum brightness
FREQUENCY_DIVIDER : constant := 2; -- LCD frequency divider
type OTM8009A_Color_Mode is (RGB565, RGB888);
type LCD_Orientation is (Portrait, Landscape);
type OTM8009A_Device
(DSI_Host : not null Any_DSI_Port;
Channel_ID : DSI_Virtual_Channel_ID;
Time : not null HAL.Time.Any_Delays)
is tagged limited private;
procedure Initialize
(This : in out OTM8009A_Device;
Color_Mode : OTM8009A_Color_Mode;
Orientation : LCD_Orientation);
private
type OTM8009A_Device
(DSI_Host : not null Any_DSI_Port;
Channel_ID : DSI_Virtual_Channel_ID;
Time : not null HAL.Time.Any_Delays)
is tagged limited record
Current_Shift : UInt8 := 0;
end record;
procedure DSI_IO_WriteCmd (This : in out OTM8009A_Device;
Data : HAL.DSI.DSI_Data);
procedure Write (This : in out OTM8009A_Device;
Address : UInt16;
Data : HAL.DSI.DSI_Data);
procedure Write (This : in out OTM8009A_Device;
S_Addr : UInt8;
Data : HAL.DSI.DSI_Data);
end OTM8009A;
|
sungyeon/drake | Ada | 300 | ads | pragma License (Unrestricted);
-- implementation unit required by compiler
package System.Img_Bool is
pragma Pure;
-- required for Boolean'Image by compiler (s-imgboo.ads)
procedure Image_Boolean (
V : Boolean;
S : in out String;
P : out Natural);
end System.Img_Bool;
|
DrenfongWong/tkm-rpc | Ada | 69 | ads | package Tkmrpc.Operation_Handlers is
end Tkmrpc.Operation_Handlers;
|
godunko/adagl | Ada | 4,049 | ads | ------------------------------------------------------------------------------
-- --
-- Ada binding for OpenGL/WebGL --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2016-2020, 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. --
-- --
------------------------------------------------------------------------------
with Web.Strings;
private with Web.GL.Shaders;
package OpenGL.Shaders is
pragma Preelaborate;
type OpenGL_Shader (Shader_Type : OpenGL.Shader_Type) is
tagged limited private;
type OpenGL_Shader_Access is access all OpenGL_Shader'Class;
function Compile_Source_Code
(Self : in out OpenGL_Shader'Class;
Source : Web.Strings.Web_String) return Boolean;
-- Sets the source code for this shader and compiles it. Returns True if
-- the source was successfully compiled, False otherwise.
function Log (Self : OpenGL_Shader'Class) return Web.Strings.Web_String;
-- Returns the errors and warnings that occurred during the last compile.
private
type OpenGL_Shader (Shader_Type : OpenGL.Shader_Type) is
tagged limited record
Shader : Web.GL.Shaders.WebGL_Shader;
Context : Web.GL.Rendering_Contexts.WebGL_Rendering_Context;
Log : Web.Strings.Web_String;
end record;
end OpenGL.Shaders;
|
Rodeo-McCabe/orka | Ada | 4,222 | 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 Orka.Contexts;
private with GL.Types;
private with Glfw.Windows;
private with Glfw.Input.Keys;
private with Glfw.Input.Mouse;
package Orka.Windows.GLFW is
function Initialize
(Major, Minor : Natural;
Debug : Boolean := False) return Orka.Contexts.Library'Class
with Pre => Major > 3 or else (Major = 3 and Minor >= 2);
type GLFW_Library is limited new Orka.Contexts.Library with private;
overriding
function Create_Window
(Object : GLFW_Library;
Width, Height : Positive;
Samples : Natural := 0;
Visible, Resizable : Boolean := True) return Window'Class;
type GLFW_Window is limited new Window with private;
overriding
function Context (Object : access GLFW_Window) return Contexts.Context'Class;
overriding
function Pointer_Input
(Object : GLFW_Window) return Inputs.Pointers.Pointer_Input_Ptr;
overriding
function Width (Object : GLFW_Window) return Positive;
overriding
function Height (Object : GLFW_Window) return Positive;
overriding
procedure Set_Title (Object : in out GLFW_Window; Value : String);
overriding
procedure Close (Object : in out GLFW_Window);
overriding
function Should_Close (Object : in out GLFW_Window) return Boolean;
overriding
procedure Process_Input (Object : in out GLFW_Window);
overriding
procedure Swap_Buffers (Object : in out GLFW_Window);
overriding
procedure Enable_Vertical_Sync (Object : in out GLFW_Window; Enable : Boolean);
private
type GLFW_Window is limited new Standard.Glfw.Windows.Window and Window with record
Input : Inputs.Pointers.Pointer_Input_Ptr;
Finalized : Boolean;
Position_X : GL.Types.Double := 0.0;
Position_Y : GL.Types.Double := 0.0;
Scroll_X : GL.Types.Double := 0.0;
Scroll_Y : GL.Types.Double := 0.0;
Width, Height : Positive;
-- Needed to workaround a GLFW bug
Got_Locked, Last_Locked : Boolean := False;
end record;
overriding
procedure Finalize (Object : in out GLFW_Window);
overriding
procedure Close_Requested (Object : not null access GLFW_Window);
overriding
procedure Key_Changed
(Object : not null access GLFW_Window;
Key : Standard.Glfw.Input.Keys.Key;
Scancode : Standard.Glfw.Input.Keys.Scancode;
Action : Standard.Glfw.Input.Keys.Action;
Mods : Standard.Glfw.Input.Keys.Modifiers);
overriding
procedure Mouse_Position_Changed
(Object : not null access GLFW_Window;
X, Y : Standard.Glfw.Input.Mouse.Coordinate);
overriding
procedure Mouse_Scrolled
(Object : not null access GLFW_Window;
X, Y : Standard.Glfw.Input.Mouse.Scroll_Offset);
overriding
procedure Mouse_Button_Changed
(Object : not null access GLFW_Window;
Button : Standard.Glfw.Input.Mouse.Button;
State : Standard.Glfw.Input.Button_State;
Mods : Standard.Glfw.Input.Keys.Modifiers);
overriding
procedure Framebuffer_Size_Changed
(Object : not null access GLFW_Window;
Width, Height : Natural);
-----------------------------------------------------------------------------
type GLFW_Library is limited new Orka.Contexts.Library with null record;
overriding
procedure Shutdown (Object : in out GLFW_Library);
type GLFW_Context (Window : access GLFW_Window) is
limited new Orka.Contexts.Context with null record;
overriding
procedure Make_Current (Object : in out GLFW_Context; Current : Boolean);
end Orka.Windows.GLFW;
|
reznikmm/matreshka | Ada | 3,784 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Style_Text_Line_Through_Color_Attributes is
pragma Preelaborate;
type ODF_Style_Text_Line_Through_Color_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Style_Text_Line_Through_Color_Attribute_Access is
access all ODF_Style_Text_Line_Through_Color_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Style_Text_Line_Through_Color_Attributes;
|
KLOC-Karsten/adaoled | Ada | 56,639 | ads |
with Bitmap_Graphics; use Bitmap_Graphics;
package Bitmap_Graphics.Font20 is
Font_Data : aliased Byte_Array := (
-- @0 ' ' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @40 '!' (14 pixels wide)
16#00#, 16#00#, --
16#07#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#02#, 16#00#, -- #
16#02#, 16#00#, -- #
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 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#, --
-- @80 '"' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#1C#, 16#E0#, -- ### ###
16#1C#, 16#E0#, -- ### ###
16#1C#, 16#E0#, -- ### ###
16#08#, 16#40#, -- # #
16#08#, 16#40#, -- # #
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#, --
-- @120 '#' (14 pixels wide)
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#3F#, 16#F0#, -- ##########
16#3F#, 16#F0#, -- ##########
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#3F#, 16#F0#, -- ##########
16#3F#, 16#F0#, -- ##########
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @160 '$' (14 pixels wide)
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#07#, 16#E0#, -- ######
16#0F#, 16#E0#, -- #######
16#18#, 16#60#, -- ## ##
16#18#, 16#00#, -- ##
16#1F#, 16#00#, -- #####
16#0F#, 16#C0#, -- ######
16#00#, 16#E0#, -- ###
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#1F#, 16#C0#, -- #######
16#1F#, 16#80#, -- ######
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @200 '%' (14 pixels wide)
16#00#, 16#00#, --
16#1C#, 16#00#, -- ###
16#22#, 16#00#, -- # #
16#22#, 16#00#, -- # #
16#22#, 16#00#, -- # #
16#1C#, 16#60#, -- ### ##
16#01#, 16#E0#, -- ####
16#0F#, 16#80#, -- #####
16#3C#, 16#00#, -- ####
16#31#, 16#C0#, -- ## ###
16#02#, 16#20#, -- # #
16#02#, 16#20#, -- # #
16#02#, 16#20#, -- # #
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#, --
-- @240 '&' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#03#, 16#E0#, -- #####
16#0F#, 16#E0#, -- #######
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#0F#, 16#30#, -- #### ##
16#1F#, 16#F0#, -- #########
16#19#, 16#E0#, -- ## ####
16#18#, 16#C0#, -- ## ##
16#1F#, 16#F0#, -- #########
16#07#, 16#B0#, -- #### ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @280 ''' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#03#, 16#80#, -- ###
16#03#, 16#80#, -- ###
16#03#, 16#80#, -- ###
16#01#, 16#00#, -- #
16#01#, 16#00#, -- #
16#01#, 16#00#, -- #
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @320 '(' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @360 ')' (14 pixels wide)
16#00#, 16#00#, --
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @400 '*' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#1B#, 16#60#, -- ## ## ##
16#1F#, 16#E0#, -- ########
16#07#, 16#80#, -- ####
16#07#, 16#80#, -- ####
16#0F#, 16#C0#, -- ######
16#0C#, 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#, --
-- @440 '+' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#3F#, 16#F0#, -- ##########
16#3F#, 16#F0#, -- ##########
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @480 ',' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#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#80#, -- ###
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#04#, 16#00#, -- #
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @520 '-' (14 pixels wide)
16#00#, 16#00#, --
16#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#E0#, -- #########
16#3F#, 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#, --
-- @560 '.' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#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#80#, -- ###
16#03#, 16#80#, -- ###
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#, --
-- @600 '/' (14 pixels wide)
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @640 '0' (14 pixels wide)
16#00#, 16#00#, --
16#0F#, 16#80#, -- #####
16#1F#, 16#C0#, -- #######
16#18#, 16#C0#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#1F#, 16#C0#, -- #######
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#, --
-- @680 '1' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#00#, -- ##
16#1F#, 16#00#, -- #####
16#1F#, 16#00#, -- #####
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @720 '2' (14 pixels wide)
16#00#, 16#00#, --
16#0F#, 16#80#, -- #####
16#1F#, 16#C0#, -- #######
16#38#, 16#E0#, -- ### ###
16#30#, 16#60#, -- ## ##
16#00#, 16#60#, -- ##
16#00#, 16#C0#, -- ##
16#01#, 16#80#, -- ##
16#03#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#3F#, 16#E0#, -- #########
16#3F#, 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#, --
-- @760 '3' (14 pixels wide)
16#00#, 16#00#, --
16#0F#, 16#80#, -- #####
16#3F#, 16#C0#, -- ########
16#30#, 16#E0#, -- ## ###
16#00#, 16#60#, -- ##
16#00#, 16#E0#, -- ###
16#07#, 16#C0#, -- #####
16#07#, 16#C0#, -- #####
16#00#, 16#E0#, -- ###
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#60#, 16#E0#, -- ## ###
16#7F#, 16#C0#, -- #########
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#, --
-- @800 '4' (14 pixels wide)
16#00#, 16#00#, --
16#01#, 16#C0#, -- ###
16#03#, 16#C0#, -- ####
16#03#, 16#C0#, -- ####
16#06#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#30#, 16#C0#, -- ## ##
16#3F#, 16#E0#, -- #########
16#3F#, 16#E0#, -- #########
16#00#, 16#C0#, -- ##
16#03#, 16#E0#, -- #####
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#, --
-- @840 '5' (14 pixels wide)
16#00#, 16#00#, --
16#1F#, 16#C0#, -- #######
16#1F#, 16#C0#, -- #######
16#18#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#1F#, 16#80#, -- ######
16#1F#, 16#C0#, -- #######
16#18#, 16#E0#, -- ## ###
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#30#, 16#E0#, -- ## ###
16#3F#, 16#C0#, -- ########
16#1F#, 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#, --
-- @880 '6' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#E0#, -- #####
16#0F#, 16#E0#, -- #######
16#1E#, 16#00#, -- ####
16#18#, 16#00#, -- ##
16#38#, 16#00#, -- ###
16#37#, 16#80#, -- ## ####
16#3F#, 16#C0#, -- ########
16#38#, 16#E0#, -- ### ###
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#18#, 16#E0#, -- ## ###
16#1F#, 16#C0#, -- #######
16#07#, 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#, --
-- @920 '7' (14 pixels wide)
16#00#, 16#00#, --
16#3F#, 16#E0#, -- #########
16#3F#, 16#E0#, -- #########
16#30#, 16#60#, -- ## ##
16#00#, 16#60#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @960 '8' (14 pixels wide)
16#00#, 16#00#, --
16#0F#, 16#80#, -- #####
16#1F#, 16#C0#, -- #######
16#38#, 16#E0#, -- ### ###
16#30#, 16#60#, -- ## ##
16#38#, 16#E0#, -- ### ###
16#1F#, 16#C0#, -- #######
16#1F#, 16#C0#, -- #######
16#38#, 16#E0#, -- ### ###
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#38#, 16#E0#, -- ### ###
16#1F#, 16#C0#, -- #######
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#, --
-- @1000 '9' (14 pixels wide)
16#00#, 16#00#, --
16#0F#, 16#00#, -- ####
16#1F#, 16#C0#, -- #######
16#38#, 16#C0#, -- ### ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#38#, 16#E0#, -- ### ###
16#1F#, 16#E0#, -- ########
16#0F#, 16#60#, -- #### ##
16#00#, 16#E0#, -- ###
16#00#, 16#C0#, -- ##
16#03#, 16#C0#, -- ####
16#3F#, 16#80#, -- #######
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#, --
-- @1040 ':' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#03#, 16#80#, -- ###
16#03#, 16#80#, -- ###
16#03#, 16#80#, -- ###
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#03#, 16#80#, -- ###
16#03#, 16#80#, -- ###
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#, --
-- @1080 ';' (14 pixels wide)
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#01#, 16#C0#, -- ###
16#01#, 16#C0#, -- ###
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#03#, 16#80#, -- ###
16#03#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#04#, 16#00#, -- #
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @1120 '<' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#30#, -- ##
16#00#, 16#F0#, -- ####
16#03#, 16#C0#, -- ####
16#07#, 16#00#, -- ###
16#1C#, 16#00#, -- ###
16#78#, 16#00#, -- ####
16#1C#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#03#, 16#C0#, -- ####
16#00#, 16#F0#, -- ####
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#, --
-- @1160 '=' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#7F#, 16#F0#, -- ###########
16#7F#, 16#F0#, -- ###########
16#00#, 16#00#, --
16#00#, 16#00#, --
16#7F#, 16#F0#, -- ###########
16#7F#, 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#, --
-- @1200 '>' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#30#, 16#00#, -- ##
16#3C#, 16#00#, -- ####
16#0F#, 16#00#, -- ####
16#03#, 16#80#, -- ###
16#00#, 16#E0#, -- ###
16#00#, 16#78#, -- ####
16#00#, 16#E0#, -- ###
16#03#, 16#80#, -- ###
16#0F#, 16#00#, -- ####
16#3C#, 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#, --
-- @1240 '?' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#0F#, 16#80#, -- #####
16#1F#, 16#C0#, -- #######
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#00#, 16#60#, -- ##
16#01#, 16#C0#, -- ###
16#03#, 16#80#, -- ###
16#03#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 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#, --
-- @1280 '@' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#80#, -- ###
16#0C#, 16#80#, -- ## #
16#08#, 16#40#, -- # #
16#10#, 16#40#, -- # #
16#10#, 16#40#, -- # #
16#11#, 16#C0#, -- # ###
16#12#, 16#40#, -- # # #
16#12#, 16#40#, -- # # #
16#12#, 16#40#, -- # # #
16#11#, 16#C0#, -- # ###
16#10#, 16#00#, -- #
16#08#, 16#00#, -- #
16#08#, 16#40#, -- # #
16#07#, 16#80#, -- ####
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @1320 'A' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#1F#, 16#80#, -- ######
16#1F#, 16#80#, -- ######
16#03#, 16#80#, -- ###
16#06#, 16#C0#, -- ## ##
16#06#, 16#C0#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#0C#, 16#60#, -- ## ##
16#1F#, 16#E0#, -- ########
16#1F#, 16#E0#, -- ########
16#30#, 16#30#, -- ## ##
16#78#, 16#78#, -- #### ####
16#78#, 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#, --
-- @1360 'B' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3F#, 16#80#, -- #######
16#3F#, 16#C0#, -- ########
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#E0#, -- ## ###
16#1F#, 16#C0#, -- #######
16#1F#, 16#E0#, -- ########
16#18#, 16#70#, -- ## ###
16#18#, 16#30#, -- ## ##
16#18#, 16#30#, -- ## ##
16#3F#, 16#F0#, -- ##########
16#3F#, 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#, --
-- @1400 'C' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#B0#, -- #### ##
16#0F#, 16#F0#, -- ########
16#1C#, 16#70#, -- ### ###
16#38#, 16#30#, -- ### ##
16#30#, 16#00#, -- ##
16#30#, 16#00#, -- ##
16#30#, 16#00#, -- ##
16#30#, 16#00#, -- ##
16#38#, 16#30#, -- ### ##
16#1C#, 16#70#, -- ### ###
16#0F#, 16#E0#, -- #######
16#07#, 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#, --
-- @1440 'D' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#7F#, 16#80#, -- ########
16#7F#, 16#C0#, -- #########
16#30#, 16#E0#, -- ## ###
16#30#, 16#70#, -- ## ###
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#70#, -- ## ###
16#30#, 16#E0#, -- ## ###
16#7F#, 16#C0#, -- #########
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#, --
-- @1480 'E' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3F#, 16#F0#, -- ##########
16#3F#, 16#F0#, -- ##########
16#18#, 16#30#, -- ## ##
16#18#, 16#30#, -- ## ##
16#19#, 16#80#, -- ## ##
16#1F#, 16#80#, -- ######
16#1F#, 16#80#, -- ######
16#19#, 16#80#, -- ## ##
16#18#, 16#30#, -- ## ##
16#18#, 16#30#, -- ## ##
16#3F#, 16#F0#, -- ##########
16#3F#, 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#, --
-- @1520 'F' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3F#, 16#F0#, -- ##########
16#3F#, 16#F0#, -- ##########
16#18#, 16#30#, -- ## ##
16#18#, 16#30#, -- ## ##
16#19#, 16#80#, -- ## ##
16#1F#, 16#80#, -- ######
16#1F#, 16#80#, -- ######
16#19#, 16#80#, -- ## ##
16#18#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#3F#, 16#00#, -- ######
16#3F#, 16#00#, -- ######
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @1560 'G' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#B0#, -- #### ##
16#1F#, 16#F0#, -- #########
16#18#, 16#70#, -- ## ###
16#30#, 16#30#, -- ## ##
16#30#, 16#00#, -- ##
16#30#, 16#00#, -- ##
16#31#, 16#F8#, -- ## ######
16#31#, 16#F8#, -- ## ######
16#30#, 16#30#, -- ## ##
16#18#, 16#30#, -- ## ##
16#1F#, 16#F0#, -- #########
16#07#, 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#, --
-- @1600 'H' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3C#, 16#F0#, -- #### ####
16#3C#, 16#F0#, -- #### ####
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#1F#, 16#E0#, -- ########
16#1F#, 16#E0#, -- ########
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#3C#, 16#F0#, -- #### ####
16#3C#, 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#, --
-- @1640 'I' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#1F#, 16#E0#, -- ########
16#1F#, 16#E0#, -- ########
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @1680 'J' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#03#, 16#F8#, -- #######
16#03#, 16#F8#, -- #######
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#30#, 16#E0#, -- ## ###
16#3F#, 16#C0#, -- ########
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#, --
-- @1720 'K' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3E#, 16#F8#, -- ##### #####
16#3E#, 16#F8#, -- ##### #####
16#18#, 16#E0#, -- ## ###
16#19#, 16#80#, -- ## ##
16#1B#, 16#00#, -- ## ##
16#1F#, 16#00#, -- #####
16#1D#, 16#80#, -- ### ##
16#18#, 16#C0#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#18#, 16#60#, -- ## ##
16#3E#, 16#78#, -- ##### ####
16#3E#, 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#, --
-- @1760 'L' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3F#, 16#00#, -- ######
16#3F#, 16#00#, -- ######
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#30#, -- ## ##
16#0C#, 16#30#, -- ## ##
16#0C#, 16#30#, -- ## ##
16#3F#, 16#F0#, -- ##########
16#3F#, 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#, --
-- @1800 'M' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#78#, 16#78#, -- #### ####
16#78#, 16#78#, -- #### ####
16#38#, 16#70#, -- ### ###
16#3C#, 16#F0#, -- #### ####
16#34#, 16#B0#, -- ## # # ##
16#37#, 16#B0#, -- ## #### ##
16#37#, 16#B0#, -- ## #### ##
16#33#, 16#30#, -- ## ## ##
16#33#, 16#30#, -- ## ## ##
16#30#, 16#30#, -- ## ##
16#7C#, 16#F8#, -- ##### #####
16#7C#, 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#, --
-- @1840 'N' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#39#, 16#F0#, -- ### #####
16#3D#, 16#F0#, -- #### #####
16#1C#, 16#60#, -- ### ##
16#1E#, 16#60#, -- #### ##
16#1E#, 16#60#, -- #### ##
16#1B#, 16#60#, -- ## ## ##
16#1B#, 16#60#, -- ## ## ##
16#19#, 16#E0#, -- ## ####
16#19#, 16#E0#, -- ## ####
16#18#, 16#E0#, -- ## ###
16#3E#, 16#E0#, -- ##### ###
16#3E#, 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#, --
-- @1880 'O' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#80#, -- ####
16#0F#, 16#C0#, -- ######
16#1C#, 16#E0#, -- ### ###
16#38#, 16#70#, -- ### ###
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#38#, 16#70#, -- ### ###
16#1C#, 16#E0#, -- ### ###
16#0F#, 16#C0#, -- ######
16#07#, 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#, --
-- @1920 'P' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3F#, 16#C0#, -- ########
16#3F#, 16#E0#, -- #########
16#18#, 16#70#, -- ## ###
16#18#, 16#30#, -- ## ##
16#18#, 16#30#, -- ## ##
16#18#, 16#70#, -- ## ###
16#1F#, 16#E0#, -- ########
16#1F#, 16#C0#, -- #######
16#18#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#3F#, 16#00#, -- ######
16#3F#, 16#00#, -- ######
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @1960 'Q' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#80#, -- ####
16#0F#, 16#C0#, -- ######
16#1C#, 16#E0#, -- ### ###
16#38#, 16#70#, -- ### ###
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#38#, 16#70#, -- ### ###
16#1C#, 16#E0#, -- ### ###
16#0F#, 16#C0#, -- ######
16#07#, 16#80#, -- ####
16#07#, 16#B0#, -- #### ##
16#0F#, 16#F0#, -- ########
16#0C#, 16#E0#, -- ## ###
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @2000 'R' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3F#, 16#C0#, -- ########
16#3F#, 16#E0#, -- #########
16#18#, 16#70#, -- ## ###
16#18#, 16#30#, -- ## ##
16#18#, 16#70#, -- ## ###
16#1F#, 16#E0#, -- ########
16#1F#, 16#C0#, -- #######
16#18#, 16#E0#, -- ## ###
16#18#, 16#60#, -- ## ##
16#18#, 16#70#, -- ## ###
16#3E#, 16#38#, -- ##### ###
16#3E#, 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#, --
-- @2040 'S' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#0F#, 16#B0#, -- ##### ##
16#1F#, 16#F0#, -- #########
16#38#, 16#70#, -- ### ###
16#30#, 16#30#, -- ## ##
16#38#, 16#00#, -- ###
16#1F#, 16#80#, -- ######
16#07#, 16#E0#, -- ######
16#00#, 16#70#, -- ###
16#30#, 16#30#, -- ## ##
16#38#, 16#70#, -- ### ###
16#3F#, 16#E0#, -- #########
16#37#, 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#, --
-- @2080 'T' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3F#, 16#F0#, -- ##########
16#3F#, 16#F0#, -- ##########
16#33#, 16#30#, -- ## ## ##
16#33#, 16#30#, -- ## ## ##
16#33#, 16#30#, -- ## ## ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#0F#, 16#C0#, -- ######
16#0F#, 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#, --
-- @2120 'U' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3C#, 16#F0#, -- #### ####
16#3C#, 16#F0#, -- #### ####
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#1C#, 16#E0#, -- ### ###
16#0F#, 16#C0#, -- ######
16#07#, 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#, --
-- @2160 'V' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#78#, 16#F0#, -- #### ####
16#78#, 16#F0#, -- #### ####
16#30#, 16#60#, -- ## ##
16#30#, 16#60#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#0D#, 16#80#, -- ## ##
16#0D#, 16#80#, -- ## ##
16#0D#, 16#80#, -- ## ##
16#07#, 16#00#, -- ###
16#07#, 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#, --
-- @2200 'W' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#7C#, 16#7C#, -- ##### #####
16#7C#, 16#7C#, -- ##### #####
16#30#, 16#18#, -- ## ##
16#33#, 16#98#, -- ## ### ##
16#33#, 16#98#, -- ## ### ##
16#33#, 16#98#, -- ## ### ##
16#36#, 16#D8#, -- ## ## ## ##
16#16#, 16#D0#, -- # ## ## #
16#1C#, 16#70#, -- ### ###
16#1C#, 16#70#, -- ### ###
16#1C#, 16#70#, -- ### ###
16#18#, 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#, --
-- @2240 'X' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#78#, 16#F0#, -- #### ####
16#78#, 16#F0#, -- #### ####
16#30#, 16#60#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#0D#, 16#80#, -- ## ##
16#07#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#0D#, 16#80#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#30#, 16#60#, -- ## ##
16#78#, 16#F0#, -- #### ####
16#78#, 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#, --
-- @2280 'Y' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3C#, 16#F0#, -- #### ####
16#3C#, 16#F0#, -- #### ####
16#18#, 16#60#, -- ## ##
16#0C#, 16#C0#, -- ## ##
16#07#, 16#80#, -- ####
16#07#, 16#80#, -- ####
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#0F#, 16#C0#, -- ######
16#0F#, 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#, --
-- @2320 'Z' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#1F#, 16#E0#, -- ########
16#1F#, 16#E0#, -- ########
16#18#, 16#60#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#01#, 16#80#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#0C#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @2360 '[' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#C0#, -- ####
16#03#, 16#C0#, -- ####
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#C0#, -- ####
16#03#, 16#C0#, -- ####
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @2400 '\' (14 pixels wide)
16#18#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#01#, 16#80#, -- ##
16#01#, 16#80#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#60#, -- ##
16#00#, 16#60#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @2440 ']' (14 pixels wide)
16#00#, 16#00#, --
16#0F#, 16#00#, -- ####
16#0F#, 16#00#, -- ####
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#0F#, 16#00#, -- ####
16#0F#, 16#00#, -- ####
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @2480 '^' (14 pixels wide)
16#00#, 16#00#, --
16#02#, 16#00#, -- #
16#07#, 16#00#, -- ###
16#0D#, 16#80#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#30#, 16#60#, -- ## ##
16#20#, 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#, --
-- @2520 '_' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#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#FC#, -- ##############
16#FF#, 16#FC#, -- ##############
-- @2560 '`' (14 pixels wide)
16#00#, 16#00#, --
16#04#, 16#00#, -- #
16#03#, 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#, --
-- @2600 'a' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#0F#, 16#C0#, -- ######
16#1F#, 16#E0#, -- ########
16#00#, 16#60#, -- ##
16#0F#, 16#E0#, -- #######
16#1F#, 16#E0#, -- ########
16#38#, 16#60#, -- ### ##
16#30#, 16#E0#, -- ## ###
16#3F#, 16#F0#, -- ##########
16#1F#, 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#, --
-- @2640 'b' (14 pixels wide)
16#00#, 16#00#, --
16#70#, 16#00#, -- ###
16#70#, 16#00#, -- ###
16#30#, 16#00#, -- ##
16#30#, 16#00#, -- ##
16#37#, 16#80#, -- ## ####
16#3F#, 16#E0#, -- #########
16#38#, 16#60#, -- ### ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#38#, 16#60#, -- ### ##
16#7F#, 16#E0#, -- ##########
16#77#, 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#, --
-- @2680 'c' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#B0#, -- #### ##
16#1F#, 16#F0#, -- #########
16#18#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#00#, -- ##
16#30#, 16#00#, -- ##
16#38#, 16#30#, -- ### ##
16#1F#, 16#F0#, -- #########
16#0F#, 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#, --
-- @2720 'd' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#70#, -- ###
16#00#, 16#70#, -- ###
16#00#, 16#30#, -- ##
16#00#, 16#30#, -- ##
16#07#, 16#B0#, -- #### ##
16#1F#, 16#F0#, -- #########
16#18#, 16#70#, -- ## ###
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#38#, 16#70#, -- ### ###
16#1F#, 16#F8#, -- ##########
16#07#, 16#B8#, -- #### ###
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @2760 'e' (14 pixels wide)
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#1F#, 16#E0#, -- ########
16#18#, 16#60#, -- ## ##
16#3F#, 16#F0#, -- ##########
16#3F#, 16#F0#, -- ##########
16#30#, 16#00#, -- ##
16#18#, 16#30#, -- ## ##
16#1F#, 16#F0#, -- #########
16#07#, 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#, --
-- @2800 'f' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#F0#, -- ######
16#07#, 16#F0#, -- #######
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#1F#, 16#E0#, -- ########
16#1F#, 16#E0#, -- ########
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @2840 'g' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#B8#, -- #### ###
16#1F#, 16#F8#, -- ##########
16#18#, 16#70#, -- ## ###
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#18#, 16#70#, -- ## ###
16#1F#, 16#F0#, -- #########
16#07#, 16#B0#, -- #### ##
16#00#, 16#30#, -- ##
16#00#, 16#70#, -- ###
16#0F#, 16#E0#, -- #######
16#0F#, 16#C0#, -- ######
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @2880 'h' (14 pixels wide)
16#00#, 16#00#, --
16#38#, 16#00#, -- ###
16#38#, 16#00#, -- ###
16#18#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#1B#, 16#C0#, -- ## ####
16#1F#, 16#E0#, -- ########
16#1C#, 16#60#, -- ### ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#3C#, 16#F0#, -- #### ####
16#3C#, 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#, --
-- @2920 'i' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#1F#, 16#00#, -- #####
16#1F#, 16#00#, -- #####
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @2960 'j' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#1F#, 16#C0#, -- #######
16#1F#, 16#C0#, -- #######
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#00#, 16#C0#, -- ##
16#01#, 16#C0#, -- ###
16#3F#, 16#80#, -- #######
16#3F#, 16#00#, -- ######
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3000 'k' (14 pixels wide)
16#00#, 16#00#, --
16#38#, 16#00#, -- ###
16#38#, 16#00#, -- ###
16#18#, 16#00#, -- ##
16#18#, 16#00#, -- ##
16#1B#, 16#E0#, -- ## #####
16#1B#, 16#E0#, -- ## #####
16#1B#, 16#00#, -- ## ##
16#1E#, 16#00#, -- ####
16#1E#, 16#00#, -- ####
16#1B#, 16#00#, -- ## ##
16#19#, 16#80#, -- ## ##
16#39#, 16#F0#, -- ### #####
16#39#, 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#, --
-- @3040 'l' (14 pixels wide)
16#00#, 16#00#, --
16#1F#, 16#00#, -- #####
16#1F#, 16#00#, -- #####
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @3080 'm' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#7E#, 16#E0#, -- ###### ###
16#7F#, 16#F0#, -- ###########
16#33#, 16#30#, -- ## ## ##
16#33#, 16#30#, -- ## ## ##
16#33#, 16#30#, -- ## ## ##
16#33#, 16#30#, -- ## ## ##
16#33#, 16#30#, -- ## ## ##
16#7B#, 16#B8#, -- #### ### ###
16#7B#, 16#B8#, -- #### ### ###
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3120 'n' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3B#, 16#C0#, -- ### ####
16#3F#, 16#E0#, -- #########
16#1C#, 16#60#, -- ### ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#3C#, 16#F0#, -- #### ####
16#3C#, 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#, --
-- @3160 'o' (14 pixels wide)
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#1F#, 16#E0#, -- ########
16#18#, 16#60#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#18#, 16#60#, -- ## ##
16#1F#, 16#E0#, -- ########
16#07#, 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#, --
-- @3200 'p' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#77#, 16#80#, -- ### ####
16#7F#, 16#E0#, -- ##########
16#38#, 16#60#, -- ### ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#38#, 16#60#, -- ### ##
16#3F#, 16#E0#, -- #########
16#37#, 16#80#, -- ## ####
16#30#, 16#00#, -- ##
16#30#, 16#00#, -- ##
16#7C#, 16#00#, -- #####
16#7C#, 16#00#, -- #####
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3240 'q' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#B8#, -- #### ###
16#1F#, 16#F8#, -- ##########
16#18#, 16#70#, -- ## ###
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#30#, 16#30#, -- ## ##
16#18#, 16#70#, -- ## ###
16#1F#, 16#F0#, -- #########
16#07#, 16#B0#, -- #### ##
16#00#, 16#30#, -- ##
16#00#, 16#30#, -- ##
16#00#, 16#F8#, -- #####
16#00#, 16#F8#, -- #####
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3280 'r' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3C#, 16#E0#, -- #### ###
16#3D#, 16#F0#, -- #### #####
16#0F#, 16#30#, -- #### ##
16#0E#, 16#00#, -- ###
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#3F#, 16#C0#, -- ########
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#, --
-- @3320 's' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#07#, 16#E0#, -- ######
16#1F#, 16#E0#, -- ########
16#18#, 16#60#, -- ## ##
16#1E#, 16#00#, -- ####
16#0F#, 16#C0#, -- ######
16#01#, 16#E0#, -- ####
16#18#, 16#60#, -- ## ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @3360 't' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#3F#, 16#E0#, -- #########
16#3F#, 16#E0#, -- #########
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#0C#, 16#30#, -- ## ##
16#0F#, 16#F0#, -- ########
16#07#, 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#, --
-- @3400 'u' (14 pixels wide)
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#38#, 16#E0#, -- ### ###
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#60#, -- ## ##
16#18#, 16#E0#, -- ## ###
16#1F#, 16#F0#, -- #########
16#0F#, 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#, --
-- @3440 'v' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#78#, 16#F0#, -- #### ####
16#78#, 16#F0#, -- #### ####
16#30#, 16#60#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#0D#, 16#80#, -- ## ##
16#0D#, 16#80#, -- ## ##
16#07#, 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#, --
-- @3480 'w' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#78#, 16#F0#, -- #### ####
16#78#, 16#F0#, -- #### ####
16#32#, 16#60#, -- ## # ##
16#32#, 16#60#, -- ## # ##
16#37#, 16#E0#, -- ## ######
16#1D#, 16#C0#, -- ### ###
16#1D#, 16#C0#, -- ### ###
16#18#, 16#C0#, -- ## ##
16#18#, 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#, --
-- @3520 'x' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#3C#, 16#F0#, -- #### ####
16#3C#, 16#F0#, -- #### ####
16#0C#, 16#C0#, -- ## ##
16#07#, 16#80#, -- ####
16#03#, 16#00#, -- ##
16#07#, 16#80#, -- ####
16#0C#, 16#C0#, -- ## ##
16#3C#, 16#F0#, -- #### ####
16#3C#, 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#, --
-- @3560 'y' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#78#, 16#F0#, -- #### ####
16#78#, 16#F0#, -- #### ####
16#30#, 16#60#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#18#, 16#C0#, -- ## ##
16#0D#, 16#80#, -- ## ##
16#0F#, 16#80#, -- #####
16#07#, 16#00#, -- ###
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#0C#, 16#00#, -- ##
16#7F#, 16#00#, -- #######
16#7F#, 16#00#, -- #######
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3600 'z' (14 pixels wide)
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
16#1F#, 16#E0#, -- ########
16#1F#, 16#E0#, -- ########
16#18#, 16#C0#, -- ## ##
16#01#, 16#80#, -- ##
16#03#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#0C#, 16#60#, -- ## ##
16#1F#, 16#E0#, -- ########
16#1F#, 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#, --
-- @3640 '{' (14 pixels wide)
16#00#, 16#00#, --
16#01#, 16#C0#, -- ###
16#03#, 16#C0#, -- ####
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#07#, 16#00#, -- ###
16#0E#, 16#00#, -- ###
16#07#, 16#00#, -- ###
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#C0#, -- ####
16#01#, 16#C0#, -- ###
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3680 '|' (14 pixels wide)
16#00#, 16#00#, --
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#03#, 16#00#, -- ##
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3720 '}' (14 pixels wide)
16#00#, 16#00#, --
16#1C#, 16#00#, -- ###
16#1E#, 16#00#, -- ####
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#07#, 16#00#, -- ###
16#03#, 16#80#, -- ###
16#07#, 16#00#, -- ###
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#06#, 16#00#, -- ##
16#1E#, 16#00#, -- ####
16#1C#, 16#00#, -- ###
16#00#, 16#00#, --
16#00#, 16#00#, --
16#00#, 16#00#, --
-- @3760 '~' (14 pixels wide)
16#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#3F#, 16#30#, -- ###### ##
16#33#, 16#F0#, -- ## ######
16#01#, 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# --
);
Font20: aliased Font := (
Width => 14,
Height => 20,
Data => Font_Data'access
);
end Bitmap_Graphics.Font20;
|
Fabien-Chouteau/spdx_ada | Ada | 7,620 | ads | package SPDX.Exceptions is
pragma Style_Checks (Off); -- Genrated code
Version : constant String :="3.10-14-g0fb8a59";
type Id is (
GCC_exception_2_0,
openvpn_openssl_exception,
GPL_3_0_linking_exception,
Fawkes_Runtime_exception,
u_boot_exception_2_0,
PS_or_PDF_font_exception_20170817,
gnu_javamail_exception,
LGPL_3_0_linking_exception,
DigiRule_FOSS_exception,
LLVM_exception,
Linux_syscall_note,
GPL_3_0_linking_source_exception,
Qwt_exception_1_0,
Id_389_exception,
mif_exception,
eCos_exception_2_0,
CLISP_exception_2_0,
Bison_exception_2_2,
Libtool_exception,
LZMA_exception,
OpenJDK_assembly_exception_1_0,
Font_exception_2_0,
OCaml_LGPL_linking_exception,
GCC_exception_3_1,
Bootloader_exception,
SHL_2_0,
Classpath_exception_2_0,
Swift_exception,
Autoconf_exception_2_0,
FLTK_exception,
freertos_exception_2_0,
Universal_FOSS_exception_1_0,
WxWindows_exception_3_1,
OCCT_exception_1_0,
Autoconf_exception_3_0,
i2p_gpl_java_exception,
GPL_CC_1_0,
Qt_LGPL_exception_1_1,
SHL_2_1,
Qt_GPL_exception_1_0);
type String_Access is not null access constant String;
Img_Ptr : constant array (Id) of String_Access :=
(
GCC_exception_2_0 => new String'("GCC-exception-2.0"),
openvpn_openssl_exception => new String'("openvpn-openssl-exception"),
GPL_3_0_linking_exception => new String'("GPL-3.0-linking-exception"),
Fawkes_Runtime_exception => new String'("Fawkes-Runtime-exception"),
u_boot_exception_2_0 => new String'("u-boot-exception-2.0"),
PS_or_PDF_font_exception_20170817 => new String'("PS-or-PDF-font-exception-20170817"),
gnu_javamail_exception => new String'("gnu-javamail-exception"),
LGPL_3_0_linking_exception => new String'("LGPL-3.0-linking-exception"),
DigiRule_FOSS_exception => new String'("DigiRule-FOSS-exception"),
LLVM_exception => new String'("LLVM-exception"),
Linux_syscall_note => new String'("Linux-syscall-note"),
GPL_3_0_linking_source_exception => new String'("GPL-3.0-linking-source-exception"),
Qwt_exception_1_0 => new String'("Qwt-exception-1.0"),
Id_389_exception => new String'("389-exception"),
mif_exception => new String'("mif-exception"),
eCos_exception_2_0 => new String'("eCos-exception-2.0"),
CLISP_exception_2_0 => new String'("CLISP-exception-2.0"),
Bison_exception_2_2 => new String'("Bison-exception-2.2"),
Libtool_exception => new String'("Libtool-exception"),
LZMA_exception => new String'("LZMA-exception"),
OpenJDK_assembly_exception_1_0 => new String'("OpenJDK-assembly-exception-1.0"),
Font_exception_2_0 => new String'("Font-exception-2.0"),
OCaml_LGPL_linking_exception => new String'("OCaml-LGPL-linking-exception"),
GCC_exception_3_1 => new String'("GCC-exception-3.1"),
Bootloader_exception => new String'("Bootloader-exception"),
SHL_2_0 => new String'("SHL-2.0"),
Classpath_exception_2_0 => new String'("Classpath-exception-2.0"),
Swift_exception => new String'("Swift-exception"),
Autoconf_exception_2_0 => new String'("Autoconf-exception-2.0"),
FLTK_exception => new String'("FLTK-exception"),
freertos_exception_2_0 => new String'("freertos-exception-2.0"),
Universal_FOSS_exception_1_0 => new String'("Universal-FOSS-exception-1.0"),
WxWindows_exception_3_1 => new String'("WxWindows-exception-3.1"),
OCCT_exception_1_0 => new String'("OCCT-exception-1.0"),
Autoconf_exception_3_0 => new String'("Autoconf-exception-3.0"),
i2p_gpl_java_exception => new String'("i2p-gpl-java-exception"),
GPL_CC_1_0 => new String'("GPL-CC-1.0"),
Qt_LGPL_exception_1_1 => new String'("Qt-LGPL-exception-1.1"),
SHL_2_1 => new String'("SHL-2.1"),
Qt_GPL_exception_1_0 => new String'("Qt-GPL-exception-1.0"));
function Img (I : Id) return String
is (Img_Ptr (I).all);
Name_Ptr : constant array (Id) of String_Access :=
(
GCC_exception_2_0 => new String'("GCC Runtime Library exception 2.0"),
openvpn_openssl_exception => new String'("OpenVPN OpenSSL Exception"),
GPL_3_0_linking_exception => new String'("GPL-3.0 Linking Exception"),
Fawkes_Runtime_exception => new String'("Fawkes Runtime Exception"),
u_boot_exception_2_0 => new String'("U-Boot exception 2.0"),
PS_or_PDF_font_exception_20170817 => new String'("PS/PDF font exception (2017-08-17)"),
gnu_javamail_exception => new String'("GNU JavaMail exception"),
LGPL_3_0_linking_exception => new String'("LGPL-3.0 Linking Exception"),
DigiRule_FOSS_exception => new String'("DigiRule FOSS License Exception"),
LLVM_exception => new String'("LLVM Exception"),
Linux_syscall_note => new String'("Linux Syscall Note"),
GPL_3_0_linking_source_exception => new String'("GPL-3.0 Linking Exception (with Corresponding Source)"),
Qwt_exception_1_0 => new String'("Qwt exception 1.0"),
Id_389_exception => new String'("389 Directory Server Exception"),
mif_exception => new String'("Macros and Inline Functions Exception"),
eCos_exception_2_0 => new String'("eCos exception 2.0"),
CLISP_exception_2_0 => new String'("CLISP exception 2.0"),
Bison_exception_2_2 => new String'("Bison exception 2.2"),
Libtool_exception => new String'("Libtool Exception"),
LZMA_exception => new String'("LZMA exception"),
OpenJDK_assembly_exception_1_0 => new String'("OpenJDK Assembly exception 1.0"),
Font_exception_2_0 => new String'("Font exception 2.0"),
OCaml_LGPL_linking_exception => new String'("OCaml LGPL Linking Exception"),
GCC_exception_3_1 => new String'("GCC Runtime Library exception 3.1"),
Bootloader_exception => new String'("Bootloader Distribution Exception"),
SHL_2_0 => new String'("Solderpad Hardware License v2.0"),
Classpath_exception_2_0 => new String'("Classpath exception 2.0"),
Swift_exception => new String'("Swift Exception"),
Autoconf_exception_2_0 => new String'("Autoconf exception 2.0"),
FLTK_exception => new String'("FLTK exception"),
freertos_exception_2_0 => new String'("FreeRTOS Exception 2.0"),
Universal_FOSS_exception_1_0 => new String'("Universal FOSS Exception, Version 1.0"),
WxWindows_exception_3_1 => new String'("WxWindows Library Exception 3.1"),
OCCT_exception_1_0 => new String'("Open CASCADE Exception 1.0"),
Autoconf_exception_3_0 => new String'("Autoconf exception 3.0"),
i2p_gpl_java_exception => new String'("i2p GPL+Java Exception"),
GPL_CC_1_0 => new String'("GPL Cooperation Commitment 1.0"),
Qt_LGPL_exception_1_1 => new String'("Qt LGPL exception 1.1"),
SHL_2_1 => new String'("Solderpad Hardware License v2.1"),
Qt_GPL_exception_1_0 => new String'("Qt GPL exception 1.0"));
function Name (I : Id) return String
is (Name_Ptr (I).all);
function Valid_Id (Str : String) return Boolean;
function From_Id (Str : String) return Id;
end SPDX.Exceptions;
|
burratoo/Acton | Ada | 1,134 | ads | ------------------------------------------------------------------------------------------
-- --
-- OAK VIEWER --
-- --
-- ISA --
-- --
-- Copyright (C) 2014-2021, Patrick Bernardi --
-- --
------------------------------------------------------------------------------------------
package ISA with Pure is
type Enable_Type is (Disable, Enable);
for Enable_Type use (Disable => 0, Enable => 1);
type Enabled_Type is (Disabled, Enabled);
for Enabled_Type use (Disabled => 0, Enabled => 1);
type Decision_Type is (No, Yes);
for Decision_Type use (No => 0, Yes => 1);
end ISA;
|
zhmu/ananas | Ada | 197 | adb | -- { dg-do compile }
-- { dg-options "-O -gnatn" }
with Inline17_Pkg1; use Inline17_Pkg1;
with Inline17_Pkg2; use Inline17_Pkg2;
procedure Inline17 is
use type SQL_Field;
begin
Test;
end;
|
reznikmm/matreshka | Ada | 10,980 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014-2016, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package body League.JSON.Streams is
procedure Update
(Self : not null access JSON_Stream'Class;
Value : League.JSON.Values.JSON_Value);
-- Update (or add) value to result.
procedure Push
(Self : not null access JSON_Stream'Class;
Kind : State_Kinds);
procedure Push
(Self : not null access JSON_Stream'Class;
Data : League.JSON.Arrays.JSON_Array);
procedure Push
(Self : not null access JSON_Stream'Class;
Data : League.JSON.Objects.JSON_Object);
-- Push current state into the stack and initialize new current state.
procedure Pop (Self : not null access JSON_Stream'Class);
-- Unwind state stack and add constructed value to new state.
---------------
-- End_Array --
---------------
procedure End_Array (Self : not null access JSON_Stream'Class) renames Pop;
----------------
-- End_Object --
----------------
procedure End_Object (Self : not null access JSON_Stream'Class) renames Pop;
------------------
-- End_Of_Array --
------------------
function End_Of_Array
(Self : not null access JSON_Stream'Class) return Boolean is
begin
return
(case Self.Current.Kind is
when Array_State =>
Self.Current.Index > Self.Current.Current_Array.Length,
when Object_State => True);
end End_Of_Array;
-----------------------
-- Get_JSON_Document --
-----------------------
function Get_JSON_Document
(Self : not null access JSON_Stream'Class)
return League.JSON.Documents.JSON_Document is
begin
return Self.Current.Current_Array.To_JSON_Document;
end Get_JSON_Document;
---------
-- Key --
---------
procedure Key
(Self : not null access JSON_Stream'Class;
Key : League.Strings.Universal_String) is
begin
Self.Current.Key := Key;
end Key;
---------
-- Pop --
---------
procedure Pop (Self : not null access JSON_Stream'Class) is
Modified : constant Boolean := Self.Current.Modified;
Value : constant League.JSON.Values.JSON_Value
:= (case Self.Current.Kind is
when Array_State => Self.Current.Current_Array.To_JSON_Value,
when Object_State => Self.Current.Current_Object.To_JSON_Value);
begin
Self.Current := Self.Stack.Last_Element;
Self.Stack.Delete_Last;
if Modified then
Self.Update (Value);
elsif Self.Current.Kind = Array_State then
Self.Current.Index := Self.Current.Index + 1;
end if;
end Pop;
----------
-- Push --
----------
procedure Push
(Self : not null access JSON_Stream'Class;
Kind : State_Kinds) is
begin
Self.Stack.Append (Self.Current);
case Kind is
when Array_State =>
Self.Current :=
(Array_State, False, League.JSON.Arrays.Empty_JSON_Array, 1);
when Object_State =>
Self.Current :=
(Object_State,
False,
League.JSON.Objects.Empty_JSON_Object,
League.Strings.Empty_Universal_String);
end case;
end Push;
----------
-- Push --
----------
procedure Push
(Self : not null access JSON_Stream'Class;
Data : League.JSON.Arrays.JSON_Array) is
begin
Self.Stack.Append (Self.Current);
Self.Current := (Array_State, False, Data, 1);
end Push;
----------
-- Push --
----------
procedure Push
(Self : not null access JSON_Stream'Class;
Data : League.JSON.Objects.JSON_Object) is
begin
Self.Stack.Append (Self.Current);
Self.Current :=
(Object_State, False, Data, League.Strings.Empty_Universal_String);
end Push;
----------
-- Read --
----------
overriding procedure Read
(Stream : in out JSON_Stream;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset) is
begin
raise Program_Error;
end Read;
----------
-- Read --
----------
function Read
(Self : in out JSON_Stream'Class)
return League.JSON.Values.JSON_Value is
begin
case Self.Current.Kind is
when Array_State =>
Self.Current.Index := Self.Current.Index + 1;
return Self.Current.Current_Array (Self.Current.Index - 1);
when Object_State =>
return Self.Current.Current_Object (Self.Current.Key);
end case;
end Read;
-----------
-- Write --
-----------
procedure Write
(Self : in out JSON_Stream'Class;
Item : League.JSON.Values.JSON_Value) is
begin
Self.Update (Item);
end Write;
-----------------------
-- Set_JSON_Document --
-----------------------
procedure Set_JSON_Document
(Self : not null access JSON_Stream'Class;
Data : League.JSON.Documents.JSON_Document) is
begin
if not Data.Is_Array then
raise Program_Error with "JSON document must contain array";
end if;
Self.Current := (Array_State, False, Data.To_JSON_Array, 1);
end Set_JSON_Document;
-----------------
-- Start_Array --
-----------------
procedure Start_Array (Self : not null access JSON_Stream'Class) is
begin
case Self.Current.Kind is
when Array_State =>
if Self.Current.Index <= Self.Current.Current_Array.Length then
Self.Push
(Self.Current.Current_Array (Self.Current.Index).To_Array);
else
Self.Push (Array_State);
end if;
when Object_State =>
if Self.Current.Current_Object.Contains (Self.Current.Key) then
Self.Push
(Self.Current.Current_Object (Self.Current.Key).To_Array);
else
Self.Push (Array_State);
end if;
end case;
end Start_Array;
------------------
-- Start_Object --
------------------
procedure Start_Object (Self : not null access JSON_Stream'Class) is
begin
case Self.Current.Kind is
when Array_State =>
if Self.Current.Index <= Self.Current.Current_Array.Length then
Self.Push
(Self.Current.Current_Array (Self.Current.Index).To_Object);
else
Self.Push (Object_State);
end if;
when Object_State =>
if Self.Current.Current_Object.Contains (Self.Current.Key) then
Self.Push
(Self.Current.Current_Object (Self.Current.Key).To_Object);
else
Self.Push (Object_State);
end if;
end case;
end Start_Object;
------------
-- Update --
------------
procedure Update
(Self : not null access JSON_Stream'Class;
Value : League.JSON.Values.JSON_Value) is
begin
case Self.Current.Kind is
when Array_State =>
if Self.Current.Index <= Self.Current.Current_Array.Length then
Self.Current.Current_Array.Replace (Self.Current.Index, Value);
else
Self.Current.Current_Array.Append (Value);
end if;
Self.Current.Index := Self.Current.Index + 1;
when Object_State =>
Self.Current.Current_Object.Insert
(Self.Current.Key, Value);
end case;
Self.Current.Modified := True;
end Update;
-----------
-- Write --
-----------
overriding procedure Write
(Stream : in out JSON_Stream;
Item : Ada.Streams.Stream_Element_Array) is
begin
raise Program_Error;
end Write;
end League.JSON.Streams;
|
reznikmm/matreshka | Ada | 3,937 | 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_Id_Attributes;
package Matreshka.ODF_Text.Id_Attributes is
type Text_Id_Attribute_Node is
new Matreshka.ODF_Text.Abstract_Text_Attribute_Node
and ODF.DOM.Text_Id_Attributes.ODF_Text_Id_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Text_Id_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Text_Id_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Text.Id_Attributes;
|
reznikmm/matreshka | Ada | 3,734 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Elements;
package ODF.DOM.Presentation_Event_Listener_Elements is
pragma Preelaborate;
type ODF_Presentation_Event_Listener is limited interface
and XML.DOM.Elements.DOM_Element;
type ODF_Presentation_Event_Listener_Access is
access all ODF_Presentation_Event_Listener'Class
with Storage_Size => 0;
end ODF.DOM.Presentation_Event_Listener_Elements;
|
stcarrez/ada-awa | Ada | 101,417 | adb | -----------------------------------------------------------------------
-- AWA.Users.Models -- AWA.Users.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.Users.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 Email_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => EMAIL_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Email_Key;
function Email_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => EMAIL_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Email_Key;
function "=" (Left, Right : Email_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 Email_Ref'Class;
Impl : out Email_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Email_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Email_Ref) is
Impl : Email_Access;
begin
Impl := new Email_Impl;
Impl.Status := MailDeliveryStatus'First;
Impl.Last_Error_Date := ADO.DEFAULT_TIME;
Impl.Version := 0;
Impl.User_Id := ADO.NO_IDENTIFIER;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Email
-- ----------------------------------------
procedure Set_Email (Object : in out Email_Ref;
Value : in String) is
Impl : Email_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 1, Impl.Email, Value);
end Set_Email;
procedure Set_Email (Object : in out Email_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Email_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 1, Impl.Email, Value);
end Set_Email;
function Get_Email (Object : in Email_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Email);
end Get_Email;
function Get_Email (Object : in Email_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Email_Access
:= Email_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Email;
end Get_Email;
procedure Set_Status (Object : in out Email_Ref;
Value : in MailDeliveryStatus) is
procedure Set_Field_Discrete is
new ADO.Objects.Set_Field_Operation
(MailDeliveryStatus);
Impl : Email_Access;
begin
Set_Field (Object, Impl);
Set_Field_Discrete (Impl.all, 2, Impl.Status, Value);
end Set_Status;
function Get_Status (Object : in Email_Ref)
return MailDeliveryStatus is
Impl : constant Email_Access
:= Email_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Status;
end Get_Status;
procedure Set_Last_Error_Date (Object : in out Email_Ref;
Value : in Ada.Calendar.Time) is
Impl : Email_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 3, Impl.Last_Error_Date, Value);
end Set_Last_Error_Date;
function Get_Last_Error_Date (Object : in Email_Ref)
return Ada.Calendar.Time is
Impl : constant Email_Access
:= Email_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Last_Error_Date;
end Get_Last_Error_Date;
function Get_Version (Object : in Email_Ref)
return Integer is
Impl : constant Email_Access
:= Email_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Id (Object : in out Email_Ref;
Value : in ADO.Identifier) is
Impl : Email_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 5, Value);
end Set_Id;
function Get_Id (Object : in Email_Ref)
return ADO.Identifier is
Impl : constant Email_Access
:= Email_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_User_Id (Object : in out Email_Ref;
Value : in ADO.Identifier) is
Impl : Email_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Identifier (Impl.all, 6, Impl.User_Id, Value);
end Set_User_Id;
function Get_User_Id (Object : in Email_Ref)
return ADO.Identifier is
Impl : constant Email_Access
:= Email_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.User_Id;
end Get_User_Id;
-- Copy of the object.
procedure Copy (Object : in Email_Ref;
Into : in out Email_Ref) is
Result : Email_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Email_Access
:= Email_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Email_Access
:= new Email_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Email := Impl.Email;
Copy.Status := Impl.Status;
Copy.Last_Error_Date := Impl.Last_Error_Date;
Copy.Version := Impl.Version;
Copy.User_Id := Impl.User_Id;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Email_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Email_Access := new Email_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 Email_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Email_Access := new Email_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 Email_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Email_Access := new Email_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;
procedure Reload (Object : in out Email_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean) is
Result : ADO.Objects.Object_Record_Access;
Impl : Email_Access;
Query : ADO.SQL.Query;
Id : ADO.Identifier;
begin
if Object.Is_Null then
raise ADO.Objects.NULL_ERROR;
end if;
Object.Prepare_Modify (Result);
Impl := Email_Impl (Result.all)'Access;
Id := ADO.Objects.Get_Key_Value (Impl.all);
Query.Bind_Param (Position => 1, Value => Id);
Query.Bind_Param (Position => 2, Value => Impl.Version);
Query.Set_Filter ("id = ? AND version != ?");
declare
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, EMAIL_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Updated := True;
Impl.Load (Stmt, Session);
else
Updated := False;
end if;
end;
end Reload;
overriding
procedure Save (Object : in out Email_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 Email_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 Email_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 Email_Impl) is
type Email_Impl_Ptr is access all Email_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Email_Impl, Email_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Email_Impl_Ptr := Email_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Email_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, EMAIL_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 Email_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 Email_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (EMAIL_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_1_NAME, -- email
Value => Object.Email);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_1_NAME, -- status
Value => Integer (MailDeliveryStatus'Enum_Rep (Object.Status)));
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_1_NAME, -- last_error_date
Value => Object.Last_Error_Date);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_1_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (5);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_1_NAME, -- user_id
Value => Object.User_Id);
Object.Clear_Modified (6);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
overriding
procedure Create (Object : in out Email_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (EMAIL_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Query.Save_Field (Name => COL_0_1_NAME, -- email
Value => Object.Email);
Query.Save_Field (Name => COL_1_1_NAME, -- status
Value => Integer (MailDeliveryStatus'Enum_Rep (Object.Status)));
Query.Save_Field (Name => COL_2_1_NAME, -- last_error_date
Value => Object.Last_Error_Date);
Query.Save_Field (Name => COL_3_1_NAME, -- version
Value => Object.Version);
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_4_1_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_5_1_NAME, -- user_id
Value => Object.User_Id);
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 Email_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (EMAIL_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 Email_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Email_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Email_Impl (Obj.all)'Access;
if Name = "email" then
return Util.Beans.Objects.To_Object (Impl.Email);
elsif Name = "status" then
return MailDeliveryStatus_Objects.To_Object (Impl.Status);
elsif Name = "last_error_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Last_Error_Date);
elsif Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "user_id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.User_Id));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Email_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Email := Stmt.Get_Unbounded_String (0);
Object.Status := MailDeliveryStatus'Enum_Val (Stmt.Get_Integer (1));
Object.Last_Error_Date := Stmt.Get_Time (2);
Object.Set_Key_Value (Stmt.Get_Identifier (4));
Object.User_Id := Stmt.Get_Identifier (5);
Object.Version := Stmt.Get_Integer (3);
ADO.Objects.Set_Created (Object);
end Load;
function User_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => USER_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end User_Key;
function User_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => USER_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end User_Key;
function "=" (Left, Right : User_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 User_Ref'Class;
Impl : out User_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := User_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out User_Ref) is
Impl : User_Access;
begin
Impl := new User_Impl;
Impl.Version := 0;
Impl.Status := Status_Type'First;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: User
-- ----------------------------------------
procedure Set_First_Name (Object : in out User_Ref;
Value : in String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_String (Impl.all, 1, Impl.First_Name, Value);
end Set_First_Name;
procedure Set_First_Name (Object : in out User_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_Unbounded_String (Impl.all, 1, Impl.First_Name, Value);
end Set_First_Name;
function Get_First_Name (Object : in User_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_First_Name);
end Get_First_Name;
function Get_First_Name (Object : in User_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.First_Name;
end Get_First_Name;
procedure Set_Last_Name (Object : in out User_Ref;
Value : in String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_String (Impl.all, 2, Impl.Last_Name, Value);
end Set_Last_Name;
procedure Set_Last_Name (Object : in out User_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_Unbounded_String (Impl.all, 2, Impl.Last_Name, Value);
end Set_Last_Name;
function Get_Last_Name (Object : in User_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Last_Name);
end Get_Last_Name;
function Get_Last_Name (Object : in User_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Last_Name;
end Get_Last_Name;
procedure Set_Country (Object : in out User_Ref;
Value : in String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_String (Impl.all, 3, Impl.Country, Value);
end Set_Country;
procedure Set_Country (Object : in out User_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_Unbounded_String (Impl.all, 3, Impl.Country, Value);
end Set_Country;
function Get_Country (Object : in User_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Country);
end Get_Country;
function Get_Country (Object : in User_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Country;
end Get_Country;
procedure Set_Name (Object : in out User_Ref;
Value : in String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_String (Impl.all, 4, Impl.Name, Value);
end Set_Name;
procedure Set_Name (Object : in out User_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Audits.Set_Field_Unbounded_String (Impl.all, 4, Impl.Name, Value);
end Set_Name;
function Get_Name (Object : in User_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Name);
end Get_Name;
function Get_Name (Object : in User_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Name;
end Get_Name;
function Get_Version (Object : in User_Ref)
return Integer is
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Id (Object : in out User_Ref;
Value : in ADO.Identifier) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 6, Value);
end Set_Id;
function Get_Id (Object : in User_Ref)
return ADO.Identifier is
Impl : constant User_Access
:= User_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Status (Object : in out User_Ref;
Value : in Status_Type) is
procedure Set_Field_Discrete is
new ADO.Audits.Set_Field_Operation
(Status_Type,
Status_Type_Objects.To_Object);
Impl : User_Access;
begin
Set_Field (Object, Impl);
Set_Field_Discrete (Impl.all, 7, Impl.Status, Value);
end Set_Status;
function Get_Status (Object : in User_Ref)
return Status_Type is
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Status;
end Get_Status;
procedure Set_Email (Object : in out User_Ref;
Value : in Email_Ref'Class) is
Impl : User_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 8, Impl.Email, Value);
end Set_Email;
function Get_Email (Object : in User_Ref)
return Email_Ref'Class is
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Email;
end Get_Email;
-- Copy of the object.
procedure Copy (Object : in User_Ref;
Into : in out User_Ref) is
Result : User_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant User_Access
:= User_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant User_Access
:= new User_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.First_Name := Impl.First_Name;
Copy.Last_Name := Impl.Last_Name;
Copy.Country := Impl.Country;
Copy.Name := Impl.Name;
Copy.Version := Impl.Version;
Copy.Status := Impl.Status;
Copy.Email := Impl.Email;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out User_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant User_Access := new User_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 User_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant User_Access := new User_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 User_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant User_Access := new User_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;
procedure Reload (Object : in out User_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean) is
Result : ADO.Objects.Object_Record_Access;
Impl : User_Access;
Query : ADO.SQL.Query;
Id : ADO.Identifier;
begin
if Object.Is_Null then
raise ADO.Objects.NULL_ERROR;
end if;
Object.Prepare_Modify (Result);
Impl := User_Impl (Result.all)'Access;
Id := ADO.Objects.Get_Key_Value (Impl.all);
Query.Bind_Param (Position => 1, Value => Id);
Query.Bind_Param (Position => 2, Value => Impl.Version);
Query.Set_Filter ("id = ? AND version != ?");
declare
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, USER_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Updated := True;
Impl.Load (Stmt, Session);
else
Updated := False;
end if;
end;
end Reload;
overriding
procedure Save (Object : in out User_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 User_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 User_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 User_Impl) is
type User_Impl_Ptr is access all User_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(User_Impl, User_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : User_Impl_Ptr := User_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out User_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, USER_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 User_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 User_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (USER_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_2_NAME, -- first_name
Value => Object.First_Name);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_2_NAME, -- last_name
Value => Object.Last_Name);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_2_NAME, -- country
Value => Object.Country);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_2_NAME, -- name
Value => Object.Name);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_2_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (6);
end if;
if Object.Is_Modified (7) then
Stmt.Save_Field (Name => COL_6_2_NAME, -- status
Value => Integer (Status_Type'Enum_Rep (Object.Status)));
Object.Clear_Modified (7);
end if;
if Object.Is_Modified (8) then
Stmt.Save_Field (Name => COL_7_2_NAME, -- email_id
Value => Object.Email);
Object.Clear_Modified (8);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
ADO.Audits.Save (Object, Session);
end;
end if;
end Save;
overriding
procedure Create (Object : in out User_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (USER_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Query.Save_Field (Name => COL_0_2_NAME, -- first_name
Value => Object.First_Name);
Query.Save_Field (Name => COL_1_2_NAME, -- last_name
Value => Object.Last_Name);
Query.Save_Field (Name => COL_2_2_NAME, -- country
Value => Object.Country);
Query.Save_Field (Name => COL_3_2_NAME, -- name
Value => Object.Name);
Query.Save_Field (Name => COL_4_2_NAME, -- version
Value => Object.Version);
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_5_2_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_6_2_NAME, -- status
Value => Integer (Status_Type'Enum_Rep (Object.Status)));
Query.Save_Field (Name => COL_7_2_NAME, -- email_id
Value => Object.Email);
Query.Execute (Result);
if Result /= 1 then
raise ADO.Objects.INSERT_ERROR;
end if;
ADO.Objects.Set_Created (Object);
ADO.Audits.Save (Object, Session);
end Create;
overriding
procedure Delete (Object : in out User_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (USER_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 User_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access User_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := User_Impl (Obj.all)'Access;
if Name = "first_name" then
return Util.Beans.Objects.To_Object (Impl.First_Name);
elsif Name = "last_name" then
return Util.Beans.Objects.To_Object (Impl.Last_Name);
elsif Name = "country" then
return Util.Beans.Objects.To_Object (Impl.Country);
elsif 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 = "status" then
return Status_Type_Objects.To_Object (Impl.Status);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out User_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.First_Name := Stmt.Get_Unbounded_String (0);
Object.Last_Name := Stmt.Get_Unbounded_String (1);
Object.Country := Stmt.Get_Unbounded_String (2);
Object.Name := Stmt.Get_Unbounded_String (3);
Object.Set_Key_Value (Stmt.Get_Identifier (5));
Object.Status := Status_Type'Enum_Val (Stmt.Get_Integer (6));
if not Stmt.Is_Null (7) then
Object.Email.Set_Key_Value (Stmt.Get_Identifier (7), Session);
end if;
Object.Version := Stmt.Get_Integer (4);
ADO.Objects.Set_Created (Object);
end Load;
function Access_Key_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => ACCESS_KEY_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Access_Key_Key;
function Access_Key_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => ACCESS_KEY_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Access_Key_Key;
function "=" (Left, Right : Access_Key_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 Access_Key_Ref'Class;
Impl : out Access_Key_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Access_Key_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Access_Key_Ref) is
Impl : Access_Key_Access;
begin
Impl := new Access_Key_Impl;
Impl.Expire_Date := ADO.DEFAULT_TIME;
Impl.Version := 0;
Impl.Kind := Key_Type'First;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Access_Key
-- ----------------------------------------
procedure Set_Access_Key (Object : in out Access_Key_Ref;
Value : in String) is
Impl : Access_Key_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 1, Impl.Access_Key, Value);
end Set_Access_Key;
procedure Set_Access_Key (Object : in out Access_Key_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Access_Key_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 1, Impl.Access_Key, Value);
end Set_Access_Key;
function Get_Access_Key (Object : in Access_Key_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Access_Key);
end Get_Access_Key;
function Get_Access_Key (Object : in Access_Key_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Access_Key_Access
:= Access_Key_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Access_Key;
end Get_Access_Key;
procedure Set_Expire_Date (Object : in out Access_Key_Ref;
Value : in Ada.Calendar.Time) is
Impl : Access_Key_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 2, Impl.Expire_Date, Value);
end Set_Expire_Date;
function Get_Expire_Date (Object : in Access_Key_Ref)
return Ada.Calendar.Time is
Impl : constant Access_Key_Access
:= Access_Key_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Expire_Date;
end Get_Expire_Date;
procedure Set_Id (Object : in out Access_Key_Ref;
Value : in ADO.Identifier) is
Impl : Access_Key_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 3, Value);
end Set_Id;
function Get_Id (Object : in Access_Key_Ref)
return ADO.Identifier is
Impl : constant Access_Key_Access
:= Access_Key_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
function Get_Version (Object : in Access_Key_Ref)
return Integer is
Impl : constant Access_Key_Access
:= Access_Key_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Kind (Object : in out Access_Key_Ref;
Value : in Key_Type) is
procedure Set_Field_Discrete is
new ADO.Objects.Set_Field_Operation
(Key_Type);
Impl : Access_Key_Access;
begin
Set_Field (Object, Impl);
Set_Field_Discrete (Impl.all, 5, Impl.Kind, Value);
end Set_Kind;
function Get_Kind (Object : in Access_Key_Ref)
return Key_Type is
Impl : constant Access_Key_Access
:= Access_Key_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Kind;
end Get_Kind;
procedure Set_User (Object : in out Access_Key_Ref;
Value : in User_Ref'Class) is
Impl : Access_Key_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 6, Impl.User, Value);
end Set_User;
function Get_User (Object : in Access_Key_Ref)
return User_Ref'Class is
Impl : constant Access_Key_Access
:= Access_Key_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.User;
end Get_User;
-- Copy of the object.
procedure Copy (Object : in Access_Key_Ref;
Into : in out Access_Key_Ref) is
Result : Access_Key_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Access_Key_Access
:= Access_Key_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Access_Key_Access
:= new Access_Key_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Access_Key := Impl.Access_Key;
Copy.Expire_Date := Impl.Expire_Date;
Copy.Version := Impl.Version;
Copy.Kind := Impl.Kind;
Copy.User := Impl.User;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Access_Key_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Access_Key_Access := new Access_Key_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 Access_Key_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Access_Key_Access := new Access_Key_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 Access_Key_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Access_Key_Access := new Access_Key_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;
procedure Reload (Object : in out Access_Key_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean) is
Result : ADO.Objects.Object_Record_Access;
Impl : Access_Key_Access;
Query : ADO.SQL.Query;
Id : ADO.Identifier;
begin
if Object.Is_Null then
raise ADO.Objects.NULL_ERROR;
end if;
Object.Prepare_Modify (Result);
Impl := Access_Key_Impl (Result.all)'Access;
Id := ADO.Objects.Get_Key_Value (Impl.all);
Query.Bind_Param (Position => 1, Value => Id);
Query.Bind_Param (Position => 2, Value => Impl.Version);
Query.Set_Filter ("id = ? AND version != ?");
declare
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, ACCESS_KEY_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Updated := True;
Impl.Load (Stmt, Session);
else
Updated := False;
end if;
end;
end Reload;
overriding
procedure Save (Object : in out Access_Key_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 Access_Key_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 Access_Key_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 Access_Key_Impl) is
type Access_Key_Impl_Ptr is access all Access_Key_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Access_Key_Impl, Access_Key_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Access_Key_Impl_Ptr := Access_Key_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Access_Key_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, ACCESS_KEY_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 Access_Key_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 Access_Key_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (ACCESS_KEY_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_3_NAME, -- access_key
Value => Object.Access_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_3_NAME, -- expire_date
Value => Object.Expire_Date);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_3_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_3_NAME, -- kind
Value => Integer (Key_Type'Enum_Rep (Object.Kind)));
Object.Clear_Modified (5);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_3_NAME, -- user_id
Value => Object.User);
Object.Clear_Modified (6);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
overriding
procedure Create (Object : in out Access_Key_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (ACCESS_KEY_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Query.Save_Field (Name => COL_0_3_NAME, -- access_key
Value => Object.Access_Key);
Query.Save_Field (Name => COL_1_3_NAME, -- expire_date
Value => Object.Expire_Date);
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_2_3_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_3_3_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_4_3_NAME, -- kind
Value => Integer (Key_Type'Enum_Rep (Object.Kind)));
Query.Save_Field (Name => COL_5_3_NAME, -- user_id
Value => Object.User);
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 Access_Key_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (ACCESS_KEY_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 Access_Key_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Access_Key_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Access_Key_Impl (Obj.all)'Access;
if Name = "access_key" then
return Util.Beans.Objects.To_Object (Impl.Access_Key);
elsif Name = "expire_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Expire_Date);
elsif Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "kind" then
return Key_Type_Objects.To_Object (Impl.Kind);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Access_Key_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Access_Key := Stmt.Get_Unbounded_String (0);
Object.Expire_Date := Stmt.Get_Time (1);
Object.Set_Key_Value (Stmt.Get_Identifier (2));
Object.Kind := Key_Type'Enum_Val (Stmt.Get_Integer (4));
if not Stmt.Is_Null (5) then
Object.User.Set_Key_Value (Stmt.Get_Identifier (5), Session);
end if;
Object.Version := Stmt.Get_Integer (3);
ADO.Objects.Set_Created (Object);
end Load;
function Authenticate_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => AUTHENTICATE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Authenticate_Key;
function Authenticate_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => AUTHENTICATE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Authenticate_Key;
function "=" (Left, Right : Authenticate_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 Authenticate_Ref'Class;
Impl : out Authenticate_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Authenticate_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Authenticate_Ref) is
Impl : Authenticate_Access;
begin
Impl := new Authenticate_Impl;
Impl.Version := 0;
Impl.Method := Authenticate_Type'First;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Authenticate
-- ----------------------------------------
procedure Set_Id (Object : in out Authenticate_Ref;
Value : in ADO.Identifier) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Authenticate_Ref)
return ADO.Identifier is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
function Get_Version (Object : in Authenticate_Ref)
return Integer is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Ident (Object : in out Authenticate_Ref;
Value : in String) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Ident, Value);
end Set_Ident;
procedure Set_Ident (Object : in out Authenticate_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 3, Impl.Ident, Value);
end Set_Ident;
function Get_Ident (Object : in Authenticate_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Ident);
end Get_Ident;
function Get_Ident (Object : in Authenticate_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Ident;
end Get_Ident;
procedure Set_Salt (Object : in out Authenticate_Ref;
Value : in String) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 4, Impl.Salt, Value);
end Set_Salt;
procedure Set_Salt (Object : in out Authenticate_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 4, Impl.Salt, Value);
end Set_Salt;
function Get_Salt (Object : in Authenticate_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Salt);
end Get_Salt;
function Get_Salt (Object : in Authenticate_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Salt;
end Get_Salt;
procedure Set_Hash (Object : in out Authenticate_Ref;
Value : in String) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 5, Impl.Hash, Value);
end Set_Hash;
procedure Set_Hash (Object : in out Authenticate_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 5, Impl.Hash, Value);
end Set_Hash;
function Get_Hash (Object : in Authenticate_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Hash);
end Get_Hash;
function Get_Hash (Object : in Authenticate_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Hash;
end Get_Hash;
procedure Set_Method (Object : in out Authenticate_Ref;
Value : in Authenticate_Type) is
procedure Set_Field_Discrete is
new ADO.Objects.Set_Field_Operation
(Authenticate_Type);
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
Set_Field_Discrete (Impl.all, 6, Impl.Method, Value);
end Set_Method;
function Get_Method (Object : in Authenticate_Ref)
return Authenticate_Type is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Method;
end Get_Method;
procedure Set_Email (Object : in out Authenticate_Ref;
Value : in Email_Ref'Class) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 7, Impl.Email, Value);
end Set_Email;
function Get_Email (Object : in Authenticate_Ref)
return Email_Ref'Class is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Email;
end Get_Email;
procedure Set_User (Object : in out Authenticate_Ref;
Value : in User_Ref'Class) is
Impl : Authenticate_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 8, Impl.User, Value);
end Set_User;
function Get_User (Object : in Authenticate_Ref)
return User_Ref'Class is
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.User;
end Get_User;
-- Copy of the object.
procedure Copy (Object : in Authenticate_Ref;
Into : in out Authenticate_Ref) is
Result : Authenticate_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Authenticate_Access
:= Authenticate_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Authenticate_Access
:= new Authenticate_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Version := Impl.Version;
Copy.Ident := Impl.Ident;
Copy.Salt := Impl.Salt;
Copy.Hash := Impl.Hash;
Copy.Method := Impl.Method;
Copy.Email := Impl.Email;
Copy.User := Impl.User;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Authenticate_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Authenticate_Access := new Authenticate_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 Authenticate_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Authenticate_Access := new Authenticate_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 Authenticate_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Authenticate_Access := new Authenticate_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;
procedure Reload (Object : in out Authenticate_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean) is
Result : ADO.Objects.Object_Record_Access;
Impl : Authenticate_Access;
Query : ADO.SQL.Query;
Id : ADO.Identifier;
begin
if Object.Is_Null then
raise ADO.Objects.NULL_ERROR;
end if;
Object.Prepare_Modify (Result);
Impl := Authenticate_Impl (Result.all)'Access;
Id := ADO.Objects.Get_Key_Value (Impl.all);
Query.Bind_Param (Position => 1, Value => Id);
Query.Bind_Param (Position => 2, Value => Impl.Version);
Query.Set_Filter ("id = ? AND version != ?");
declare
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, AUTHENTICATE_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Updated := True;
Impl.Load (Stmt, Session);
else
Updated := False;
end if;
end;
end Reload;
overriding
procedure Save (Object : in out Authenticate_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 Authenticate_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 Authenticate_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 Authenticate_Impl) is
type Authenticate_Impl_Ptr is access all Authenticate_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Authenticate_Impl, Authenticate_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Authenticate_Impl_Ptr := Authenticate_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Authenticate_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, AUTHENTICATE_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 Authenticate_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 Authenticate_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (AUTHENTICATE_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_4_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_4_NAME, -- ident
Value => Object.Ident);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_4_NAME, -- salt
Value => Object.Salt);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_4_NAME, -- hash
Value => Object.Hash);
Object.Clear_Modified (5);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_4_NAME, -- method
Value => Integer (Authenticate_Type'Enum_Rep (Object.Method)));
Object.Clear_Modified (6);
end if;
if Object.Is_Modified (7) then
Stmt.Save_Field (Name => COL_6_4_NAME, -- email_id
Value => Object.Email);
Object.Clear_Modified (7);
end if;
if Object.Is_Modified (8) then
Stmt.Save_Field (Name => COL_7_4_NAME, -- user_id
Value => Object.User);
Object.Clear_Modified (8);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
overriding
procedure Create (Object : in out Authenticate_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (AUTHENTICATE_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_4_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_4_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_2_4_NAME, -- ident
Value => Object.Ident);
Query.Save_Field (Name => COL_3_4_NAME, -- salt
Value => Object.Salt);
Query.Save_Field (Name => COL_4_4_NAME, -- hash
Value => Object.Hash);
Query.Save_Field (Name => COL_5_4_NAME, -- method
Value => Integer (Authenticate_Type'Enum_Rep (Object.Method)));
Query.Save_Field (Name => COL_6_4_NAME, -- email_id
Value => Object.Email);
Query.Save_Field (Name => COL_7_4_NAME, -- user_id
Value => Object.User);
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 Authenticate_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (AUTHENTICATE_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 Authenticate_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Authenticate_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Authenticate_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "ident" then
return Util.Beans.Objects.To_Object (Impl.Ident);
elsif Name = "salt" then
return Util.Beans.Objects.To_Object (Impl.Salt);
elsif Name = "hash" then
return Util.Beans.Objects.To_Object (Impl.Hash);
elsif Name = "method" then
return Authenticate_Type_Objects.To_Object (Impl.Method);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
procedure List (Object : in out Authenticate_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, AUTHENTICATE_DEF'Access);
begin
Stmt.Execute;
Authenticate_Vectors.Clear (Object);
while Stmt.Has_Elements loop
declare
Item : Authenticate_Ref;
Impl : constant Authenticate_Access := new Authenticate_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 Authenticate_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Ident := Stmt.Get_Unbounded_String (2);
Object.Salt := Stmt.Get_Unbounded_String (3);
Object.Hash := Stmt.Get_Unbounded_String (4);
Object.Method := Authenticate_Type'Enum_Val (Stmt.Get_Integer (5));
if not Stmt.Is_Null (6) then
Object.Email.Set_Key_Value (Stmt.Get_Identifier (6), Session);
end if;
if not Stmt.Is_Null (7) then
Object.User.Set_Key_Value (Stmt.Get_Identifier (7), Session);
end if;
Object.Version := Stmt.Get_Integer (1);
ADO.Objects.Set_Created (Object);
end Load;
function Session_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => SESSION_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Session_Key;
function Session_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => SESSION_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Session_Key;
function "=" (Left, Right : Session_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 Session_Ref'Class;
Impl : out Session_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Session_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Session_Ref) is
Impl : Session_Access;
begin
Impl := new Session_Impl;
Impl.Start_Date := ADO.DEFAULT_TIME;
Impl.End_Date.Is_Null := True;
Impl.Stype := Session_Type'First;
Impl.Version := 0;
Impl.Server_Id := 0;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Session
-- ----------------------------------------
procedure Set_Start_Date (Object : in out Session_Ref;
Value : in Ada.Calendar.Time) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 1, Impl.Start_Date, Value);
end Set_Start_Date;
function Get_Start_Date (Object : in Session_Ref)
return Ada.Calendar.Time is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Start_Date;
end Get_Start_Date;
procedure Set_End_Date (Object : in out Session_Ref;
Value : in ADO.Nullable_Time) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 2, Impl.End_Date, Value);
end Set_End_Date;
function Get_End_Date (Object : in Session_Ref)
return ADO.Nullable_Time is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.End_Date;
end Get_End_Date;
procedure Set_Ip_Address (Object : in out Session_Ref;
Value : in String) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Ip_Address, Value);
end Set_Ip_Address;
procedure Set_Ip_Address (Object : in out Session_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 3, Impl.Ip_Address, Value);
end Set_Ip_Address;
function Get_Ip_Address (Object : in Session_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Ip_Address);
end Get_Ip_Address;
function Get_Ip_Address (Object : in Session_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Ip_Address;
end Get_Ip_Address;
procedure Set_Stype (Object : in out Session_Ref;
Value : in Session_Type) is
procedure Set_Field_Discrete is
new ADO.Objects.Set_Field_Operation
(Session_Type);
Impl : Session_Access;
begin
Set_Field (Object, Impl);
Set_Field_Discrete (Impl.all, 4, Impl.Stype, Value);
end Set_Stype;
function Get_Stype (Object : in Session_Ref)
return Session_Type is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Stype;
end Get_Stype;
function Get_Version (Object : in Session_Ref)
return Integer is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Server_Id (Object : in out Session_Ref;
Value : in Integer) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Integer (Impl.all, 6, Impl.Server_Id, Value);
end Set_Server_Id;
function Get_Server_Id (Object : in Session_Ref)
return Integer is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Server_Id;
end Get_Server_Id;
procedure Set_Id (Object : in out Session_Ref;
Value : in ADO.Identifier) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 7, Value);
end Set_Id;
function Get_Id (Object : in Session_Ref)
return ADO.Identifier is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Auth (Object : in out Session_Ref;
Value : in Session_Ref'Class) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 8, Impl.Auth, Value);
end Set_Auth;
function Get_Auth (Object : in Session_Ref)
return Session_Ref'Class is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Auth;
end Get_Auth;
procedure Set_User (Object : in out Session_Ref;
Value : in User_Ref'Class) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 9, Impl.User, Value);
end Set_User;
function Get_User (Object : in Session_Ref)
return User_Ref'Class is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.User;
end Get_User;
procedure Set_User_Auth (Object : in out Session_Ref;
Value : in Authenticate_Ref'Class) is
Impl : Session_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 10, Impl.User_Auth, Value);
end Set_User_Auth;
function Get_User_Auth (Object : in Session_Ref)
return Authenticate_Ref'Class is
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.User_Auth;
end Get_User_Auth;
-- Copy of the object.
procedure Copy (Object : in Session_Ref;
Into : in out Session_Ref) is
Result : Session_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Session_Access
:= Session_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Session_Access
:= new Session_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Start_Date := Impl.Start_Date;
Copy.End_Date := Impl.End_Date;
Copy.Ip_Address := Impl.Ip_Address;
Copy.Stype := Impl.Stype;
Copy.Version := Impl.Version;
Copy.Server_Id := Impl.Server_Id;
Copy.Auth := Impl.Auth;
Copy.User := Impl.User;
Copy.User_Auth := Impl.User_Auth;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Session_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Session_Access := new Session_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 Session_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Session_Access := new Session_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 Session_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Session_Access := new Session_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;
procedure Reload (Object : in out Session_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean) is
Result : ADO.Objects.Object_Record_Access;
Impl : Session_Access;
Query : ADO.SQL.Query;
Id : ADO.Identifier;
begin
if Object.Is_Null then
raise ADO.Objects.NULL_ERROR;
end if;
Object.Prepare_Modify (Result);
Impl := Session_Impl (Result.all)'Access;
Id := ADO.Objects.Get_Key_Value (Impl.all);
Query.Bind_Param (Position => 1, Value => Id);
Query.Bind_Param (Position => 2, Value => Impl.Version);
Query.Set_Filter ("id = ? AND version != ?");
declare
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, SESSION_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Updated := True;
Impl.Load (Stmt, Session);
else
Updated := False;
end if;
end;
end Reload;
overriding
procedure Save (Object : in out Session_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 Session_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 Session_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 Session_Impl) is
type Session_Impl_Ptr is access all Session_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Session_Impl, Session_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Session_Impl_Ptr := Session_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Session_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, SESSION_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 Session_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 Session_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (SESSION_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_5_NAME, -- start_date
Value => Object.Start_Date);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_5_NAME, -- end_date
Value => Object.End_Date);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_5_NAME, -- ip_address
Value => Object.Ip_Address);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_5_NAME, -- stype
Value => Integer (Session_Type'Enum_Rep (Object.Stype)));
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_5_NAME, -- server_id
Value => Object.Server_Id);
Object.Clear_Modified (6);
end if;
if Object.Is_Modified (7) then
Stmt.Save_Field (Name => COL_6_5_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (7);
end if;
if Object.Is_Modified (8) then
Stmt.Save_Field (Name => COL_7_5_NAME, -- auth_id
Value => Object.Auth);
Object.Clear_Modified (8);
end if;
if Object.Is_Modified (9) then
Stmt.Save_Field (Name => COL_8_5_NAME, -- user_id
Value => Object.User);
Object.Clear_Modified (9);
end if;
if Object.Is_Modified (10) then
Stmt.Save_Field (Name => COL_9_5_NAME, -- user_auth_id
Value => Object.User_Auth);
Object.Clear_Modified (10);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
overriding
procedure Create (Object : in out Session_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (SESSION_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Query.Save_Field (Name => COL_0_5_NAME, -- start_date
Value => Object.Start_Date);
Query.Save_Field (Name => COL_1_5_NAME, -- end_date
Value => Object.End_Date);
Query.Save_Field (Name => COL_2_5_NAME, -- ip_address
Value => Object.Ip_Address);
Query.Save_Field (Name => COL_3_5_NAME, -- stype
Value => Integer (Session_Type'Enum_Rep (Object.Stype)));
Query.Save_Field (Name => COL_4_5_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_5_5_NAME, -- server_id
Value => Object.Server_Id);
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_6_5_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_7_5_NAME, -- auth_id
Value => Object.Auth);
Query.Save_Field (Name => COL_8_5_NAME, -- user_id
Value => Object.User);
Query.Save_Field (Name => COL_9_5_NAME, -- user_auth_id
Value => Object.User_Auth);
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 Session_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (SESSION_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 Session_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Session_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Session_Impl (Obj.all)'Access;
if Name = "start_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Start_Date);
elsif Name = "end_date" then
if Impl.End_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (Impl.End_Date.Value);
end if;
elsif Name = "ip_address" then
return Util.Beans.Objects.To_Object (Impl.Ip_Address);
elsif Name = "stype" then
return Session_Type_Objects.To_Object (Impl.Stype);
elsif Name = "server_id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Server_Id));
elsif Name = "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 Session_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Start_Date := Stmt.Get_Time (0);
Object.End_Date := Stmt.Get_Nullable_Time (1);
Object.Ip_Address := Stmt.Get_Unbounded_String (2);
Object.Stype := Session_Type'Enum_Val (Stmt.Get_Integer (3));
Object.Server_Id := Stmt.Get_Integer (5);
Object.Set_Key_Value (Stmt.Get_Identifier (6));
if not Stmt.Is_Null (7) then
Object.Auth.Set_Key_Value (Stmt.Get_Identifier (7), Session);
end if;
if not Stmt.Is_Null (8) then
Object.User.Set_Key_Value (Stmt.Get_Identifier (8), Session);
end if;
if not Stmt.Is_Null (9) then
Object.User_Auth.Set_Key_Value (Stmt.Get_Identifier (9), Session);
end if;
Object.Version := Stmt.Get_Integer (4);
ADO.Objects.Set_Created (Object);
end Load;
procedure Op_Authenticate (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Authenticate (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Authenticate_Bean'Class (Bean).Authenticate (Outcome);
end Op_Authenticate;
package Binding_Authenticate_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Authenticate_Bean,
Method => Op_Authenticate,
Name => "authenticate");
procedure Op_Register (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Register (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Authenticate_Bean'Class (Bean).Register (Outcome);
end Op_Register;
package Binding_Authenticate_Bean_2 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Authenticate_Bean,
Method => Op_Register,
Name => "register");
procedure Op_Lost_Password (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Lost_Password (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Authenticate_Bean'Class (Bean).Lost_Password (Outcome);
end Op_Lost_Password;
package Binding_Authenticate_Bean_3 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Authenticate_Bean,
Method => Op_Lost_Password,
Name => "lost_password");
procedure Op_Logout (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Logout (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Authenticate_Bean'Class (Bean).Logout (Outcome);
end Op_Logout;
package Binding_Authenticate_Bean_4 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Authenticate_Bean,
Method => Op_Logout,
Name => "logout");
procedure Op_Load (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Authenticate_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Authenticate_Bean_5 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Authenticate_Bean,
Method => Op_Load,
Name => "load");
procedure Op_Auth_Error (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Auth_Error (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Authenticate_Bean'Class (Bean).Auth_Error (Outcome);
end Op_Auth_Error;
package Binding_Authenticate_Bean_6 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Authenticate_Bean,
Method => Op_Auth_Error,
Name => "auth_error");
procedure Op_Reset_Password (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Reset_Password (Bean : in out Authenticate_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Authenticate_Bean'Class (Bean).Reset_Password (Outcome);
end Op_Reset_Password;
package Binding_Authenticate_Bean_7 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Authenticate_Bean,
Method => Op_Reset_Password,
Name => "reset_password");
Binding_Authenticate_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Authenticate_Bean_1.Proxy'Access,
2 => Binding_Authenticate_Bean_2.Proxy'Access,
3 => Binding_Authenticate_Bean_3.Proxy'Access,
4 => Binding_Authenticate_Bean_4.Proxy'Access,
5 => Binding_Authenticate_Bean_5.Proxy'Access,
6 => Binding_Authenticate_Bean_6.Proxy'Access,
7 => Binding_Authenticate_Bean_7.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Authenticate_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Authenticate_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Authenticate_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Authenticate_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
null;
end Set_Value;
end AWA.Users.Models;
|
python36/0xfa | Ada | 2,869 | adb | package body getter.for_loop is
function get return character is
use type pos_count;
c : character;
begin
if cur_for_loop.last > unb.length(cur_for_loop.code) then
cur_for_loop.cur_line := cur_for_loop.first_line;
cur_for_loop.last := 1;
inc(cur_for_loop.cur_i);
if cur_for_loop.cur_i > cur_for_loop.end_i then
pop;
environment.delete(cur_for_loop.cursor);
for_loops.delete_last;
if not for_loops_t.is_empty(for_loops) then
cur_for_loop := for_loops_t.last_element(for_loops);
end if;
else
environment.replace_element(cur_for_loop.cursor, word(cur_for_loop.cur_i));
end if;
return ' ';
end if;
c := unb.element(cur_for_loop.code, cur_for_loop.last);
if c = ascii.lf then
cur_for_loop.cur_line := cur_for_loop.cur_line + 1;
set_line(cur_for_loop.cur_line);
end if;
inc(cur_for_loop.last);
return c;
end get;
procedure create (start_i, end_i : word; var : environment_t.cursor) is
ofs : natural := 1;
eqs_start : natural := 1;
eqs_end : natural := 1;
len_start : constant natural := for_statement'length;
len_end : constant natural := end_for_statement'length;
c : character;
begin
tmp_for_loop.code := unb.to_unbounded_string(" ");
tmp_for_loop.first_line := get_line;
tmp_for_loop.cur_line := tmp_for_loop.first_line;
tmp_for_loop.cursor := var;
tmp_for_loop.start_i := natural(start_i);
tmp_for_loop.cur_i := tmp_for_loop.start_i;
tmp_for_loop.end_i := natural(end_i);
environment.replace_element(var, start_i);
loop
c := getter.get(false);
if c = ascii.nul then
raise ERROR_NO_CLOSED;
end if;
if for_statement(eqs_start) = c and then unb.element(tmp_for_loop.code, unb.length(tmp_for_loop.code) - eqs_start + 1) in ' '|ascii.lf then
inc(eqs_start);
if eqs_start > len_start then
inc(ofs);
eqs_start := 1;
end if;
else
eqs_start := 1;
end if;
if end_for_statement(eqs_end) = c and then unb.element(tmp_for_loop.code, unb.length(tmp_for_loop.code) - eqs_end + 1) in ' '|ascii.lf then
inc(eqs_end);
if eqs_end > len_end then
eqs_end := 1;
dec(ofs);
if ofs = 0 then
unb.delete(tmp_for_loop.code, unb.length(tmp_for_loop.code) - 6, unb.length(tmp_for_loop.code));
exit;
end if;
end if;
else
eqs_end := 1;
end if;
unb.append(tmp_for_loop.code, c);
end loop;
if not for_loops_t.is_empty(for_loops) then
for_loops.replace_element(for_loops_t.last(for_loops), cur_for_loop);
end if;
for_loops.append(tmp_for_loop);
cur_for_loop := tmp_for_loop;
getter.push(get'access);
end create;
end getter.for_loop; |
AdaCore/ada-traits-containers | Ada | 3,956 | ads | --
-- Copyright (C) 2015-2016, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
--
-- This package provides support for unbounded list, compatible with SPARK.
-- It uses an resizable array of access types. It is resizable so that there
-- is no upper-limit on the size of the list. Since it is an array, cursors
-- are indexes into this array, not actual access types, so that we can write
-- pre and post-conditions conveniently.
pragma Ada_2012;
with Conts.Elements;
generic
with package Elements is new Conts.Elements.Traits (<>);
type Container_Base_Type is abstract tagged limited private;
-- The base type for these unbounded lists
package Conts.Lists.Storage.Unbounded_SPARK with SPARK_Mode is
pragma Assertion_Policy
(Pre => Suppressible, Ghost => Suppressible, Post => Ignore);
type Node_Access is new Count_Type;
Null_Node_Access : constant Node_Access := 0;
type Node is record
Element : Elements.Stored_Type;
Previous, Next : Node_Access := Null_Node_Access;
end record;
type Big_Nodes_Array is array (1 .. Count_Type'Last) of Node;
package Private_Nodes_List with SPARK_Mode is
type Nodes_List is abstract new Container_Base_Type with private;
procedure Allocate
(Self : in out Nodes_List'Class;
Element : Elements.Stored_Type;
N : out Node_Access); -- not inlined
procedure Release (Self : in out Nodes_List'Class);
function Get_Element
(Self : Nodes_List'Class; N : Node_Access)
return Elements.Stored_Type
with Inline;
function Get_Next
(Self : Nodes_List'Class; N : Node_Access) return Node_Access
with Inline;
function Get_Previous
(Self : Nodes_List'Class; N : Node_Access) return Node_Access
with Inline;
procedure Set_Next
(Self : in out Nodes_List'Class; N, Next : Node_Access)
with Inline;
procedure Set_Previous
(Self : in out Nodes_List'Class; N, Previous : Node_Access)
with Inline;
procedure Set_Element
(Self : in out Nodes_List'Class;
N : Node_Access;
E : Elements.Stored_Type) with Inline;
function Capacity (Self : Nodes_List'Class) return Count_Type
is (Count_Type'Last) with Inline;
procedure Assign
(Nodes : in out Nodes_List'Class;
Source : Nodes_List'Class;
New_Head : out Node_Access;
Old_Head : Node_Access;
New_Tail : out Node_Access;
Old_Tail : Node_Access);
private
pragma SPARK_Mode (Off);
type Nodes_Array_Access is access Big_Nodes_Array;
for Nodes_Array_Access'Storage_Size use 0;
-- The nodes is a pointer so that we can use realloc
type Nodes_List is abstract new Container_Base_Type with record
Nodes : Nodes_Array_Access := null;
Last : Count_Type := 0; -- Last valid index in Nodes
Free : Integer := 0; -- head of free nodes list
-- For a negative value, its absolute value points to the first
-- free element
end record;
function Get_Element
(Self : Nodes_List'Class; N : Node_Access)
return Elements.Stored_Type
is (Self.Nodes (Count_Type (N)).Element);
function Get_Next
(Self : Nodes_List'Class; N : Node_Access) return Node_Access
is (Self.Nodes (Count_Type (N)).Next);
function Get_Previous
(Self : Nodes_List'Class; N : Node_Access) return Node_Access
is (Self.Nodes (Count_Type (N)).Previous);
end Private_Nodes_List;
use Private_Nodes_List;
package Traits is new Conts.Lists.Storage.Traits
(Elements => Elements,
Container => Nodes_List,
Node_Access => Node_Access,
Null_Access => Null_Node_Access,
Allocate => Allocate,
Release => Release);
end Conts.Lists.Storage.Unbounded_SPARK;
|
stcarrez/ada-awa | Ada | 79,081 | adb | -----------------------------------------------------------------------
-- AWA.Workspaces.Models -- AWA.Workspaces.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;
with AWA.Events.Action_Method;
pragma Warnings (On);
package body AWA.Workspaces.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 Workspace_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Key;
function Workspace_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Key;
function "=" (Left, Right : Workspace_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 Workspace_Ref'Class;
Impl : out Workspace_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Workspace_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Workspace_Ref) is
Impl : Workspace_Access;
begin
Impl := new Workspace_Impl;
Impl.Version := 0;
Impl.Create_Date := ADO.DEFAULT_TIME;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Workspace
-- ----------------------------------------
procedure Set_Id (Object : in out Workspace_Ref;
Value : in ADO.Identifier) is
Impl : Workspace_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Workspace_Ref)
return ADO.Identifier is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
function Get_Version (Object : in Workspace_Ref)
return Integer is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Create_Date (Object : in out Workspace_Ref;
Value : in Ada.Calendar.Time) is
Impl : Workspace_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 3, Impl.Create_Date, Value);
end Set_Create_Date;
function Get_Create_Date (Object : in Workspace_Ref)
return Ada.Calendar.Time is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Create_Date;
end Get_Create_Date;
procedure Set_Owner (Object : in out Workspace_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Workspace_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 4, Impl.Owner, Value);
end Set_Owner;
function Get_Owner (Object : in Workspace_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Owner;
end Get_Owner;
-- Copy of the object.
procedure Copy (Object : in Workspace_Ref;
Into : in out Workspace_Ref) is
Result : Workspace_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Workspace_Access
:= new Workspace_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Version := Impl.Version;
Copy.Create_Date := Impl.Create_Date;
Copy.Owner := Impl.Owner;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Workspace_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Workspace_Access := new Workspace_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 Workspace_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Workspace_Access := new Workspace_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 Workspace_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Workspace_Access := new Workspace_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;
procedure Reload (Object : in out Workspace_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean) is
Result : ADO.Objects.Object_Record_Access;
Impl : Workspace_Access;
Query : ADO.SQL.Query;
Id : ADO.Identifier;
begin
if Object.Is_Null then
raise ADO.Objects.NULL_ERROR;
end if;
Object.Prepare_Modify (Result);
Impl := Workspace_Impl (Result.all)'Access;
Id := ADO.Objects.Get_Key_Value (Impl.all);
Query.Bind_Param (Position => 1, Value => Id);
Query.Bind_Param (Position => 2, Value => Impl.Version);
Query.Set_Filter ("id = ? AND version != ?");
declare
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, WORKSPACE_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Updated := True;
Impl.Load (Stmt, Session);
else
Updated := False;
end if;
end;
end Reload;
overriding
procedure Save (Object : in out Workspace_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 Workspace_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 Workspace_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 Workspace_Impl) is
type Workspace_Impl_Ptr is access all Workspace_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Workspace_Impl, Workspace_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Workspace_Impl_Ptr := Workspace_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Workspace_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, WORKSPACE_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 Workspace_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 Workspace_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (WORKSPACE_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_1_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_1_NAME, -- create_date
Value => Object.Create_Date);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_1_NAME, -- owner_id
Value => Object.Owner);
Object.Clear_Modified (4);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
overriding
procedure Create (Object : in out Workspace_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (WORKSPACE_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_1_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_1_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_2_1_NAME, -- create_date
Value => Object.Create_Date);
Query.Save_Field (Name => COL_3_1_NAME, -- owner_id
Value => Object.Owner);
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 Workspace_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (WORKSPACE_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 Workspace_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Workspace_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Workspace_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "create_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Create_Date);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Workspace_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Create_Date := Stmt.Get_Time (2);
if not Stmt.Is_Null (3) then
Object.Owner.Set_Key_Value (Stmt.Get_Identifier (3), Session);
end if;
Object.Version := Stmt.Get_Integer (1);
ADO.Objects.Set_Created (Object);
end Load;
function Workspace_Member_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_MEMBER_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Member_Key;
function Workspace_Member_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_MEMBER_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Member_Key;
function "=" (Left, Right : Workspace_Member_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 Workspace_Member_Ref'Class;
Impl : out Workspace_Member_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Workspace_Member_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Workspace_Member_Ref) is
Impl : Workspace_Member_Access;
begin
Impl := new Workspace_Member_Impl;
Impl.Join_Date.Is_Null := True;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Workspace_Member
-- ----------------------------------------
procedure Set_Id (Object : in out Workspace_Member_Ref;
Value : in ADO.Identifier) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Workspace_Member_Ref)
return ADO.Identifier is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Join_Date (Object : in out Workspace_Member_Ref;
Value : in ADO.Nullable_Time) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 2, Impl.Join_Date, Value);
end Set_Join_Date;
function Get_Join_Date (Object : in Workspace_Member_Ref)
return ADO.Nullable_Time is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Join_Date;
end Get_Join_Date;
procedure Set_Role (Object : in out Workspace_Member_Ref;
Value : in String) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Role, Value);
end Set_Role;
procedure Set_Role (Object : in out Workspace_Member_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 3, Impl.Role, Value);
end Set_Role;
function Get_Role (Object : in Workspace_Member_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Role);
end Get_Role;
function Get_Role (Object : in Workspace_Member_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Role;
end Get_Role;
procedure Set_Member (Object : in out Workspace_Member_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 4, Impl.Member, Value);
end Set_Member;
function Get_Member (Object : in Workspace_Member_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Member;
end Get_Member;
procedure Set_Workspace (Object : in out Workspace_Member_Ref;
Value : in Workspace_Ref'Class) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 5, Impl.Workspace, Value);
end Set_Workspace;
function Get_Workspace (Object : in Workspace_Member_Ref)
return Workspace_Ref'Class is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Workspace;
end Get_Workspace;
-- Copy of the object.
procedure Copy (Object : in Workspace_Member_Ref;
Into : in out Workspace_Member_Ref) is
Result : Workspace_Member_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Workspace_Member_Access
:= new Workspace_Member_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Join_Date := Impl.Join_Date;
Copy.Role := Impl.Role;
Copy.Member := Impl.Member;
Copy.Workspace := Impl.Workspace;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Workspace_Member_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Workspace_Member_Access := new Workspace_Member_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 Workspace_Member_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Workspace_Member_Access := new Workspace_Member_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 Workspace_Member_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Workspace_Member_Access := new Workspace_Member_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 Workspace_Member_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 Workspace_Member_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 Workspace_Member_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 Workspace_Member_Impl) is
type Workspace_Member_Impl_Ptr is access all Workspace_Member_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Workspace_Member_Impl, Workspace_Member_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Workspace_Member_Impl_Ptr := Workspace_Member_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Workspace_Member_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, WORKSPACE_MEMBER_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 Workspace_Member_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 Workspace_Member_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (WORKSPACE_MEMBER_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_2_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_2_NAME, -- join_date
Value => Object.Join_Date);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_2_NAME, -- role
Value => Object.Role);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_2_NAME, -- member_id
Value => Object.Member);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_2_NAME, -- workspace_id
Value => Object.Workspace);
Object.Clear_Modified (5);
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 Workspace_Member_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (WORKSPACE_MEMBER_DEF'Access);
Result : Integer;
begin
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_2_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_2_NAME, -- join_date
Value => Object.Join_Date);
Query.Save_Field (Name => COL_2_2_NAME, -- role
Value => Object.Role);
Query.Save_Field (Name => COL_3_2_NAME, -- member_id
Value => Object.Member);
Query.Save_Field (Name => COL_4_2_NAME, -- workspace_id
Value => Object.Workspace);
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 Workspace_Member_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (WORKSPACE_MEMBER_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 Workspace_Member_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Workspace_Member_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Workspace_Member_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "join_date" then
if Impl.Join_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (Impl.Join_Date.Value);
end if;
elsif Name = "role" then
return Util.Beans.Objects.To_Object (Impl.Role);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Workspace_Member_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Join_Date := Stmt.Get_Nullable_Time (1);
Object.Role := Stmt.Get_Unbounded_String (2);
if not Stmt.Is_Null (3) then
Object.Member.Set_Key_Value (Stmt.Get_Identifier (3), Session);
end if;
if not Stmt.Is_Null (4) then
Object.Workspace.Set_Key_Value (Stmt.Get_Identifier (4), Session);
end if;
ADO.Objects.Set_Created (Object);
end Load;
function Invitation_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => INVITATION_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Invitation_Key;
function Invitation_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => INVITATION_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Invitation_Key;
function "=" (Left, Right : Invitation_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 Invitation_Ref'Class;
Impl : out Invitation_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Invitation_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Invitation_Ref) is
Impl : Invitation_Access;
begin
Impl := new Invitation_Impl;
Impl.Version := 0;
Impl.Create_Date := ADO.DEFAULT_TIME;
Impl.Acceptance_Date.Is_Null := True;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Invitation
-- ----------------------------------------
procedure Set_Id (Object : in out Invitation_Ref;
Value : in ADO.Identifier) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Invitation_Ref)
return ADO.Identifier is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
function Get_Version (Object : in Invitation_Ref)
return Integer is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Create_Date (Object : in out Invitation_Ref;
Value : in Ada.Calendar.Time) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 3, Impl.Create_Date, Value);
end Set_Create_Date;
function Get_Create_Date (Object : in Invitation_Ref)
return Ada.Calendar.Time is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Create_Date;
end Get_Create_Date;
procedure Set_Email (Object : in out Invitation_Ref;
Value : in String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 4, Impl.Email, Value);
end Set_Email;
procedure Set_Email (Object : in out Invitation_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 4, Impl.Email, Value);
end Set_Email;
function Get_Email (Object : in Invitation_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Email);
end Get_Email;
function Get_Email (Object : in Invitation_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Email;
end Get_Email;
procedure Set_Message (Object : in out Invitation_Ref;
Value : in String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 5, Impl.Message, Value);
end Set_Message;
procedure Set_Message (Object : in out Invitation_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 5, Impl.Message, Value);
end Set_Message;
function Get_Message (Object : in Invitation_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Message);
end Get_Message;
function Get_Message (Object : in Invitation_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Message;
end Get_Message;
procedure Set_Acceptance_Date (Object : in out Invitation_Ref;
Value : in ADO.Nullable_Time) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 6, Impl.Acceptance_Date, Value);
end Set_Acceptance_Date;
function Get_Acceptance_Date (Object : in Invitation_Ref)
return ADO.Nullable_Time is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Acceptance_Date;
end Get_Acceptance_Date;
procedure Set_Workspace (Object : in out Invitation_Ref;
Value : in Workspace_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 7, Impl.Workspace, Value);
end Set_Workspace;
function Get_Workspace (Object : in Invitation_Ref)
return Workspace_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Workspace;
end Get_Workspace;
procedure Set_Access_Key (Object : in out Invitation_Ref;
Value : in AWA.Users.Models.Access_Key_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 8, Impl.Access_Key, Value);
end Set_Access_Key;
function Get_Access_Key (Object : in Invitation_Ref)
return AWA.Users.Models.Access_Key_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Access_Key;
end Get_Access_Key;
procedure Set_Invitee (Object : in out Invitation_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 9, Impl.Invitee, Value);
end Set_Invitee;
function Get_Invitee (Object : in Invitation_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Invitee;
end Get_Invitee;
procedure Set_Inviter (Object : in out Invitation_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 10, Impl.Inviter, Value);
end Set_Inviter;
function Get_Inviter (Object : in Invitation_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Inviter;
end Get_Inviter;
procedure Set_Member (Object : in out Invitation_Ref;
Value : in Workspace_Member_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 11, Impl.Member, Value);
end Set_Member;
function Get_Member (Object : in Invitation_Ref)
return Workspace_Member_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Member;
end Get_Member;
-- Copy of the object.
procedure Copy (Object : in Invitation_Ref;
Into : in out Invitation_Ref) is
Result : Invitation_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Invitation_Access
:= new Invitation_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Version := Impl.Version;
Copy.Create_Date := Impl.Create_Date;
Copy.Email := Impl.Email;
Copy.Message := Impl.Message;
Copy.Acceptance_Date := Impl.Acceptance_Date;
Copy.Workspace := Impl.Workspace;
Copy.Access_Key := Impl.Access_Key;
Copy.Invitee := Impl.Invitee;
Copy.Inviter := Impl.Inviter;
Copy.Member := Impl.Member;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Invitation_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Invitation_Access := new Invitation_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 Invitation_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Invitation_Access := new Invitation_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 Invitation_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Invitation_Access := new Invitation_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;
procedure Reload (Object : in out Invitation_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean) is
Result : ADO.Objects.Object_Record_Access;
Impl : Invitation_Access;
Query : ADO.SQL.Query;
Id : ADO.Identifier;
begin
if Object.Is_Null then
raise ADO.Objects.NULL_ERROR;
end if;
Object.Prepare_Modify (Result);
Impl := Invitation_Impl (Result.all)'Access;
Id := ADO.Objects.Get_Key_Value (Impl.all);
Query.Bind_Param (Position => 1, Value => Id);
Query.Bind_Param (Position => 2, Value => Impl.Version);
Query.Set_Filter ("id = ? AND version != ?");
declare
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, INVITATION_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Updated := True;
Impl.Load (Stmt, Session);
else
Updated := False;
end if;
end;
end Reload;
overriding
procedure Save (Object : in out Invitation_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 Invitation_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 Invitation_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 Invitation_Impl) is
type Invitation_Impl_Ptr is access all Invitation_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Invitation_Impl, Invitation_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Invitation_Impl_Ptr := Invitation_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Invitation_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, INVITATION_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 Invitation_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 Invitation_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (INVITATION_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_3_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_3_NAME, -- create_date
Value => Object.Create_Date);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_3_NAME, -- email
Value => Object.Email);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_3_NAME, -- message
Value => Object.Message);
Object.Clear_Modified (5);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_3_NAME, -- acceptance_date
Value => Object.Acceptance_Date);
Object.Clear_Modified (6);
end if;
if Object.Is_Modified (7) then
Stmt.Save_Field (Name => COL_6_3_NAME, -- workspace_id
Value => Object.Workspace);
Object.Clear_Modified (7);
end if;
if Object.Is_Modified (8) then
Stmt.Save_Field (Name => COL_7_3_NAME, -- access_key_id
Value => Object.Access_Key);
Object.Clear_Modified (8);
end if;
if Object.Is_Modified (9) then
Stmt.Save_Field (Name => COL_8_3_NAME, -- invitee_id
Value => Object.Invitee);
Object.Clear_Modified (9);
end if;
if Object.Is_Modified (10) then
Stmt.Save_Field (Name => COL_9_3_NAME, -- inviter_id
Value => Object.Inviter);
Object.Clear_Modified (10);
end if;
if Object.Is_Modified (11) then
Stmt.Save_Field (Name => COL_10_3_NAME, -- member_id
Value => Object.Member);
Object.Clear_Modified (11);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
overriding
procedure Create (Object : in out Invitation_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (INVITATION_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_3_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_3_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_2_3_NAME, -- create_date
Value => Object.Create_Date);
Query.Save_Field (Name => COL_3_3_NAME, -- email
Value => Object.Email);
Query.Save_Field (Name => COL_4_3_NAME, -- message
Value => Object.Message);
Query.Save_Field (Name => COL_5_3_NAME, -- acceptance_date
Value => Object.Acceptance_Date);
Query.Save_Field (Name => COL_6_3_NAME, -- workspace_id
Value => Object.Workspace);
Query.Save_Field (Name => COL_7_3_NAME, -- access_key_id
Value => Object.Access_Key);
Query.Save_Field (Name => COL_8_3_NAME, -- invitee_id
Value => Object.Invitee);
Query.Save_Field (Name => COL_9_3_NAME, -- inviter_id
Value => Object.Inviter);
Query.Save_Field (Name => COL_10_3_NAME, -- member_id
Value => Object.Member);
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 Invitation_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (INVITATION_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 Invitation_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Invitation_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Invitation_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "create_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Create_Date);
elsif Name = "email" then
return Util.Beans.Objects.To_Object (Impl.Email);
elsif Name = "message" then
return Util.Beans.Objects.To_Object (Impl.Message);
elsif Name = "acceptance_date" then
if Impl.Acceptance_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (Impl.Acceptance_Date.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 Invitation_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Create_Date := Stmt.Get_Time (2);
Object.Email := Stmt.Get_Unbounded_String (3);
Object.Message := Stmt.Get_Unbounded_String (4);
Object.Acceptance_Date := Stmt.Get_Nullable_Time (5);
if not Stmt.Is_Null (6) then
Object.Workspace.Set_Key_Value (Stmt.Get_Identifier (6), Session);
end if;
if not Stmt.Is_Null (7) then
Object.Access_Key.Set_Key_Value (Stmt.Get_Identifier (7), Session);
end if;
if not Stmt.Is_Null (8) then
Object.Invitee.Set_Key_Value (Stmt.Get_Identifier (8), Session);
end if;
if not Stmt.Is_Null (9) then
Object.Inviter.Set_Key_Value (Stmt.Get_Identifier (9), Session);
end if;
if not Stmt.Is_Null (10) then
Object.Member.Set_Key_Value (Stmt.Get_Identifier (10), Session);
end if;
Object.Version := Stmt.Get_Integer (1);
ADO.Objects.Set_Created (Object);
end Load;
function Workspace_Feature_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_FEATURE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Feature_Key;
function Workspace_Feature_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_FEATURE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Feature_Key;
function "=" (Left, Right : Workspace_Feature_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 Workspace_Feature_Ref'Class;
Impl : out Workspace_Feature_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Workspace_Feature_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Workspace_Feature_Ref) is
Impl : Workspace_Feature_Access;
begin
Impl := new Workspace_Feature_Impl;
Impl.Limit := 0;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Workspace_Feature
-- ----------------------------------------
procedure Set_Id (Object : in out Workspace_Feature_Ref;
Value : in ADO.Identifier) is
Impl : Workspace_Feature_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Workspace_Feature_Ref)
return ADO.Identifier is
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Limit (Object : in out Workspace_Feature_Ref;
Value : in Integer) is
Impl : Workspace_Feature_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Integer (Impl.all, 2, Impl.Limit, Value);
end Set_Limit;
function Get_Limit (Object : in Workspace_Feature_Ref)
return Integer is
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Limit;
end Get_Limit;
procedure Set_Workspace (Object : in out Workspace_Feature_Ref;
Value : in Workspace_Ref'Class) is
Impl : Workspace_Feature_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 3, Impl.Workspace, Value);
end Set_Workspace;
function Get_Workspace (Object : in Workspace_Feature_Ref)
return Workspace_Ref'Class is
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Workspace;
end Get_Workspace;
-- Copy of the object.
procedure Copy (Object : in Workspace_Feature_Ref;
Into : in out Workspace_Feature_Ref) is
Result : Workspace_Feature_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Workspace_Feature_Access
:= new Workspace_Feature_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Limit := Impl.Limit;
Copy.Workspace := Impl.Workspace;
end;
end if;
Into := Result;
end Copy;
overriding
procedure Find (Object : in out Workspace_Feature_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Workspace_Feature_Access := new Workspace_Feature_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 Workspace_Feature_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Workspace_Feature_Access := new Workspace_Feature_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 Workspace_Feature_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Workspace_Feature_Access := new Workspace_Feature_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 Workspace_Feature_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 Workspace_Feature_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 Workspace_Feature_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 Workspace_Feature_Impl) is
type Workspace_Feature_Impl_Ptr is access all Workspace_Feature_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Workspace_Feature_Impl, Workspace_Feature_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Workspace_Feature_Impl_Ptr := Workspace_Feature_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
overriding
procedure Find (Object : in out Workspace_Feature_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, WORKSPACE_FEATURE_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 Workspace_Feature_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 Workspace_Feature_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (WORKSPACE_FEATURE_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_4_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_4_NAME, -- limit
Value => Object.Limit);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_4_NAME, -- workspace_id
Value => Object.Workspace);
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 Workspace_Feature_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (WORKSPACE_FEATURE_DEF'Access);
Result : Integer;
begin
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_4_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_4_NAME, -- limit
Value => Object.Limit);
Query.Save_Field (Name => COL_2_4_NAME, -- workspace_id
Value => Object.Workspace);
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 Workspace_Feature_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (WORKSPACE_FEATURE_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 Workspace_Feature_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Workspace_Feature_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Workspace_Feature_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "limit" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Limit));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Workspace_Feature_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Limit := Stmt.Get_Integer (1);
if not Stmt.Is_Null (2) then
Object.Workspace.Set_Key_Value (Stmt.Get_Identifier (2), Session);
end if;
ADO.Objects.Set_Created (Object);
end Load;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Member_Info;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Id));
elsif Name = "user_id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.User_Id));
elsif Name = "name" then
return Util.Beans.Objects.To_Object (From.Name);
elsif Name = "email" then
return Util.Beans.Objects.To_Object (From.Email);
elsif Name = "role" then
return Util.Beans.Objects.To_Object (From.Role);
elsif Name = "join_date" then
if From.Join_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (From.Join_Date.Value);
end if;
elsif Name = "invite_date" then
if From.Invite_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (From.Invite_Date.Value);
end if;
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 Member_Info;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "id" then
Item.Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "user_id" then
Item.User_Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "name" then
Item.Name := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "email" then
Item.Email := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "role" then
Item.Role := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "join_date" then
Item.Join_Date.Is_Null := Util.Beans.Objects.Is_Null (Value);
if not Item.Join_Date.Is_Null then
Item.Join_Date.Value := Util.Beans.Objects.Time.To_Time (Value);
end if;
elsif Name = "invite_date" then
Item.Invite_Date.Is_Null := Util.Beans.Objects.Is_Null (Value);
if not Item.Invite_Date.Is_Null then
Item.Invite_Date.Value := Util.Beans.Objects.Time.To_Time (Value);
end if;
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 Member_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 Member_Info describes a member of the workspace.
-- --------------------
procedure List (Object : in out Member_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
procedure Read (Into : in out Member_Info);
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Context);
Pos : Positive := 1;
procedure Read (Into : in out Member_Info) is
begin
Into.Id := Stmt.Get_Identifier (0);
Into.User_Id := Stmt.Get_Identifier (1);
Into.Name := Stmt.Get_Unbounded_String (2);
Into.Email := Stmt.Get_Unbounded_String (3);
Into.Role := Stmt.Get_Unbounded_String (4);
Into.Join_Date := Stmt.Get_Nullable_Time (5);
Into.Invite_Date := Stmt.Get_Nullable_Time (6);
end Read;
begin
Stmt.Execute;
Member_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 Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Invitation_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Invitation_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Invitation_Bean,
Method => Op_Load,
Name => "load");
procedure Op_Accept_Invitation (Bean : in out Invitation_Bean;
Event : in AWA.Events.Module_Event'Class);
procedure Op_Accept_Invitation (Bean : in out Invitation_Bean;
Event : in AWA.Events.Module_Event'Class) is
begin
Invitation_Bean'Class (Bean).Accept_Invitation (Event);
end Op_Accept_Invitation;
package Binding_Invitation_Bean_2 is
new AWA.Events.Action_Method.Bind (Bean => Invitation_Bean,
Method => Op_Accept_Invitation,
Name => "accept_invitation");
procedure Op_Send (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Send (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Invitation_Bean'Class (Bean).Send (Outcome);
end Op_Send;
package Binding_Invitation_Bean_3 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Invitation_Bean,
Method => Op_Send,
Name => "send");
Binding_Invitation_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Invitation_Bean_1.Proxy'Access,
2 => Binding_Invitation_Bean_2.Proxy'Access,
3 => Binding_Invitation_Bean_3.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Invitation_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Invitation_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Invitation_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "key" then
return Util.Beans.Objects.To_Object (From.Key);
end if;
return Awa.Workspaces.Models.Invitation_Ref (From).Get_Value (Name);
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Invitation_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "key" then
Item.Key := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "create_date" then
Item.Set_Create_Date (Util.Beans.Objects.Time.To_Time (Value));
elsif Name = "email" then
Item.Set_Email (Util.Beans.Objects.To_String (Value));
elsif Name = "message" then
Item.Set_Message (Util.Beans.Objects.To_String (Value));
elsif Name = "acceptance_date" then
if Util.Beans.Objects.Is_Null (Value) then
Item.Set_Acceptance_Date (ADO.Nullable_Time '(Is_Null => True, others => <>));
else
Item.Set_Acceptance_Date (ADO.Nullable_Time '(Is_Null => False,
Value => Util.Beans.Objects.Time.To_Time (Value)));
end if;
end if;
end Set_Value;
procedure Op_Load (Bean : in out Member_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Member_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Member_List_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Member_List_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Member_List_Bean,
Method => Op_Load,
Name => "load");
Binding_Member_List_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Member_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 Member_List_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Member_List_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Member_List_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "page_size" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Page_Size));
elsif Name = "count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Count));
elsif Name = "page" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Page));
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 Member_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "page_size" then
Item.Page_Size := Util.Beans.Objects.To_Integer (Value);
elsif Name = "count" then
Item.Count := Util.Beans.Objects.To_Integer (Value);
elsif Name = "page" then
Item.Page := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
procedure Op_Load (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Member_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Member_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Member_Bean,
Method => Op_Load,
Name => "load");
procedure Op_Delete (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Delete (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Member_Bean'Class (Bean).Delete (Outcome);
end Op_Delete;
package Binding_Member_Bean_2 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Member_Bean,
Method => Op_Delete,
Name => "delete");
Binding_Member_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Member_Bean_1.Proxy'Access,
2 => Binding_Member_Bean_2.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Member_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Member_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Member_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "join_date" then
if Util.Beans.Objects.Is_Null (Value) then
Item.Set_Join_Date (ADO.Nullable_Time '(Is_Null => True, others => <>));
else
Item.Set_Join_Date (ADO.Nullable_Time '(Is_Null => False,
Value => Util.Beans.Objects.Time.To_Time (Value)));
end if;
elsif Name = "role" then
Item.Set_Role (Util.Beans.Objects.To_String (Value));
end if;
end Set_Value;
end AWA.Workspaces.Models;
|
optikos/oasis | Ada | 3,481 | adb | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Operator_Symbols is
function Create
(Operator_Symbol_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Operator_Symbol is
begin
return Result : Operator_Symbol :=
(Operator_Symbol_Token => Operator_Symbol_Token,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Operator_Symbol is
begin
return Result : Implicit_Operator_Symbol :=
(Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Operator_Symbol_Token
(Self : Operator_Symbol)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Operator_Symbol_Token;
end Operator_Symbol_Token;
overriding function Image (Self : Operator_Symbol) return Text is
begin
return Self.Operator_Symbol_Token.Image;
end Image;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Operator_Symbol)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Operator_Symbol)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Operator_Symbol)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
overriding function Image (Self : Implicit_Operator_Symbol) return Text is
pragma Unreferenced (Self);
begin
return "";
end Image;
procedure Initialize (Self : aliased in out Base_Operator_Symbol'Class) is
begin
null;
end Initialize;
overriding function Is_Operator_Symbol_Element
(Self : Base_Operator_Symbol)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Operator_Symbol_Element;
overriding function Is_Expression_Element
(Self : Base_Operator_Symbol)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Expression_Element;
overriding procedure Visit
(Self : not null access Base_Operator_Symbol;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Operator_Symbol (Self);
end Visit;
overriding function To_Operator_Symbol_Text
(Self : aliased in out Operator_Symbol)
return Program.Elements.Operator_Symbols.Operator_Symbol_Text_Access is
begin
return Self'Unchecked_Access;
end To_Operator_Symbol_Text;
overriding function To_Operator_Symbol_Text
(Self : aliased in out Implicit_Operator_Symbol)
return Program.Elements.Operator_Symbols.Operator_Symbol_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Operator_Symbol_Text;
end Program.Nodes.Operator_Symbols;
|
reznikmm/matreshka | Ada | 4,319 | 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.Style.Language_Complex.Internals is
------------
-- Create --
------------
function Create
(Node : Matreshka.ODF_Attributes.Style.Language_Complex.Style_Language_Complex_Access)
return ODF.DOM.Attributes.Style.Language_Complex.ODF_Style_Language_Complex 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.Style.Language_Complex.Style_Language_Complex_Access)
return ODF.DOM.Attributes.Style.Language_Complex.ODF_Style_Language_Complex is
begin
return
(XML.DOM.Attributes.Internals.Wrap
(Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record);
end Wrap;
end ODF.DOM.Attributes.Style.Language_Complex.Internals;
|
AdaCore/Ada_Drivers_Library | Ada | 17,176 | ads | -- This spec has been automatically generated from STM32F7x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.DMA2D is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_MODE_Field is HAL.UInt2;
-- control register
type CR_Register is record
-- Start
START : Boolean := False;
-- Suspend
SUSP : Boolean := False;
-- Abort
ABORT_k : Boolean := False;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Transfer error interrupt enable
TEIE : Boolean := False;
-- Transfer complete interrupt enable
TCIE : Boolean := False;
-- Transfer watermark interrupt enable
TWIE : Boolean := False;
-- CLUT access error interrupt enable
CAEIE : Boolean := False;
-- CLUT transfer complete interrupt enable
CTCIE : Boolean := False;
-- Configuration Error Interrupt Enable
CEIE : Boolean := False;
-- unspecified
Reserved_14_15 : HAL.UInt2 := 16#0#;
-- DMA2D mode
MODE : CR_MODE_Field := 16#0#;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
START at 0 range 0 .. 0;
SUSP at 0 range 1 .. 1;
ABORT_k at 0 range 2 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
TEIE at 0 range 8 .. 8;
TCIE at 0 range 9 .. 9;
TWIE at 0 range 10 .. 10;
CAEIE at 0 range 11 .. 11;
CTCIE at 0 range 12 .. 12;
CEIE at 0 range 13 .. 13;
Reserved_14_15 at 0 range 14 .. 15;
MODE at 0 range 16 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-- Interrupt Status Register
type ISR_Register is record
-- Read-only. Transfer error interrupt flag
TEIF : Boolean;
-- Read-only. Transfer complete interrupt flag
TCIF : Boolean;
-- Read-only. Transfer watermark interrupt flag
TWIF : Boolean;
-- Read-only. CLUT access error interrupt flag
CAEIF : Boolean;
-- Read-only. CLUT transfer complete interrupt flag
CTCIF : Boolean;
-- Read-only. Configuration error interrupt flag
CEIF : Boolean;
-- unspecified
Reserved_6_31 : HAL.UInt26;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
TEIF at 0 range 0 .. 0;
TCIF at 0 range 1 .. 1;
TWIF at 0 range 2 .. 2;
CAEIF at 0 range 3 .. 3;
CTCIF at 0 range 4 .. 4;
CEIF at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- interrupt flag clear register
type IFCR_Register is record
-- Clear Transfer error interrupt flag
CTEIF : Boolean := False;
-- Clear transfer complete interrupt flag
CTCIF : Boolean := False;
-- Clear transfer watermark interrupt flag
CTWIF : Boolean := False;
-- Clear CLUT access error interrupt flag
CAECIF : Boolean := False;
-- Clear CLUT transfer complete interrupt flag
CCTCIF : Boolean := False;
-- Clear configuration error interrupt flag
CCEIF : Boolean := False;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IFCR_Register use record
CTEIF at 0 range 0 .. 0;
CTCIF at 0 range 1 .. 1;
CTWIF at 0 range 2 .. 2;
CAECIF at 0 range 3 .. 3;
CCTCIF at 0 range 4 .. 4;
CCEIF at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype FGOR_LO_Field is HAL.UInt14;
-- foreground offset register
type FGOR_Register is record
-- Line offset
LO : FGOR_LO_Field := 16#0#;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FGOR_Register use record
LO at 0 range 0 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype BGOR_LO_Field is HAL.UInt14;
-- background offset register
type BGOR_Register is record
-- Line offset
LO : BGOR_LO_Field := 16#0#;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BGOR_Register use record
LO at 0 range 0 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype FGPFCCR_CM_Field is HAL.UInt4;
subtype FGPFCCR_CS_Field is HAL.UInt8;
subtype FGPFCCR_AM_Field is HAL.UInt2;
subtype FGPFCCR_ALPHA_Field is HAL.UInt8;
-- foreground PFC control register
type FGPFCCR_Register is record
-- Color mode
CM : FGPFCCR_CM_Field := 16#0#;
-- CLUT color mode
CCM : Boolean := False;
-- Start
START : Boolean := False;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- CLUT size
CS : FGPFCCR_CS_Field := 16#0#;
-- Alpha mode
AM : FGPFCCR_AM_Field := 16#0#;
-- unspecified
Reserved_18_23 : HAL.UInt6 := 16#0#;
-- Alpha value
ALPHA : FGPFCCR_ALPHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FGPFCCR_Register use record
CM at 0 range 0 .. 3;
CCM at 0 range 4 .. 4;
START at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
CS at 0 range 8 .. 15;
AM at 0 range 16 .. 17;
Reserved_18_23 at 0 range 18 .. 23;
ALPHA at 0 range 24 .. 31;
end record;
subtype FGCOLR_BLUE_Field is HAL.UInt8;
subtype FGCOLR_GREEN_Field is HAL.UInt8;
subtype FGCOLR_RED_Field is HAL.UInt8;
-- foreground color register
type FGCOLR_Register is record
-- Blue Value
BLUE : FGCOLR_BLUE_Field := 16#0#;
-- Green Value
GREEN : FGCOLR_GREEN_Field := 16#0#;
-- Red Value
RED : FGCOLR_RED_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FGCOLR_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype BGPFCCR_CM_Field is HAL.UInt4;
subtype BGPFCCR_CS_Field is HAL.UInt8;
subtype BGPFCCR_AM_Field is HAL.UInt2;
subtype BGPFCCR_ALPHA_Field is HAL.UInt8;
-- background PFC control register
type BGPFCCR_Register is record
-- Color mode
CM : BGPFCCR_CM_Field := 16#0#;
-- CLUT Color mode
CCM : Boolean := False;
-- Start
START : Boolean := False;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- CLUT size
CS : BGPFCCR_CS_Field := 16#0#;
-- Alpha mode
AM : BGPFCCR_AM_Field := 16#0#;
-- unspecified
Reserved_18_23 : HAL.UInt6 := 16#0#;
-- Alpha value
ALPHA : BGPFCCR_ALPHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BGPFCCR_Register use record
CM at 0 range 0 .. 3;
CCM at 0 range 4 .. 4;
START at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
CS at 0 range 8 .. 15;
AM at 0 range 16 .. 17;
Reserved_18_23 at 0 range 18 .. 23;
ALPHA at 0 range 24 .. 31;
end record;
subtype BGCOLR_BLUE_Field is HAL.UInt8;
subtype BGCOLR_GREEN_Field is HAL.UInt8;
subtype BGCOLR_RED_Field is HAL.UInt8;
-- background color register
type BGCOLR_Register is record
-- Blue Value
BLUE : BGCOLR_BLUE_Field := 16#0#;
-- Green Value
GREEN : BGCOLR_GREEN_Field := 16#0#;
-- Red Value
RED : BGCOLR_RED_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BGCOLR_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype OPFCCR_CM_Field is HAL.UInt3;
-- output PFC control register
type OPFCCR_Register is record
-- Color mode
CM : OPFCCR_CM_Field := 16#0#;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OPFCCR_Register use record
CM at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype OCOLR_BLUE_Field is HAL.UInt8;
subtype OCOLR_GREEN_Field is HAL.UInt8;
subtype OCOLR_RED_Field is HAL.UInt8;
subtype OCOLR_APLHA_Field is HAL.UInt8;
-- output color register
type OCOLR_Register is record
-- Blue Value
BLUE : OCOLR_BLUE_Field := 16#0#;
-- Green Value
GREEN : OCOLR_GREEN_Field := 16#0#;
-- Red Value
RED : OCOLR_RED_Field := 16#0#;
-- Alpha Channel Value
APLHA : OCOLR_APLHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OCOLR_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
APLHA at 0 range 24 .. 31;
end record;
subtype OOR_LO_Field is HAL.UInt14;
-- output offset register
type OOR_Register is record
-- Line Offset
LO : OOR_LO_Field := 16#0#;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OOR_Register use record
LO at 0 range 0 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype NLR_NL_Field is HAL.UInt16;
subtype NLR_PL_Field is HAL.UInt14;
-- number of line register
type NLR_Register is record
-- Number of lines
NL : NLR_NL_Field := 16#0#;
-- Pixel per lines
PL : NLR_PL_Field := 16#0#;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for NLR_Register use record
NL at 0 range 0 .. 15;
PL at 0 range 16 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype LWR_LW_Field is HAL.UInt16;
-- line watermark register
type LWR_Register is record
-- Line watermark
LW : LWR_LW_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 LWR_Register use record
LW at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype AMTCR_DT_Field is HAL.UInt8;
-- AHB master timer configuration register
type AMTCR_Register is record
-- Enable
EN : Boolean := False;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
-- Dead Time
DT : AMTCR_DT_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 AMTCR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
DT at 0 range 8 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype FGCLUT_BLUE_Field is HAL.UInt8;
subtype FGCLUT_GREEN_Field is HAL.UInt8;
subtype FGCLUT_RED_Field is HAL.UInt8;
subtype FGCLUT_APLHA_Field is HAL.UInt8;
-- FGCLUT
type FGCLUT_Register is record
-- BLUE
BLUE : FGCLUT_BLUE_Field := 16#0#;
-- GREEN
GREEN : FGCLUT_GREEN_Field := 16#0#;
-- RED
RED : FGCLUT_RED_Field := 16#0#;
-- APLHA
APLHA : FGCLUT_APLHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FGCLUT_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
APLHA at 0 range 24 .. 31;
end record;
subtype BGCLUT_BLUE_Field is HAL.UInt8;
subtype BGCLUT_GREEN_Field is HAL.UInt8;
subtype BGCLUT_RED_Field is HAL.UInt8;
subtype BGCLUT_APLHA_Field is HAL.UInt8;
-- BGCLUT
type BGCLUT_Register is record
-- BLUE
BLUE : BGCLUT_BLUE_Field := 16#0#;
-- GREEN
GREEN : BGCLUT_GREEN_Field := 16#0#;
-- RED
RED : BGCLUT_RED_Field := 16#0#;
-- APLHA
APLHA : BGCLUT_APLHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BGCLUT_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
APLHA at 0 range 24 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- DMA2D controller
type DMA2D_Peripheral is record
-- control register
CR : aliased CR_Register;
-- Interrupt Status Register
ISR : aliased ISR_Register;
-- interrupt flag clear register
IFCR : aliased IFCR_Register;
-- foreground memory address register
FGMAR : aliased HAL.UInt32;
-- foreground offset register
FGOR : aliased FGOR_Register;
-- background memory address register
BGMAR : aliased HAL.UInt32;
-- background offset register
BGOR : aliased BGOR_Register;
-- foreground PFC control register
FGPFCCR : aliased FGPFCCR_Register;
-- foreground color register
FGCOLR : aliased FGCOLR_Register;
-- background PFC control register
BGPFCCR : aliased BGPFCCR_Register;
-- background color register
BGCOLR : aliased BGCOLR_Register;
-- foreground CLUT memory address register
FGCMAR : aliased HAL.UInt32;
-- background CLUT memory address register
BGCMAR : aliased HAL.UInt32;
-- output PFC control register
OPFCCR : aliased OPFCCR_Register;
-- output color register
OCOLR : aliased OCOLR_Register;
-- output memory address register
OMAR : aliased HAL.UInt32;
-- output offset register
OOR : aliased OOR_Register;
-- number of line register
NLR : aliased NLR_Register;
-- line watermark register
LWR : aliased LWR_Register;
-- AHB master timer configuration register
AMTCR : aliased AMTCR_Register;
-- FGCLUT
FGCLUT : aliased FGCLUT_Register;
-- BGCLUT
BGCLUT : aliased BGCLUT_Register;
end record
with Volatile;
for DMA2D_Peripheral use record
CR at 16#0# range 0 .. 31;
ISR at 16#4# range 0 .. 31;
IFCR at 16#8# range 0 .. 31;
FGMAR at 16#C# range 0 .. 31;
FGOR at 16#10# range 0 .. 31;
BGMAR at 16#14# range 0 .. 31;
BGOR at 16#18# range 0 .. 31;
FGPFCCR at 16#1C# range 0 .. 31;
FGCOLR at 16#20# range 0 .. 31;
BGPFCCR at 16#24# range 0 .. 31;
BGCOLR at 16#28# range 0 .. 31;
FGCMAR at 16#2C# range 0 .. 31;
BGCMAR at 16#30# range 0 .. 31;
OPFCCR at 16#34# range 0 .. 31;
OCOLR at 16#38# range 0 .. 31;
OMAR at 16#3C# range 0 .. 31;
OOR at 16#40# range 0 .. 31;
NLR at 16#44# range 0 .. 31;
LWR at 16#48# range 0 .. 31;
AMTCR at 16#4C# range 0 .. 31;
FGCLUT at 16#400# range 0 .. 31;
BGCLUT at 16#800# range 0 .. 31;
end record;
-- DMA2D controller
DMA2D_Periph : aliased DMA2D_Peripheral
with Import, Address => System'To_Address (16#4002B000#);
end STM32_SVD.DMA2D;
|
AdaCore/training_material | Ada | 8,700 | adb | -----------------------------------------------------------------------
-- Ada Labs --
-- --
-- Copyright (C) 2008-2009, AdaCore --
-- --
-- Labs is free software; you can redistribute it and/or modify it --
-- under the terms of the GNU General Public License as published by --
-- the Free Software Foundation; either version 2 of the License, or --
-- (at your option) any later version. --
-- --
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have received --
-- a copy of the GNU General Public License along with this program; --
-- if not, write to the Free Software Foundation, Inc., 59 Temple --
-- Place - Suite 330, Boston, MA 02111-1307, USA. --
-----------------------------------------------------------------------
with Libm_Single; use Libm_Single;
with Ada.Real_Time; use Ada.Real_Time;
with Ada.Real_Time.Timing_Events; use Ada.Real_Time.Timing_Events;
with HAL; use HAL;
with STM32.RNG.Interrupts; use STM32.RNG.Interrupts;
package body Solar_System is
Random_Color_Event_Span : constant Time_Span := Seconds (2);
type Random_Color_Timing_Event is new Timing_Event with null record;
----------------------------------
-- Random_Color_Timing_Event_PO --
----------------------------------
protected Random_Color_Timing_Event_PO is
pragma Interrupt_Priority;
entry Wait_On_Random_Color_Timing_Event;
procedure Random_Color_Timing_Event_Handler
(Event : in out Timing_Event);
private
Time_Is_Up : Boolean := False;
end Random_Color_Timing_Event_PO;
Random_Color_Timer : Random_Color_Timing_Event;
Random_Color_Timer_Handler : constant Timing_Event_Handler :=
Random_Color_Timing_Event_PO.Random_Color_Timing_Event_Handler'Access;
----------------------------------
-- Random_Color_Timing_Event_PO --
----------------------------------
protected body Random_Color_Timing_Event_PO is
entry Wait_On_Random_Color_Timing_Event when Time_Is_Up is
begin
Time_Is_Up := False;
end Wait_On_Random_Color_Timing_Event;
procedure Random_Color_Timing_Event_Handler
(Event : in out Timing_Event)
is
Now : constant Time := Clock;
begin
Time_Is_Up := True;
Set_Handler
(Event => Event,
At_Time => Now + Random_Color_Event_Span,
Handler => Random_Color_Timer_Handler);
end Random_Color_Timing_Event_Handler;
end Random_Color_Timing_Event_PO;
------------------------------
-- T_Change_Color_To_Random --
------------------------------
task body T_Change_Color_To_Random is
Body_Data : Body_Type;
begin
loop
Random_Color_Timing_Event_PO.Wait_On_Random_Color_Timing_Event;
for P_Body of Bodies loop
Body_Data := P_Body.Get_Data;
Body_Data.Color :=
(R => Color_Component_T (Random mod 255),
G => Color_Component_T (Random mod 255),
B => Color_Component_T (Random mod 255),
A => 255);
P_Body.Set_Data (Body_Data);
end loop;
end loop;
end T_Change_Color_To_Random;
------------------------------
-- Enable_Random_Color_Mode --
------------------------------
procedure Enable_Random_Color_Mode is
Now : constant Time := Clock;
begin
Initialize_RNG;
Set_Handler
(Event => Random_Color_Timer,
At_Time => Now + Random_Color_Event_Span,
Handler => Random_Color_Timer_Handler);
end Enable_Random_Color_Mode;
---------------
-- Init_Body --
---------------
procedure Init_Body
(B : Bodies_Enum;
Radius : Float;
Color : RGBA_T;
Distance : Float;
Speed : Float;
Turns_Around : Bodies_Enum;
Angle : Float := 0.0;
Tail : Boolean := False;
Visible : Boolean := True)
is
begin
Bodies (B).Set_Data
((Distance => Distance,
Speed => Speed,
Angle => Angle,
Turns_Around => Turns_Around,
Visible => Visible,
Color => Color,
Radius => Radius,
Pos => (0.0, 0.0),
With_Tail => Tail,
Tail => (others => (0.0, 0.0))));
end Init_Body;
-- implement a function to compute the X coordinate
-- x of the reference + distance * cos(angle)
function Compute_X
(Body_To_Move : Body_Type;
Turns_Around : Body_Type) return Float;
-- implement a function to compute the Y coordinate
-- y of the reference + distance * sin(angle)
function Compute_Y
(Body_To_Move : Body_Type;
Turns_Around : Body_Type) return Float;
---------------
-- Compute_X --
---------------
function Compute_X
(Body_To_Move : Body_Type;
Turns_Around : Body_Type) return Float
is
begin
return Turns_Around.Pos.X +
Body_To_Move.Distance * Cos (Body_To_Move.Angle);
end Compute_X;
---------------
-- Compute_X --
---------------
function Compute_X
(X_Ref : Float;
Angle : Float;
Distance : Float) return Float
is
begin
return X_Ref + Distance * Cos (Angle);
end Compute_X;
---------------
-- Compute_Y --
---------------
function Compute_Y
(Body_To_Move : Body_Type;
Turns_Around : Body_Type) return Float
is
begin
return Turns_Around.Pos.Y +
Body_To_Move.Distance * Sin (Body_To_Move.Angle);
end Compute_Y;
---------------
-- Compute_Y --
---------------
function Compute_Y
(Y_Ref : Float;
Angle : Float;
Distance : Float) return Float
is
begin
return Y_Ref + Distance * Sin (Angle);
end Compute_Y;
----------
-- Move --
----------
procedure Move
(Body_To_Move : in out Body_Type;
Turns_Around : Body_Type)
is
begin
Body_To_Move.Pos.X := Compute_X (Body_To_Move, Turns_Around);
Body_To_Move.Pos.Y := Compute_Y (Body_To_Move, Turns_Around);
Body_To_Move.Angle := Body_To_Move.Angle + Body_To_Move.Speed;
if Body_To_Move.With_Tail then
for I in Body_To_Move.Tail'First .. Body_To_Move.Tail'Last - 1 loop
Body_To_Move.Tail (I) := Body_To_Move.Tail (I + 1);
end loop;
Body_To_Move.Tail (T_Tail'Last) := Body_To_Move.Pos;
end if;
end Move;
------------
-- P_Body --
------------
protected body P_Body is
--------------
-- Get_Data --
--------------
function Get_Data return Body_Type is
begin
return Data;
end Get_Data;
--------------
-- Set_Data --
--------------
procedure Set_Data (B : Body_Type) is
begin
Data := B;
end Set_Data;
end P_Body;
protected body Dispatch_Tasks is
-------------------
-- Get_Next_Body --
-------------------
procedure Get_Next_Body (B : out Bodies_Enum) is
begin
B := Current;
if Current /= Bodies_Enum'Last then
Current := Bodies_Enum'Succ (Current);
end if;
end Get_Next_Body;
end Dispatch_Tasks;
-----------------
-- T_Move_Body --
-----------------
task body T_Move_Body is
-- declare a variable Now of type Time to record current time
Now : Time;
-- declare a constant Period of 40 milliseconds of type Time_Span defining the loop period
Period : constant Time_Span := Milliseconds (20);
Current : Body_Type;
Turns_Around : Body_Type;
B : Bodies_Enum;
begin
Dispatch_Tasks.Get_Next_Body (B);
loop
Now := Clock;
Current := Bodies (B).Get_Data;
Turns_Around := Bodies (Current.Turns_Around).Get_Data;
Move (Current, Turns_Around);
Bodies (B).Set_Data (Current);
delay until Now + Period;
end loop;
end T_Move_Body;
end Solar_System;
|
AdaCore/Ada_Drivers_Library | Ada | 11,538 | ads | -- Copyright (c) 2013, Nordic Semiconductor ASA
-- 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 Nordic Semiconductor ASA 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 spec has been automatically generated from nrf51.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NRF_SVD.GPIOTE is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Tasks asssociated with GPIOTE channels.
-- Tasks asssociated with GPIOTE channels.
type TASKS_OUT_Registers is array (0 .. 3) of HAL.UInt32;
-- Tasks asssociated with GPIOTE channels.
-- Tasks asssociated with GPIOTE channels.
type EVENTS_IN_Registers is array (0 .. 3) of HAL.UInt32;
-- Enable interrupt on IN[0] event.
type INTENSET_IN0_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENSET_IN0_Field use
(Disabled => 0,
Enabled => 1);
-- Enable interrupt on IN[0] event.
type INTENSET_IN0_Field_1 is
(-- Reset value for the field
Intenset_In0_Field_Reset,
-- Enable interrupt on write.
Set)
with Size => 1;
for INTENSET_IN0_Field_1 use
(Intenset_In0_Field_Reset => 0,
Set => 1);
-- INTENSET_IN array
type INTENSET_IN_Field_Array is array (0 .. 3) of INTENSET_IN0_Field_1
with Component_Size => 1, Size => 4;
-- Type definition for INTENSET_IN
type INTENSET_IN_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IN as a value
Val : HAL.UInt4;
when True =>
-- IN as an array
Arr : INTENSET_IN_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for INTENSET_IN_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- Enable interrupt on PORT event.
type INTENSET_PORT_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENSET_PORT_Field use
(Disabled => 0,
Enabled => 1);
-- Enable interrupt on PORT event.
type INTENSET_PORT_Field_1 is
(-- Reset value for the field
Intenset_Port_Field_Reset,
-- Enable interrupt on write.
Set)
with Size => 1;
for INTENSET_PORT_Field_1 use
(Intenset_Port_Field_Reset => 0,
Set => 1);
-- Interrupt enable set register.
type INTENSET_Register is record
-- Enable interrupt on IN[0] event.
IN_k : INTENSET_IN_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_4_30 : HAL.UInt27 := 16#0#;
-- Enable interrupt on PORT event.
PORT : INTENSET_PORT_Field_1 := Intenset_Port_Field_Reset;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENSET_Register use record
IN_k at 0 range 0 .. 3;
Reserved_4_30 at 0 range 4 .. 30;
PORT at 0 range 31 .. 31;
end record;
-- Disable interrupt on IN[0] event.
type INTENCLR_IN0_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENCLR_IN0_Field use
(Disabled => 0,
Enabled => 1);
-- Disable interrupt on IN[0] event.
type INTENCLR_IN0_Field_1 is
(-- Reset value for the field
Intenclr_In0_Field_Reset,
-- Disable interrupt on write.
Clear)
with Size => 1;
for INTENCLR_IN0_Field_1 use
(Intenclr_In0_Field_Reset => 0,
Clear => 1);
-- INTENCLR_IN array
type INTENCLR_IN_Field_Array is array (0 .. 3) of INTENCLR_IN0_Field_1
with Component_Size => 1, Size => 4;
-- Type definition for INTENCLR_IN
type INTENCLR_IN_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IN as a value
Val : HAL.UInt4;
when True =>
-- IN as an array
Arr : INTENCLR_IN_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for INTENCLR_IN_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- Disable interrupt on PORT event.
type INTENCLR_PORT_Field is
(-- Interrupt disabled.
Disabled,
-- Interrupt enabled.
Enabled)
with Size => 1;
for INTENCLR_PORT_Field use
(Disabled => 0,
Enabled => 1);
-- Disable interrupt on PORT event.
type INTENCLR_PORT_Field_1 is
(-- Reset value for the field
Intenclr_Port_Field_Reset,
-- Disable interrupt on write.
Clear)
with Size => 1;
for INTENCLR_PORT_Field_1 use
(Intenclr_Port_Field_Reset => 0,
Clear => 1);
-- Interrupt enable clear register.
type INTENCLR_Register is record
-- Disable interrupt on IN[0] event.
IN_k : INTENCLR_IN_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_4_30 : HAL.UInt27 := 16#0#;
-- Disable interrupt on PORT event.
PORT : INTENCLR_PORT_Field_1 := Intenclr_Port_Field_Reset;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for INTENCLR_Register use record
IN_k at 0 range 0 .. 3;
Reserved_4_30 at 0 range 4 .. 30;
PORT at 0 range 31 .. 31;
end record;
-- Mode
type CONFIG_MODE_Field is
(-- Disabled.
Disabled,
-- Channel configure in event mode.
Event,
-- Channel configure in task mode.
Task_k)
with Size => 2;
for CONFIG_MODE_Field use
(Disabled => 0,
Event => 1,
Task_k => 3);
subtype CONFIG_PSEL_Field is HAL.UInt5;
-- Effects on output when in Task mode, or events on input that generates
-- an event.
type CONFIG_POLARITY_Field is
(-- No task or event.
None,
-- Low to high.
Lotohi,
-- High to low.
Hitolo,
-- Toggle.
Toggle)
with Size => 2;
for CONFIG_POLARITY_Field use
(None => 0,
Lotohi => 1,
Hitolo => 2,
Toggle => 3);
-- Initial value of the output when the GPIOTE channel is configured as a
-- Task.
type CONFIG_OUTINIT_Field is
(-- Initial low output when in task mode.
Low,
-- Initial high output when in task mode.
High)
with Size => 1;
for CONFIG_OUTINIT_Field use
(Low => 0,
High => 1);
-- Channel configuration registers.
type CONFIG_Register is record
-- Mode
MODE : CONFIG_MODE_Field := NRF_SVD.GPIOTE.Disabled;
-- unspecified
Reserved_2_7 : HAL.UInt6 := 16#0#;
-- Pin select.
PSEL : CONFIG_PSEL_Field := 16#0#;
-- unspecified
Reserved_13_15 : HAL.UInt3 := 16#0#;
-- Effects on output when in Task mode, or events on input that
-- generates an event.
POLARITY : CONFIG_POLARITY_Field := NRF_SVD.GPIOTE.None;
-- unspecified
Reserved_18_19 : HAL.UInt2 := 16#0#;
-- Initial value of the output when the GPIOTE channel is configured as
-- a Task.
OUTINIT : CONFIG_OUTINIT_Field := NRF_SVD.GPIOTE.Low;
-- unspecified
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CONFIG_Register use record
MODE at 0 range 0 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
PSEL at 0 range 8 .. 12;
Reserved_13_15 at 0 range 13 .. 15;
POLARITY at 0 range 16 .. 17;
Reserved_18_19 at 0 range 18 .. 19;
OUTINIT at 0 range 20 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
-- Channel configuration registers.
type CONFIG_Registers is array (0 .. 3) of CONFIG_Register;
-- Peripheral power control.
type POWER_POWER_Field is
(-- Module power disabled.
Disabled,
-- Module power enabled.
Enabled)
with Size => 1;
for POWER_POWER_Field use
(Disabled => 0,
Enabled => 1);
-- Peripheral power control.
type POWER_Register is record
-- Peripheral power control.
POWER : POWER_POWER_Field := NRF_SVD.GPIOTE.Disabled;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for POWER_Register use record
POWER at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- GPIO tasks and events.
type GPIOTE_Peripheral is record
-- Tasks asssociated with GPIOTE channels.
TASKS_OUT : aliased TASKS_OUT_Registers;
-- Tasks asssociated with GPIOTE channels.
EVENTS_IN : aliased EVENTS_IN_Registers;
-- Event generated from multiple pins.
EVENTS_PORT : aliased HAL.UInt32;
-- Interrupt enable set register.
INTENSET : aliased INTENSET_Register;
-- Interrupt enable clear register.
INTENCLR : aliased INTENCLR_Register;
-- Channel configuration registers.
CONFIG : aliased CONFIG_Registers;
-- Peripheral power control.
POWER : aliased POWER_Register;
end record
with Volatile;
for GPIOTE_Peripheral use record
TASKS_OUT at 16#0# range 0 .. 127;
EVENTS_IN at 16#100# range 0 .. 127;
EVENTS_PORT at 16#17C# range 0 .. 31;
INTENSET at 16#304# range 0 .. 31;
INTENCLR at 16#308# range 0 .. 31;
CONFIG at 16#510# range 0 .. 127;
POWER at 16#FFC# range 0 .. 31;
end record;
-- GPIO tasks and events.
GPIOTE_Periph : aliased GPIOTE_Peripheral
with Import, Address => GPIOTE_Base;
end NRF_SVD.GPIOTE;
|
Gabriel-Degret/adalib | Ada | 3,759 | ads | -- Standard Ada library specification
-- Copyright (c) 2003-2018 Maxim Reznik <[email protected]>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
with Ada.Characters.Conversions;
package Ada.Characters.Handling is
pragma Pure (Handling);
-- Character classification functions
function Is_Control (Item : in Character) return Boolean;
function Is_Graphic (Item : in Character) return Boolean;
function Is_Letter (Item : in Character) return Boolean;
function Is_Lower (Item : in Character) return Boolean;
function Is_Upper (Item : in Character) return Boolean;
function Is_Basic (Item : in Character) return Boolean;
function Is_Digit (Item : in Character) return Boolean;
function Is_Decimal_Digit (Item : in Character) return Boolean
renames Is_Digit;
function Is_Hexadecimal_Digit (Item : in Character) return Boolean;
function Is_Alphanumeric (Item : in Character) return Boolean;
function Is_Special (Item : in Character) return Boolean;
function Is_Line_Terminator (Item : in Character) return Boolean;
function Is_Mark (Item : in Character) return Boolean;
function Is_Other_Format (Item : in Character) return Boolean;
function Is_Punctuation_Connector (Item : in Character) return Boolean;
function Is_Space (Item : in Character) return Boolean;
-- Conversion functions for Character and String
function To_Lower (Item : in Character) return Character;
function To_Upper (Item : in Character) return Character;
function To_Basic (Item : in Character) return Character;
function To_Lower (Item : in String) return String;
function To_Upper (Item : in String) return String;
function To_Basic (Item : in String) return String;
-- Classifications of and conversions between Character and ISO 646
subtype ISO_646 is
Character range Character'Val(0) .. Character'Val(127);
function Is_ISO_646 (Item : in Character) return Boolean;
function Is_ISO_646 (Item : in String) return Boolean;
function To_ISO_646 (Item : in Character;
Substitute : in ISO_646 := ' ')
return ISO_646;
function To_ISO_646 (Item : in String;
Substitute : in ISO_646 := ' ')
return String;
-- The functions Is_Character, Is_String, To_Character, To_String,
-- To_Wide_Character and To_Wide_String are obsolescent; see J.14.
function Is_Character (Item : in Wide_Character) return Boolean
renames Conversions.Is_Character;
function Is_String (Item : in Wide_String) return Boolean
renames Conversions.Is_String;
function To_Character (Item : in Wide_Character;
Substitute : in Character := ' ')
return Character
renames Conversions.To_Character;
function To_String (Item : in Wide_String;
Substitute : in Character := ' ')
return String
renames Conversions.To_String;
function To_Wide_Character (Item : in Character) return Wide_Character
renames Conversions.To_Wide_Character;
function To_Wide_String (Item : in String) return Wide_String
renames Conversions.To_Wide_String;
end Ada.Characters.Handling;
|
docandrew/troodon | Ada | 2,164 | adb | with Ada.IO_Exceptions;
package body GID.Buffering is
procedure Fill_Buffer(b: in out Input_buffer);
-- ^ Spec here to avoid warning by 'Get_Byte' below (GNAT 2009):
-- warning: call to subprogram with no separate spec prevents inlining
procedure Fill_Buffer(b: in out Input_buffer)
is
--
procedure BlockRead(
buffer : out Byte_array;
actually_read: out Natural
)
is
use Ada.Streams;
Last_Read: Stream_Element_Offset;
begin
if is_mapping_possible then
declare
SE_Buffer_mapped: Stream_Element_Array (1 .. buffer'Length);
-- direct mapping: buffer = SE_Buffer_mapped
for SE_Buffer_mapped'Address use buffer'Address;
pragma Import (Ada, SE_Buffer_mapped);
begin
Read(b.stream.all, SE_Buffer_mapped, Last_Read);
end;
else
declare
SE_Buffer: Stream_Element_Array (1 .. buffer'Length);
-- need to copy array (slightly slower)
begin
Read(b.stream.all, SE_Buffer, Last_Read);
for i in buffer'Range loop
buffer(i):= U8(SE_Buffer(Stream_Element_Offset(i-buffer'First)+SE_Buffer'First));
end loop;
end;
end if;
actually_read:= Natural(Last_Read);
end BlockRead;
--
begin
BlockRead(
buffer => b.data,
actually_read => b.MaxInBufIdx
);
b.InputEoF:= b.MaxInBufIdx = 0;
b.InBufIdx := 1;
end Fill_Buffer;
procedure Attach_Stream(
b : out Input_buffer;
stm : in Stream_Access
)
is
begin
b.stream:= stm;
-- Fill_Buffer(b) will be performed on first call of Get_Byte
end Attach_Stream;
function Is_stream_attached(b: Input_buffer) return Boolean is
begin
return b.stream /= null;
end Is_stream_attached;
procedure Get_Byte(b: in out Input_buffer; byte: out U8) is
begin
if b.InBufIdx > b.MaxInBufIdx then
Fill_Buffer(b);
if b.InputEoF then
raise Ada.IO_Exceptions.End_Error;
end if;
end if;
byte:= b.data(b.InBufIdx);
b.InBufIdx:= b.InBufIdx + 1;
end Get_Byte;
end GID.Buffering;
|
kjseefried/coreland-cgbc | Ada | 901 | adb | with Ada.Strings;
with CGBC.Bounded_Wide_Strings;
with Test;
procedure T_WBstr_Append_RB03 is
package BS renames CGBC.Bounded_Wide_Strings;
TC : Test.Context_t;
S1 : BS.Bounded_String (8);
S : constant Wide_String := " H";
begin
Test.Initialize
(Test_Context => TC,
Program => "t_wbstr_append_rb03",
Test_DB => "TEST_DB",
Test_Results => "TEST_RESULTS");
BS.Append (S1, "ABCDEFGH");
-- As Append_R03 but with unusual bounds on New_Item.
pragma Assert (S (11 .. 11) = "H");
BS.Append
(Source => S1,
New_Item => S (11 .. 11),
Drop => Ada.Strings.Right);
Test.Check (TC, 1298, BS.Length (S1) = 8, "BS.Length (S1) = 8");
Test.Check (TC, 1299, BS.Maximum_Length (S1) = 8, "BS.Maximum_Length (S1) = 8");
Test.Check (TC, 1300, BS.To_String (S1) = "ABCDEFGH", "BS.To_String (S1) = ""ABCDEFGH""");
end T_WBstr_Append_RB03;
|
sonneveld/adazmq | Ada | 2,386 | adb | -- Reading from multiple sockets
-- This version uses a simple recv loop
with Ada.Command_Line;
with Ada.Text_IO;
with GNAT.Formatted_String;
with Ada.Calendar;
with ZMQ;
procedure MSReader is
use type Ada.Calendar.Time;
use type GNAT.Formatted_String.Formatted_String;
function Main return Ada.Command_Line.Exit_Status
is
begin
declare
-- Prepare our context and socket
Context : ZMQ.Context_Type := ZMQ.New_Context;
-- Connect to task ventilator
Receiver : constant ZMQ.Socket_Type'Class := Context.New_Socket (ZMQ.ZMQ_PULL);
-- Connect to weather server
Subscriber : constant ZMQ.Socket_Type'Class := Context.New_Socket (ZMQ.ZMQ_SUB);
begin
Receiver.Connect ("tcp://localhost:5557");
Subscriber.Connect ("tcp://localhost:5556");
Subscriber.Set_Sock_Opt (ZMQ.ZMQ_SUBSCRIBE, -(+"%05d "&Integer (10001)));
-- Process messages from both sockets
-- We prioritize traffic from the task ventilator
loop
Receiver_Loop :
loop
begin
declare
Msg : String := Receiver.Recv (Do_Not_Wait => True);
begin
-- Process task
Ada.Text_IO.Put_Line ("task");
null;
end;
exception
when ZMQ.ZMQ_Error =>
-- EAGAIN
exit Receiver_Loop;
end;
end loop Receiver_Loop;
Subscriber_Loop :
loop
begin
declare
Msg : String := Subscriber.Recv (Do_Not_Wait => True);
begin
-- Process weather update
Ada.Text_IO.Put_Line ("wu");
null;
end;
exception
when ZMQ.ZMQ_Error =>
-- EAGAIN
exit Subscriber_Loop;
end;
end loop Subscriber_Loop;
-- No activity, so sleep for 1 msec
delay 0.001;
end loop;
Receiver.Close;
Subscriber.Close;
Context.Term;
end;
return 0;
end Main;
begin
Ada.Command_Line.Set_Exit_Status (Main);
end MSReader;
|
zhmu/ananas | Ada | 4,043 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ W I D E _ T E X T _ I O . F I X E D _ I O --
-- --
-- S p e c --
-- --
-- Copyright (C) 2020-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the implementation for Ada.Wide_Wide_Text_IO.Fixed_IO
-- Routines in this package are identical semantically to those in Fixed_IO,
-- except that the default parameters have been removed because they are
-- supplied explicitly by the calls from within these units, and there are
-- additional Num and Den parameters giving the value of Num'Small, as well
-- as For0 and Aft0 giving some properties of Num'Small. In addition the Get
-- routines return the value rather than store it in an Out parameter.
private generic
type Int is range <>;
with function Scan
(Str : String;
Ptr : not null access Integer;
Max : Integer;
Num : Int;
Den : Int) return Int;
with procedure Set_Image
(V : Int;
S : in out String;
P : in out Natural;
Num : Int;
Den : Int;
For0 : Natural;
Aft0 : Natural;
Fore : Natural;
Aft : Natural;
Exp : Natural);
package Ada.Wide_Wide_Text_IO.Fixed_Aux is
function Get
(File : File_Type;
Width : Field;
Num : Int;
Den : Int) return Int;
procedure Put
(File : File_Type;
Item : Int;
Fore : Field;
Aft : Field;
Exp : Natural;
Num : Int;
Den : Int;
For0 : Natural;
Aft0 : Natural);
function Gets
(From : String;
Last : out Positive;
Num : Int;
Den : Int) return Int;
procedure Puts
(To : out String;
Item : Int;
Aft : Field;
Exp : Natural;
Num : Int;
Den : Int;
For0 : Natural;
Aft0 : Natural);
end Ada.Wide_Wide_Text_IO.Fixed_Aux;
|
optikos/oasis | Ada | 426 | ads | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package Program.Elements.Paths is
pragma Pure (Program.Elements.Paths);
type Path is limited interface and Program.Elements.Element;
type Path_Access is access all Path'Class with Storage_Size => 0;
end Program.Elements.Paths;
|
rbkmoney/swagger-codegen | Ada | 11,797 | adb | -- Swagger Petstore
-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
--
-- OpenAPI spec version: 1.0.0
-- Contact: [email protected]
--
-- NOTE: This package is auto generated by the swagger code generator 2.3.0-SNAPSHOT.
-- https://github.com/swagger-api/swagger-codegen.git
-- Do not edit the class manually.
package body Samples.Petstore.Models is
use Swagger.Streams;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ApiResponse_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("code", Value.Code);
Into.Write_Entity ("type", Value.P_Type);
Into.Write_Entity ("message", Value.Message);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ApiResponse_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ApiResponse_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "code", Value.Code);
Swagger.Streams.Deserialize (Object, "type", Value.P_Type);
Swagger.Streams.Deserialize (Object, "message", Value.Message);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ApiResponse_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : ApiResponse_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Category_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "id", Value.Id);
Into.Write_Entity ("name", Value.Name);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Category_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Category_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "id", Value.Id);
Swagger.Streams.Deserialize (Object, "name", Value.Name);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Category_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Category_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Tag_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "id", Value.Id);
Into.Write_Entity ("name", Value.Name);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Tag_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Tag_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "id", Value.Id);
Swagger.Streams.Deserialize (Object, "name", Value.Name);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Tag_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Tag_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in User_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "id", Value.Id);
Into.Write_Entity ("username", Value.Username);
Into.Write_Entity ("firstName", Value.First_Name);
Into.Write_Entity ("lastName", Value.Last_Name);
Into.Write_Entity ("email", Value.Email);
Into.Write_Entity ("password", Value.Password);
Into.Write_Entity ("phone", Value.Phone);
Into.Write_Entity ("userStatus", Value.User_Status);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in User_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out User_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "id", Value.Id);
Swagger.Streams.Deserialize (Object, "username", Value.Username);
Swagger.Streams.Deserialize (Object, "firstName", Value.First_Name);
Swagger.Streams.Deserialize (Object, "lastName", Value.Last_Name);
Swagger.Streams.Deserialize (Object, "email", Value.Email);
Swagger.Streams.Deserialize (Object, "password", Value.Password);
Swagger.Streams.Deserialize (Object, "phone", Value.Phone);
Swagger.Streams.Deserialize (Object, "userStatus", Value.User_Status);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out User_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : User_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Order_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "id", Value.Id);
Serialize (Into, "petId", Value.Pet_Id);
Into.Write_Entity ("quantity", Value.Quantity);
Into.Write_Entity ("shipDate", Value.Ship_Date);
Into.Write_Entity ("status", Value.Status);
Into.Write_Entity ("complete", Value.Complete);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Order_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Order_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "id", Value.Id);
Swagger.Streams.Deserialize (Object, "petId", Value.Pet_Id);
Swagger.Streams.Deserialize (Object, "quantity", Value.Quantity);
Deserialize (Object, "shipDate", Value.Ship_Date);
Swagger.Streams.Deserialize (Object, "status", Value.Status);
Swagger.Streams.Deserialize (Object, "complete", Value.Complete);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Order_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Order_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Pet_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "id", Value.Id);
Serialize (Into, "category", Value.Category);
Into.Write_Entity ("name", Value.Name);
Serialize (Into, "photoUrls", Value.Photo_Urls);
Serialize (Into, "tags", Value.Tags);
Into.Write_Entity ("status", Value.Status);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Pet_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Pet_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "id", Value.Id);
Deserialize (Object, "category", Value.Category);
Swagger.Streams.Deserialize (Object, "name", Value.Name);
Swagger.Streams.Deserialize (Object, "photoUrls", Value.Photo_Urls);
Deserialize (Object, "tags", Value.Tags);
Swagger.Streams.Deserialize (Object, "status", Value.Status);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Pet_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Pet_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
end Samples.Petstore.Models;
|
sebsgit/textproc | Ada | 1,976 | ads | with Interfaces.C; use Interfaces.C;
with Interfaces.C.Pointers;
with Interfaces.C.Strings; use Interfaces.C.Strings;
package StbiWrapper is
pragma Assertion_Policy (Pre => Check,
Post => Check,
Type_Invariant => Check);
package C renames Interfaces.C;
type IntArray is array (C.size_t range <>) of aliased C.int;
type UCharArray is array (C.size_t range <>) of aliased C.unsigned_char;
package IntPtr is
new C.Pointers (Index => C.size_t,
Element => C.int,
Element_Array => IntArray,
Default_Terminator => C.int(0));
package UCharPtr is
new C.Pointers (Index => C.size_t,
Element => C.unsigned_char,
Element_Array => UCharArray,
Default_Terminator => C.unsigned_char(0));
use IntPtr;
use UCharPtr;
--extern unsigned char *stbi_load (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels);
--extern int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
--extern void free(unsigned char*)
function writePng(filename: C.Strings.chars_ptr; width, height, compression: C.int; data: UCharPtr.Pointer; stride_in_bytes: C.int) return C.int
with
import => True,
Convention => C,
External_Name => "stbi_write_png",
Pre => (width > 0 and height > 0 and stride_in_bytes >= width and data /= null),
Post => (writePng'Result in 0 .. 1);
type ImageData is record
pixels: UCharPtr.Pointer;
width, height, nChannels: C.int;
end record;
function load(filename: C.Strings.chars_ptr; desired_channels: C.int := 3) return ImageData
with
Pre => (desired_channels in 1 .. 4),
Post => check(load'Result);
procedure free(data: ImageData);
function check(data: ImageData) return Boolean;
end StbiWrapper;
|
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.Chart_Symbol_Name_Attributes;
package Matreshka.ODF_Chart.Symbol_Name_Attributes is
type Chart_Symbol_Name_Attribute_Node is
new Matreshka.ODF_Chart.Abstract_Chart_Attribute_Node
and ODF.DOM.Chart_Symbol_Name_Attributes.ODF_Chart_Symbol_Name_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Chart_Symbol_Name_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Chart_Symbol_Name_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Chart.Symbol_Name_Attributes;
|
stcarrez/ada-util | Ada | 2,787 | adb | -----------------------------------------------------------------------
-- util-processes-tools -- System specific and low level operations
-- Copyright (C) 2018, 2019 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.Systems.Os;
with Util.Streams.Texts;
package body Util.Processes.Tools is
procedure Execute (Command : in String;
Process : in out Util.Streams.Pipes.Pipe_Stream;
Output : in out Util.Strings.Vectors.Vector;
Status : out Integer) is
Text : Util.Streams.Texts.Reader_Stream;
begin
Text.Initialize (Process'Unchecked_Access);
Process.Open (Command, Util.Processes.READ);
while not Text.Is_Eof loop
declare
Line : Ada.Strings.Unbounded.Unbounded_String;
begin
Text.Read_Line (Line, Strip => True);
if Ada.Strings.Unbounded.Length (Line) > 0 then
Output.Append (Ada.Strings.Unbounded.To_String (Line));
end if;
end;
end loop;
Process.Close;
Status := Process.Get_Exit_Status;
end Execute;
-- ------------------------------
-- Execute the command and append the output in the vector array.
-- The program output is read line by line and the standard input is closed.
-- Return the program exit status.
-- ------------------------------
procedure Execute (Command : in String;
Output : in out Util.Strings.Vectors.Vector;
Status : out Integer) is
Proc : Util.Streams.Pipes.Pipe_Stream;
begin
Proc.Add_Close (Util.Systems.Os.STDIN_FILENO);
Execute (Command, Proc, Output, Status);
end Execute;
procedure Execute (Command : in String;
Input_Path : in String;
Output : in out Util.Strings.Vectors.Vector;
Status : out Integer) is
Proc : Util.Streams.Pipes.Pipe_Stream;
begin
Proc.Set_Input_Stream (Input_Path);
Execute (Command, Proc, Output, Status);
end Execute;
end Util.Processes.Tools;
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.