14using System.Runtime.InteropServices;
18 , global::System.Collections.Generic.IDictionary<OdDgElementId, OdDgVariableValueVariant>
20 private Object locker =
new Object();
21 private HandleRef swigCPtr;
23 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
26 swigCPtr =
new HandleRef(
this, cPtr);
28 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
30 return (obj ==
null) ?
new HandleRef(
null, IntPtr.Zero) : obj.swigCPtr;
39 global::System.GC.SuppressFinalize(
this);
42 protected virtual void Dispose(
bool disposing) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
88 global::System.Collections.Generic.ICollection<
OdDgElementId> keys =
new global::System.Collections.Generic.List<
OdDgElementId>();
89 int size = this.
Count;
91 global::System.IntPtr iter = create_iterator_begin();
92 for (
int i = 0; i < size; i++) {
93 keys.Add(get_next_key(iter));
95 destroy_iterator(iter);
105 vals.Add(pair.Value);
112 Add(item.Key, item.Value);
124 if (
this[item.Key] == item.Value) {
137 throw new global::System.ArgumentNullException(
"array");
139 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
141 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
142 if (arrayIndex+this.
Count > array.Length)
143 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
146 for (
int i = 0; i < keyList.Count; i++) {
153 return new MapVariableIdEnumerator(
this);
156 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
157 return new MapVariableIdEnumerator(
this);
170 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<OdDgElementId, OdDgVariableValueVariant>>
173 private global::System.Collections.Generic.IList<
OdDgElementId> keyCollection;
174 private int currentIndex;
175 private object currentObject;
176 private int currentSize;
179 collectionRef = collection;
180 keyCollection =
new global::System.Collections.Generic.List<
OdDgElementId>(collection.
Keys);
182 currentObject =
null;
183 currentSize = collectionRef.
Count;
189 if (currentIndex == -1)
190 throw new global::System.InvalidOperationException(
"Enumeration not started.");
191 if (currentIndex > currentSize - 1)
192 throw new global::System.InvalidOperationException(
"Enumeration finished.");
193 if (currentObject ==
null)
194 throw new global::System.InvalidOperationException(
"Collection modified.");
200 object global::System.Collections.IEnumerator.Current {
207 int size = collectionRef.
Count;
208 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
214 currentObject =
null;
221 currentObject =
null;
222 if (collectionRef.
Count != currentSize) {
223 throw new global::System.InvalidOperationException(
"Collection modified.");
229 currentObject =
null;
242 private uint size() {
265 private void setitem(OdDgElementId key, OdDgVariableValueVariant x) {
266 TG_DbPINVOKE.MapVariableId_setitem(swigCPtr, OdDgElementId.getCPtr(key), OdDgVariableValueVariant.getCPtr(x));
267 if (TG_DbPINVOKE.SWIGPendingException.Pending)
throw TG_DbPINVOKE.SWIGPendingException.Retrieve();
287 private global::System.IntPtr create_iterator_begin() {
293 private OdDgElementId get_next_key(global::System.IntPtr swigiterator) {
294 OdDgElementId ret =
new OdDgElementId(TG_DbPINVOKE.MapVariableId_get_next_key(swigCPtr, swigiterator),
false);
295 if (TG_DbPINVOKE.SWIGPendingException.Pending)
throw TG_DbPINVOKE.SWIGPendingException.Retrieve();
299 private void destroy_iterator(global::System.IntPtr swigiterator) {
300 TG_DbPINVOKE.MapVariableId_destroy_iterator(swigCPtr, swigiterator);
301 if (TG_DbPINVOKE.SWIGPendingException.Pending)
throw TG_DbPINVOKE.SWIGPendingException.Retrieve();
global::System.Collections.Generic.KeyValuePair< OdDgElementId, OdDgVariableValueVariant > Current
MapVariableIdEnumerator(MapVariableId collection)
bool Remove(global::System.Collections.Generic.KeyValuePair< OdDgElementId, OdDgVariableValueVariant > item)
void CopyTo(global::System.Collections.Generic.KeyValuePair< OdDgElementId, OdDgVariableValueVariant >[] array, int arrayIndex)
MapVariableId(MapVariableId other)
void Add(OdDgElementId key, OdDgVariableValueVariant value)
bool Contains(global::System.Collections.Generic.KeyValuePair< OdDgElementId, OdDgVariableValueVariant > item)
static HandleRef getCPtr(MapVariableId obj)
bool ContainsKey(OdDgElementId key)
bool TryGetValue(OdDgElementId key, out OdDgVariableValueVariant value)
virtual void Dispose(bool disposing)
void Add(global::System.Collections.Generic.KeyValuePair< OdDgElementId, OdDgVariableValueVariant > item)
MapVariableIdEnumerator GetEnumerator()
bool Remove(OdDgElementId key)
global::System.Collections.Generic.ICollection< OdDgVariableValueVariant > Values
MapVariableId(IntPtr cPtr, bool cMemoryOwn)
global::System.Collections.Generic.ICollection< OdDgElementId > Keys
void CopyTo(global::System.Collections.Generic.KeyValuePair< OdDgElementId, OdDgVariableValueVariant >[] array)
static HandleRef getCPtr(OdDgElementId obj)
static HandleRef getCPtr(OdDgVariableValueVariant obj)
static global::System.Exception Retrieve()
static global::System.IntPtr MapVariableId_create_iterator_begin(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool MapVariableId_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool MapVariableId_empty(global::System.Runtime.InteropServices.HandleRef jarg1)
static void MapVariableId_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static uint MapVariableId_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void MapVariableId_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_MapVariableId(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool MapVariableId_ContainsKey(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr MapVariableId_getitem(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)