~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to swig/csharp/gdal/AsyncReader.cs

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ----------------------------------------------------------------------------
 
2
 * This file was automatically generated by SWIG (http://www.swig.org).
 
3
 * Version 1.3.40
 
4
 *
 
5
 * Do not make changes to this file unless you know what you are doing--modify
 
6
 * the SWIG interface file instead.
 
7
 * ----------------------------------------------------------------------------- */
 
8
 
 
9
namespace OSGeo.GDAL {
 
10
 
 
11
using System;
 
12
using System.Runtime.InteropServices;
 
13
 
 
14
public class AsyncReader : IDisposable {
 
15
  private HandleRef swigCPtr;
 
16
  protected bool swigCMemOwn;
 
17
  protected object swigParentRef;
 
18
  
 
19
  protected static object ThisOwn_true() { return null; }
 
20
  protected object ThisOwn_false() { return this; }
 
21
 
 
22
  public AsyncReader(IntPtr cPtr, bool cMemoryOwn, object parent) {
 
23
    swigCMemOwn = cMemoryOwn;
 
24
    swigParentRef = parent;
 
25
    swigCPtr = new HandleRef(this, cPtr);
 
26
  }
 
27
 
 
28
  public static HandleRef getCPtr(AsyncReader obj) {
 
29
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 
30
  }
 
31
  public static HandleRef getCPtrAndDisown(AsyncReader obj, object parent) {
 
32
    if (obj != null)
 
33
    {
 
34
      obj.swigCMemOwn = false;
 
35
      obj.swigParentRef = parent;
 
36
      return obj.swigCPtr;
 
37
    }
 
38
    else
 
39
    {
 
40
      return new HandleRef(null, IntPtr.Zero);
 
41
    }
 
42
  }
 
43
  public static HandleRef getCPtrAndSetReference(AsyncReader obj, object parent) {
 
44
    if (obj != null)
 
45
    {
 
46
      obj.swigParentRef = parent;
 
47
      return obj.swigCPtr;
 
48
    }
 
49
    else
 
50
    {
 
51
      return new HandleRef(null, IntPtr.Zero);
 
52
    }
 
53
  }
 
54
 
 
55
  ~AsyncReader() {
 
56
    Dispose();
 
57
  }
 
58
 
 
59
  public virtual void Dispose() {
 
60
  lock(this) {
 
61
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
 
62
        swigCMemOwn = false;
 
63
        GdalPINVOKE.delete_AsyncReader(swigCPtr);
 
64
      }
 
65
      swigCPtr = new HandleRef(null, IntPtr.Zero);
 
66
      swigParentRef = null;
 
67
      GC.SuppressFinalize(this);
 
68
    }
 
69
  }
 
70
 
 
71
  public AsyncStatusType GetNextUpdatedRegion(double timeout, out int xoff, out int yoff, out int buf_xsize, out int buf_ysize) {
 
72
    AsyncStatusType ret = (AsyncStatusType)GdalPINVOKE.AsyncReader_GetNextUpdatedRegion(swigCPtr, timeout, out xoff, out yoff, out buf_xsize, out buf_ysize);
 
73
    if (GdalPINVOKE.SWIGPendingException.Pending) throw GdalPINVOKE.SWIGPendingException.Retrieve();
 
74
    return ret;
 
75
  }
 
76
 
 
77
  public int LockBuffer(double timeout) {
 
78
    int ret = GdalPINVOKE.AsyncReader_LockBuffer(swigCPtr, timeout);
 
79
    if (GdalPINVOKE.SWIGPendingException.Pending) throw GdalPINVOKE.SWIGPendingException.Retrieve();
 
80
    return ret;
 
81
  }
 
82
 
 
83
  public void UnlockBuffer() {
 
84
    GdalPINVOKE.AsyncReader_UnlockBuffer(swigCPtr);
 
85
    if (GdalPINVOKE.SWIGPendingException.Pending) throw GdalPINVOKE.SWIGPendingException.Retrieve();
 
86
  }
 
87
 
 
88
}
 
89
 
 
90
}