/// <summary> /// Add all member from the parsed realtime object /// </summary> /// <param name="in_object"></param> public void CopyParsedMember(ParserRealtimeObject in_object) { foreach (ParserRealtimeObjectMember parsed_member in in_object.Members) { RealtimeObjectMember member = new RealtimeObjectMember(parsed_member); MemberAdd(member); } }
/// <summary> /// Parses realtime object description file elements /// </summary> /// <param name="in_element"></param> protected override void ParseElement(XPathNavigator in_element, TextReader in_xml_stream, object in_parent) { switch (in_element.Name) { case "Object": { ParserRealtimeObject realtime_object = new ParserRealtimeObject((byte)(((ParserRealtimeObjectCollection)in_parent).Objects.Count + 1)); realtime_object.ParseXML(in_element); ParseXMLChildNodes(in_element, in_xml_stream, realtime_object); ((ParserRealtimeObjectCollection)in_parent).AddObject(in_element, realtime_object); } break; case "LinearConverter": { LinearConverter converter = new LinearConverter(); converter.ParseXML(in_element); ((ParserRealtimeObjectCollection)m_root_class).AddConverter(in_element, converter); } break; default: { ParserRealtimeObjectMember realtime_member = new ParserRealtimeObjectMember(); realtime_member.ParseValueMember(in_element, in_xml_stream, in_parent); ((ParserRealtimeObject)in_parent).AddMember(in_element, realtime_member); } break; } }
/// <summary> /// Adds object to the collection /// </summary> /// <param name="in_element"></param> /// <param name="in_object"></param> public void AddObject(XPathNavigator in_element, ParserRealtimeObject in_object) { m_objects.Add(in_object); m_object_name_lookup.Add(in_object.Name, m_objects.Count - 1); }
/// <summary> /// Creates object from parsed realtime object /// </summary> /// <param name="in_parser_object"></param> public RealtimeObject(ParserRealtimeObject in_parser_object) : this(in_parser_object.Name) { }