14using System.Runtime.InteropServices;
17 , global::System.Collections.Generic.IDictionary<OdDbStub, double>
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);
69 value =
default(
double);
85 public global::System.Collections.Generic.ICollection<
OdDbStub>
Keys {
87 global::System.Collections.Generic.ICollection<
OdDbStub> keys =
new global::System.Collections.Generic.List<
OdDbStub>();
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);
100 public global::System.Collections.Generic.ICollection<
double>
Values {
102 global::System.Collections.Generic.ICollection<
double> vals =
new global::System.Collections.Generic.List<
double>();
103 foreach (global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double> pair in
this) {
104 vals.Add(pair.Value);
110 public void Add(global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double> item) {
111 Add(item.Key, item.Value);
114 public bool Remove(global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double> item) {
122 public bool Contains(global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double> item) {
123 if (
this[item.Key] == item.Value) {
130 public void CopyTo(global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double>[] array) {
134 public void CopyTo(global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double>[] 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<
OdDbStub> keyList =
new global::System.Collections.Generic.List<
OdDbStub>(this.
Keys);
145 for (
int i = 0; i < keyList.Count; i++) {
147 array.SetValue(
new global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double>(currentKey,
this[currentKey]), arrayIndex+i);
151 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double>>.GetEnumerator() {
152 return new MapDeviationsEnumerator(
this);
155 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
156 return new MapDeviationsEnumerator(
this);
169 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<OdDbStub, double>>
172 private global::System.Collections.Generic.IList<
OdDbStub> keyCollection;
173 private int currentIndex;
174 private object currentObject;
175 private int currentSize;
178 collectionRef = collection;
179 keyCollection =
new global::System.Collections.Generic.List<
OdDbStub>(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<
OdDbStub,
double>)currentObject;
199 object global::System.Collections.IEnumerator.Current {
206 int size = collectionRef.
Count;
207 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
210 OdDbStub currentKey = keyCollection[currentIndex];
211 currentObject =
new global::System.Collections.Generic.KeyValuePair<
OdDbStub,
double>(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() {
258 private double getitem(
OdDbStub key) {
264 private void setitem(OdDbStub key,
double x) {
265 GlobalsPINVOKE.MapDeviations_setitem(swigCPtr, OdDbStub.getCPtr(key).Handle, x);
266 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
286 private global::System.IntPtr create_iterator_begin() {
292 private OdDbStub get_next_key(global::System.IntPtr swigiterator) {
293 global::System.IntPtr cPtr = GlobalsPINVOKE.MapDeviations_get_next_key(swigCPtr, swigiterator);
294 OdDbStub ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new OdDbStub(cPtr,
false);
295 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
299 private void destroy_iterator(global::System.IntPtr swigiterator) {
300 GlobalsPINVOKE.MapDeviations_destroy_iterator(swigCPtr, swigiterator);
301 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
static global::System.Exception Retrieve()
static global::System.IntPtr MapDeviations_create_iterator_begin(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool MapDeviations_empty(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_MapDeviations(global::System.Runtime.InteropServices.HandleRef jarg1)
static void MapDeviations_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static double MapDeviations_getitem(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static bool MapDeviations_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static uint MapDeviations_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool MapDeviations_ContainsKey(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2)
static void MapDeviations_Add(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr jarg2, double jarg3)
global::System.Collections.Generic.KeyValuePair< OdDbStub, double > Current
MapDeviationsEnumerator(MapDeviations collection)
MapDeviations(MapDeviations other)
bool Contains(global::System.Collections.Generic.KeyValuePair< OdDbStub, double > item)
MapDeviationsEnumerator GetEnumerator()
void Add(OdDbStub key, double value)
bool Remove(OdDbStub key)
static HandleRef getCPtr(MapDeviations obj)
virtual void Dispose(bool disposing)
global::System.Collections.Generic.ICollection< OdDbStub > Keys
bool Remove(global::System.Collections.Generic.KeyValuePair< OdDbStub, double > item)
void CopyTo(global::System.Collections.Generic.KeyValuePair< OdDbStub, double >[] array, int arrayIndex)
void Add(global::System.Collections.Generic.KeyValuePair< OdDbStub, double > item)
bool TryGetValue(OdDbStub key, out double value)
global::System.Collections.Generic.ICollection< double > Values
MapDeviations(IntPtr cPtr, bool cMemoryOwn)
void CopyTo(global::System.Collections.Generic.KeyValuePair< OdDbStub, double >[] array)
bool ContainsKey(OdDbStub key)
static HandleRef getCPtr(OdDbStub obj)