Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdDgElementId.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.TG {
12
13using System;
14using System.Runtime.InteropServices;
15using Teigha.Core;
16
17public class OdDgElementId : global::System.IDisposable {
18 private Object locker = new Object();
19 private HandleRef swigCPtr;
20 protected bool swigCMemOwn;
21 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
22 public OdDgElementId(IntPtr cPtr, bool cMemoryOwn) {
23 swigCMemOwn = cMemoryOwn;
24 swigCPtr = new HandleRef(this, cPtr);
25 }
26 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
27 public static HandleRef getCPtr(OdDgElementId obj) {
28 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
29 }
30
32 Dispose(false);
33 }
34
35 public void Dispose() {
36 Dispose(true);
37 global::System.GC.SuppressFinalize(this);
38 }
39
40 protected virtual void Dispose(bool disposing) {
41 lock(this) {
42 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
43 if (swigCMemOwn) {
44 swigCMemOwn = false;
46 }
47 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
48 }
49 }
50 }
51
52 public override bool Equals(object obj)
53 {
55 if (null == id)
56 {
57 return false;
58 }
61 return ret;
62 }
63 public override int GetHashCode()
64 {
65 return (int)this.getHandle().ToUInt64();
66 }
67
68 public OdDgElementId() : this(TG_DbPINVOKE.new_OdDgElementId__SWIG_0(), true) {
70 }
71
72 public OdDgElementId(OdDbStub objectId) : this(TG_DbPINVOKE.new_OdDgElementId__SWIG_1(OdDbStub.getCPtr(objectId)), true) {
74 }
75
76 public static OdDgElementId kNull {
77 get {
78 global::System.IntPtr cPtr = TG_DbPINVOKE.OdDgElementId_kNull_get();
79 OdDgElementId ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdDgElementId(cPtr, false);
81 return ret;
82 }
83 }
84
85 public bool isNull() {
86 bool ret = TG_DbPINVOKE.OdDgElementId_isNull(swigCPtr);
88 return ret;
89 }
90
91 public void setNull() {
94 }
95
96 public bool isValid() {
97 bool ret = TG_DbPINVOKE.OdDgElementId_isValid(swigCPtr);
99 return ret;
100 }
101
105 return ret;
106 }
107
108 public OdDgElementId Assign(OdDbStub objectId) {
111 return ret;
112 }
113
114 public bool IsEqual(OdDgElementId objectId) {
115 bool ret = TG_DbPINVOKE.OdDgElementId_IsEqual(swigCPtr, OdDgElementId.getCPtr(objectId));
117 return ret;
118 }
119
120 public bool IsNotEqual(OdDgElementId objectId) {
121 bool ret = TG_DbPINVOKE.OdDgElementId_IsNotEqual(swigCPtr, OdDgElementId.getCPtr(objectId));
123 return ret;
124 }
125
127 global::System.IntPtr cPtr = TG_DbPINVOKE.OdDgElementId_AsOdDbStubPointer(swigCPtr);
128 OdDbStub ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdDbStub(cPtr, false);
130 return ret;
131 }
132
134 global::System.IntPtr cPtr = TG_DbPINVOKE.OdDgElementId___deref__(swigCPtr);
135 OdDgStub ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdDgStub(cPtr, false);
137 return ret;
138 }
139
141 OdDgDatabase ret = (OdDgDatabase)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgDatabase),TG_DbPINVOKE.OdDgElementId_database(swigCPtr),false); /*createInt 3_2*/
142
144 return ret;
145}
146
148 OdDgDatabase ret = (OdDgDatabase)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgDatabase),TG_DbPINVOKE.OdDgElementId_originalDatabase(swigCPtr),false); /*createInt 3_2*/
149
151 return ret;
152}
153
154 public void convertToRedirectedId() {
157 }
158
159 public bool isErased() {
160 bool ret = TG_DbPINVOKE.OdDgElementId_isErased(swigCPtr);
162 return ret;
163 }
164
166 OdDbHandle ret = new OdDbHandle(TG_DbPINVOKE.OdDgElementId_getHandle(swigCPtr), false);
168 return ret;
169 }
170
174 return ret;
175 }
176
177 public OdRxObject openObject(OpenMode openMode, bool openErasedOne) {// OdRxObjectPtr
178 MemoryManager mMan = MemoryManager.GetMemoryManager();
179 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
180 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_openObject__SWIG_0(swigCPtr, (int)openMode, openErasedOne);
181
182 OdRxObject ret = null;
183 if (null != mTrans)
184 {
185 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
186 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
187 }
188 else
189 {
190 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
191 }
192
194 return ret;
195}
196
197 public OdRxObject openObject(OpenMode openMode) {// OdRxObjectPtr
198 MemoryManager mMan = MemoryManager.GetMemoryManager();
199 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
200 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_openObject__SWIG_1(swigCPtr, (int)openMode);
201
202 OdRxObject ret = null;
203 if (null != mTrans)
204 {
205 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
206 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
207 }
208 else
209 {
210 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
211 }
212
214 return ret;
215}
216
217 public OdRxObject openObject() {// OdRxObjectPtr
218 MemoryManager mMan = MemoryManager.GetMemoryManager();
219 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
220 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_openObject__SWIG_2(swigCPtr);
221
222 OdRxObject ret = null;
223 if (null != mTrans)
224 {
225 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
226 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
227 }
228 else
229 {
230 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
231 }
232
234 return ret;
235}
236
237 public OdRxObject safeOpenObject(OpenMode openMode, bool openErasedOne) {// OdRxObjectPtr
238 MemoryManager mMan = MemoryManager.GetMemoryManager();
239 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
240 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_safeOpenObject__SWIG_0(swigCPtr, (int)openMode, openErasedOne);
241
242 OdRxObject ret = null;
243 if (null != mTrans)
244 {
245 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
246 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
247 }
248 else
249 {
250 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
251 }
252
254 return ret;
255}
256
257 public OdRxObject safeOpenObject(OpenMode openMode) {// OdRxObjectPtr
258 MemoryManager mMan = MemoryManager.GetMemoryManager();
259 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
260 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_safeOpenObject__SWIG_1(swigCPtr, (int)openMode);
261
262 OdRxObject ret = null;
263 if (null != mTrans)
264 {
265 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
266 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
267 }
268 else
269 {
270 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
271 }
272
274 return ret;
275}
276
277 public OdRxObject safeOpenObject() {// OdRxObjectPtr
278 MemoryManager mMan = MemoryManager.GetMemoryManager();
279 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
281
282 OdRxObject ret = null;
283 if (null != mTrans)
284 {
285 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
286 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
287 }
288 else
289 {
290 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
291 }
292
294 return ret;
295}
296
297}
298
299}
static HandleRef getCPtr(OdDbStub obj)
Definition: OdDbStub.cs:26
bool IsEqual(OdDgElementId objectId)
OdRxObject safeOpenObject(OpenMode openMode, bool openErasedOne)
OdDbHandle getNonForwardedHandle()
OdDgElementId(OdDbStub objectId)
OdDgElementId Assign(OdDgElementId objectId)
OdDgDatabase originalDatabase()
virtual void Dispose(bool disposing)
static OdDgElementId kNull
OdRxObject openObject(OpenMode openMode)
OdDgElementId(IntPtr cPtr, bool cMemoryOwn)
OdDgElementId Assign(OdDbStub objectId)
override bool Equals(object obj)
OdDgDatabase database()
bool IsNotEqual(OdDgElementId objectId)
static HandleRef getCPtr(OdDgElementId obj)
override int GetHashCode()
OdRxObject openObject(OpenMode openMode, bool openErasedOne)
OdRxObject safeOpenObject()
OdRxObject safeOpenObject(OpenMode openMode)
static global::System.Exception Retrieve()
static bool OdDgElementId_isValid(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDgElementId_openObject__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static IntPtr OdDgElementId_safeOpenObject__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr OdDgElementId_Assign__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static IntPtr OdDgElementId_openObject__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDgElementId_database(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDgElementId_openObject__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, bool jarg3)
static void OdDgElementId_setNull(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDgElementId_Assign__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static IntPtr OdDgElementId_safeOpenObject__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, bool jarg3)
static bool OdDgElementId_isNull(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_OdDgElementId(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDgElementId_AsOdDbStubPointer(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDgElementId___deref__(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdDgElementId_convertToRedirectedId(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDgElementId_getNonForwardedHandle(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDgElementId_originalDatabase(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDgElementId_getHandle(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDgElementId_kNull_get()
static bool OdDgElementId_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static IntPtr OdDgElementId_safeOpenObject__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdDgElementId_IsNotEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdDgElementId_isErased(global::System.Runtime.InteropServices.HandleRef jarg1)