using System; using System.Collections.Generic; using System.Collections; using System.Text; using CLab.Auxiliary; namespace CLab { class LayoutTypeEnumeration : LayoutType { private ArrayList indexToValue; private Hashtable valueToIndex; public LayoutTypeEnumeration(String typeName, int domainSize, ArrayList indexToValue, Hashtable valueToIndex) : base(typeName, booleanVarNumber(domainSize), domainSize) { this.indexToValue = indexToValue; this.valueToIndex = valueToIndex; } public Hashtable ValueToIndex { get { return valueToIndex; } } public ArrayList IndexToValue { get { return indexToValue; } } public override string ToString() { String indexToValuePrint = ""; indexToValuePrint += "'indexToValue:' "; for (int i = 0; i < indexToValue.Count; i++) { indexToValuePrint += "" + indexToValue[i] + " = " + i + ", "; } return string.Format(" {0} \n{1}", base.ToString(), indexToValuePrint); } } }