/* ----------------------------------------------------------------------------
 * 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 OBSetData : OBGenericData {
  private HandleRef swigCPtr;

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

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

  ~OBSetData() {
    Dispose();
  }

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

  public OBSetData() : this(openbabelPINVOKE.new_OBSetData(), true) {
  }

  public void AddData(OBGenericData d) {
    openbabelPINVOKE.OBSetData_AddData(swigCPtr, OBGenericData.getCPtr(d));
  }

  public void SetData(vectorData vdata) {
    openbabelPINVOKE.OBSetData_SetData(swigCPtr, vectorData.getCPtr(vdata));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBGenericData GetData(string s) {
    IntPtr cPtr = openbabelPINVOKE.OBSetData_GetData__SWIG_0(swigCPtr, s);
    OBGenericData ret = (cPtr == IntPtr.Zero) ? null : new OBGenericData(cPtr, false);
    return ret;
  }

  public virtual vectorData GetData() {
    vectorData ret = new vectorData(openbabelPINVOKE.OBSetData_GetData__SWIG_2(swigCPtr), false);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator GetBegin() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator(openbabelPINVOKE.OBSetData_GetBegin(swigCPtr), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator GetEnd() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator(openbabelPINVOKE.OBSetData_GetEnd(swigCPtr), true);
    return ret;
  }

  public void DeleteData(OBGenericData gd) {
    openbabelPINVOKE.OBSetData_DeleteData(swigCPtr, OBGenericData.getCPtr(gd));
  }

}
