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/naming/CosNaming.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.Exceptions;
with PolyORB.Any.NVList;
with PolyORB.Types;
with CosNaming.Helper;
with PolyORB.Any;
with CORBA.Object.Helper;
with PolyORB.Requests;
with CORBA.ExceptionList;
with CosNaming.NamingContext.Helper;
with PolyORB.CORBA_P.Interceptors_Hooks;
with PolyORB.CORBA_P.Exceptions;
with CosNaming.BindingIterator.Helper;

package body CosNaming.NamingContext is

   -----------------
   -- Get_Members --
   -----------------

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To : out CosNaming.NamingContext.NotFound_Members)
   is
   begin
      PolyORB.Exceptions.User_Get_Members
        (From,
         To);
   end Get_Members;

   -----------------
   -- Get_Members --
   -----------------

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To : out CosNaming.NamingContext.CannotProceed_Members)
   is
   begin
      PolyORB.Exceptions.User_Get_Members
        (From,
         To);
   end Get_Members;

   -----------------
   -- Get_Members --
   -----------------

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To : out CosNaming.NamingContext.InvalidName_Members)
   is
   begin
      PolyORB.Exceptions.User_Get_Members
        (From,
         To);
   end Get_Members;

   -----------------
   -- Get_Members --
   -----------------

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To : out CosNaming.NamingContext.AlreadyBound_Members)
   is
   begin
      PolyORB.Exceptions.User_Get_Members
        (From,
         To);
   end Get_Members;

   -----------------
   -- Get_Members --
   -----------------

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To : out CosNaming.NamingContext.NotEmpty_Members)
   is
   begin
      PolyORB.Exceptions.User_Get_Members
        (From,
         To);
   end Get_Members;

   bind_Arg_Name_n_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("n");

   bind_Arg_Name_obj_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("obj");

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

   -------------------
   -- bind_Result_Ü --
   -------------------

   function bind_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (bind_Result_Ü);
   begin
      return (Name => bind_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end bind_Result_Ü;

   ----------
   -- bind --
   ----------

   procedure bind
     (Self : Ref;
      n : CosNaming.Name;
      obj : CORBA.Object.Ref)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Arg_CC_n_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_NameComponent.Sequence
              (n)'Unrestricted_Access);
      Arg_Any_n_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_Name,
            Arg_CC_n_Ü'Unchecked_Access);
      Arg_CC_obj_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (obj'Unrestricted_Access);
      Arg_Any_obj_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CORBA.Object.Helper.TC_Object,
            Arg_CC_obj_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        bind_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_Ü,
         bind_Arg_Name_n_Ü,
         PolyORB.Any.Any
           (Arg_Any_n_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         bind_Arg_Name_obj_Ü,
         PolyORB.Any.Any
           (Arg_Any_obj_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_NotFound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_CannotProceed);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_InvalidName);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_AlreadyBound);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "bind",
         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_Ü);
   end bind;

   rebind_Arg_Name_n_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("n");

   rebind_Arg_Name_obj_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("obj");

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

   ---------------------
   -- rebind_Result_Ü --
   ---------------------

   function rebind_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (rebind_Result_Ü);
   begin
      return (Name => rebind_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end rebind_Result_Ü;

   ------------
   -- rebind --
   ------------

   procedure rebind
     (Self : Ref;
      n : CosNaming.Name;
      obj : CORBA.Object.Ref)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Arg_CC_n_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_NameComponent.Sequence
              (n)'Unrestricted_Access);
      Arg_Any_n_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_Name,
            Arg_CC_n_Ü'Unchecked_Access);
      Arg_CC_obj_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (obj'Unrestricted_Access);
      Arg_Any_obj_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CORBA.Object.Helper.TC_Object,
            Arg_CC_obj_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        rebind_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_Ü,
         rebind_Arg_Name_n_Ü,
         PolyORB.Any.Any
           (Arg_Any_n_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         rebind_Arg_Name_obj_Ü,
         PolyORB.Any.Any
           (Arg_Any_obj_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_NotFound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_CannotProceed);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_InvalidName);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "rebind",
         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_Ü);
   end rebind;

   bind_context_Arg_Name_n_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("n");

   bind_context_Arg_Name_nc_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("nc");

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

   ---------------------------
   -- bind_context_Result_Ü --
   ---------------------------

   function bind_context_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (bind_context_Result_Ü);
   begin
      return (Name => bind_context_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end bind_context_Result_Ü;

   ------------------
   -- bind_context --
   ------------------

   procedure bind_context
     (Self : Ref;
      n : CosNaming.Name;
      nc : CosNaming.NamingContext.Ref'Class)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Arg_CC_n_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_NameComponent.Sequence
              (n)'Unrestricted_Access);
      Arg_Any_n_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_Name,
            Arg_CC_n_Ü'Unchecked_Access);
      Arg_CC_nc_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (nc)'Unrestricted_Access);
      Arg_Any_nc_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.NamingContext.Helper.TC_NamingContext,
            Arg_CC_nc_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        bind_context_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_Ü,
         bind_context_Arg_Name_n_Ü,
         PolyORB.Any.Any
           (Arg_Any_n_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         bind_context_Arg_Name_nc_Ü,
         PolyORB.Any.Any
           (Arg_Any_nc_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_NotFound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_CannotProceed);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_InvalidName);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_AlreadyBound);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "bind_context",
         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_Ü);
   end bind_context;

   rebind_context_Arg_Name_n_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("n");

   rebind_context_Arg_Name_nc_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("nc");

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

   -----------------------------
   -- rebind_context_Result_Ü --
   -----------------------------

   function rebind_context_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (rebind_context_Result_Ü);
   begin
      return (Name => rebind_context_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end rebind_context_Result_Ü;

   --------------------
   -- rebind_context --
   --------------------

   procedure rebind_context
     (Self : Ref;
      n : CosNaming.Name;
      nc : CosNaming.NamingContext.Ref'Class)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Arg_CC_n_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_NameComponent.Sequence
              (n)'Unrestricted_Access);
      Arg_Any_n_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_Name,
            Arg_CC_n_Ü'Unchecked_Access);
      Arg_CC_nc_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (nc)'Unrestricted_Access);
      Arg_Any_nc_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.NamingContext.Helper.TC_NamingContext,
            Arg_CC_nc_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        rebind_context_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_Ü,
         rebind_context_Arg_Name_n_Ü,
         PolyORB.Any.Any
           (Arg_Any_n_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         rebind_context_Arg_Name_nc_Ü,
         PolyORB.Any.Any
           (Arg_Any_nc_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_NotFound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_CannotProceed);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_InvalidName);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "rebind_context",
         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_Ü);
   end rebind_context;

   resolve_Arg_Name_n_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("n");

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

   ----------------------
   -- resolve_Result_Ü --
   ----------------------

   function resolve_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (resolve_Result_Ü);
   begin
      return (Name => resolve_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.Object.Helper.TC_Object),
      Arg_Modes => 0);
   end resolve_Result_Ü;

   -------------
   -- resolve --
   -------------

   function resolve
     (Self : Ref;
      n : CosNaming.Name)
     return CORBA.Object.Ref
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CORBA.Object.Ref;
      pragma Warnings (Off, Result_Ü);
      pragma Suppress (Validity_Check, Result_Ü);
      Arg_CC_Result_Ü_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (Result_Ü'Unrestricted_Access);
      Arg_CC_n_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_NameComponent.Sequence
              (n)'Unrestricted_Access);
      Arg_Any_n_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_Name,
            Arg_CC_n_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        resolve_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_Ü,
         resolve_Arg_Name_n_Ü,
         PolyORB.Any.Any
           (Arg_Any_n_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_NotFound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_CannotProceed);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_InvalidName);
      --  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 => "resolve",
         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 resolve;

   unbind_Arg_Name_n_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("n");

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

   ---------------------
   -- unbind_Result_Ü --
   ---------------------

   function unbind_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (unbind_Result_Ü);
   begin
      return (Name => unbind_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end unbind_Result_Ü;

   ------------
   -- unbind --
   ------------

   procedure unbind
     (Self : Ref;
      n : CosNaming.Name)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Arg_CC_n_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_NameComponent.Sequence
              (n)'Unrestricted_Access);
      Arg_Any_n_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_Name,
            Arg_CC_n_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        unbind_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_Ü,
         unbind_Arg_Name_n_Ü,
         PolyORB.Any.Any
           (Arg_Any_n_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_NotFound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_CannotProceed);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_InvalidName);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "unbind",
         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_Ü);
   end unbind;

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

   --------------------------
   -- new_context_Result_Ü --
   --------------------------

   function new_context_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (new_context_Result_Ü);
   begin
      return (Name => new_context_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosNaming.NamingContext.Helper.TC_NamingContext),
      Arg_Modes => 0);
   end new_context_Result_Ü;

   -----------------
   -- new_context --
   -----------------

   function new_context
     (Self : Ref)
     return CosNaming.NamingContext.Ref'Class
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosNaming.NamingContext.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 :=
        new_context_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 => "new_context",
         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_context;

   bind_new_context_Arg_Name_n_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("n");

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

   -------------------------------
   -- bind_new_context_Result_Ü --
   -------------------------------

   function bind_new_context_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (bind_new_context_Result_Ü);
   begin
      return (Name => bind_new_context_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CosNaming.NamingContext.Helper.TC_NamingContext),
      Arg_Modes => 0);
   end bind_new_context_Result_Ü;

   ----------------------
   -- bind_new_context --
   ----------------------

   function bind_new_context
     (Self : Ref;
      n : CosNaming.Name)
     return CosNaming.NamingContext.Ref'Class
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Result_Ü : CosNaming.NamingContext.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_n_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_NameComponent.Sequence
              (n)'Unrestricted_Access);
      Arg_Any_n_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_Name,
            Arg_CC_n_Ü'Unchecked_Access);
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        bind_new_context_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_Ü,
         bind_new_context_Arg_Name_n_Ü,
         PolyORB.Any.Any
           (Arg_Any_n_Ü),
         PolyORB.Any.ARG_IN);
      --  Create the Exception list
      CORBA.ExceptionList.Create_List
        (Exception_List_Ü);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_NotFound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_AlreadyBound);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_CannotProceed);
      CORBA.ExceptionList.Add
        (Exception_List_Ü,
         CosNaming.NamingContext.Helper.TC_InvalidName);
      --  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 => "bind_new_context",
         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 bind_new_context;

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

   ----------------------
   -- destroy_Result_Ü --
   ----------------------

   function destroy_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (destroy_Result_Ü);
   begin
      return (Name => destroy_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end destroy_Result_Ü;

   -------------
   -- destroy --
   -------------

   procedure destroy
     (Self : Ref)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Request_Ü : aliased PolyORB.Requests.Request;
      Exception_List_Ü : CORBA.ExceptionList.Ref;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        destroy_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_Ü,
         CosNaming.NamingContext.Helper.TC_NotEmpty);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "destroy",
         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_Ü);
   end destroy;

   list_Arg_Name_how_many_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("how_many");

   list_Arg_Name_bl_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("bl");

   list_Arg_Name_bi_Ü : constant PolyORB.Types.Identifier :=
     PolyORB.Types.To_PolyORB_String
        ("bi");

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

   -------------------
   -- list_Result_Ü --
   -------------------

   function list_Result_Ü return PolyORB.Any.NamedValue is
      pragma Inline (list_Result_Ü);
   begin
      return (Name => list_Result_Name_Ü,
      Argument => CORBA.Internals.Get_Empty_Any
        (CORBA.TC_Void),
      Arg_Modes => 0);
   end list_Result_Ü;

   ----------
   -- list --
   ----------

   procedure list
     (Self : Ref;
      how_many : CORBA.Unsigned_Long;
      bl : out CosNaming.BindingList;
      bi : out CosNaming.BindingIterator_Forward.Ref)
   is
      Argument_List_Ü : PolyORB.Any.NVList.Ref;
      Arg_CC_how_many_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Wrap
           (how_many'Unrestricted_Access);
      Arg_Any_how_many_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CORBA.TC_Unsigned_Long,
            Arg_CC_how_many_Ü'Unchecked_Access);
      Arg_CC_bl_Ü : aliased PolyORB.Any.Content'Class :=
        CosNaming.Helper.Internals.Wrap
           (CosNaming.IDL_SEQUENCE_CosNaming_Binding.Sequence
              (bl)'Unrestricted_Access);
      Arg_Any_bl_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.Helper.TC_BindingList,
            Arg_CC_bl_Ü'Unchecked_Access);
      pragma Warnings (Off, bl);
      pragma Suppress (Validity_Check, bl);
      Arg_CC_bi_Ü : aliased PolyORB.Any.Content'Class :=
        CORBA.Object.Helper.Wrap
           (CORBA.Object.Ref
              (bi)'Unrestricted_Access);
      Arg_Any_bi_Ü : constant CORBA.Any :=
        CORBA.Internals.Get_Wrapper_Any
           (CosNaming.BindingIterator.Helper.TC_BindingIterator,
            Arg_CC_bi_Ü'Unchecked_Access);
      pragma Warnings (Off, bi);
      pragma Suppress (Validity_Check, bi);
      Request_Ü : aliased PolyORB.Requests.Request;
      Result_Nv_Ü : PolyORB.Any.NamedValue :=
        list_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_Ü,
         list_Arg_Name_how_many_Ü,
         PolyORB.Any.Any
           (Arg_Any_how_many_Ü),
         PolyORB.Any.ARG_IN);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         list_Arg_Name_bl_Ü,
         PolyORB.Any.Any
           (Arg_Any_bl_Ü),
         PolyORB.Any.ARG_OUT);
      PolyORB.Any.NVList.Add_Item
        (Argument_List_Ü,
         list_Arg_Name_bi_Ü,
         PolyORB.Any.Any
           (Arg_Any_bi_Ü),
         PolyORB.Any.ARG_OUT);
      --  Creating the request
      PolyORB.Requests.Setup_Request
        (Req => Request_Ü,
         Target => CORBA.Object.Internals.To_PolyORB_Ref
           (CORBA.Object.Ref
              (Self)),
         Operation => "list",
         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 list;

   ----------
   -- 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,
         CosNaming.NamingContext.Repository_Id)
         or else CORBA.Is_Equivalent
           (Logical_Type_Id,
            "IDL:omg.org/CORBA/Object:1.0"))
         or else False);
   end Is_A;

end CosNaming.NamingContext;
