------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008-2010 Vadim Godunko <vgodunko@gmail.com>                 --
--                                                                          --
-- QtAda 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 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License distributed with QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
with Qt4.Child_Events;
with Qt4.Events;
with Qt4.Timer_Events;
with Qt_Ada.Internals.Events;
with Qt_Ada.Internals.Object_Registry;
pragma Elaborate (Qt_Ada.Internals.Object_Registry);
with Qt_Ada.Internals.Objects;
with Qt_Ada.Internals.Objects.Object_Utilities;

package body Qt4.IO_Devices.Directors is

   function qt_metacall_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Kind : Qt4.Meta_Objects.Call;
     Id   : Qt4.Q_Integer;
     Args : Qt4.Address_Pointer)
       return Qt4.Q_Integer;
   pragma Import (C, qt_metacall_wrapper,
                  "__Qt4Ada_QIODevice_qt_metacall_wrapper");

   function qt_metacast_wrapper
    (Self  : not null access Qt_Ada.Internals.Objects.QObject;
     Class : Interfaces.C.char_array)
       return System.Address;
   pragma Import (C, qt_metacast_wrapper,
                  "__Qt4Ada_QIODevice_qt_metacast_wrapper");

   function atEnd_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool;
   pragma Export (C, atEnd_0_dispatch,
                     "__Qt4Ada_QIODevice_atEnd_0_dispatch");
   pragma Warnings (Off, atEnd_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function atEnd_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, atEnd_0_wrapper,
                     "__Qt4Ada_QIODevice_atEnd_0_wrapper");

   function bytesAvailable_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64;
   pragma Export (C, bytesAvailable_0_dispatch,
                     "__Qt4Ada_QIODevice_bytesAvailable_0_dispatch");
   pragma Warnings (Off, bytesAvailable_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function bytesAvailable_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer_64;
   pragma Import (C, bytesAvailable_0_wrapper,
                     "__Qt4Ada_QIODevice_bytesAvailable_0_wrapper");

   function bytesToWrite_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64;
   pragma Export (C, bytesToWrite_0_dispatch,
                     "__Qt4Ada_QIODevice_bytesToWrite_0_dispatch");
   pragma Warnings (Off, bytesToWrite_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function bytesToWrite_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer_64;
   pragma Import (C, bytesToWrite_0_wrapper,
                     "__Qt4Ada_QIODevice_bytesToWrite_0_wrapper");

   function canReadLine_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool;
   pragma Export (C, canReadLine_0_dispatch,
                     "__Qt4Ada_QIODevice_canReadLine_0_dispatch");
   pragma Warnings (Off, canReadLine_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function canReadLine_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, canReadLine_0_wrapper,
                     "__Qt4Ada_QIODevice_canReadLine_0_wrapper");

   procedure close_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access);
   pragma Export (C, close_0_dispatch,
                     "__Qt4Ada_QIODevice_close_0_dispatch");
   pragma Warnings (Off, close_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   procedure close_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, close_0_wrapper,
                     "__Qt4Ada_QIODevice_close_0_wrapper");

   function isSequential_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool;
   pragma Export (C, isSequential_0_dispatch,
                     "__Qt4Ada_QIODevice_isSequential_0_dispatch");
   pragma Warnings (Off, isSequential_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function isSequential_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, isSequential_0_wrapper,
                     "__Qt4Ada_QIODevice_isSequential_0_wrapper");

   function pos_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64;
   pragma Export (C, pos_0_dispatch,
                     "__Qt4Ada_QIODevice_pos_0_dispatch");
   pragma Warnings (Off, pos_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function pos_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer_64;
   pragma Import (C, pos_0_wrapper,
                     "__Qt4Ada_QIODevice_pos_0_wrapper");

   function reset_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool;
   pragma Export (C, reset_0_dispatch,
                     "__Qt4Ada_QIODevice_reset_0_dispatch");
   pragma Warnings (Off, reset_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function reset_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, reset_0_wrapper,
                     "__Qt4Ada_QIODevice_reset_0_wrapper");

   function seek_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Pos : Qt4.Q_Integer_64)
       return Qt4.bool;
   pragma Export (C, seek_0_dispatch,
                     "__Qt4Ada_QIODevice_seek_0_dispatch");
   pragma Warnings (Off, seek_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function seek_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Pos : Qt4.Q_Integer_64)
       return Qt4.bool;
   pragma Import (C, seek_0_wrapper,
                     "__Qt4Ada_QIODevice_seek_0_wrapper");

   function size_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64;
   pragma Export (C, size_0_dispatch,
                     "__Qt4Ada_QIODevice_size_0_dispatch");
   pragma Warnings (Off, size_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function size_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer_64;
   pragma Import (C, size_0_wrapper,
                     "__Qt4Ada_QIODevice_size_0_wrapper");

   procedure aboutToClose_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, aboutToClose_0_wrapper,
                     "__Qt4Ada_QIODevice_aboutToClose_0_wrapper");

   procedure bytesWritten_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Bytes : Qt4.Q_Integer_64);
   pragma Import (C, bytesWritten_0_wrapper,
                     "__Qt4Ada_QIODevice_bytesWritten_0_wrapper");

   procedure readChannelFinished_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, readChannelFinished_0_wrapper,
                     "__Qt4Ada_QIODevice_readChannelFinished_0_wrapper");

   procedure readyRead_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, readyRead_0_wrapper,
                     "__Qt4Ada_QIODevice_readyRead_0_wrapper");

   procedure setErrorString_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Error_String : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setErrorString_0_wrapper,
                     "__Qt4Ada_QIODevice_setErrorString_0_wrapper");

   procedure childEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, childEvent_0_wrapper,
                     "__Qt4Ada_QIODevice_childEvent_0_wrapper");

   procedure customEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, customEvent_0_wrapper,
                     "__Qt4Ada_QIODevice_customEvent_0_wrapper");

   procedure timerEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, timerEvent_0_wrapper,
                     "__Qt4Ada_QIODevice_timerEvent_0_wrapper");

   function sender_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, sender_0_wrapper,
                     "__Qt4Ada_QIODevice_sender_0_wrapper");

   pragma Style_Checks ("N");

   ----------------------
   -- atEnd_0_dispatch --
   ----------------------

   function atEnd_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool
   is
   begin
      return
        Qt4.To_bool
         (Q_IO_Device_Director'Class (Self.all).At_End);
   end atEnd_0_dispatch;

   ------------
   -- At_End --
   ------------

   overriding
   function At_End
    (Self : not null access constant Q_IO_Device_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (atEnd_0_wrapper
           (Q_IO_Device_Director'Class (Self.all).QObject_View));
   end At_End;

   -------------------------------
   -- bytesAvailable_0_dispatch --
   -------------------------------

   function bytesAvailable_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64
   is
   begin
      return
        Q_IO_Device_Director'Class (Self.all).Bytes_Available;
   end bytesAvailable_0_dispatch;

   ---------------------
   -- Bytes_Available --
   ---------------------

   overriding
   function Bytes_Available
    (Self : not null access constant Q_IO_Device_Director)
       return Qt4.Q_Integer_64
   is
   begin
      return
        bytesAvailable_0_wrapper
         (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Bytes_Available;

   -----------------------------
   -- bytesToWrite_0_dispatch --
   -----------------------------

   function bytesToWrite_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64
   is
   begin
      return
        Q_IO_Device_Director'Class (Self.all).Bytes_To_Write;
   end bytesToWrite_0_dispatch;

   --------------------
   -- Bytes_To_Write --
   --------------------

   overriding
   function Bytes_To_Write
    (Self : not null access constant Q_IO_Device_Director)
       return Qt4.Q_Integer_64
   is
   begin
      return
        bytesToWrite_0_wrapper
         (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Bytes_To_Write;

   ----------------------------
   -- canReadLine_0_dispatch --
   ----------------------------

   function canReadLine_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool
   is
   begin
      return
        Qt4.To_bool
         (Q_IO_Device_Director'Class (Self.all).Can_Read_Line);
   end canReadLine_0_dispatch;

   -------------------
   -- Can_Read_Line --
   -------------------

   overriding
   function Can_Read_Line
    (Self : not null access constant Q_IO_Device_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (canReadLine_0_wrapper
           (Q_IO_Device_Director'Class (Self.all).QObject_View));
   end Can_Read_Line;

   ----------------------
   -- close_0_dispatch --
   ----------------------

   procedure close_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
   is
   begin
      Q_IO_Device_Director'Class (Self.all).Close;
   end close_0_dispatch;

   -----------
   -- Close --
   -----------

   overriding
   procedure Close
    (Self : not null access Q_IO_Device_Director)
   is
   begin
      close_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Close;

   -----------------------------
   -- isSequential_0_dispatch --
   -----------------------------

   function isSequential_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool
   is
   begin
      return
        Qt4.To_bool
         (Q_IO_Device_Director'Class (Self.all).Is_Sequential);
   end isSequential_0_dispatch;

   -------------------
   -- Is_Sequential --
   -------------------

   overriding
   function Is_Sequential
    (Self : not null access constant Q_IO_Device_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isSequential_0_wrapper
           (Q_IO_Device_Director'Class (Self.all).QObject_View));
   end Is_Sequential;

   --------------------
   -- pos_0_dispatch --
   --------------------

   function pos_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64
   is
   begin
      return
        Q_IO_Device_Director'Class (Self.all).Pos;
   end pos_0_dispatch;

   ---------
   -- Pos --
   ---------

   overriding
   function Pos
    (Self : not null access constant Q_IO_Device_Director)
       return Qt4.Q_Integer_64
   is
   begin
      return
        pos_0_wrapper
         (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Pos;

   ----------------------
   -- reset_0_dispatch --
   ----------------------

   function reset_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool
   is
   begin
      return
        Qt4.To_bool
         (Q_IO_Device_Director'Class (Self.all).Reset);
   end reset_0_dispatch;

   -----------
   -- Reset --
   -----------

   overriding
   function Reset
    (Self : not null access Q_IO_Device_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (reset_0_wrapper
           (Q_IO_Device_Director'Class (Self.all).QObject_View));
   end Reset;

   ---------------------
   -- seek_0_dispatch --
   ---------------------

   function seek_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Pos : Qt4.Q_Integer_64)
       return Qt4.bool
   is
   begin
      return
        Qt4.To_bool
         (Q_IO_Device_Director'Class (Self.all).Seek
           (Pos));
   end seek_0_dispatch;

   ----------
   -- Seek --
   ----------

   overriding
   function Seek
    (Self : not null access Q_IO_Device_Director;
     Pos : Qt4.Q_Integer_64)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (seek_0_wrapper
           (Q_IO_Device_Director'Class (Self.all).QObject_View,
            Pos));
   end Seek;

   ---------------------
   -- size_0_dispatch --
   ---------------------

   function size_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer_64
   is
   begin
      return
        Q_IO_Device_Director'Class (Self.all).Size;
   end size_0_dispatch;

   ----------
   -- Size --
   ----------

   overriding
   function Size
    (Self : not null access constant Q_IO_Device_Director)
       return Qt4.Q_Integer_64
   is
   begin
      return
        size_0_wrapper
         (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Size;

   -------------------------
   -- Emit_About_To_Close --
   -------------------------

   not overriding
   procedure Emit_About_To_Close
    (Self : not null access Q_IO_Device_Director)
   is
   begin
      aboutToClose_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Emit_About_To_Close;

   ------------------------
   -- Emit_Bytes_Written --
   ------------------------

   not overriding
   procedure Emit_Bytes_Written
    (Self : not null access Q_IO_Device_Director;
     Bytes : Qt4.Q_Integer_64)
   is
   begin
      bytesWritten_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View,
        Bytes);
   end Emit_Bytes_Written;

   --------------------------------
   -- Emit_Read_Channel_Finished --
   --------------------------------

   not overriding
   procedure Emit_Read_Channel_Finished
    (Self : not null access Q_IO_Device_Director)
   is
   begin
      readChannelFinished_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Emit_Read_Channel_Finished;

   ---------------------
   -- Emit_Ready_Read --
   ---------------------

   not overriding
   procedure Emit_Ready_Read
    (Self : not null access Q_IO_Device_Director)
   is
   begin
      readyRead_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View);
   end Emit_Ready_Read;

   ----------------------
   -- Set_Error_String --
   ----------------------

   not overriding
   procedure Set_Error_String
    (Self : not null access Q_IO_Device_Director;
     Error_String : Qt4.Strings.Q_String)
   is
   begin
      setErrorString_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View,
        Qt4.Strings.Internals.QString_View (Error_String));
   end Set_Error_String;

   -----------------
   -- Child_Event --
   -----------------

   overriding
   procedure Child_Event
    (Self : not null access Q_IO_Device_Director;
     Event : not null access Qt4.Child_Events.Q_Child_Event'Class)
   is
   begin
      childEvent_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Child_Event;

   ------------------
   -- Custom_Event --
   ------------------

   overriding
   procedure Custom_Event
    (Self : not null access Q_IO_Device_Director;
     Event : not null access Qt4.Events.Q_Event'Class)
   is
   begin
      customEvent_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Custom_Event;

   -----------------
   -- Timer_Event --
   -----------------

   overriding
   procedure Timer_Event
    (Self : not null access Q_IO_Device_Director;
     Event : not null access Qt4.Timer_Events.Q_Timer_Event'Class)
   is
   begin
      timerEvent_0_wrapper
       (Q_IO_Device_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Timer_Event;

   ------------
   -- Sender --
   ------------

   overriding
   function Sender
    (Self : not null access constant Q_IO_Device_Director)
       return access Qt4.Objects.Q_Object'Class
   is
   begin
      return
        Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_Q_Object
         (sender_0_wrapper
           (Q_IO_Device_Director'Class (Self.all).QObject_View));
   end Sender;

begin
   Qt_Ada.Internals.Object_Registry.Register_Director
    ("QIODevice", qt_metacast_wrapper'Access, qt_metacall_wrapper'Access);

end Qt4.IO_Devices.Directors;
