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

namespace be.portugal.eid {

using System;
using System.Runtime.InteropServices;

/// <summary>
/// Exception class Readerset changed (error code = EIDMW_ERR_READERSET_CHANGED).
/// Throw when accessing to a card object but the readerset has been changed.
/// Used in : 
/// - PTEID_Object::checkContextStillOk()
/// </summary>
public class PTEID_ExReaderSetChanged : PTEID_Exception {
  private HandleRef swigCPtr;

  internal PTEID_ExReaderSetChanged(IntPtr cPtr, bool cMemoryOwn) : base(pteidlib_dotNetPINVOKE.PTEID_ExReaderSetChangedUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new HandleRef(this, cPtr);
  }

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

  ~PTEID_ExReaderSetChanged() {
    Dispose();
  }

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

  public PTEID_ExReaderSetChanged() : this(pteidlib_dotNetPINVOKE.new_PTEID_ExReaderSetChanged(), true) {
  }

}

}
