with GNATCOM.Errors;

package body MSHTML.IElementNamespace_Interface is

   procedure Initialize (This : in out IElementNamespace_Type) is
   begin
      Set_IID (This, IID_IElementNamespace);
   end Initialize;

   function Pointer (This : IElementNamespace_Type)
     return Pointer_To_IElementNamespace
   is
   begin
      return To_Pointer_To_IElementNamespace (Address (This));
   end Pointer;

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

   procedure AddTag
     (This        : IElementNamespace_Type;
      bstrTagName : GNATCOM.Types.BSTR;
      lFlags      : Interfaces.C.long;
      Free        : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.AddTag
         (Pointer (This),
          bstrTagName,
          lFlags));

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

   end AddTag;

end MSHTML.IElementNamespace_Interface;

