Extended .NET SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
OdUnitsFormatter.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 OdUnitsFormatter(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdUnitsFormatter_SWIGUpcast(cPtr), cMemoryOwn) {
21 swigCPtr = new HandleRef(this, cPtr);
22 }
23
24 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 public static HandleRef getCPtr(OdUnitsFormatter 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 OdUnitsFormatter cast(OdRxObject pObj) {// OdSmartPtr<OdUnitsFormatter>
43 MemoryManager mMan = MemoryManager.GetMemoryManager();
44 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
46
47 OdUnitsFormatter ret = null;
48 if (null != mTrans)
49 {
50 mTrans.AddObject((OdUnitsFormatter)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdUnitsFormatter),ptr, true));
51 ret = (OdUnitsFormatter)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdUnitsFormatter),ptr, false);
52 }
53 else
54 {
55 ret = (OdUnitsFormatter)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdUnitsFormatter),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.OdUnitsFormatter_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.OdUnitsFormatter_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.OdUnitsFormatter_queryX(swigCPtr, OdRxClass.getCPtr(protocolClass)),false); /*createInt 3_2*/
78
80 return ret;
81}
82
83 public static OdUnitsFormatter createObject() {// OdSmartPtr<OdUnitsFormatter>
84 MemoryManager mMan = MemoryManager.GetMemoryManager();
85 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
87
88 OdUnitsFormatter ret = null;
89 if (null != mTrans)
90 {
91 mTrans.AddObject((OdUnitsFormatter)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdUnitsFormatter),ptr, true));
92 ret = (OdUnitsFormatter)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdUnitsFormatter),ptr, false);
93 }
94 else
95 {
96 ret = (OdUnitsFormatter)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdUnitsFormatter),ptr, true);
97 }
98
100 return ret;
101}
102
103 public class DimzinValues : global::System.IDisposable {
104 private Object locker = new Object();
105 private HandleRef swigCPtr;
106 protected bool swigCMemOwn;
107 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
108 public DimzinValues(IntPtr cPtr, bool cMemoryOwn) {
109 swigCMemOwn = cMemoryOwn;
110 swigCPtr = new HandleRef(this, cPtr);
111 }
112 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
113 public static HandleRef getCPtr(DimzinValues obj) {
114 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
115 }
116
117 ~DimzinValues() {
118 Dispose(false);
119 }
120
121 public void Dispose() {
122 Dispose(true);
123 global::System.GC.SuppressFinalize(this);
124 }
125
126 protected virtual void Dispose(bool disposing) {
127 lock(this) {
128 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
129 if (swigCMemOwn) {
130 swigCMemOwn = false;
132 }
133 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
134 }
135 }
136 }
137
138 public DimzinValues() : this(GlobalsPINVOKE.new_OdUnitsFormatter_DimzinValues(), true) {
140 }
141
146 public const int kSuppressesLeadingZeros = 4;
147 public const int kSuppressesTrailingZeros = 8;
149
150 }
151
157
158 public virtual OdCmColorBase unformatCmColor(String string_) {
159 //MemoryManager mMan = MemoryManager.GetMemoryManager();
160 //MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #15
161 IntPtr ptr = GlobalsPINVOKE.OdUnitsFormatter_unformatCmColor(swigCPtr, string_);
162
163 OdCmColorBase ret = null;
164 //if (null != mTrans)
165 //{
166 //mTrans.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdCmColorBase>(typeof(OdCmColorBase), ptr, true));
167 ret = Teigha.Core.Helpers.odCreateObjectInternal<OdCmColorBase>(typeof(OdCmColorBase), ptr, false);
168 //}
169 //else
170 //{
171 // ret = Teigha.Core.Helpers.odCreateObjectInternal<OdCmColorBase>(typeof(OdCmColorBase), ptr, true);
172 //}
173
175 return ret;
176}
177
178 public virtual String formatLinear(double value) {
179 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatLinear(swigCPtr, value);
181 return ret;
182}
183
184 public virtual double unformatLinear(String string_) {
185 double ret = GlobalsPINVOKE.OdUnitsFormatter_unformatLinear(swigCPtr, string_);
187 return ret;
188 }
189
190 public virtual String formatAngle(double value) {
191 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatAngle(swigCPtr, value);
193 return ret;
194}
195
196 public virtual double unformatAngle(String string_) {
197 double ret = GlobalsPINVOKE.OdUnitsFormatter_unformatAngle(swigCPtr, string_);
199 return ret;
200 }
201
202 public static bool isZeroFeetSuppressed(int dimzin) {
205 return ret;
206 }
207
213
214 public static bool isZeroFeetSuppressed2(int dimzin) {
217 return ret;
218 }
219
225
226 public static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep, String thsep, bool useStdRound) {
227 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatL__SWIG_0(value, (int)lUnits, precision, dimzin, unitMode, decsep, thsep, useStdRound);
229 return ret;
230}
231
232 public static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep, String thsep) {
233 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatL__SWIG_1(value, (int)lUnits, precision, dimzin, unitMode, decsep, thsep);
235 return ret;
236}
237
238 public static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep) {
239 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatL__SWIG_2(value, (int)lUnits, precision, dimzin, unitMode, decsep);
241 return ret;
242}
243
244 public static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode) {
245 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatL__SWIG_3(value, (int)lUnits, precision, dimzin, unitMode);
247 return ret;
248}
249
250 public static String formatArea(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep, String thsep) {
251 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatArea__SWIG_0(value, (int)lUnits, precision, dimzin, unitMode, decsep, thsep);
253 return ret;
254}
255
256 public static String formatArea(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep) {
257 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatArea__SWIG_1(value, (int)lUnits, precision, dimzin, unitMode, decsep);
259 return ret;
260}
261
262 public static String formatArea(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode) {
263 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatArea__SWIG_2(value, (int)lUnits, precision, dimzin, unitMode);
265 return ret;
266}
267
268 public static double unformatL(String string_) {
269 double ret = GlobalsPINVOKE.OdUnitsFormatter_unformatL(string_);
271 return ret;
272 }
273
274 public class DimazinValues : global::System.IDisposable {
275 private Object locker = new Object();
276 private HandleRef swigCPtr;
277 protected bool swigCMemOwn;
278 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
279 public DimazinValues(IntPtr cPtr, bool cMemoryOwn) {
280 swigCMemOwn = cMemoryOwn;
281 swigCPtr = new HandleRef(this, cPtr);
282 }
283 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
284 public static HandleRef getCPtr(DimazinValues obj) {
285 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
286 }
287
289 Dispose(false);
290 }
291
292 public void Dispose() {
293 Dispose(true);
294 global::System.GC.SuppressFinalize(this);
295 }
296
297 protected virtual void Dispose(bool disposing) {
298 lock(this) {
299 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
300 if (swigCMemOwn) {
301 swigCMemOwn = false;
303 }
304 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
305 }
306 }
307 }
308
309 public DimazinValues() : this(GlobalsPINVOKE.new_OdUnitsFormatter_DimazinValues(), true) {
311 }
312
314 public const int kSuppressesLeadingZeros = 1;
315 public const int kSuppressesTrailingZeros = 2;
317
318 }
319
320 public static String formatA(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode, String decsep) {
321 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatA__SWIG_0(value, (int)aUnits, precision, dimazin, unitMode, decsep);
323 return ret;
324}
325
326 public static String formatA(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode) {
327 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatA__SWIG_1(value, (int)aUnits, precision, dimazin, unitMode);
329 return ret;
330}
331
332 public static String formatA_unnorm(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode, String decsep) {
333 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatA_unnorm__SWIG_0(value, (int)aUnits, precision, dimazin, unitMode, decsep);
335 return ret;
336}
337
338 public static String formatA_unnorm(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode) {
339 string ret = GlobalsPINVOKE.OdUnitsFormatter_formatA_unnorm__SWIG_1(value, (int)aUnits, precision, dimazin, unitMode);
341 return ret;
342}
343
344 public static double unformatA(String string_) {
345 double ret = GlobalsPINVOKE.OdUnitsFormatter_unformatA(string_);
347 return ret;
348 }
349
350 public static double unformatA_unnorm(String string_, bool refuseDots) {
351 double ret = GlobalsPINVOKE.OdUnitsFormatter_unformatA_unnorm__SWIG_0(string_, refuseDots);
353 return ret;
354 }
355
356 public static double unformatA_unnorm(String string_) {
359 return ret;
360 }
361
362 protected static string getRealClassName(IntPtr ptr) {
363 string ret = GlobalsPINVOKE.OdUnitsFormatter_getRealClassName(ptr /*SIMPLETYPE*/);
365 return ret;
366 }
367
368 public enum LUnits {
369 kScientific = 1,
370 kDecimal = 2,
371 kEngineering = 3,
372 kArchitectural = 4,
373 kFractional = 5,
375 }
376
377 public enum AUnits {
378 kDegrees = 0,
379 kDegMinSec = 1,
380 kGrads = 2,
381 kRadians = 3,
382 kSurveyors = 4
383 }
384
385}
386
387}
static global::System.Exception Retrieve()
static double OdUnitsFormatter_unformatA([MarshalAs(UnmanagedType.LPWStr)]String jarg1)
static void delete_OdUnitsFormatter_DimzinValues(global::System.Runtime.InteropServices.HandleRef jarg1)
static String OdUnitsFormatter_formatAngle(HandleRef jarg1, double jarg2)
static double OdUnitsFormatter_unformatA_unnorm__SWIG_1([MarshalAs(UnmanagedType.LPWStr)]String jarg1)
static void delete_OdUnitsFormatter_DimazinValues(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr OdUnitsFormatter_cast(HandleRef jarg1)
static double OdUnitsFormatter_unformatLinear(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static bool OdUnitsFormatter_isZeroFeetSuppressed2(int jarg1)
static void delete_OdUnitsFormatter(HandleRef jarg1)
static double OdUnitsFormatter_unformatL([MarshalAs(UnmanagedType.LPWStr)]String jarg1)
static String OdUnitsFormatter_formatL__SWIG_0(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5, [MarshalAs(UnmanagedType.LPWStr)]String jarg6, [MarshalAs(UnmanagedType.LPWStr)]String jarg7, bool jarg8)
static String OdUnitsFormatter_formatA__SWIG_0(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5, [MarshalAs(UnmanagedType.LPWStr)]String jarg6)
static String OdUnitsFormatter_formatL__SWIG_1(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5, [MarshalAs(UnmanagedType.LPWStr)]String jarg6, [MarshalAs(UnmanagedType.LPWStr)]String jarg7)
static String OdUnitsFormatter_formatA_unnorm__SWIG_0(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5, [MarshalAs(UnmanagedType.LPWStr)]String jarg6)
static IntPtr OdUnitsFormatter_createObject()
static String OdUnitsFormatter_formatArea__SWIG_2(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5)
static bool OdUnitsFormatter_isZeroInchesSuppressed(int jarg1)
static String OdUnitsFormatter_formatArea__SWIG_1(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5, [MarshalAs(UnmanagedType.LPWStr)]String jarg6)
static double OdUnitsFormatter_unformatA_unnorm__SWIG_0([MarshalAs(UnmanagedType.LPWStr)]String jarg1, bool jarg2)
static IntPtr OdUnitsFormatter_isA(HandleRef jarg1)
static String OdUnitsFormatter_formatArea__SWIG_0(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5, [MarshalAs(UnmanagedType.LPWStr)]String jarg6, [MarshalAs(UnmanagedType.LPWStr)]String jarg7)
static double OdUnitsFormatter_unformatAngle(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static String OdUnitsFormatter_formatA__SWIG_1(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5)
static bool OdUnitsFormatter_isZeroFeetSuppressed(int jarg1)
static bool OdUnitsFormatter_isZeroInchesSuppressed2(int jarg1)
static String OdUnitsFormatter_formatLinear(HandleRef jarg1, double jarg2)
static IntPtr OdUnitsFormatter_queryX(HandleRef jarg1, HandleRef jarg2)
static IntPtr OdUnitsFormatter_desc()
static String OdUnitsFormatter_formatL__SWIG_2(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5, [MarshalAs(UnmanagedType.LPWStr)]String jarg6)
static string OdUnitsFormatter_getRealClassName(IntPtr jarg1)
static IntPtr OdUnitsFormatter_unformatCmColor(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static String OdUnitsFormatter_formatA_unnorm__SWIG_1(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5)
static String OdUnitsFormatter_formatCmColor(HandleRef jarg1, HandleRef jarg2)
static String OdUnitsFormatter_formatL__SWIG_3(double jarg1, int jarg2, int jarg3, int jarg4, int jarg5)
static HandleRef getCPtr(OdCmColorBase obj)
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
DimazinValues(IntPtr cPtr, bool cMemoryOwn)
static HandleRef getCPtr(DimazinValues obj)
DimzinValues(IntPtr cPtr, bool cMemoryOwn)
static HandleRef getCPtr(DimzinValues obj)
virtual String formatAngle(double value)
static String formatA_unnorm(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode)
static String formatA(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode, String decsep)
static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode)
static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep, String thsep)
static double unformatL(String string_)
static OdUnitsFormatter cast(OdRxObject pObj)
static OdUnitsFormatter createObject()
static String formatArea(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode)
static new OdRxClass desc()
static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep, String thsep, bool useStdRound)
static String formatA(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode)
static String formatL(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep)
static string getRealClassName(IntPtr ptr)
virtual OdCmColorBase unformatCmColor(String string_)
static String formatArea(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep)
virtual double unformatAngle(String string_)
static double unformatA_unnorm(String string_, bool refuseDots)
static HandleRef getCPtr(OdUnitsFormatter obj)
virtual String formatLinear(double value)
static bool isZeroInchesSuppressed(int dimzin)
OdUnitsFormatter(IntPtr cPtr, bool cMemoryOwn)
static bool isZeroFeetSuppressed2(int dimzin)
static String formatArea(double value, OdUnitsFormatter.LUnits lUnits, int precision, int dimzin, int unitMode, String decsep, String thsep)
override void Dispose(bool disposing)
static bool isZeroFeetSuppressed(int dimzin)
static double unformatA_unnorm(String string_)
static bool isZeroInchesSuppressed2(int dimzin)
virtual double unformatLinear(String string_)
override OdRxObject queryX(OdRxClass protocolClass)
static double unformatA(String string_)
virtual String formatCmColor(OdCmColorBase value)
static String formatA_unnorm(double value, OdUnitsFormatter.AUnits aUnits, int precision, int dimazin, int unitMode, String decsep)