with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IDOMNodeIterator_Interface is

   procedure Initialize (This : in out IDOMNodeIterator_Type) is
   begin
      Set_IID (This, IID_IDOMNodeIterator);
   end Initialize;

   function Pointer (This : IDOMNodeIterator_Type)
     return Pointer_To_IDOMNodeIterator
   is
   begin
      return To_Pointer_To_IDOMNodeIterator (Address (This));
   end Pointer;

   procedure Attach (This    : in out IDOMNodeIterator_Type;
                     Pointer : in     Pointer_To_IDOMNodeIterator)
   is
   begin
      Attach (This, GNATCOM.IInterface.To_Pointer_To_IUnknown
              (Pointer.all'Address));
   end Attach;

   function Get_root
     (This : IDOMNodeIterator_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_root
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_root;

   function Get_whatToShow
     (This : IDOMNodeIterator_Type)
     return Interfaces.C.unsigned_long
   is
       RetVal : aliased Interfaces.C.unsigned_long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_whatToShow
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_whatToShow;

   function Get_filter
     (This : IDOMNodeIterator_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_filter
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_filter;

   function Get_expandEntityReferences
     (This : IDOMNodeIterator_Type)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_expandEntityReferences
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_expandEntityReferences;

   function nextNode
     (This      : IDOMNodeIterator_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.nextNode
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end nextNode;

   function previousNode
     (This      : IDOMNodeIterator_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.previousNode
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end previousNode;

   procedure Detach
     (This : IDOMNodeIterator_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Detach
         (Pointer (This)));

   end Detach;

end MSHTML.IDOMNodeIterator_Interface;

