Extended .NET SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
OdSmFiler.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 OdSmFiler : OdRxObject {
18 private Object locker = new Object();
19 private HandleRef swigCPtr;
20 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
21 public OdSmFiler(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdSmFiler_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new HandleRef(this, cPtr);
23 }
24
25 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
26 public static HandleRef getCPtr(OdSmFiler obj) {
27 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
28 }
29
30 protected override void Dispose(bool disposing) {
31 lock(this) {
32 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33 if (swigCMemOwn) {
34 swigCMemOwn = false;
36 }
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38 }
39 base.Dispose(disposing);
40 }
41 }
42
43 public virtual void init(OdStreamBuf file, OdSmDatabase pDb, bool bForWrite) {
44 TD_DbPINVOKE.OdSmFiler_init(swigCPtr, OdStreamBuf.getCPtr(file), OdSmDatabase.getCPtr(pDb), bForWrite);
46 }
47
52
53 public virtual OdSmDatabase getDatabase() {
54 OdSmDatabase ret = (OdSmDatabase)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdSmDatabase),TD_DbPINVOKE.OdSmFiler_getDatabase(swigCPtr),false); /*createInt 3_2*/
55
57 return ret;
58}
59
64
69
70 public virtual OdSmPersist getCurrentObject() {
71 OdSmPersist ret = (OdSmPersist)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdSmPersist),TD_DbPINVOKE.OdSmFiler_getCurrentObject(swigCPtr),false); /*createInt 3_2*/
72
74 return ret;
75}
76
77 public virtual OdSmPersist readObject() {
78 OdSmPersist ret = (OdSmPersist)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdSmPersist),TD_DbPINVOKE.OdSmFiler_readObject(swigCPtr),false); /*createInt 3_2*/
79
81 return ret;
82}
83
84 public virtual bool readProperty(ref string ppPropname, OdVariant pVal) {
85IntPtr tmp_ppPropname = Marshal.StringToCoTaskMemUni(ppPropname);
86 IntPtr saved_ppPropname = tmp_ppPropname;
87 try {
88 bool ret = TD_DbPINVOKE.OdSmFiler_readProperty(swigCPtr, ref tmp_ppPropname, OdVariant.getCPtr(pVal));
90 return ret;
91 } finally {
92if (tmp_ppPropname != saved_ppPropname) ppPropname = Marshal.PtrToStringUni(tmp_ppPropname);
93 }
94 }
95
96 public virtual bool readRawData(OdStreamBuf pStreamBuf) {
97 bool ret = TD_DbPINVOKE.OdSmFiler_readRawData(swigCPtr, OdStreamBuf.getCPtr(pStreamBuf));
99 return ret;
100 }
101
106
107 public virtual void writeProperty(String pPropname, Object pVal) {
108IntPtr vpVal = Teigha.Core.Helpers.MarshalVariant(pVal);
109 try {
110 TD_DbPINVOKE.OdSmFiler_writeProperty(swigCPtr, pPropname, vpVal);
112 } finally {
113Teigha.Core.Helpers.FreeVariant(vpVal);
114 }
115 }
116
121
122 public virtual bool readInt(out int arg0) {
123 bool ret = TD_DbPINVOKE.OdSmFiler_readInt(swigCPtr, out arg0);
125 return ret;
126 }
127
128 public virtual bool readDouble(out double arg0) {
129 bool ret = TD_DbPINVOKE.OdSmFiler_readDouble(swigCPtr, out arg0);
131 return ret;
132 }
133
134 public virtual bool readString(ref string arg0) {
135IntPtr tmp_arg0 = Marshal.StringToCoTaskMemUni(arg0);
136 IntPtr saved_arg0 = tmp_arg0;
137 try {
138 bool ret = TD_DbPINVOKE.OdSmFiler_readString(swigCPtr, ref tmp_arg0);
140 return ret;
141 } finally {
142if (tmp_arg0 != saved_arg0) arg0 = Marshal.PtrToStringUni(tmp_arg0);
143 }
144 }
145
146 public virtual void writeInt(int pInt) {
147 TD_DbPINVOKE.OdSmFiler_writeInt(swigCPtr, pInt);
149 }
150
151 public virtual void writeDouble(double pDbl) {
152 TD_DbPINVOKE.OdSmFiler_writeDouble(swigCPtr, pDbl);
154 }
155
160
161 protected static string getRealClassName(IntPtr ptr) {
162 string ret = TD_DbPINVOKE.OdSmFiler_getRealClassName(ptr /*SIMPLETYPE*/);
164 return ret;
165 }
166
167}
168
169}
static HandleRef getCPtr(OdStreamBuf obj)
static HandleRef getCPtr(OdVariant obj)
Definition OdVariant.cs:26
static HandleRef getCPtr(OdSmDatabase obj)
OdSmFiler(IntPtr cPtr, bool cMemoryOwn)
Definition OdSmFiler.cs:21
static HandleRef getCPtr(OdSmFiler obj)
Definition OdSmFiler.cs:26
virtual bool readRawData(OdStreamBuf pStreamBuf)
Definition OdSmFiler.cs:96
virtual OdSmDatabase getDatabase()
Definition OdSmFiler.cs:53
virtual bool readInt(out int arg0)
Definition OdSmFiler.cs:122
static string getRealClassName(IntPtr ptr)
Definition OdSmFiler.cs:161
virtual bool readProperty(ref string ppPropname, OdVariant pVal)
Definition OdSmFiler.cs:84
virtual bool readString(ref string arg0)
Definition OdSmFiler.cs:134
virtual OdSmPersist getCurrentObject()
Definition OdSmFiler.cs:70
virtual void pushCurrentReadObject(OdSmPersist pObj)
Definition OdSmFiler.cs:60
override void Dispose(bool disposing)
Definition OdSmFiler.cs:30
virtual void popCurrentReadObject(bool bSuccess)
Definition OdSmFiler.cs:65
virtual void close()
Definition OdSmFiler.cs:48
virtual void writeRawData(OdStreamBuf pStreamBuf)
Definition OdSmFiler.cs:117
virtual bool readDouble(out double arg0)
Definition OdSmFiler.cs:128
virtual void writeString(String s)
Definition OdSmFiler.cs:156
virtual void init(OdStreamBuf file, OdSmDatabase pDb, bool bForWrite)
Definition OdSmFiler.cs:43
virtual void writeObject(OdSmPersist pObj)
Definition OdSmFiler.cs:102
virtual void writeDouble(double pDbl)
Definition OdSmFiler.cs:151
virtual OdSmPersist readObject()
Definition OdSmFiler.cs:77
virtual void writeProperty(String pPropname, Object pVal)
Definition OdSmFiler.cs:107
virtual void writeInt(int pInt)
Definition OdSmFiler.cs:146
static HandleRef getCPtr(OdSmPersist obj)
static global::System.Exception Retrieve()
static void OdSmFiler_writeInt(HandleRef jarg1, int jarg2)
static void OdSmFiler_close(HandleRef jarg1)
static void OdSmFiler_popCurrentReadObject(HandleRef jarg1, bool jarg2)
static bool OdSmFiler_readDouble(HandleRef jarg1, out double jarg2)
static IntPtr OdSmFiler_readObject(HandleRef jarg1)
static void OdSmFiler_writeDouble(HandleRef jarg1, double jarg2)
static bool OdSmFiler_readProperty(HandleRef jarg1, ref IntPtr jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static string OdSmFiler_getRealClassName(IntPtr jarg1)
static void OdSmFiler_init(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, bool jarg4)
static void OdSmFiler_writeRawData(HandleRef jarg1, HandleRef jarg2)
static void OdSmFiler_pushCurrentReadObject(HandleRef jarg1, HandleRef jarg2)
static bool OdSmFiler_readRawData(HandleRef jarg1, HandleRef jarg2)
static bool OdSmFiler_readString(HandleRef jarg1, ref IntPtr jarg2)
static bool OdSmFiler_readInt(HandleRef jarg1, out int jarg2)
static IntPtr OdSmFiler_getCurrentObject(HandleRef jarg1)
static void delete_OdSmFiler(HandleRef jarg1)
static void OdSmFiler_writeObject(HandleRef jarg1, HandleRef jarg2)
static IntPtr OdSmFiler_getDatabase(HandleRef jarg1)
static void OdSmFiler_writeString(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static void OdSmFiler_writeProperty(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2, IntPtr jarg3)