pragma Style_Checks ("NM32766");

---------------------------------------------------
--  This file has been generated automatically from
--  /work/a/ports/net/polyorb/work/polyorb-2.9.0/idls/Misc/DynamicAny.idl
--  by IAC (IDL to Ada Compiler) 2.9.0 (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 CORBA.Object;
with DynamicAny.DynStruct.Impl;

package body DynamicAny.DynStruct is

   -------------------------
   -- current_member_name --
   -------------------------

   function current_member_name
     (Self : Local_Ref)
     return DynamicAny.FieldName
   is
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      return DynamicAny.DynStruct.Impl.current_member_name
        (DynamicAny.DynStruct.Impl.Object_Ptr
           (Entity_Of
              (Self)));
   end current_member_name;

   -------------------------
   -- current_member_kind --
   -------------------------

   function current_member_kind
     (Self : Local_Ref)
     return CORBA.TCKind
   is
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      return DynamicAny.DynStruct.Impl.current_member_kind
        (DynamicAny.DynStruct.Impl.Object_Ptr
           (Entity_Of
              (Self)));
   end current_member_kind;

   -----------------
   -- get_members --
   -----------------

   function get_members
     (Self : Local_Ref)
     return DynamicAny.NameValuePairSeq
   is
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      return DynamicAny.DynStruct.Impl.get_members
        (DynamicAny.DynStruct.Impl.Object_Ptr
           (Entity_Of
              (Self)));
   end get_members;

   -----------------
   -- set_members --
   -----------------

   procedure set_members
     (Self : Local_Ref;
      value : DynamicAny.NameValuePairSeq)
   is
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      DynamicAny.DynStruct.Impl.set_members
        (DynamicAny.DynStruct.Impl.Object_Ptr
           (Entity_Of
              (Self)),
         value);
   end set_members;

   ----------------------------
   -- get_members_as_dyn_any --
   ----------------------------

   function get_members_as_dyn_any
     (Self : Local_Ref)
     return DynamicAny.NameDynAnyPairSeq
   is
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      return DynamicAny.DynStruct.Impl.get_members_as_dyn_any
        (DynamicAny.DynStruct.Impl.Object_Ptr
           (Entity_Of
              (Self)));
   end get_members_as_dyn_any;

   ----------------------------
   -- set_members_as_dyn_any --
   ----------------------------

   procedure set_members_as_dyn_any
     (Self : Local_Ref;
      value : DynamicAny.NameDynAnyPairSeq)
   is
   begin
      if CORBA.Object.Is_Nil
        (CORBA.Object.Ref
           (Self))
      then
         CORBA.Raise_Inv_Objref
           (CORBA.Default_Sys_Member);
      end if;
      DynamicAny.DynStruct.Impl.set_members_as_dyn_any
        (DynamicAny.DynStruct.Impl.Object_Ptr
           (Entity_Of
              (Self)),
         value);
   end set_members_as_dyn_any;

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To : out DynamicAny.DynStruct.InvalidValue_Members)
     renames DynamicAny.DynAny.Get_Members;

   procedure Get_Members
     (From : Ada.Exceptions.Exception_Occurrence;
      To : out DynamicAny.DynStruct.TypeMismatch_Members)
     renames DynamicAny.DynAny.Get_Members;

end DynamicAny.DynStruct;
