public CDLLHints copy() { var ret = new CDLLHints(dllInfo_); foreach (string s in hintOrder_) { CDLLHintInfo mhi = hints_[s]; ret.addInfo(mhi.copy()); } return(ret); }
public static CDLLHintInfo decode(CEncodedObjectInputBufferI bin) { string tag = bin.thisTag(); Dictionary <string, string> attr = bin.getAttributes(); CDLLHintInfo ret = null; switch (tag) { case BOOL_TYPE: ret = new CDLLBoolHintInfo(attr, bin); break; case NAME_VALUE_SET: ret = new CDLLNameValueHintInfo(attr, bin); break; case NUMERIC_RANGE_VALUE_TYPE: ret = new CDLLNumericRangeValueHintInfo(attr, bin); break; case NUMERIC_VALUE_TYPE: ret = new CDLLNumericValueHintInfo(attr, bin); break; case STRING_VALUE_TYPE: ret = new CDLLStringValueHintInfo(attr, bin); break; case FILE_VALUE_TYPE: ret = new CDLLFileValueHintInfo(attr, bin); break; case CONTAINER_TYPE: ret = new CDLLContainerHintInfo(attr, bin); break; case LOCKED_CONTAINER_TYPE: ret = new CDLLLockableHintInfo(attr, bin); break; case RADIO_CONTAINER_TYPE: ret = new CDLLRadioContainerHintInfo(attr, bin); break; default: throw new Exception("Unknown decode type " + tag); } bin.endTag(tag); return(ret); }
public void encode(CEncodedObjectOutputBufferI output) { output.openObject(TAG); dllInfo_.encode(output); output.openObject(INFOS); foreach (string s in hintOrder_) { CDLLHintInfo mhi = hints_[s]; mhi.encode(output); } output.objectEnd(); output.objectEnd(); }
public CDLLHints(CEncodedObjectInputBufferI bin) { bin.nextTag(TAG); dllInfo_ = new CDLLInfo(bin); { bin.nextTag(INFOS); if (bin.hasChildren()) { bin.firstChild(); while (!bin.reachedEndTag(INFOS)) { CDLLHintInfo mhi = CDLLHintInfo.decode(bin); addInfo(mhi); } } bin.endTag(INFOS); } bin.endTag(TAG); }
public void addInfo(CDLLHintInfo info) { hints_.Add(info.key_, info); hintOrder_.Add(info.key_); }