//aspects displayable,SUBOVERLAPS,RUNNING_TIME_TO_BERTH_TC,OVERLAP_RELEASE_TIME not used //er_button_latch_id,trts_latch_id,allow_routing,aws_type_and_body also omitted because they don't exist in thameslink public override void DoSecondPass(Dictionary <string, LDLBOBase> parsedObjects) { LDLBOBase dlocObject; if (!string.IsNullOrEmpty(NormalApproachStr)) { parsedObjects.TryGetValue(NormalApproachStr, out dlocObject); NormalApproachTrigger = dlocObject as LDLNormalApproachTrigger; } if (!string.IsNullOrEmpty(ReverseApproachStr)) { parsedObjects.TryGetValue(ReverseApproachStr, out dlocObject); ReverseApproachTrigger = dlocObject as LDLReverseApproachTrigger; } if (!string.IsNullOrEmpty(RadioBlockControLStr)) { parsedObjects.TryGetValue(RadioBlockControLStr, out dlocObject); RadioBlockControl = dlocObject as LDLRBC; } if (!string.IsNullOrEmpty(InterlockingStr)) { parsedObjects.TryGetValue(InterlockingStr, out dlocObject); Interlocking = dlocObject as LDLInterlocking; } if (Location != null) { Location.DoSecondPass(parsedObjects); } }
public LDLBOBase CreateItem(string[] definition, string id) { LDLInterlocking result = new LDLInterlocking(id); int nLines = definition.GetLength(0); LDLSectionList sections = LDLSectionList.ExtractSectionList(definition, nLines, 0); result.Sections = sections; return(result); }
public LDLSectionList Sections;//It's a multi-part section, not a section list technically, for my purposes it seems OK to model them identically public override void DoSecondPass(Dictionary <string, LDLBOBase> parsedObjects) { if (!string.IsNullOrEmpty(InterlockingStr)) { LDLBOBase InterlockingObj; parsedObjects.TryGetValue(InterlockingStr, out InterlockingObj); Interlocking = InterlockingObj as LDLInterlocking; } Sections.DoSecondPass(parsedObjects); }
public override void DoSecondPass(Dictionary <string, LDLBOBase> parsedObjects) { LDLBOBase foundObject; if (!string.IsNullOrEmpty(InterlockingStr)) { parsedObjects.TryGetValue(InterlockingStr, out foundObject); Interlocking = foundObject as LDLInterlocking; } if (!string.IsNullOrEmpty(EntranceStr)) { parsedObjects.TryGetValue(EntranceStr, out foundObject); Entrance = foundObject; } if (!string.IsNullOrEmpty(ExitStr)) { parsedObjects.TryGetValue(ExitStr, out foundObject); Exit = foundObject; } if (Sections != null) { Sections.DoSecondPass(parsedObjects); } }