Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdDbObjectId.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.TD {
12
13using System;
14using System.Runtime.InteropServices;
15using Teigha.Core;
16
17public class OdDbObjectId : 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 OdDbObjectId(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(OdDbObjectId 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 {
54 OdDbObjectId id = (OdDbObjectId)obj;
55 if (null == id)
56 {
57 return false;
58 }
59 bool ret = TD_DbPINVOKE.OdDbObjectId_IsEqual(swigCPtr, OdDbObjectId.getCPtr(id));
61 return ret;
62 }
63 public override int GetHashCode()
64 {
65 return (int)this.getHandle().ToUInt64();
66 }
67 public OdDbObjectId() : this(TD_DbPINVOKE.new_OdDbObjectId__SWIG_0(), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
68 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #28
69 if (null != mTr)
70 {
71 mTr.AddObject(new OdDbObjectId(swigCPtr.Handle, true));
72 }
74 }
75
76 public OdDbObjectId(OdDbStub objectId) : this(TD_DbPINVOKE.new_OdDbObjectId__SWIG_1(OdDbStub.getCPtr(objectId)), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
77 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #29
78 if (null != mTr)
79 {
80 mTr.AddObject(new OdDbObjectId(swigCPtr.Handle, true));
81 }
83 }
84
85 public static OdDbObjectId kNull {
86 get {
87 global::System.IntPtr cPtr = TD_DbPINVOKE.OdDbObjectId_kNull_get();
88 OdDbObjectId ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdDbObjectId(cPtr, false);
90 return ret;
91 }
92 }
93
94 public bool isNull() {
95 bool ret = TD_DbPINVOKE.OdDbObjectId_isNull(swigCPtr);
97 return ret;
98 }
99
100 public void setNull() {
103 }
104
105 public bool isValid() {
106 bool ret = TD_DbPINVOKE.OdDbObjectId_isValid(swigCPtr);
108 return ret;
109 }
110
114 return ret;
115 }
116
117 public bool IsEqual(OdDbObjectId objectId) {
118 bool ret = TD_DbPINVOKE.OdDbObjectId_IsEqual(swigCPtr, OdDbObjectId.getCPtr(objectId));
120 return ret;
121 }
122
123 public bool IsNotEqual(OdDbObjectId objectId) {
124 bool ret = TD_DbPINVOKE.OdDbObjectId_IsNotEqual(swigCPtr, OdDbObjectId.getCPtr(objectId));
126 return ret;
127 }
128
130 global::System.IntPtr cPtr = TD_DbPINVOKE.OdDbObjectId_AsOdDbStubPointer(swigCPtr);
131 OdDbStub ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdDbStub(cPtr, false);
133 return ret;
134 }
135
137 global::System.IntPtr cPtr = TD_DbPINVOKE.OdDbObjectId___deref__(swigCPtr);
138 OdDbStubExt ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdDbStubExt(cPtr, false);
140 return ret;
141 }
142
144 OdDbDatabase ret = (OdDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbDatabase),TD_DbPINVOKE.OdDbObjectId_database(swigCPtr),false); /*createInt 3_2*/
145
147 return ret;
148}
149
151 OdDbDatabase ret = (OdDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbDatabase),TD_DbPINVOKE.OdDbObjectId_originalDatabase(swigCPtr),false); /*createInt 3_2*/
152
154 return ret;
155}
156
157 public void convertToRedirectedId() {
160 }
161
162 public bool isErased() {
163 bool ret = TD_DbPINVOKE.OdDbObjectId_isErased(swigCPtr);
165 return ret;
166 }
167
168 public bool isEffectivelyErased() {
171 return ret;
172 }
173
174 public bool objectLeftOnDisk() {
175 bool ret = TD_DbPINVOKE.OdDbObjectId_objectLeftOnDisk(swigCPtr);
177 return ret;
178 }
179
181 OdDbHandle ret = new OdDbHandle(TD_DbPINVOKE.OdDbObjectId_getHandle(swigCPtr), false);
183 return ret;
184 }
185
189 return ret;
190 }
191
192 public OdResult openObject(ref OdDbObject /*OUT_PARAM for SMARTPTR*/ pObj, OpenMode openMode, bool openErasedOne) {
193 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pObj = pObj == null ? IntPtr.Zero : OdDbObject.getCPtr(pObj).Handle;
194 IntPtr saved_pObj = tmp_pObj;
195 /*OUT_PARAM for SMARTPTR pre*/
196 try {
197 OdResult ret = (OdResult)TD_DbPINVOKE.OdDbObjectId_openObject__SWIG_0(swigCPtr, ref tmp_pObj /*OUT_PARAM for SMARTPTR*/, (int)openMode, openErasedOne);
199 return ret;
200 } finally {
201if(tmp_pObj == IntPtr.Zero) pObj = null;
202 if(tmp_pObj != IntPtr.Zero && tmp_pObj != saved_pObj)
203 {
204 MemoryTransaction mTrans_pObj = MemoryManager.GetMemoryManager().GetCurrentTransaction();
205 if(mTrans_pObj != null)
206 mTrans_pObj.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdDbObject>(typeof(OdDbObject), tmp_pObj, true));
207 pObj = Teigha.Core.Helpers.odCreateObjectInternal<OdDbObject>(typeof(OdDbObject), tmp_pObj, mTrans_pObj == null);
208 /*OUT_PARAM for SMARTPTR*/
209 }
210 }
211 }
212
213 public OdResult openObject(ref OdDbObject /*OUT_PARAM for SMARTPTR*/ pObj, OpenMode openMode) {
214 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pObj = pObj == null ? IntPtr.Zero : OdDbObject.getCPtr(pObj).Handle;
215 IntPtr saved_pObj = tmp_pObj;
216 /*OUT_PARAM for SMARTPTR pre*/
217 try {
218 OdResult ret = (OdResult)TD_DbPINVOKE.OdDbObjectId_openObject__SWIG_1(swigCPtr, ref tmp_pObj /*OUT_PARAM for SMARTPTR*/, (int)openMode);
220 return ret;
221 } finally {
222if(tmp_pObj == IntPtr.Zero) pObj = null;
223 if(tmp_pObj != IntPtr.Zero && tmp_pObj != saved_pObj)
224 {
225 MemoryTransaction mTrans_pObj = MemoryManager.GetMemoryManager().GetCurrentTransaction();
226 if(mTrans_pObj != null)
227 mTrans_pObj.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdDbObject>(typeof(OdDbObject), tmp_pObj, true));
228 pObj = Teigha.Core.Helpers.odCreateObjectInternal<OdDbObject>(typeof(OdDbObject), tmp_pObj, mTrans_pObj == null);
229 /*OUT_PARAM for SMARTPTR*/
230 }
231 }
232 }
233
234 public OdResult openObject(ref OdDbObject /*OUT_PARAM for SMARTPTR*/ pObj) {
235 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pObj = pObj == null ? IntPtr.Zero : OdDbObject.getCPtr(pObj).Handle;
236 IntPtr saved_pObj = tmp_pObj;
237 /*OUT_PARAM for SMARTPTR pre*/
238 try {
239 OdResult ret = (OdResult)TD_DbPINVOKE.OdDbObjectId_openObject__SWIG_2(swigCPtr, ref tmp_pObj /*OUT_PARAM for SMARTPTR*/);
241 return ret;
242 } finally {
243if(tmp_pObj == IntPtr.Zero) pObj = null;
244 if(tmp_pObj != IntPtr.Zero && tmp_pObj != saved_pObj)
245 {
246 MemoryTransaction mTrans_pObj = MemoryManager.GetMemoryManager().GetCurrentTransaction();
247 if(mTrans_pObj != null)
248 mTrans_pObj.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdDbObject>(typeof(OdDbObject), tmp_pObj, true));
249 pObj = Teigha.Core.Helpers.odCreateObjectInternal<OdDbObject>(typeof(OdDbObject), tmp_pObj, mTrans_pObj == null);
250 /*OUT_PARAM for SMARTPTR*/
251 }
252 }
253 }
254
255 public OdDbObject openObject(OpenMode openMode, bool openErasedOne) {// OdDbObjectPtr
256 MemoryManager mMan = MemoryManager.GetMemoryManager();
257 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
258 IntPtr ptr = TD_DbPINVOKE.OdDbObjectId_openObject__SWIG_3(swigCPtr, (int)openMode, openErasedOne);
259
260 OdDbObject ret = null;
261 if (null != mTrans)
262 {
263 mTrans.AddObject((OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true));
264 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, false);
265 }
266 else
267 {
268 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true);
269 }
270
272 return ret;
273}
274
275 public OdDbObject openObject(OpenMode openMode) {// OdDbObjectPtr
276 MemoryManager mMan = MemoryManager.GetMemoryManager();
277 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
278 IntPtr ptr = TD_DbPINVOKE.OdDbObjectId_openObject__SWIG_4(swigCPtr, (int)openMode);
279
280 OdDbObject ret = null;
281 if (null != mTrans)
282 {
283 mTrans.AddObject((OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true));
284 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, false);
285 }
286 else
287 {
288 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true);
289 }
290
292 return ret;
293}
294
295 public OdDbObject openObject() {// OdDbObjectPtr
296 MemoryManager mMan = MemoryManager.GetMemoryManager();
297 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
298 IntPtr ptr = TD_DbPINVOKE.OdDbObjectId_openObject__SWIG_5(swigCPtr);
299
300 OdDbObject ret = null;
301 if (null != mTrans)
302 {
303 mTrans.AddObject((OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true));
304 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, false);
305 }
306 else
307 {
308 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true);
309 }
310
312 return ret;
313}
314
315 public OdDbObject safeOpenObject(OpenMode openMode, bool openErasedOne) {// OdDbObjectPtr
316 MemoryManager mMan = MemoryManager.GetMemoryManager();
317 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
318 IntPtr ptr = TD_DbPINVOKE.OdDbObjectId_safeOpenObject__SWIG_0(swigCPtr, (int)openMode, openErasedOne);
319
320 OdDbObject ret = null;
321 if (null != mTrans)
322 {
323 mTrans.AddObject((OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true));
324 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, false);
325 }
326 else
327 {
328 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true);
329 }
330
332 return ret;
333}
334
335 public OdDbObject safeOpenObject(OpenMode openMode) {// OdDbObjectPtr
336 MemoryManager mMan = MemoryManager.GetMemoryManager();
337 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
338 IntPtr ptr = TD_DbPINVOKE.OdDbObjectId_safeOpenObject__SWIG_1(swigCPtr, (int)openMode);
339
340 OdDbObject ret = null;
341 if (null != mTrans)
342 {
343 mTrans.AddObject((OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true));
344 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, false);
345 }
346 else
347 {
348 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true);
349 }
350
352 return ret;
353}
354
355 public OdDbObject safeOpenObject() {// OdDbObjectPtr
356 MemoryManager mMan = MemoryManager.GetMemoryManager();
357 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
359
360 OdDbObject ret = null;
361 if (null != mTrans)
362 {
363 mTrans.AddObject((OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true));
364 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, false);
365 }
366 else
367 {
368 ret = (OdDbObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdDbObject),ptr, true);
369 }
370
372 return ret;
373}
374
375 public void bindObject(OdDbObject pObj) {
378 }
379
381 OdRxClass ret = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxClass),TD_DbPINVOKE.OdDbObjectId_objectClass(swigCPtr),false); /*createInt 3_2*/
382
384 return ret;
385}
386
388 OdDbObjectId ret = new OdDbObjectId(TD_DbPINVOKE.OdDbObjectId_Assign(swigCPtr, OdDbObjectId.getCPtr(objectId)), false);
390 return ret;
391 }
392
393}
394
395}
static HandleRef getCPtr(OdDbStub obj)
Definition: OdDbStub.cs:26
static HandleRef getCPtr(OdDbObject obj)
Definition: OdDbObject.cs:26
OdDbStubExt __deref__()
virtual void Dispose(bool disposing)
Definition: OdDbObjectId.cs:40
OdDbObjectId Assign(OdDbObjectId objectId)
OdDbObject safeOpenObject()
OdDbStub AsOdDbStubPointer()
OdDbObject safeOpenObject(OpenMode openMode, bool openErasedOne)
override bool Equals(object obj)
Definition: OdDbObjectId.cs:52
OdDbDatabase database()
OdDbObject openObject()
OdDbHandle getHandle()
OdDbObject openObject(OpenMode openMode, bool openErasedOne)
OdDbObject openObject(OpenMode openMode)
OdDbObjectId AssignOdDbStub(OdDbStub objectId)
OdResult openObject(ref OdDbObject pObj, OpenMode openMode, bool openErasedOne)
OdResult openObject(ref OdDbObject pObj, OpenMode openMode)
OdDbDatabase originalDatabase()
OdDbObjectId(IntPtr cPtr, bool cMemoryOwn)
Definition: OdDbObjectId.cs:22
bool IsNotEqual(OdDbObjectId objectId)
static OdDbObjectId kNull
Definition: OdDbObjectId.cs:85
void bindObject(OdDbObject pObj)
static HandleRef getCPtr(OdDbObjectId obj)
Definition: OdDbObjectId.cs:27
OdDbObject safeOpenObject(OpenMode openMode)
OdDbObjectId(OdDbStub objectId)
Definition: OdDbObjectId.cs:76
OdDbHandle getNonForwardedHandle()
bool IsEqual(OdDbObjectId objectId)
OdResult openObject(ref OdDbObject pObj)
override int GetHashCode()
Definition: OdDbObjectId.cs:63
static global::System.Exception Retrieve()
static IntPtr OdDbObjectId_openObject__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, bool jarg3)
static IntPtr OdDbObjectId_database(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdDbObjectId_bindObject(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static bool OdDbObjectId_isValid(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdDbObjectId_isEffectivelyErased(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDbObjectId_safeOpenObject__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDbObjectId_safeOpenObject__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, bool jarg3)
static bool OdDbObjectId_IsNotEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdDbObjectId_isNull(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDbObjectId_safeOpenObject__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr OdDbObjectId_AssignOdDbStub(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int OdDbObjectId_openObject__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, ref IntPtr jarg2, int jarg3, bool jarg4)
static int OdDbObjectId_openObject__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, ref IntPtr jarg2, int jarg3)
static global::System.IntPtr OdDbObjectId_getHandle(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDbObjectId_kNull_get()
static void OdDbObjectId_setNull(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdDbObjectId_objectLeftOnDisk(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDbObjectId___deref__(global::System.Runtime.InteropServices.HandleRef jarg1)
static int OdDbObjectId_openObject__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, ref IntPtr jarg2)
static global::System.IntPtr OdDbObjectId_AsOdDbStubPointer(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_OdDbObjectId(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDbObjectId_openObject__SWIG_5(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDbObjectId_getNonForwardedHandle(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdDbObjectId_isErased(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdDbObjectId_convertToRedirectedId(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDbObjectId_originalDatabase(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdDbObjectId_openObject__SWIG_4(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static IntPtr OdDbObjectId_objectClass(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdDbObjectId_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdDbObjectId_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)