Extended .NET SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
OdOleStorage.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
16public class OdOleStorage : OdRxObject {
17 private Object locker = new Object();
18 private HandleRef swigCPtr;
19 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
20 public OdOleStorage(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdOleStorage_SWIGUpcast(cPtr), cMemoryOwn) {
21 swigCPtr = new HandleRef(this, cPtr);
22 }
23
24 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 public static HandleRef getCPtr(OdOleStorage 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 override OdRxClass isA() {
43 OdRxClass ret = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxClass),GlobalsPINVOKE.OdOleStorage_isA(swigCPtr),false); /*createInt 3_2*/
44
46 return ret;
47}
48
49 public override OdRxObject queryX(OdRxClass protocolClass) {
50 OdRxObject ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),GlobalsPINVOKE.OdOleStorage_queryX(swigCPtr, OdRxClass.getCPtr(protocolClass)),false); /*createInt 3_2*/
51
53 return ret;
54}
55
56 public virtual void init(OdByteData pByteData, int accessMode) {
57 GlobalsPINVOKE.OdOleStorage_init__SWIG_0(swigCPtr, OdByteData.getCPtr(pByteData), accessMode);
59 }
60
65
66 public virtual OdByteData rawData() {// OdByteDataPtr
67 MemoryManager mMan = MemoryManager.GetMemoryManager();
68 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
69 IntPtr ptr = GlobalsPINVOKE.OdOleStorage_rawData(swigCPtr);
70
71 OdByteData ret = null;
72 if (null != mTrans)
73 {
74 mTrans.AddObject((OdByteData)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdByteData),ptr, true));
75 ret = (OdByteData)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdByteData),ptr, false);
76 }
77 else
78 {
79 ret = (OdByteData)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdByteData),ptr, true);
80 }
81
83 return ret;
84}
85
86 public virtual OdStreamBuf openStream(String filename, bool createIfNotFound, int accessMode) {// OdStreamBufPtr
87 MemoryManager mMan = MemoryManager.GetMemoryManager();
88 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
89 IntPtr ptr = GlobalsPINVOKE.OdOleStorage_openStream__SWIG_0(swigCPtr, filename, createIfNotFound, accessMode);
90
91 OdStreamBuf ret = null;
92 if (null != mTrans)
93 {
94 mTrans.AddObject((OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, true));
95 ret = (OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, false);
96 }
97 else
98 {
99 ret = (OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, true);
100 }
101
103 return ret;
104}
105
106 public virtual OdStreamBuf openStream(String filename, bool createIfNotFound) {// OdStreamBufPtr
107 MemoryManager mMan = MemoryManager.GetMemoryManager();
108 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
109 IntPtr ptr = GlobalsPINVOKE.OdOleStorage_openStream__SWIG_1(swigCPtr, filename, createIfNotFound);
110
111 OdStreamBuf ret = null;
112 if (null != mTrans)
113 {
114 mTrans.AddObject((OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, true));
115 ret = (OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, false);
116 }
117 else
118 {
119 ret = (OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, true);
120 }
121
123 return ret;
124}
125
126 public virtual OdStreamBuf openStream(String filename) {// OdStreamBufPtr
127 MemoryManager mMan = MemoryManager.GetMemoryManager();
128 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
129 IntPtr ptr = GlobalsPINVOKE.OdOleStorage_openStream__SWIG_2(swigCPtr, filename);
130
131 OdStreamBuf ret = null;
132 if (null != mTrans)
133 {
134 mTrans.AddObject((OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, true));
135 ret = (OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, false);
136 }
137 else
138 {
139 ret = (OdStreamBuf)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr, true);
140 }
141
143 return ret;
144}
145
146 protected static string getRealClassName(IntPtr ptr) {
147 string ret = GlobalsPINVOKE.OdOleStorage_getRealClassName(ptr /*SIMPLETYPE*/);
149 return ret;
150 }
151
152}
153
154}
static global::System.Exception Retrieve()
static IntPtr OdOleStorage_openStream__SWIG_0(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2, bool jarg3, int jarg4)
static void OdOleStorage_init__SWIG_0(HandleRef jarg1, HandleRef jarg2, int jarg3)
static IntPtr OdOleStorage_isA(HandleRef jarg1)
static void delete_OdOleStorage(HandleRef jarg1)
static string OdOleStorage_getRealClassName(IntPtr jarg1)
static IntPtr OdOleStorage_openStream__SWIG_1(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2, bool jarg3)
static IntPtr OdOleStorage_openStream__SWIG_2(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static IntPtr OdOleStorage_rawData(HandleRef jarg1)
static IntPtr OdOleStorage_queryX(HandleRef jarg1, HandleRef jarg2)
static void OdOleStorage_init__SWIG_1(HandleRef jarg1, HandleRef jarg2)
static HandleRef getCPtr(OdByteData obj)
Definition OdByteData.cs:25
static HandleRef getCPtr(OdOleStorage obj)
virtual OdStreamBuf openStream(String filename)
override void Dispose(bool disposing)
OdOleStorage(IntPtr cPtr, bool cMemoryOwn)
virtual OdStreamBuf openStream(String filename, bool createIfNotFound)
override OdRxObject queryX(OdRxClass protocolClass)
virtual void init(OdByteData pByteData, int accessMode)
virtual OdStreamBuf openStream(String filename, bool createIfNotFound, int accessMode)
virtual OdByteData rawData()
static string getRealClassName(IntPtr ptr)
virtual void init(OdByteData pByteData)
override OdRxClass isA()
static HandleRef getCPtr(OdRxClass obj)
Definition OdRxClass.cs:25
OdRxObject(IntPtr cPtr, bool cMemoryOwn)
Definition OdRxObject.cs:21