with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLAnchorElement2_Interface is

   procedure Initialize (This : in out IHTMLAnchorElement2_Type) is
   begin
      Set_IID (This, IID_IHTMLAnchorElement2);
   end Initialize;

   function Pointer (This : IHTMLAnchorElement2_Type)
     return Pointer_To_IHTMLAnchorElement2
   is
   begin
      return To_Pointer_To_IHTMLAnchorElement2 (Address (This));
   end Pointer;

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

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

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

   end Put_charset;

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

      return RetVal;
   end Get_charset;

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

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

   end Put_coords;

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

      return RetVal;
   end Get_coords;

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

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

   end Put_hreflang;

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

      return RetVal;
   end Get_hreflang;

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

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

   end Put_shape;

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

      return RetVal;
   end Get_shape;

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

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

   end Put_type;

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

      return RetVal;
   end Get_type;

end MSHTML.IHTMLAnchorElement2_Interface;

