Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdApcObjectPool.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
11namespace Teigha.Core {
12
13using System;
14using System.Runtime.InteropServices;
15
17 private Object locker = new Object();
18 private HandleRef swigCPtr;
19 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
20 public OdApcObjectPool(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdApcObjectPool_SWIGUpcast(cPtr), cMemoryOwn) {
21 swigCPtr = new HandleRef(this, cPtr);
22 }
23
24 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 public static HandleRef getCPtr(OdApcObjectPool obj) {
26 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
27 }
28
29 protected override void Dispose(bool disposing) {
30 lock(this) {
31 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
32 if (swigCMemOwn) {
33 swigCMemOwn = false;
35 }
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37 }
38 base.Dispose(disposing);
39 }
40 }
41
42 public virtual void reserve(UInt32 /*SIMPLETYPE*/ n) {
43 GlobalsPINVOKE.OdApcObjectPool_reserve(swigCPtr, n /*SIMPLETYPE*/);
45 }
46
47 public virtual OdRxObject take() {// OdRxObjectPtr
48 MemoryManager mMan = MemoryManager.GetMemoryManager();
49 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
50 IntPtr ptr = GlobalsPINVOKE.OdApcObjectPool_take(swigCPtr);
51
52 OdRxObject ret = null;
53 if (null != mTrans)
54 {
55 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
56 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
57 }
58 else
59 {
60 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
61 }
62
64 return ret;
65}
66
67 public virtual void put(OdRxObject pObj) {
70 }
71
72 protected static string getRealClassName(IntPtr /*SIMPLETYPE*/ ptr) {
73 string ret = GlobalsPINVOKE.OdApcObjectPool_getRealClassName(ptr /*SIMPLETYPE*/);
75 return ret;
76 }
77
78}
79
80}
static global::System.Exception Retrieve()
static void OdApcObjectPool_put(HandleRef jarg1, HandleRef jarg2)
static IntPtr OdApcObjectPool_take(HandleRef jarg1)
static string OdApcObjectPool_getRealClassName(IntPtr jarg1)
static void OdApcObjectPool_reserve(HandleRef jarg1, UInt32 jarg2)
static void delete_OdApcObjectPool(HandleRef jarg1)
static HandleRef getCPtr(OdApcObjectPool obj)
override void Dispose(bool disposing)
static string getRealClassName(IntPtr ptr)
virtual void reserve(UInt32 n)
virtual void put(OdRxObject pObj)
OdApcObjectPool(IntPtr cPtr, bool cMemoryOwn)
virtual OdRxObject take()
static HandleRef getCPtr(OdRxObject obj)
Definition: OdRxObject.cs:26