/// <summary> /// Parses Packet description /// </summary> /// <param name="in_element"></param> protected override void ParseElement(XPathNavigator in_element, TextReader in_xml_stream, object in_parent) { ParserDeviceSettingValue value = null; // parse only elements if (in_element.NodeType != XPathNodeType.Element) { return; } switch (in_element.Name) { case "Group": { ParserDeviceSettingsRoot parent = (ParserDeviceSettingsRoot)in_parent; ParserDeviceSettingsGroup group = new ParserDeviceSettingsGroup(); group.ParseXML(in_element); parent.AddGroup(in_element, group); ParseXMLChildNodes(in_element, in_xml_stream, group); } break; case "EnumDefs": { ParserDeviceSettingsRoot parent = (ParserDeviceSettingsRoot)in_parent; ParserDeviceSettingsEnumDefs enum_defs = new ParserDeviceSettingsEnumDefs(); enum_defs.ParseXML(in_element); parent.AddEnumDefs(in_element, enum_defs); ParseXMLChildNodes(in_element, in_xml_stream, enum_defs); } break; case "Title": { ParserDeviceSettingsEnumDefs parent = (ParserDeviceSettingsEnumDefs)in_parent; ParserDeviceSettingsEnumValue title = new ParserDeviceSettingsEnumValue(); title.ParseXML(in_element); parent.AddValue(in_element, title); } break; default: value = ParserDeviceSettingValue.ValueFactory(in_element, in_xml_stream, (ParserDeviceSettingsGroup)in_parent); break; } if (value != null) { value.SetValueIndex(m_value_index++); } }
/// <summary> /// Clears all data content of the class /// </summary> public override void Clear() { m_root_class = new ParserDeviceSettingsRoot(this); m_value_index = 0; }
/// <summary> /// Sets root device settings for this group /// </summary> /// <param name="in_root"></param> internal void SetRoot(ParserDeviceSettingsRoot in_root) { m_root = in_root; }