14using System.Runtime.InteropServices;
18 , global::System.Collections.Generic.IDictionary<string, bool>
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);
55 public bool this[
string key] {
70 value =
default(
bool);
86 public global::System.Collections.Generic.ICollection<
string>
Keys {
88 global::System.Collections.Generic.ICollection<
string> keys =
new global::System.Collections.Generic.List<
string>();
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);
101 public global::System.Collections.Generic.ICollection<
bool>
Values {
103 global::System.Collections.Generic.ICollection<
bool> vals =
new global::System.Collections.Generic.List<
bool>();
104 foreach (global::System.Collections.Generic.KeyValuePair<
string,
bool> pair in
this) {
105 vals.Add(pair.Value);
111 public void Add(global::System.Collections.Generic.KeyValuePair<
string,
bool> item) {
112 Add(item.Key, item.Value);
115 public bool Remove(global::System.Collections.Generic.KeyValuePair<
string,
bool> item) {
123 public bool Contains(global::System.Collections.Generic.KeyValuePair<
string,
bool> item) {
124 if (
this[item.Key] == item.Value) {
131 public void CopyTo(global::System.Collections.Generic.KeyValuePair<
string,
bool>[] array) {
135 public void CopyTo(global::System.Collections.Generic.KeyValuePair<
string,
bool>[] array,
int arrayIndex) {
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.");
145 global::System.Collections.Generic.IList<
string> keyList =
new global::System.Collections.Generic.List<
string>(this.
Keys);
146 for (
int i = 0; i < keyList.Count; i++) {
147 string currentKey = keyList[i];
148 array.SetValue(
new global::System.Collections.Generic.KeyValuePair<
string,
bool>(currentKey,
this[currentKey]), arrayIndex+i);
152 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string,
bool>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string,
bool>>.GetEnumerator() {
153 return new StringToBoolMapEnumerator(
this);
156 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
157 return new StringToBoolMapEnumerator(
this);
170 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, bool>>
173 private global::System.Collections.Generic.IList<
string> keyCollection;
174 private int currentIndex;
175 private object currentObject;
176 private int currentSize;
179 collectionRef = collection;
180 keyCollection =
new global::System.Collections.Generic.List<
string>(collection.
Keys);
182 currentObject =
null;
183 currentSize = collectionRef.
Count;
187 public global::System.Collections.Generic.KeyValuePair<string,
bool>
Current {
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.");
195 return (global::System.Collections.Generic.KeyValuePair<
string,
bool>)currentObject;
200 object global::System.Collections.IEnumerator.Current {
207 int size = collectionRef.
Count;
208 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
211 string currentKey = keyCollection[currentIndex];
212 currentObject =
new global::System.Collections.Generic.KeyValuePair<string,
bool>(currentKey, collectionRef[currentKey]);
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() {
259 private bool getitem(
string key) {
265 private void setitem(
string key,
bool x) {
266 TD_DbPINVOKE.StringToBoolMap_setitem(swigCPtr, key, x);
267 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
287 private global::System.IntPtr create_iterator_begin() {
293 private string get_next_key(global::System.IntPtr swigiterator) {
294 string ret = TD_DbPINVOKE.StringToBoolMap_get_next_key(swigCPtr, swigiterator);
295 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
299 private void destroy_iterator(global::System.IntPtr swigiterator) {
300 TD_DbPINVOKE.StringToBoolMap_destroy_iterator(swigCPtr, swigiterator);
301 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
global::System.Collections.Generic.KeyValuePair< string, bool > Current
StringToBoolMapEnumerator(StringToBoolMap collection)
global::System.Collections.Generic.ICollection< bool > Values
bool ContainsKey(string key)
StringToBoolMap(IntPtr cPtr, bool cMemoryOwn)
global::System.Collections.Generic.ICollection< string > Keys
void CopyTo(global::System.Collections.Generic.KeyValuePair< string, bool >[] array, int arrayIndex)
void CopyTo(global::System.Collections.Generic.KeyValuePair< string, bool >[] array)
bool Contains(global::System.Collections.Generic.KeyValuePair< string, bool > item)
void Add(global::System.Collections.Generic.KeyValuePair< string, bool > item)
static HandleRef getCPtr(StringToBoolMap obj)
virtual void Dispose(bool disposing)
bool Remove(global::System.Collections.Generic.KeyValuePair< string, bool > item)
StringToBoolMapEnumerator GetEnumerator()
bool TryGetValue(string key, out bool value)
StringToBoolMap(StringToBoolMap other)
void Add(string key, bool value)
static global::System.Exception Retrieve()
static void StringToBoolMap_Add(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]string jarg2, bool jarg3)
static uint StringToBoolMap_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool StringToBoolMap_getitem(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]string jarg2)
static bool StringToBoolMap_empty(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool StringToBoolMap_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]string jarg2)
static bool StringToBoolMap_ContainsKey(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]string jarg2)
static void delete_StringToBoolMap(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr StringToBoolMap_create_iterator_begin(global::System.Runtime.InteropServices.HandleRef jarg1)
static void StringToBoolMap_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)