Example #1
0
 protected internal virtual Pointer deallocator(Pointer.Deallocator deallocator)
 {
   this.deallocator = deallocator;
   Pointer.DeallocatorReference deallocatorReference;
   while ((deallocatorReference = (Pointer.DeallocatorReference) Pointer.referenceQueue.poll()) != null)
   {
     deallocatorReference.clear();
     deallocatorReference.remove();
   }
   (!(deallocator is Pointer.DeallocatorReference) ? new Pointer.DeallocatorReference(this, deallocator) : (Pointer.DeallocatorReference) deallocator).add();
   return this;
 }
Example #2
0
 public Pointer(Pointer p)
 {
   base.\u002Ector();
   Pointer pointer = this;
   if (p == null)
   {
     this.address = 0L;
     this.position = 0;
   }
   else
   {
     this.address = p.address;
     this.position = p.position;
   }
 }
Example #3
0
 public ShortPointer(Pointer p)
   : base(p)
 {
 }
 public virtual PointerPointer put(Pointer p)
 {
   JNI.Frame frame = (JNI.Frame) null;
   if (PointerPointer.__\u003Cjniptr\u003Eput\u0028Lcom\u002Fgooglecode\u002Fjavacpp\u002FPointer\u003B\u0029Lcom\u002Fgooglecode\u002Fjavacpp\u002FPointerPointer\u003B == IntPtr.Zero)
     PointerPointer.__\u003Cjniptr\u003Eput\u0028Lcom\u002Fgooglecode\u002Fjavacpp\u002FPointer\u003B\u0029Lcom\u002Fgooglecode\u002Fjavacpp\u002FPointerPointer\u003B = JNI.Frame.GetFuncPtr(PointerPointer.__\u003CGetCallerID\u003E(), "com/googlecode/javacpp/PointerPointer", "put", "(Lcom/googlecode/javacpp/Pointer;)Lcom/googlecode/javacpp/PointerPointer;");
   // ISSUE: explicit reference operation
   IntPtr num1 = ((JNI.Frame) @frame).Enter(PointerPointer.__\u003CGetCallerID\u003E());
   try
   {
     // ISSUE: explicit reference operation
     // ISSUE: variable of a reference type
     JNI.Frame& local = @frame;
     IntPtr num2 = num1;
     // ISSUE: explicit reference operation
     IntPtr num3 = ((JNI.Frame) @frame).MakeLocalRef((object) this);
     // ISSUE: explicit reference operation
     IntPtr num4 = ((JNI.Frame) @frame).MakeLocalRef((object) p);
     // ISSUE: cast to a function pointer type
     // ISSUE: function pointer call
     IntPtr num5 = __calli((__FnPtr<IntPtr (IntPtr, IntPtr, IntPtr)>) PointerPointer.__\u003Cjniptr\u003Eput\u0028Lcom\u002Fgooglecode\u002Fjavacpp\u002FPointer\u003B\u0029Lcom\u002Fgooglecode\u002Fjavacpp\u002FPointerPointer\u003B)(num2, num3, num4);
     return (PointerPointer) ((JNI.Frame) local).UnwrapLocalRef(num5);
   }
   catch (object ex)
   {
     Console.WriteLine((object) "*** exception in native code ***");
     Console.WriteLine(ex);
     throw;
   }
   finally
   {
     // ISSUE: explicit reference operation
     ((JNI.Frame) @frame).Leave();
   }
 }
 public PointerPointer(Pointer p)
   : base(p)
 {
 }
Example #6
0
 public FloatPointer(Pointer p)
   : base(p)
 {
 }
Example #7
0
 public LongPointer(Pointer p)
   : base(p)
 {
 }
Example #8
0
 public CharPointer(Pointer p)
   : base(p)
 {
 }
 public DoublePointer(Pointer p)
   : base(p)
 {
 }
Example #10
0
 public IntPointer(Pointer p)
   : base(p)
 {
 }
Example #11
0
 public SizeTPointer(Pointer p)
   : base(p)
 {
 }
 public FunctionPointer(Pointer p)
   : base(p)
 {
 }