with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLTableCol_Interface is

   procedure Initialize (This : in out IHTMLTableCol_Type) is
   begin
      Set_IID (This, IID_IHTMLTableCol);
   end Initialize;

   function Pointer (This : IHTMLTableCol_Type)
     return Pointer_To_IHTMLTableCol
   is
   begin
      return To_Pointer_To_IHTMLTableCol (Address (This));
   end Pointer;

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

   procedure Put_span
     (This : IHTMLTableCol_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_span
         (Pointer (This),
          p));

   end Put_span;

   function Get_span
     (This : IHTMLTableCol_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_span
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_span;

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

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

   end Put_width;

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

      return RetVal;
   end Get_width;

   procedure Put_align
     (This : IHTMLTableCol_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 : IHTMLTableCol_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 : IHTMLTableCol_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 : IHTMLTableCol_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;

end MSHTML.IHTMLTableCol_Interface;

