with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLTableSection_Interface is

   procedure Initialize (This : in out IHTMLTableSection_Type) is
   begin
      Set_IID (This, IID_IHTMLTableSection);
   end Initialize;

   function Pointer (This : IHTMLTableSection_Type)
     return Pointer_To_IHTMLTableSection
   is
   begin
      return To_Pointer_To_IHTMLTableSection (Address (This));
   end Pointer;

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

   procedure Put_align
     (This : IHTMLTableSection_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_align
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_align;

   function Get_align
     (This : IHTMLTableSection_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_align
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_align;

   procedure Put_vAlign
     (This : IHTMLTableSection_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_vAlign
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_vAlign;

   function Get_vAlign
     (This : IHTMLTableSection_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_vAlign
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_vAlign;

   procedure Put_bgColor
     (This : IHTMLTableSection_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_bgColor
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_bgColor;

   function Get_bgColor
     (This : IHTMLTableSection_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_bgColor
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_bgColor;

   function Get_rows
     (This : IHTMLTableSection_Type)
     return Pointer_To_IHTMLElementCollection
   is
       RetVal : aliased Pointer_To_IHTMLElementCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_rows
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_rows;

   function insertRow
     (This  : IHTMLTableSection_Type;
      index : Interfaces.C.long)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.insertRow
         (Pointer (This),
          index,
          RetVal'Unchecked_Access));

      return RetVal;
   end insertRow;

   procedure deleteRow
     (This  : IHTMLTableSection_Type;
      index : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.deleteRow
         (Pointer (This),
          index));

   end deleteRow;

end MSHTML.IHTMLTableSection_Interface;

