/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.36
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


using System;
using System.Runtime.InteropServices;

public class OBTorsionData : OBGenericData {
  private HandleRef swigCPtr;

  internal OBTorsionData(IntPtr cPtr, bool cMemoryOwn) : base(openbabelPINVOKE.OBTorsionDataUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(OBTorsionData obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~OBTorsionData() {
    Dispose();
  }

  public override void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        openbabelPINVOKE.delete_OBTorsionData(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
      base.Dispose();
    }
  }

  public void Clear() {
    openbabelPINVOKE.OBTorsionData_Clear(swigCPtr);
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBTorsion_t GetData() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBTorsion_t ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBTorsion_t(openbabelPINVOKE.OBTorsionData_GetData(swigCPtr), true);
    return ret;
  }

  public uint GetSize() {
    uint ret = openbabelPINVOKE.OBTorsionData_GetSize(swigCPtr);
    return ret;
  }

  public void SetData(OBTorsion torsion) {
    openbabelPINVOKE.OBTorsionData_SetData(swigCPtr, OBTorsion.getCPtr(torsion));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool FillTorsionArray(SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_int_t_t torsions) {
    bool ret = openbabelPINVOKE.OBTorsionData_FillTorsionArray(swigCPtr, SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_int_t_t.getCPtr(torsions));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}
