public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, Name); // Tooltip/description Writer.WriteLine(Tooltip); if (Pins != null && Pins.Count() > 0) { // Visualization of the node Writer.EnterRegion("graph"); Writer.EnterObject("BlueprintNode"); if (CompactName != null) { Writer.WriteParamLiteral("type", "compact"); Writer.WriteParamLiteral("title", CompactName); } else { Writer.WriteParamLiteral("type", NodeType); Writer.WriteParamLiteral("title", Name); } Writer.EnterParam("inputs"); WritePinObjects(Writer, Pins.Where(x => x.bInputPin)); Writer.LeaveParam(); Writer.EnterParam("outputs"); WritePinObjects(Writer, Pins.Where(x => !x.bInputPin && x.GetTypeText() != "delegate")); if (bShowAddPin) { Writer.EnterObject("BlueprintPin"); Writer.WriteParamLiteral("type", "addpin"); Writer.WriteParamLiteral("id", "AddPin"); Writer.WriteParamLiteral("title", "Add pin"); Writer.LeaveObject(); } Writer.LeaveParam(); Writer.LeaveObject(); Writer.LeaveRegion(); // Inputs Writer.EnterSection("inputs", "Inputs"); Writer.WriteObject("MemberIconListHeadBlank"); WritePins(Writer, Pins.Where(x => x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); // Outputs Writer.EnterSection("outputs", "Outputs"); Writer.WriteObject("MemberIconListHeadBlank"); WritePins(Writer, Pins.Where(x => !x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); } } }
public void WritePin(UdnWriter Writer) { Writer.EnterObject("ActionPinListItem"); Writer.EnterParam("icons"); var PinType = GetTypeText(); if (PinType == "exec") { Writer.WriteRegion("input_exec", ""); } else if (bIsArray) { Writer.WriteRegion("input_array " + PinType, ""); } else { Writer.WriteRegion("input_variable " + PinType, ""); } Writer.LeaveParam(); Writer.WriteParamLiteral("name", Name); Writer.WriteParamLiteral("type", TypeText); Writer.WriteParam("tooltip", Tooltip); Writer.WriteParamLiteral("id", GetId()); Writer.LeaveObject(); }
public void WriteListSection(UdnWriter Writer, string SectionId, string SectionTitle, Dictionary <string, string> Descriptions) { if (NodeList.Count > 0) { // Create the list items List <MetadataListItem> ListItems = new List <MetadataListItem>(); CreateListItems(NodeList, APIDocTool.Icons.GetMetadataIconsForType(Type), Descriptions, false, ListItems); // Enter the section and list Writer.EnterSection(SectionId, SectionTitle); Writer.WriteObject("MetadataListHead"); // Write the items foreach (MetadataListItem ListItem in ListItems) { Writer.EnterObject("MetadataListItem"); Writer.WriteParam("icon", ListItem.Icon); Writer.WriteParam("name", ListItem.Name); Writer.EnterParam("value"); for (int Idx = 0; Idx < ListItem.Values.Count; Idx++) { Writer.WriteLine("{0}{1} ", ListItem.Values[Idx], (Idx + 1 < ListItem.Values.Count) ? ", " : ""); } Writer.LeaveParam(); Writer.WriteParam("desc", ListItem.Description); Writer.LeaveObject(); } // Leave the section and list Writer.WriteObject("MetadataListTail"); Writer.LeaveSection(); } }
public void WriteListItem(UdnWriter Writer, bool bWithType) { // Enter the object Writer.EnterObject(bWithType? "FunctionListItemWithType" : "FunctionListItem"); // Get all the icons List <Icon> ItemIcons = new List <Icon> { Icons.Function[(int)Protection] }; if (IsStatic) { ItemIcons.Add(Icons.StaticFunction); } if (IsVirtual) { ItemIcons.Add(Icons.VirtualFunction); } if (MetadataDirective != null) { ItemIcons.Add(Icons.ReflectedFunction); ItemIcons.AddRange(MetadataDirective.Icons); } Writer.WriteParam("icons", ItemIcons); // Write the return type Writer.WriteParam("type", Markdown.Truncate(ReturnType, 12, "...")); // Write the name if (Parameters.Count == 0) { Writer.WriteParam("name", Name + "()"); Writer.WriteParam("arguments", ""); } else { Writer.WriteParam("name", Name); Writer.EnterParam("arguments"); if (Parameters.Count > 0) { Writer.WriteEscapedLine("( "); for (int Idx = 0; Idx < Parameters.Count; Idx++) { string Separator = (Idx + 1 == Parameters.Count) ? "" : ","; string Definition = Markdown.Truncate(APIMember.RemoveElaborations(Parameters[Idx].Definition), 35, "..."); Writer.WriteLine(UdnWriter.TabSpaces + Definition + Separator + " "); } Writer.WriteEscapedLine(") "); } Writer.LeaveParam(); } // Write the other parameters Writer.WriteParam("link", "[RELATIVE:" + LinkPath + "]"); Writer.WriteParam("description", BriefDescription); // Leave the object Writer.LeaveObject(); }
public void WriteListItem(UdnWriter Writer) { // Enter the object Writer.EnterObject("FunctionListItem"); // Get all the icons List <Icon> ItemIcons = new List <Icon> { Icons.Function[(int)Protection] }; if (IsStatic) { ItemIcons.Add(Icons.StaticFunction); } if (IsVirtual) { ItemIcons.Add(Icons.VirtualFunction); } if (MetadataDirective != null) { ItemIcons.Add(Icons.ReflectedFunction); ItemIcons.AddRange(MetadataDirective.Icons); } Writer.WriteParam("icons", ItemIcons); // Write the name Writer.WriteParam("name", Name); Writer.WriteParam("link", "[RELATIVE:" + LinkPath + "]"); // Add the parameter section if need be Writer.EnterParam("arguments"); if (Parameters.Count > 0) { Writer.WriteEscapedLine("( "); for (int Idx = 0; Idx < Parameters.Count; Idx++) { string Separator = (Idx + 1 == Parameters.Count) ? "" : ","; string Definition = Markdown.Truncate(Parameters[Idx].GetAbbreviatedDefinition(), 35, "..."); Writer.WriteLine(UdnWriter.TabSpaces + Definition + Separator + " "); } Writer.WriteEscapedLine(") "); } Writer.LeaveParam(); // Write the description Writer.WriteParam("description", BriefDescription); // Leave the object Writer.LeaveObject(); }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, Name); // Tooltip/description - Write this as interleaved text and notes foreach (TooltipLine TTL in TooltipData) { switch (TTL.Type) { case TooltipLine.LineType.Normal: Writer.WriteLine(TTL.Text); break; case TooltipLine.LineType.Note: Writer.EnterRegion("note"); Writer.WriteLine(TTL.Text); Writer.LeaveRegion(); break; default: //Error? Ignore this entry for now. break; } } if (Pins != null && Pins.Count() > 0) { // Visualization of the node Writer.EnterRegion("graph"); Writer.EnterObject("BlueprintNode"); if (CompactName != null) { Writer.WriteParamLiteral("type", "compact"); Writer.WriteParamLiteral("title", CompactName); } else { Writer.WriteParamLiteral("type", NodeType); Writer.WriteParamLiteral("title", Name); } Writer.EnterParam("inputs"); WritePinObjects(Writer, Pins.Where(x => x.bInputPin)); Writer.LeaveParam(); Writer.EnterParam("outputs"); WritePinObjects(Writer, Pins.Where(x => !x.bInputPin && x.GetTypeText() != "delegate")); if (bShowAddPin) { Writer.EnterObject("BlueprintPin"); Writer.WriteParamLiteral("type", "addpin"); Writer.WriteParamLiteral("id", "AddPin"); Writer.WriteParamLiteral("title", "Add pin"); Writer.LeaveObject(); } Writer.LeaveParam(); Writer.LeaveObject(); Writer.LeaveRegion(); // Inputs Writer.EnterSection("inputs", "Inputs"); Writer.WriteObject("MemberIconListHeadBlank"); WritePins(Writer, Pins.Where(x => x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); // Outputs Writer.EnterSection("outputs", "Outputs"); Writer.WriteObject("MemberIconListHeadBlank"); // TODO: Remove this hack and reinstate the one-line version once UE-16475 is resolved. bool bAlreadyWroteOutputDelegate = false; for (int i = 0; i < Pins.Count; ++i) { APIActionPin Pin = Pins[i]; if (!Pin.bInputPin) { if (Pin.GetTypeText() == "delegate") { if (bAlreadyWroteOutputDelegate) { continue; } bAlreadyWroteOutputDelegate = true; } Pin.WritePin(Writer); } } //WritePins(Writer, Pins.Where(x => !x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); } } }
public void WriteListItem(UdnWriter Writer, bool bWithType) { // Enter the object Writer.EnterObject(bWithType? "FunctionListItemWithType" : "FunctionListItem"); // Get all the icons List<Icon> ItemIcons = new List<Icon>{ Icons.Function[(int)Protection] }; if (IsStatic) { ItemIcons.Add(Icons.StaticFunction); } if (IsVirtual) { ItemIcons.Add(Icons.VirtualFunction); } if (MetadataDirective != null) { ItemIcons.Add(Icons.ReflectedFunction); ItemIcons.AddRange(MetadataDirective.Icons); } Writer.WriteParam("icons", ItemIcons); // Write the return type Writer.WriteParam("type", Markdown.Truncate(ReturnType, 12, "...")); // Write the name if(Parameters.Count == 0) { Writer.WriteParam("name", Name + "()"); Writer.WriteParam("arguments", ""); } else { Writer.WriteParam("name", Name); Writer.EnterParam("arguments"); if (Parameters.Count > 0) { Writer.WriteEscapedLine("( "); for (int Idx = 0; Idx < Parameters.Count; Idx++) { string Separator = (Idx + 1 == Parameters.Count) ? "" : ","; string Definition = Markdown.Truncate(APIMember.RemoveElaborations(Parameters[Idx].Definition), 35, "..."); // Fix spacing around pointer/reference punctuation to match Epic code standards. if (Definition != null) { Definition = Definition.Replace(" *", "*").Replace(" &", "&"); } Writer.WriteLine(UdnWriter.TabSpaces + Definition + Separator + " "); } Writer.WriteEscapedLine(") "); } Writer.LeaveParam(); } // Write the other parameters Writer.WriteParam("link", "[RELATIVE:" + LinkPath + "]"); Writer.WriteParam("description", BriefDescription); // Leave the object Writer.LeaveObject(); }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, Name); // Tooltip/description Writer.WriteLine(Tooltip); if (Pins != null && Pins.Count() > 0) { // Visualization of the node Writer.EnterRegion("graph"); Writer.EnterObject("BlueprintNode"); if (CompactName != null) { Writer.WriteParamLiteral("type", "compact"); Writer.WriteParamLiteral("title", CompactName); } else { Writer.WriteParamLiteral("type", NodeType); Writer.WriteParamLiteral("title", Name); } Writer.EnterParam("inputs"); WritePinObjects(Writer, Pins.Where(x => x.bInputPin)); Writer.LeaveParam(); Writer.EnterParam("outputs"); WritePinObjects(Writer, Pins.Where(x => !x.bInputPin)); if (bShowAddPin) { Writer.EnterObject("BlueprintPin"); Writer.WriteParamLiteral("type", "addpin"); Writer.WriteParamLiteral("id", "AddPin"); Writer.WriteParamLiteral("title", "Add pin"); Writer.LeaveObject(); } Writer.LeaveParam(); Writer.LeaveObject(); Writer.LeaveRegion(); // Inputs Writer.EnterSection("inputs", "Inputs"); Writer.WriteObject("MemberIconListHeadBlank"); WritePins(Writer, Pins.Where(x => x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); // Outputs Writer.EnterSection("outputs", "Outputs"); Writer.WriteObject("MemberIconListHeadBlank"); WritePins(Writer, Pins.Where(x => !x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); } } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, Name); // Tooltip/description - Write this as interleaved text and notes foreach (TooltipLine TTL in TooltipData) { switch (TTL.Type) { case TooltipLine.LineType.Normal: Writer.WriteLine(TTL.Text); break; case TooltipLine.LineType.Note: Writer.EnterRegion("note"); Writer.WriteLine(TTL.Text); Writer.LeaveRegion(); break; default: //Error? Ignore this entry for now. break; } } if (Pins != null && Pins.Count() > 0) { // Visualization of the node Writer.EnterRegion("graph"); Writer.EnterObject("BlueprintNode"); if (CompactName != null) { Writer.WriteParamLiteral("type", "compact"); Writer.WriteParamLiteral("title", CompactName); } else { Writer.WriteParamLiteral("type", NodeType); Writer.WriteParamLiteral("title", Name); } Writer.EnterParam("inputs"); WritePinObjects(Writer, Pins.Where(x => x.bInputPin)); Writer.LeaveParam(); Writer.EnterParam("outputs"); WritePinObjects(Writer, Pins.Where(x => !x.bInputPin && x.GetTypeText() != "delegate")); if (bShowAddPin) { Writer.EnterObject("BlueprintPin"); Writer.WriteParamLiteral("type", "addpin"); Writer.WriteParamLiteral("id", "AddPin"); Writer.WriteParamLiteral("title", "Add pin"); Writer.LeaveObject(); } Writer.LeaveParam(); Writer.LeaveObject(); Writer.LeaveRegion(); // Inputs Writer.EnterSection("inputs", "Inputs"); Writer.WriteObject("MemberIconListHeadBlank"); WritePins(Writer, Pins.Where(x => x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); // Outputs Writer.EnterSection("outputs", "Outputs"); Writer.WriteObject("MemberIconListHeadBlank"); WritePins(Writer, Pins.Where(x => !x.bInputPin)); Writer.WriteObject("MemberIconListTail"); Writer.LeaveSection(); } } }
public void WritePin(UdnWriter Writer) { Writer.EnterObject("ActionPinListItem"); Writer.EnterParam("icons"); var PinType = GetTypeText(); if (PinType == "exec") { Writer.WriteRegion("input_exec",""); } else if (bIsArray) { Writer.WriteRegion("input_array " + PinType, ""); } else { Writer.WriteRegion("input_variable " + PinType, ""); } Writer.LeaveParam(); Writer.WriteParamLiteral("name", Name); Writer.WriteParamLiteral("type", TypeText); Writer.WriteParam("tooltip", Tooltip); Writer.WriteParamLiteral("id", GetId()); Writer.LeaveObject(); }
public void WriteListSection(UdnWriter Writer, string SectionId, string SectionTitle, Dictionary<string, string> Descriptions) { if (NodeList.Count > 0) { // Create the list items List<MetadataListItem> ListItems = new List<MetadataListItem>(); CreateListItems(NodeList, APIDocTool.Icons.GetMetadataIconsForType(Type), Descriptions, false, ListItems); // Enter the section and list Writer.EnterSection(SectionId, SectionTitle); Writer.WriteObject("MetadataListHead"); // Write the items foreach (MetadataListItem ListItem in ListItems) { Writer.EnterObject("MetadataListItem"); Writer.WriteParam("icon", ListItem.Icon); Writer.WriteParam("name", ListItem.Name); Writer.EnterParam("value"); for (int Idx = 0; Idx < ListItem.Values.Count; Idx++) { Writer.WriteLine("{0}{1} ", ListItem.Values[Idx], (Idx + 1 < ListItem.Values.Count) ? ", " : ""); } Writer.LeaveParam(); Writer.WriteParam("desc", ListItem.Description); Writer.LeaveObject(); } // Leave the section and list Writer.WriteObject("MetadataListTail"); Writer.LeaveSection(); } }
public void WriteListItem(UdnWriter Writer) { // Enter the object Writer.EnterObject("FunctionListItem"); // Get all the icons List<Icon> ItemIcons = new List<Icon>{ Icons.Function[(int)Protection] }; if (IsStatic) { ItemIcons.Add(Icons.StaticFunction); } if (IsVirtual) { ItemIcons.Add(Icons.VirtualFunction); } if (MetadataDirective != null) { ItemIcons.Add(Icons.ReflectedFunction); ItemIcons.AddRange(MetadataDirective.Icons); } Writer.WriteParam("icons", ItemIcons); // Write the name Writer.WriteParam("name", Name); Writer.WriteParam("link", "[RELATIVE:" + LinkPath + "]"); // Add the parameter section if need be Writer.EnterParam("arguments"); if (Parameters.Count > 0) { Writer.WriteEscapedLine("( "); for (int Idx = 0; Idx < Parameters.Count; Idx++) { string Separator = (Idx + 1 == Parameters.Count) ? "" : ","; string Definition = Markdown.Truncate(Parameters[Idx].GetAbbreviatedDefinition(), 35, "..."); Writer.WriteLine(UdnWriter.TabSpaces + Definition + Separator + " "); } Writer.WriteEscapedLine(") "); } Writer.LeaveParam(); // Write the description Writer.WriteParam("description", BriefDescription); // Leave the object Writer.LeaveObject(); }