/* ----------------------------------------------------------------------------
 * 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 SpaceGroup : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal SpaceGroup(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

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

  ~SpaceGroup() {
    Dispose();
  }

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

  public SpaceGroup() : this(openbabelPINVOKE.new_SpaceGroup(), true) {
  }

  public void SetHMName(string name) {
    openbabelPINVOKE.SpaceGroup_SetHMName__SWIG_0(swigCPtr, name);
  }

  public void SetHallName(string name) {
    openbabelPINVOKE.SpaceGroup_SetHallName__SWIG_0(swigCPtr, name);
  }

  public void SetId(uint n) {
    openbabelPINVOKE.SpaceGroup_SetId(swigCPtr, n);
  }

  public void AddTransform(string s) {
    openbabelPINVOKE.SpaceGroup_AddTransform(swigCPtr, s);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public string GetHMName() {
    string ret = openbabelPINVOKE.SpaceGroup_GetHMName(swigCPtr);
    return ret;
  }

  public string GetHallName() {
    string ret = openbabelPINVOKE.SpaceGroup_GetHallName(swigCPtr);
    return ret;
  }

  public uint GetId() {
    uint ret = openbabelPINVOKE.SpaceGroup_GetId(swigCPtr);
    return ret;
  }

  public SWIGTYPE_p_std__listT_OpenBabel__vector3_t Transform(vector3 v) {
    SWIGTYPE_p_std__listT_OpenBabel__vector3_t ret = new SWIGTYPE_p_std__listT_OpenBabel__vector3_t(openbabelPINVOKE.SpaceGroup_Transform(swigCPtr, vector3.getCPtr(v)), true);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public transform3d BeginTransform(SWIGTYPE_p_std__listT_OpenBabel__transform3d_p_t__const_iterator i) {
    IntPtr cPtr = openbabelPINVOKE.SpaceGroup_BeginTransform(swigCPtr, SWIGTYPE_p_std__listT_OpenBabel__transform3d_p_t__const_iterator.getCPtr(i));
    transform3d ret = (cPtr == IntPtr.Zero) ? null : new transform3d(cPtr, false);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public transform3d NextTransform(SWIGTYPE_p_std__listT_OpenBabel__transform3d_p_t__const_iterator i) {
    IntPtr cPtr = openbabelPINVOKE.SpaceGroup_NextTransform(swigCPtr, SWIGTYPE_p_std__listT_OpenBabel__transform3d_p_t__const_iterator.getCPtr(i));
    transform3d ret = (cPtr == IntPtr.Zero) ? null : new transform3d(cPtr, false);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static SpaceGroup GetSpaceGroup(string name) {
    IntPtr cPtr = openbabelPINVOKE.SpaceGroup_GetSpaceGroup__SWIG_0(name);
    SpaceGroup ret = (cPtr == IntPtr.Zero) ? null : new SpaceGroup(cPtr, false);
    return ret;
  }

  public static SpaceGroup GetSpaceGroup(uint id) {
    IntPtr cPtr = openbabelPINVOKE.SpaceGroup_GetSpaceGroup__SWIG_2(id);
    SpaceGroup ret = (cPtr == IntPtr.Zero) ? null : new SpaceGroup(cPtr, false);
    return ret;
  }

  public static SpaceGroup Find(SpaceGroup group) {
    IntPtr cPtr = openbabelPINVOKE.SpaceGroup_Find(SpaceGroup.getCPtr(group));
    SpaceGroup ret = (cPtr == IntPtr.Zero) ? null : new SpaceGroup(cPtr, false);
    return ret;
  }

  public bool IsValid() {
    bool ret = openbabelPINVOKE.SpaceGroup_IsValid(swigCPtr);
    return ret;
  }

}
