Extended .NET SDK Documentation 2025 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
95
96 public bool isValid() {
97 bool ret = TG_DbPINVOKE.OdDgElementId_isValid(swigCPtr);
99 return ret;
100 }
101
107
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
158
159 public bool isErased() {
160 bool ret = TG_DbPINVOKE.OdDgElementId_isErased(swigCPtr);
162 return ret;
163 }
164
170
176
177 public OdResult openObject(ref OdDgElement /*OUT_PARAM for SMARTPTR*/ pObj, OpenMode openMode, bool openErasedOne) {
178 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pObj = pObj == null ? IntPtr.Zero : OdDgElement.getCPtr(pObj).Handle;
179 IntPtr saved_pObj = tmp_pObj;
180 /*OUT_PARAM for SMARTPTR pre*/
181 try {
182 OdResult ret = (OdResult)TG_DbPINVOKE.OdDgElementId_openObject__SWIG_0(swigCPtr, ref tmp_pObj /*OUT_PARAM for SMARTPTR*/, (int)openMode, openErasedOne);
184 return ret;
185 } finally {
186if(tmp_pObj == IntPtr.Zero) pObj = null;
187 if(tmp_pObj != IntPtr.Zero && tmp_pObj != saved_pObj)
188 {
189 MemoryTransaction mTrans_pObj = MemoryManager.GetMemoryManager().GetCurrentTransaction();
190 if(mTrans_pObj != null)
191 mTrans_pObj.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdDgElement>(typeof(OdDgElement), tmp_pObj, true));
192 pObj = Teigha.Core.Helpers.odCreateObjectInternal<OdDgElement>(typeof(OdDgElement), tmp_pObj, mTrans_pObj == null);
193 /*OUT_PARAM for SMARTPTR*/
194 }
195 }
196 }
197
198 public OdResult openObject(ref OdDgElement /*OUT_PARAM for SMARTPTR*/ pObj, OpenMode openMode) {
199 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pObj = pObj == null ? IntPtr.Zero : OdDgElement.getCPtr(pObj).Handle;
200 IntPtr saved_pObj = tmp_pObj;
201 /*OUT_PARAM for SMARTPTR pre*/
202 try {
203 OdResult ret = (OdResult)TG_DbPINVOKE.OdDgElementId_openObject__SWIG_1(swigCPtr, ref tmp_pObj /*OUT_PARAM for SMARTPTR*/, (int)openMode);
205 return ret;
206 } finally {
207if(tmp_pObj == IntPtr.Zero) pObj = null;
208 if(tmp_pObj != IntPtr.Zero && tmp_pObj != saved_pObj)
209 {
210 MemoryTransaction mTrans_pObj = MemoryManager.GetMemoryManager().GetCurrentTransaction();
211 if(mTrans_pObj != null)
212 mTrans_pObj.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdDgElement>(typeof(OdDgElement), tmp_pObj, true));
213 pObj = Teigha.Core.Helpers.odCreateObjectInternal<OdDgElement>(typeof(OdDgElement), tmp_pObj, mTrans_pObj == null);
214 /*OUT_PARAM for SMARTPTR*/
215 }
216 }
217 }
218
219 public OdResult openObject(ref OdDgElement /*OUT_PARAM for SMARTPTR*/ pObj) {
220 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pObj = pObj == null ? IntPtr.Zero : OdDgElement.getCPtr(pObj).Handle;
221 IntPtr saved_pObj = tmp_pObj;
222 /*OUT_PARAM for SMARTPTR pre*/
223 try {
224 OdResult ret = (OdResult)TG_DbPINVOKE.OdDgElementId_openObject__SWIG_2(swigCPtr, ref tmp_pObj /*OUT_PARAM for SMARTPTR*/);
226 return ret;
227 } finally {
228if(tmp_pObj == IntPtr.Zero) pObj = null;
229 if(tmp_pObj != IntPtr.Zero && tmp_pObj != saved_pObj)
230 {
231 MemoryTransaction mTrans_pObj = MemoryManager.GetMemoryManager().GetCurrentTransaction();
232 if(mTrans_pObj != null)
233 mTrans_pObj.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdDgElement>(typeof(OdDgElement), tmp_pObj, true));
234 pObj = Teigha.Core.Helpers.odCreateObjectInternal<OdDgElement>(typeof(OdDgElement), tmp_pObj, mTrans_pObj == null);
235 /*OUT_PARAM for SMARTPTR*/
236 }
237 }
238 }
239
240 public OdDgElement openObject(OpenMode openMode, bool openErasedOne) {// OdDgElementPtr
241 MemoryManager mMan = MemoryManager.GetMemoryManager();
242 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
243 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_openObject__SWIG_3(swigCPtr, (int)openMode, openErasedOne);
244
245 OdDgElement ret = null;
246 if (null != mTrans)
247 {
248 mTrans.AddObject((OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true));
249 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, false);
250 }
251 else
252 {
253 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true);
254 }
255
257 return ret;
258}
259
260 public OdDgElement openObject(OpenMode openMode) {// OdDgElementPtr
261 MemoryManager mMan = MemoryManager.GetMemoryManager();
262 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
263 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_openObject__SWIG_4(swigCPtr, (int)openMode);
264
265 OdDgElement ret = null;
266 if (null != mTrans)
267 {
268 mTrans.AddObject((OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true));
269 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, false);
270 }
271 else
272 {
273 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true);
274 }
275
277 return ret;
278}
279
280 public OdDgElement openObject() {// OdDgElementPtr
281 MemoryManager mMan = MemoryManager.GetMemoryManager();
282 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
283 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_openObject__SWIG_5(swigCPtr);
284
285 OdDgElement ret = null;
286 if (null != mTrans)
287 {
288 mTrans.AddObject((OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true));
289 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, false);
290 }
291 else
292 {
293 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true);
294 }
295
297 return ret;
298}
299
300 public OdDgElement safeOpenObject(OpenMode openMode, bool openErasedOne) {// OdDgElementPtr
301 MemoryManager mMan = MemoryManager.GetMemoryManager();
302 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
303 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_safeOpenObject__SWIG_0(swigCPtr, (int)openMode, openErasedOne);
304
305 OdDgElement ret = null;
306 if (null != mTrans)
307 {
308 mTrans.AddObject((OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true));
309 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, false);
310 }
311 else
312 {
313 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true);
314 }
315
317 return ret;
318}
319
320 public OdDgElement safeOpenObject(OpenMode openMode) {// OdDgElementPtr
321 MemoryManager mMan = MemoryManager.GetMemoryManager();
322 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
323 IntPtr ptr = TG_DbPINVOKE.OdDgElementId_safeOpenObject__SWIG_1(swigCPtr, (int)openMode);
324
325 OdDgElement ret = null;
326 if (null != mTrans)
327 {
328 mTrans.AddObject((OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true));
329 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, false);
330 }
331 else
332 {
333 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true);
334 }
335
337 return ret;
338}
339
340 public OdDgElement safeOpenObject() {// OdDgElementPtr
341 MemoryManager mMan = MemoryManager.GetMemoryManager();
342 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
344
345 OdDgElement ret = null;
346 if (null != mTrans)
347 {
348 mTrans.AddObject((OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true));
349 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, false);
350 }
351 else
352 {
353 ret = (OdDgElement)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDgElement),ptr, true);
354 }
355
357 return ret;
358}
359
360}
361
362}
static HandleRef getCPtr(OdDbStub obj)
Definition OdDbStub.cs:26
static HandleRef getCPtr(OdDgElement obj)
bool IsEqual(OdDgElementId objectId)
OdDbHandle getNonForwardedHandle()
OdDgElementId(OdDbStub objectId)
OdResult openObject(ref OdDgElement pObj, OpenMode openMode)
OdDgElementId Assign(OdDgElementId objectId)
OdDgDatabase originalDatabase()
virtual void Dispose(bool disposing)
static OdDgElementId kNull
OdResult openObject(ref OdDgElement pObj)
OdDgElementId(IntPtr cPtr, bool cMemoryOwn)
OdDgElementId Assign(OdDbStub objectId)
OdDgElement safeOpenObject(OpenMode openMode, bool openErasedOne)
override bool Equals(object obj)
OdDgElement safeOpenObject()
bool IsNotEqual(OdDgElementId objectId)
OdDgElement safeOpenObject(OpenMode openMode)
OdDgElement openObject(OpenMode openMode)
OdDgElement openObject(OpenMode openMode, bool openErasedOne)
static HandleRef getCPtr(OdDgElementId obj)
override int GetHashCode()
OdResult openObject(ref OdDgElement pObj, OpenMode openMode, bool openErasedOne)
static global::System.Exception Retrieve()
static bool OdDgElementId_isValid(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDgElementId_safeOpenObject__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int OdDgElementId_openObject__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, ref IntPtr jarg2)
static global::System.IntPtr OdDgElementId_Assign__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static IntPtr OdDgElementId_database(global::System.Runtime.InteropServices.HandleRef jarg1)
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_openObject__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, bool jarg3)
static int OdDgElementId_openObject__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, ref IntPtr jarg2, int jarg3, bool jarg4)
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 IntPtr OdDgElementId_openObject__SWIG_4(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
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 IntPtr OdDgElementId_openObject__SWIG_5(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 int OdDgElementId_openObject__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, ref IntPtr jarg2, int jarg3)
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)