Extended .NET SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
OdCategoryDefinition.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 OdCategoryDefinition(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdCategoryDefinition_SWIGUpcast(cPtr), cMemoryOwn) {
21 swigCPtr = new HandleRef(this, cPtr);
22 }
23
24 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 public static HandleRef getCPtr(OdCategoryDefinition 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 static OdCategoryDefinition cast(OdRxObject pObj) {// OdSmartPtr<OdSpatialReference::OdCategoryDefinition>
43 MemoryManager mMan = MemoryManager.GetMemoryManager();
44 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
46
47 OdCategoryDefinition ret = null;
48 if (null != mTrans)
49 {
50 mTrans.AddObject((OdCategoryDefinition)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdCategoryDefinition),ptr, true));
51 ret = (OdCategoryDefinition)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdCategoryDefinition),ptr, false);
52 }
53 else
54 {
55 ret = (OdCategoryDefinition)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdCategoryDefinition),ptr, true);
56 }
57
59 return ret;
60}
61
62 public new static OdRxClass desc() {
63 OdRxClass ret = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxClass),GlobalsPINVOKE.OdCategoryDefinition_desc(),false); /*createInt 3_2*/
64
66 return ret;
67}
68
69 public override OdRxClass isA() {
70 OdRxClass ret = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxClass),GlobalsPINVOKE.OdCategoryDefinition_isA(swigCPtr),false); /*createInt 3_2*/
71
73 return ret;
74}
75
76 public override OdRxObject queryX(OdRxClass protocolClass) {
77 OdRxObject ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),GlobalsPINVOKE.OdCategoryDefinition_queryX(swigCPtr, OdRxClass.getCPtr(protocolClass)),false); /*createInt 3_2*/
78
80 return ret;
81}
82
83 public static OdCategoryDefinition createObject() {// OdSmartPtr<OdSpatialReference::OdCategoryDefinition>
84 MemoryManager mMan = MemoryManager.GetMemoryManager();
85 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
87
88 OdCategoryDefinition ret = null;
89 if (null != mTrans)
90 {
91 mTrans.AddObject((OdCategoryDefinition)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdCategoryDefinition),ptr, true));
92 ret = (OdCategoryDefinition)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdCategoryDefinition),ptr, false);
93 }
94 else
95 {
96 ret = (OdCategoryDefinition)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdCategoryDefinition),ptr, true);
97 }
98
100 return ret;
101}
102
103 public static OdResult load(String sCode, ref OdCategoryDefinition /*OUT_PARAM for SMARTPTR*/ pCategoryDefinition) {
104 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pCategoryDefinition = pCategoryDefinition == null ? IntPtr.Zero : OdCategoryDefinition.getCPtr(pCategoryDefinition).Handle;
105 IntPtr saved_pCategoryDefinition = tmp_pCategoryDefinition;
106 /*OUT_PARAM for SMARTPTR pre*/
107 try {
108 OdResult ret = (OdResult)GlobalsPINVOKE.OdCategoryDefinition_load(sCode, ref tmp_pCategoryDefinition /*OUT_PARAM for SMARTPTR*/);
110 return ret;
111 } finally {
112if(tmp_pCategoryDefinition == IntPtr.Zero) pCategoryDefinition = null;
113 if(tmp_pCategoryDefinition != IntPtr.Zero && tmp_pCategoryDefinition != saved_pCategoryDefinition)
114 {
115 MemoryTransaction mTrans_pCategoryDefinition = MemoryManager.GetMemoryManager().GetCurrentTransaction();
116 if(mTrans_pCategoryDefinition != null)
117 mTrans_pCategoryDefinition.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdCategoryDefinition>(typeof(OdCategoryDefinition), tmp_pCategoryDefinition, true));
118 pCategoryDefinition = Teigha.Core.Helpers.odCreateObjectInternal<OdCategoryDefinition>(typeof(OdCategoryDefinition), tmp_pCategoryDefinition, mTrans_pCategoryDefinition == null);
119 /*OUT_PARAM for SMARTPTR*/
120 }
121 }
122 }
123
129
135
136 public OdResult getCount(out UInt32 uCount) {
139 return ret;
140 }
141
142 public OdResult getAt(UInt32 uIndex, ref string sCode) {
143IntPtr tmp_sCode = Marshal.StringToCoTaskMemUni(sCode);
144 IntPtr saved_sCode = tmp_sCode;
145 try {
146 OdResult ret = (OdResult)GlobalsPINVOKE.OdCategoryDefinition_getAt(swigCPtr, uIndex /*SIMPLETYPE*/, ref tmp_sCode);
148 return ret;
149 } finally {
150if (tmp_sCode != saved_sCode) sCode = Marshal.PtrToStringUni(tmp_sCode);
151 }
152 }
153
159
165
171
172 public OdResult contains(String sCode, out bool bContains) {
173 OdResult ret = (OdResult)GlobalsPINVOKE.OdCategoryDefinition_contains(swigCPtr, sCode, out bContains);
175 return ret;
176 }
177
178 public static bool isLegalCode(String sCode) {
181 return ret;
182 }
183
189
190 protected static string getRealClassName(IntPtr ptr) {
191 string ret = GlobalsPINVOKE.OdCategoryDefinition_getRealClassName(ptr /*SIMPLETYPE*/);
193 return ret;
194 }
195
196}
197
198}
static global::System.Exception Retrieve()
static IntPtr OdCategoryDefinition_queryX(HandleRef jarg1, HandleRef jarg2)
static int OdCategoryDefinition_contains(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2, out bool jarg3)
static int OdCategoryDefinition_loadAll__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static int OdCategoryDefinition_getAt(HandleRef jarg1, UInt32 jarg2, ref IntPtr jarg3)
static IntPtr OdCategoryDefinition_cast(HandleRef jarg1)
static int OdCategoryDefinition_add(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static int OdCategoryDefinition_remove__SWIG_1_0(HandleRef jarg1)
static int OdCategoryDefinition_remove__SWIG_0(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static int OdCategoryDefinition_load([MarshalAs(UnmanagedType.LPWStr)]String jarg1, ref IntPtr jarg2)
static int OdCategoryDefinition_loadAll__SWIG_1([MarshalAs(UnmanagedType.LPWStr)]String jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int OdCategoryDefinition_getCount(HandleRef jarg1, out UInt32 jarg2)
static IntPtr OdCategoryDefinition_desc()
static IntPtr OdCategoryDefinition_createObject()
static int OdCategoryDefinition_clear(HandleRef jarg1)
static void delete_OdCategoryDefinition(HandleRef jarg1)
static IntPtr OdCategoryDefinition_isA(HandleRef jarg1)
static string OdCategoryDefinition_getRealClassName(IntPtr jarg1)
static bool OdCategoryDefinition_isLegalCode([MarshalAs(UnmanagedType.LPWStr)]String jarg1)
OdResult contains(String sCode, out bool bContains)
static OdCategoryDefinition cast(OdRxObject pObj)
override OdRxObject queryX(OdRxClass protocolClass)
static OdResult loadAll(SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdSpatialReference__OdCategoryDefinition_t_t arrCD)
static OdResult loadAll(String sCsCode, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdSpatialReference__OdCategoryDefinition_t_t arrCD)
static OdResult load(String sCode, ref OdCategoryDefinition pCategoryDefinition)
OdCategoryDefinition(IntPtr cPtr, bool cMemoryOwn)
OdResult getAt(UInt32 uIndex, ref string sCode)
static string getRealClassName(IntPtr ptr)
static HandleRef getCPtr(OdCategoryDefinition obj)
override void Dispose(bool disposing)
OdResult getCount(out UInt32 uCount)
static bool isLegalCode(String sCode)
static OdCategoryDefinition createObject()
static HandleRef getCPtr(OdRxClass obj)
Definition OdRxClass.cs:25
OdRxObject(IntPtr cPtr, bool cMemoryOwn)
Definition OdRxObject.cs:21
static HandleRef getCPtr(OdRxObject obj)
Definition OdRxObject.cs:26