pragma Style_Checks ("NM32766");
pragma Warnings (Off, "use of an anonymous access type allocator");
pragma Warnings (Off, "unnecessary with of ancestor");

---------------------------------------------------
--  This file has been generated automatically from
--  /pbulk/work/net/ada-polyorb/work/PolyORB-25.0/idls/cos/time/CosTime.idl
--  by IAC (IDL to Ada Compiler) 25.0w (rev. unknown).
---------------------------------------------------
--  NOTE: If you modify this file by hand, your
--  changes will be lost when you re-run the
--  IDL to Ada compiler.
---------------------------------------------------

with PolyORB.Any.NVList;
with TimeBase.Helper;
with PolyORB.Any;
with PolyORB.Requests;
with PolyORB.Types;
with PolyORB.CORBA_P.Interceptors_Hooks;
with PolyORB.CORBA_P.Exceptions;
with CosTime.Helper;
with CORBA.Object.Helper;
with CosTime.UTO.Helper;
with CosTime.TIO.Helper;

package body CosTime.TIO is

   get_time_interval_Result_Name_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("Result");

   --------------------------------
   -- get_time_interval_Result_Ü --
   --------------------------------

   function get_time_interval_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (get_time_interval_Result_Ü);
   begin
      return (Name => get_time_interval_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (TimeBase.Helper.TC_IntervalT),
      Arg_Modes => 0);
   end get_time_interval_Result_Ü;

   -----------------------
   -- get_time_interval --
   -----------------------

   function get_time_interval
     (Self : Ref)
     return TimeBase.IntervalT
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : TimeBase.IntervalT;
      pragma Warnings (Off, Result_Ü);
      pragma Suppress (Validity_Check, Result_Ü);
      Arg_CC_Result_Ü_Ü : aliased PolyORB.Any.Content'Class :=
        TimeBase.Helper.Internals.Wrap
           (Result_Ü'Unrestricted_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        get_time_interval_Result_Ü;
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      --  Create the Argument list
      PolyORB.Any.NVList.Create
        (Argument_List_Ü);
      --  Setting the result value
      PolyORB.Any.Set_Value
        (PolyORB.Any.Get_Container
           (Result_Nv_Ü.Argument).all,
         Arg_CC_Result_Ü_Ü'Unrestricted_Access);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "_get_time_interval",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü);
      --  Invoking the request (synchronously or asynchronously)
      PolyORB.CORBA_P.Interceptors_Hooks.Client_Invoke
        (Request_Ü'Access,
         PolyORB.Requests.Flags
           (0));
      --  Raise exception, if needed
      PolyORB.CORBA_P.Exceptions.Request_Raise_Occurrence
        (Request_Ü);
      --  Return value
      return Result_Ü;
   end get_time_interval;

   spans_Arg_Name_time_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("time");

   spans_Arg_Name_overlap_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("overlap");

   spans_Result_Name_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("Result");

   --------------------
   -- spans_Result_Ü --
   --------------------

   function spans_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (spans_Result_Ü);
   begin
      return (Name => spans_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosTime.Helper.TC_OverlapType),
      Arg_Modes => 0);
   end spans_Result_Ü;

   -----------
   -- spans --
   -----------

   procedure spans
     (Self : Ref;
      time : CosTime.UTO.Ref;
      overlap : out CosTime.TIO.Ref'Class;
      Returns : out CosTime.OverlapType)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosTime.OverlapType
        renames Returns;
      pragma Warnings (Off, Returns);
      pragma Suppress (Validity_Check, Returns);
      Arg_CC_Result_Ü_Ü : aliased PolyORB.Any.Content'Class :=
        CosTime.Helper.Internals.Wrap
           (Result_Ü'Unrestricted_Access);
      Arg_CC_time_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (time)'Unrestricted_Access);
      Arg_Any_time_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosTime.UTO.Helper.TC_UTO,
            Arg_CC_time_Ü'Unchecked_Access);
      Arg_CC_overlap_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (overlap)'Unrestricted_Access);
      Arg_Any_overlap_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosTime.TIO.Helper.TC_TIO,
            Arg_CC_overlap_Ü'Unchecked_Access);
      pragma Warnings (Off, overlap);
      pragma Suppress (Validity_Check, overlap);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        spans_Result_Ü;
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      --  Create the Argument list
      PolyORB.Any.NVList.Create
        (Argument_List_Ü);
      --  Fill the Argument list
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         spans_Arg_Name_time_Ü,
         PolyORB.Any.Any
           (Arg_Any_time_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         spans_Arg_Name_overlap_Ü,
         PolyORB.Any.Any
           (Arg_Any_overlap_Ü),
         PolyORB.Any.ARG_OUT);
      --  Setting the result value
      PolyORB.Any.Set_Value
        (PolyORB.Any.Get_Container
           (Result_Nv_Ü.Argument).all,
         Arg_CC_Result_Ü_Ü'Unrestricted_Access);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "spans",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü);
      --  Invoking the request (synchronously or asynchronously)
      PolyORB.CORBA_P.Interceptors_Hooks.Client_Invoke
        (Request_Ü'Access,
         PolyORB.Requests.Flags
           (0));
      --  Raise exception, if needed
      PolyORB.CORBA_P.Exceptions.Request_Raise_Occurrence
        (Request_Ü);
   end spans;

   overlaps_Arg_Name_interval_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("interval");

   overlaps_Arg_Name_overlap_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("overlap");

   overlaps_Result_Name_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("Result");

   -----------------------
   -- overlaps_Result_Ü --
   -----------------------

   function overlaps_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (overlaps_Result_Ü);
   begin
      return (Name => overlaps_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosTime.Helper.TC_OverlapType),
      Arg_Modes => 0);
   end overlaps_Result_Ü;

   --------------
   -- overlaps --
   --------------

   procedure overlaps
     (Self : Ref;
      interval : CosTime.TIO.Ref'Class;
      overlap : out CosTime.TIO.Ref'Class;
      Returns : out CosTime.OverlapType)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosTime.OverlapType
        renames Returns;
      pragma Warnings (Off, Returns);
      pragma Suppress (Validity_Check, Returns);
      Arg_CC_Result_Ü_Ü : aliased PolyORB.Any.Content'Class :=
        CosTime.Helper.Internals.Wrap
           (Result_Ü'Unrestricted_Access);
      Arg_CC_interval_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (interval)'Unrestricted_Access);
      Arg_Any_interval_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosTime.TIO.Helper.TC_TIO,
            Arg_CC_interval_Ü'Unchecked_Access);
      Arg_CC_overlap_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (overlap)'Unrestricted_Access);
      Arg_Any_overlap_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosTime.TIO.Helper.TC_TIO,
            Arg_CC_overlap_Ü'Unchecked_Access);
      pragma Warnings (Off, overlap);
      pragma Suppress (Validity_Check, overlap);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        overlaps_Result_Ü;
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      --  Create the Argument list
      PolyORB.Any.NVList.Create
        (Argument_List_Ü);
      --  Fill the Argument list
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         overlaps_Arg_Name_interval_Ü,
         PolyORB.Any.Any
           (Arg_Any_interval_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         overlaps_Arg_Name_overlap_Ü,
         PolyORB.Any.Any
           (Arg_Any_overlap_Ü),
         PolyORB.Any.ARG_OUT);
      --  Setting the result value
      PolyORB.Any.Set_Value
        (PolyORB.Any.Get_Container
           (Result_Nv_Ü.Argument).all,
         Arg_CC_Result_Ü_Ü'Unrestricted_Access);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "overlaps",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü);
      --  Invoking the request (synchronously or asynchronously)
      PolyORB.CORBA_P.Interceptors_Hooks.Client_Invoke
        (Request_Ü'Access,
         PolyORB.Requests.Flags
           (0));
      --  Raise exception, if needed
      PolyORB.CORBA_P.Exceptions.Request_Raise_Occurrence
        (Request_Ü);
   end overlaps;

   time_Result_Name_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("Result");

   -------------------
   -- time_Result_Ü --
   -------------------

   function time_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (time_Result_Ü);
   begin
      return (Name => time_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosTime.UTO.Helper.TC_UTO),
      Arg_Modes => 0);
   end time_Result_Ü;

   ----------
   -- time --
   ----------

   function time
     (Self : Ref)
     return CosTime.UTO.Ref
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosTime.UTO.Ref;
      pragma Warnings (Off, Result_Ü);
      pragma Suppress (Validity_Check, Result_Ü);
      Arg_CC_Result_Ü_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (Result_Ü)'Unrestricted_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        time_Result_Ü;
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      --  Create the Argument list
      PolyORB.Any.NVList.Create
        (Argument_List_Ü);
      --  Setting the result value
      PolyORB.Any.Set_Value
        (PolyORB.Any.Get_Container
           (Result_Nv_Ü.Argument).all,
         Arg_CC_Result_Ü_Ü'Unrestricted_Access);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "time",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü);
      --  Invoking the request (synchronously or asynchronously)
      PolyORB.CORBA_P.Interceptors_Hooks.Client_Invoke
        (Request_Ü'Access,
         PolyORB.Requests.Flags
           (0));
      --  Raise exception, if needed
      PolyORB.CORBA_P.Exceptions.Request_Raise_Occurrence
        (Request_Ü);
      --  Return value
      return Result_Ü;
   end time;

   ----------
   -- Is_A --
   ----------

   function Is_A
     (Self : Ref;
      Logical_Type_Id : PolyORB.Std.String)
     return CORBA.Boolean
   is
   begin
      return (False
         or else (Is_A
           (Logical_Type_Id)
            or else CORBA.Object.Is_A
              (CORBA.Object.Ref
                 (Self),
               Logical_Type_Id)));
   end Is_A;

   ----------
   -- Is_A --
   ----------

   function Is_A
     (Logical_Type_Id : PolyORB.Std.String)
     return CORBA.Boolean
   is
   begin
      return ((CORBA.Is_Equivalent
        (Logical_Type_Id,
         CosTime.TIO.Repository_Id)
         or else CORBA.Is_Equivalent
           (Logical_Type_Id,
            "IDL:omg.org/CORBA/Object:1.0"))
         or else False);
   end Is_A;

end CosTime.TIO;
