with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ISVGAngle_Interface is

   procedure Initialize (This : in out ISVGAngle_Type) is
   begin
      Set_IID (This, IID_ISVGAngle);
   end Initialize;

   function Pointer (This : ISVGAngle_Type)
     return Pointer_To_ISVGAngle
   is
   begin
      return To_Pointer_To_ISVGAngle (Address (This));
   end Pointer;

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

   procedure Put_unitType
     (This : ISVGAngle_Type;
      p    : Interfaces.C.short)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_unitType
         (Pointer (This),
          p));

   end Put_unitType;

   function Get_unitType
     (This : ISVGAngle_Type)
     return Interfaces.C.short
   is
       RetVal : aliased Interfaces.C.short;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_unitType
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_unitType;

   procedure Put_value
     (This : ISVGAngle_Type;
      p    : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_value
         (Pointer (This),
          p));

   end Put_value;

   function Get_value
     (This : ISVGAngle_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_value
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_value;

   procedure Put_valueInSpecifiedUnits
     (This : ISVGAngle_Type;
      p    : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_valueInSpecifiedUnits
         (Pointer (This),
          p));

   end Put_valueInSpecifiedUnits;

   function Get_valueInSpecifiedUnits
     (This : ISVGAngle_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_valueInSpecifiedUnits
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_valueInSpecifiedUnits;

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

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

   end Put_valueAsString;

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

      return RetVal;
   end Get_valueAsString;

   procedure newValueSpecifiedUnits
     (This                  : ISVGAngle_Type;
      unitType              : Interfaces.C.short;
      valueInSpecifiedUnits : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.newValueSpecifiedUnits
         (Pointer (This),
          unitType,
          valueInSpecifiedUnits));

   end newValueSpecifiedUnits;

   procedure convertToSpecifiedUnits
     (This     : ISVGAngle_Type;
      unitType : Interfaces.C.short)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.convertToSpecifiedUnits
         (Pointer (This),
          unitType));

   end convertToSpecifiedUnits;

end MSHTML.ISVGAngle_Interface;

