14using System.Runtime.InteropServices;
17 private Object locker =
new Object();
18 private HandleRef swigCPtr;
20 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
23 swigCPtr =
new HandleRef(
this, cPtr);
25 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
27 return (obj ==
null) ?
new HandleRef(
null, IntPtr.Zero) : obj.swigCPtr;
36 global::System.GC.SuppressFinalize(
this);
39 protected virtual void Dispose(
bool disposing) {
40 if (swigCPtr.Handle != IntPtr.Zero)
46 if ((swigCPtr.Handle != IntPtr.Zero) && (
swigCMemOwn))
54 swigCPtr =
new HandleRef(
null, IntPtr.Zero);
56 GC.SuppressFinalize(
this);
95 public void increase(uint nThreads, UInt32[] aThreads, uint nThreadAttributes) {
100 public void increase(uint nThreads, UInt32[] aThreads) {
105 public void decrease(uint nThreads, UInt32[] aThreads) {
120 public bool hasThread(uint nThreadId, UInt32[] pThreadAttributes) {
128 Globals.ExecuteMainThreadFuncDelegateNative func_inDelegate =
null;
131 func_inDelegate = (Globals.MainThreadFuncDelegateNative _func,IntPtr _arg) =>
133 Globals.MainThreadFuncDelegateNative func_nativeTemp = _func;
134 Globals.MainThreadFuncDelegate func_csharpTemp =
null;
135 if (func_nativeTemp !=
null)
136 func_csharpTemp = (IntPtr __arg) => { func_nativeTemp(__arg); };
147 func(func_csharpTemp,_arg);
155 IntPtr func_ptr = (func ==
null) ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func_inDelegate);
156 Teigha.
Core.DelegateHolder.Add(func_inDelegate);
171 Globals.ExecuteMainThreadFuncDelegate outDelegate =
null;
172 if (nativeCallback != IntPtr.Zero)
174 outDelegate = (Globals.MainThreadFuncDelegate _func,IntPtr _arg) =>
179 if (func_csharpTemp !=
null)
180 func_nativeTemp = (IntPtr __arg) => { func_csharpTemp(__arg); };
189 cPtr_NativeDelegate(func_nativeTemp,_arg);
delegate void ExecuteMainThreadFuncDelegate(Globals.MainThreadFuncDelegate _func, IntPtr _arg)
delegate void MainThreadFuncDelegate(IntPtr arg1)
delegate void MainThreadFuncDelegateNative(IntPtr arg1)
delegate void ExecuteMainThreadFuncDelegateNative(Globals.MainThreadFuncDelegateNative _func, IntPtr _arg)
static global::System.Exception Retrieve()
static IntPtr ThreadsCounter_getMainThreadFunc(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool ThreadsCounter_hasReactor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void ThreadsCounter_setMainThreadFunc(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static bool ThreadsCounter_hasThread(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, IntPtr jarg3)
static bool ThreadsCounter_removeReactor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool ThreadsCounter_addReactor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void ThreadsCounter_startThread(global::System.Runtime.InteropServices.HandleRef jarg1)
static void ThreadsCounter_decrease(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, IntPtr jarg3)
static void ThreadsCounter_increase__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, IntPtr jarg3)
static void ThreadsCounter_stopThread(global::System.Runtime.InteropServices.HandleRef jarg1)
static void ThreadsCounter_setThreadPoolService(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static int ThreadsCounter_nReactors(global::System.Runtime.InteropServices.HandleRef jarg1)
static void ThreadsCounter_increase__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, IntPtr jarg3, uint jarg4)
static IntPtr ThreadsCounter_getThreadPoolService(global::System.Runtime.InteropServices.HandleRef jarg1)
static HandleRef getCPtr(OdRxThreadPoolService obj)
Globals.ExecuteMainThreadFuncDelegate getMainThreadFunc()
void setThreadPoolService(OdRxThreadPoolService pService)
void decrease(uint nThreads, UInt32[] aThreads)
void setMainThreadFunc(Globals.ExecuteMainThreadFuncDelegate func)
OdRxThreadPoolService getThreadPoolService()
bool removeReactor(ThreadsCounterReactor pReactor)
static HandleRef getCPtr(ThreadsCounter obj)
ThreadsCounter(IntPtr cPtr, bool cMemoryOwn)
bool hasReactor(ThreadsCounterReactor pReactor)
void increase(uint nThreads, UInt32[] aThreads, uint nThreadAttributes)
bool hasThread(uint nThreadId, UInt32[] pThreadAttributes)
void increase(uint nThreads, UInt32[] aThreads)
bool addReactor(ThreadsCounterReactor pReactor)
virtual void Dispose(bool disposing)
static HandleRef getCPtr(ThreadsCounterReactor obj)