public static string[] ToSymbolArray(Obj obj) { int size = obj.GetSize(); string[] array = new string[size]; SeqOrSetIter it = obj.GetSeqOrSetIter(); int idx = 0; while (!it.Done()) { array[idx++] = it.Get().ToString(); it.Next(); } return(array); }
public static long[] ToLongArray(Obj obj) { int size = obj.GetSize(); long[] array = new long[size]; SeqOrSetIter it = obj.GetSeqOrSetIter(); int idx = 0; while (!it.Done()) { array[idx++] = it.Get().GetLong(); it.Next(); } return(array); }
public static double[] ToDoubleArray(Obj obj) { int size = obj.GetSize(); double[] array = new double[size]; SeqOrSetIter it = obj.GetSeqOrSetIter(); int idx = 0; while (!it.Done()) { array[idx++] = it.Get().GetDouble(); it.Next(); } return(array); }
//////////////////////////////////////////////////////////////////////////// public static bool[] ToBoolArray(Obj obj) { int size = obj.GetSize(); bool[] array = new bool[size]; SeqOrSetIter it = obj.GetSeqOrSetIter(); int idx = 0; while (!it.Done()) { array[idx++] = it.Get().GetBool(); it.Next(); } return(array); }
public void Set(Obj value) { Clear(); Miscellanea.Assert(insertList.Count == 0); SeqOrSetIter it = value.GetSeqOrSetIter(); while (!it.Done()) { Obj val = it.Get(); int surr = store.LookupValueEx(val); if (surr == -1) { surr = store.Insert(val); } insertList.Add((uint)surr); it.Next(); } }