14using System.Runtime.InteropServices;
17 , global::System.Collections.Generic.IDictionary<uint, OdStreamBuf>
19 private Object locker =
new Object();
20 private HandleRef swigCPtr;
22 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 swigCPtr =
new HandleRef(
this, cPtr);
27 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
29 return (obj ==
null) ?
new HandleRef(
null, IntPtr.Zero) : obj.swigCPtr;
38 global::System.GC.SuppressFinalize(
this);
41 protected virtual void Dispose(
bool disposing) {
43 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
48 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
85 public global::System.Collections.Generic.ICollection<uint>
Keys {
87 global::System.Collections.Generic.ICollection<uint> keys =
new global::System.Collections.Generic.List<uint>();
88 int size = this.
Count;
90 global::System.IntPtr iter = create_iterator_begin();
91 for (
int i = 0; i < size; i++) {
92 keys.Add(get_next_key(iter));
94 destroy_iterator(iter);
102 global::System.Collections.Generic.ICollection<
OdStreamBuf> vals =
new global::System.Collections.Generic.List<
OdStreamBuf>();
103 foreach (global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf> pair in
this) {
104 vals.Add(pair.Value);
110 public void Add(global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf> item) {
111 Add(item.Key, item.Value);
123 if (
this[item.Key] == item.Value) {
130 public void CopyTo(global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf>[] array) {
134 public void CopyTo(global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf>[] array,
int arrayIndex) {
136 throw new global::System.ArgumentNullException(
"array");
138 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
140 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
141 if (arrayIndex+this.
Count > array.Length)
142 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
144 global::System.Collections.Generic.IList<uint> keyList =
new global::System.Collections.Generic.List<uint>(this.
Keys);
145 for (
int i = 0; i < keyList.Count; i++) {
146 uint currentKey = keyList[i];
147 array.SetValue(
new global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf>(currentKey,
this[currentKey]), arrayIndex+i);
151 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf>>.GetEnumerator() {
152 return new PRCStreamsMapEnumerator(
this);
155 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
156 return new PRCStreamsMapEnumerator(
this);
169 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<uint, OdStreamBuf>>
172 private global::System.Collections.Generic.IList<uint> keyCollection;
173 private int currentIndex;
174 private object currentObject;
175 private int currentSize;
178 collectionRef = collection;
179 keyCollection =
new global::System.Collections.Generic.List<uint>(collection.
Keys);
181 currentObject =
null;
182 currentSize = collectionRef.
Count;
188 if (currentIndex == -1)
189 throw new global::System.InvalidOperationException(
"Enumeration not started.");
190 if (currentIndex > currentSize - 1)
191 throw new global::System.InvalidOperationException(
"Enumeration finished.");
192 if (currentObject ==
null)
193 throw new global::System.InvalidOperationException(
"Collection modified.");
194 return (global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf>)currentObject;
199 object global::System.Collections.IEnumerator.Current {
206 int size = collectionRef.
Count;
207 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
210 uint currentKey = keyCollection[currentIndex];
211 currentObject =
new global::System.Collections.Generic.KeyValuePair<uint,
OdStreamBuf>(currentKey, collectionRef[currentKey]);
213 currentObject =
null;
220 currentObject =
null;
221 if (collectionRef.
Count != currentSize) {
222 throw new global::System.InvalidOperationException(
"Collection modified.");
228 currentObject =
null;
241 private uint size() {
259 MemoryManager mMan = MemoryManager.GetMemoryManager();
260 MemoryTransaction mTrans = mMan.GetCurrentTransaction();
271 ret = (OdStreamBuf)
Teigha.
Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdStreamBuf),ptr,
true);
274 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
278 private void setitem(uint key, OdStreamBuf x) {
279 GlobalsPINVOKE.PRCStreamsMap_setitem(swigCPtr, key, OdStreamBuf.getCPtr(x));
280 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
300 private global::System.IntPtr create_iterator_begin() {
306 private uint get_next_key(global::System.IntPtr swigiterator) {
307 uint ret = GlobalsPINVOKE.PRCStreamsMap_get_next_key(swigCPtr, swigiterator);
308 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
312 private void destroy_iterator(global::System.IntPtr swigiterator) {
313 GlobalsPINVOKE.PRCStreamsMap_destroy_iterator(swigCPtr, swigiterator);
314 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
static global::System.Exception Retrieve()
static uint PRCStreamsMap_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PRCStreamsMap_empty(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr PRCStreamsMap_getitem(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static bool PRCStreamsMap_ContainsKey(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static void PRCStreamsMap_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PRCStreamsMap_Add(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, HandleRef jarg3)
static void delete_PRCStreamsMap(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr PRCStreamsMap_create_iterator_begin(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PRCStreamsMap_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static HandleRef getCPtr(OdStreamBuf obj)
PRCStreamsMapEnumerator(PRCStreamsMap collection)
global::System.Collections.Generic.KeyValuePair< uint, OdStreamBuf > Current
bool ContainsKey(uint key)
void CopyTo(global::System.Collections.Generic.KeyValuePair< uint, OdStreamBuf >[] array)
bool TryGetValue(uint key, out OdStreamBuf value)
virtual void Dispose(bool disposing)
void CopyTo(global::System.Collections.Generic.KeyValuePair< uint, OdStreamBuf >[] array, int arrayIndex)
PRCStreamsMap(PRCStreamsMap other)
bool Contains(global::System.Collections.Generic.KeyValuePair< uint, OdStreamBuf > item)
void Add(global::System.Collections.Generic.KeyValuePair< uint, OdStreamBuf > item)
PRCStreamsMapEnumerator GetEnumerator()
global::System.Collections.Generic.ICollection< OdStreamBuf > Values
bool Remove(global::System.Collections.Generic.KeyValuePair< uint, OdStreamBuf > item)
global::System.Collections.Generic.ICollection< uint > Keys
PRCStreamsMap(IntPtr cPtr, bool cMemoryOwn)
static HandleRef getCPtr(PRCStreamsMap obj)
void Add(uint key, OdStreamBuf value)