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

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

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

  ~AliasData() {
    Dispose();
  }

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

  public AliasData() : this(openbabelPINVOKE.new_AliasData(), true) {
  }

  public void SetAlias(string alias) {
    openbabelPINVOKE.AliasData_SetAlias__SWIG_0(swigCPtr, alias);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public string GetAlias() {
    string ret = openbabelPINVOKE.AliasData_GetAlias(swigCPtr);
    return ret;
  }

  public void SetExpandedAtoms(vectorUnsignedInt atoms) {
    openbabelPINVOKE.AliasData_SetExpandedAtoms(swigCPtr, vectorUnsignedInt.getCPtr(atoms));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public vectorUnsignedInt GetExpandedAtoms() {
    vectorUnsignedInt ret = new vectorUnsignedInt(openbabelPINVOKE.AliasData_GetExpandedAtoms(swigCPtr), true);
    return ret;
  }

  public bool IsExpanded() {
    bool ret = openbabelPINVOKE.AliasData_IsExpanded(swigCPtr);
    return ret;
  }

  public bool Expand(OBMol mol, uint atomindex) {
    bool ret = openbabelPINVOKE.AliasData_Expand(swigCPtr, OBMol.getCPtr(mol), atomindex);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}
