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 CORBA.Object.Helper;
with PolyORB.Any;
with PolyORB.Requests;
with CORBA.ExceptionList;
with PolyORB.Types;
with CosTime.Helper;
with CosTime.UTO.Helper;
with PolyORB.CORBA_P.Interceptors_Hooks;
with PolyORB.CORBA_P.Exceptions;
with TimeBase.Helper;
with CosTime.TIO.Helper;

package body CosTime.TimeService is

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

   -----------------------------
   -- universal_time_Result_Ü --
   -----------------------------

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

   --------------------
   -- universal_time --
   --------------------

   function universal_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;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        universal_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_Ü);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosTime.Helper.TC_TimeUnavailable);
      --  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 => "universal_time",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü,
         Exc_List => CORBA.ExceptionList.Internals.To_PolyORB_Ref
           (Exception_List_Ü));
      --  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 universal_time;

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

   ------------------------------------
   -- secure_universal_time_Result_Ü --
   ------------------------------------

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

   ---------------------------
   -- secure_universal_time --
   ---------------------------

   function secure_universal_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;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        secure_universal_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_Ü);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosTime.Helper.TC_TimeUnavailable);
      --  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 => "secure_universal_time",
         Arg_List => Argument_List_Ü,
         Result => Result_Nv_Ü,
         Exc_List => CORBA.ExceptionList.Internals.To_PolyORB_Ref
           (Exception_List_Ü));
      --  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 secure_universal_time;

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

   new_universal_time_Arg_Name_inaccuracy_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("inaccuracy");

   new_universal_time_Arg_Name_tdf_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("tdf");

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

   ---------------------------------
   -- new_universal_time_Result_Ü --
   ---------------------------------

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

   ------------------------
   -- new_universal_time --
   ------------------------

   function new_universal_time
     (Self : Ref;
      time : TimeBase.TimeT;
      inaccuracy : TimeBase.InaccuracyT;
      tdf : TimeBase.TdfT)
     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);
      Arg_CC_time_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Wrap
           (CORBA.Unsigned_Long_Long
              (time)'Unrestricted_Access);
      Arg_Any_time_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (TimeBase.Helper.TC_TimeT,
            Arg_CC_time_Ü'Unchecked_Access);
      Arg_CC_inaccuracy_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Wrap
           (CORBA.Unsigned_Long_Long
              (inaccuracy)'Unrestricted_Access);
      Arg_Any_inaccuracy_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (TimeBase.Helper.TC_InaccuracyT,
            Arg_CC_inaccuracy_Ü'Unchecked_Access);
      Arg_CC_tdf_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Wrap
           (CORBA.Short
              (tdf)'Unrestricted_Access);
      Arg_Any_tdf_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (TimeBase.Helper.TC_TdfT,
            Arg_CC_tdf_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        new_universal_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_Ü);
      --  Fill the Argument list
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         new_universal_time_Arg_Name_time_Ü,
         PolyORB.Any.Any
           (Arg_Any_time_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         new_universal_time_Arg_Name_inaccuracy_Ü,
         PolyORB.Any.Any
           (Arg_Any_inaccuracy_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         new_universal_time_Arg_Name_tdf_Ü,
         PolyORB.Any.Any
           (Arg_Any_tdf_Ü),
         PolyORB.Any.ARG_IN);
      --  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 => "new_universal_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 new_universal_time;

   uto_from_utc_Arg_Name_utc_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("utc");

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

   ---------------------------
   -- uto_from_utc_Result_Ü --
   ---------------------------

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

   ------------------
   -- uto_from_utc --
   ------------------

   function uto_from_utc
     (Self : Ref;
      utc : TimeBase.UtcT)
     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);
      Arg_CC_utc_Ü : aliased PolyORB.Any.Content'Class :=
        TimeBase.Helper.Internals.Wrap
           (utc'Unrestricted_Access);
      Arg_Any_utc_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (TimeBase.Helper.TC_UtcT,
            Arg_CC_utc_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        uto_from_utc_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_Ü,
         uto_from_utc_Arg_Name_utc_Ü,
         PolyORB.Any.Any
           (Arg_Any_utc_Ü),
         PolyORB.Any.ARG_IN);
      --  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 => "uto_from_utc",
         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 uto_from_utc;

   new_interval_Arg_Name_lower_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("lower");

   new_interval_Arg_Name_upper_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("upper");

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

   ---------------------------
   -- new_interval_Result_Ü --
   ---------------------------

   function new_interval_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (new_interval_Result_Ü);
   begin
      return (Name => new_interval_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosTime.TIO.Helper.TC_TIO),
      Arg_Modes => 0);
   end new_interval_Result_Ü;

   ------------------
   -- new_interval --
   ------------------

   function new_interval
     (Self : Ref;
      lower : TimeBase.TimeT;
      upper : TimeBase.TimeT)
     return CosTime.TIO.Ref
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosTime.TIO.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);
      Arg_CC_lower_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Wrap
           (CORBA.Unsigned_Long_Long
              (lower)'Unrestricted_Access);
      Arg_Any_lower_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (TimeBase.Helper.TC_TimeT,
            Arg_CC_lower_Ü'Unchecked_Access);
      Arg_CC_upper_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Wrap
           (CORBA.Unsigned_Long_Long
              (upper)'Unrestricted_Access);
      Arg_Any_upper_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (TimeBase.Helper.TC_TimeT,
            Arg_CC_upper_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        new_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_Ü);
      --  Fill the Argument list
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         new_interval_Arg_Name_lower_Ü,
         PolyORB.Any.Any
           (Arg_Any_lower_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         new_interval_Arg_Name_upper_Ü,
         PolyORB.Any.Any
           (Arg_Any_upper_Ü),
         PolyORB.Any.ARG_IN);
      --  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 => "new_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 new_interval;

   ----------
   -- 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.TimeService.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.TimeService;
