本文整理汇总了C#中APIDocTool.UdnWriter类的典型用法代码示例。如果您正苦于以下问题:C# UdnWriter类的具体用法?C# UdnWriter怎么用?C# UdnWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UdnWriter类属于APIDocTool命名空间,在下文中一共展示了UdnWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: WritePage
public override void WritePage(UdnManifest Manifest, string OutputPath)
{
using (UdnWriter Writer = new UdnWriter(OutputPath))
{
Writer.WritePageHeader(Name, PageCrumbs, BriefDescription);
Writer.EnterTag("[OBJECT:Constant]");
Writer.EnterTag("[PARAM:briefdesc]");
if (!Utility.IsNullOrWhitespace(BriefDescription))
{
Writer.WriteLine(BriefDescription);
}
Writer.LeaveTag("[/PARAM]");
// Write the syntax
Writer.EnterTag("[PARAM:syntax]");
Writer.EnterSection("syntax", "Syntax");
WriteDefinition(Writer);
Writer.LeaveSection();
Writer.LeaveTag("[/PARAM]");
// Write the description
Writer.EnterTag("[PARAM:description]");
if (!Utility.IsNullOrWhitespace(FullDescription) && FullDescription != BriefDescription)
{
Writer.EnterSection("description", "Remarks");
Writer.WriteLine(FullDescription);
Writer.LeaveSection();
}
Writer.LeaveTag("[/PARAM]");
Writer.LeaveTag("[/OBJECT]");
}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:35,代码来源:APIConstant.cs
示例2: Write
public void Write(UdnWriter Writer, int Depth)
{
if (!IsEmpty)
{
// CSS region for indenting
Writer.EnterRegion("module-sections-list");
// Find all the modules in this category
if(Modules.Count > 0)
{
Writer.WriteList(Modules.OrderBy(x => x.Name).Select(x => x.GetListItem()));
}
// Write all the subcategories
foreach (APIModuleCategory Category in Categories.OrderBy(x => x.Name))
{
Writer.WriteHeading(Depth, Category.Name);
Writer.WriteLine();
Category.Write(Writer, Depth + 1);
}
// End of CSS region
Writer.LeaveRegion();
}
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:25,代码来源:APIModuleIndex.cs
示例3: WriteListSection
public static void WriteListSection(UdnWriter Writer, string SectionId, string SectionTitle, IEnumerable<APIFilter> Categories)
{
APIFilter[] CategoryArray = Categories.ToArray();
if (CategoryArray.Length > 0)
{
Writer.EnterSection(SectionId, SectionTitle);
Writer.WriteFilterList(CategoryArray.Select(x => x.GetFilterListItem()).ToArray());
Writer.LeaveSection();
}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:10,代码来源:APIFilter.cs
示例4: WritePage
public override void WritePage(UdnManifest Manifest, string OutputPath)
{
using (UdnWriter Writer = new UdnWriter(OutputPath))
{
Writer.WritePageHeader("Getting started with the Unreal Engine API", PageCrumbs, "Getting started with the Unreal Engine API");
Writer.WriteHeading(2, "Orientation");
Writer.WriteLine("Games, programs and the Unreal Editor are all *targets* built by UnrealBuildTool. Each target is compiled from C++ *modules*, each implementing a particular area of functionality. Your game is a target, and your game code is implemented in one or more modules.");
Writer.WriteLine();
Writer.WriteLine("Code in each module can use other modules by referencing them in their *build rules*. Build rules for each module are given by C# scripts with the .build.cs extension. *Target rules* are given by C# scripts with the .target.cs extension.");
Writer.WriteLine();
Writer.WriteLine(Manifest, "Modules supplied with the Unreal Engine are divided into three categories; the {Runtime|ModuleIndex:Runtime Modules}, functionality for the {Editor|ModuleIndex:Editor Modules}, and {Developer|ModuleIndex:Developer Modules} utilities.");
Writer.WriteLine();
Writer.WriteLine(Manifest, "Most gameplay programming just uses runtime modules, and the three most commonly encountered are {Core|Filter:Core}, {CoreUObject|Filter:CoreUObject} and {Engine|Filter:Engine}.");
Writer.WriteLine();
Writer.WriteHeading(2, "Core");
Writer.WriteLine(Manifest, "The **{Core|Filter:Core}** module provides a common framework for Unreal modules to communicate; a standard set of types, a {math library|Filter:Core.Math}, a {container|Filter:Core.Containers} library, and a lot of the hardware abstraction that allows Unreal to run on so many platforms.");
Writer.WriteLine(Manifest, "Some common topics are listed below; full documentation is available {here|Filter:Core}.");
Writer.WriteLine();
List<UdnListItem> CoreItems = new List<UdnListItem>();
CoreItems.Add(new UdnListItem("Basic types:", Manifest.FormatString("bool · float/double · {int8}/{int16}/{int32}/{int64} · {uint8}/{uint16}/{uint32}/{uint64} · {ANSICHAR} · {TCHAR} · {FString}"), null));
CoreItems.Add(new UdnListItem("Math:", Manifest.FormatString("{FMath} · {FVector} · {FRotator} · {FTransform} · {FMatrix} · {More...|Filter:Core.Math}"), null));
CoreItems.Add(new UdnListItem("Containers:", Manifest.FormatString("{TArray} · {TList} · {TMap} · {More...|Filter:Core.Containers}"), null));
CoreItems.Add(new UdnListItem("Other:", Manifest.FormatString("{FName} · {FArchive} · {FOutputDevice}"), null));
Writer.WriteList(CoreItems);
Writer.WriteHeading(2, "CoreUObject");
Writer.WriteLine(Manifest, "The **{CoreUObject|Filter:CoreUObject}** module defines UObject, the base class for all managed objects in Unreal. Managed objects are key to integrating with the editor, for serialization, network replication, and runtime type information. UObject derived classes are garbage collected.");
Writer.WriteLine(Manifest, "Some common topics are listed below; full documentation is available {here|Filter:CoreUObject}.");
Writer.WriteLine();
List<UdnListItem> CoreUObjectItems = new List<UdnListItem>();
CoreUObjectItems.Add(new UdnListItem("Classes:", Manifest.FormatString("{UObject} · {UClass} · {UProperty} · {UPackage}"), null));
CoreUObjectItems.Add(new UdnListItem("Functions:", Manifest.FormatString("{ConstructObject} · {FindObject} · {Cast} · {CastChecked}"), null));
Writer.WriteList(CoreUObjectItems);
Writer.WriteHeading(2, "Engine");
Writer.WriteLine(Manifest, "The **{Engine|Filter:Engine}** module contains functionality you’d associate with a game. The game world, actors, characters, physics and special effects are all defined here.");
Writer.WriteLine(Manifest, "Some common topics are listed below; full documentation is available {here|Filter:Engine}.");
Writer.WriteLine();
List<UdnListItem> EngineItems = new List<UdnListItem>();
EngineItems.Add(new UdnListItem("Actors:", Manifest.FormatString("{AActor} · {AVolume} · {AGameMode} · {AHUD} · {More...|Hierarchy:AActor}"), null));
EngineItems.Add(new UdnListItem("Pawns:", Manifest.FormatString("{APawn} · {ACharacter} · {AWheeledVehicle}"), null));
EngineItems.Add(new UdnListItem("Controllers:", Manifest.FormatString("{AController} · {AAIController} · {APlayerController}"), null));
EngineItems.Add(new UdnListItem("Components:", Manifest.FormatString("{UActorComponent} · {UBrainComponent} · {UInputComponent} · {USkeletalMeshComponent} · {UParticleSystemComponent} · {More...|Hierarchy:UActorComponent}"), null));
EngineItems.Add(new UdnListItem("Gameplay:", Manifest.FormatString("{UPlayer} · {ULocalPlayer} · {UWorld} · {ULevel}"), null));
EngineItems.Add(new UdnListItem("Assets:", Manifest.FormatString("{UTexture} · {UMaterial} · {UStaticMesh} · {USkeletalMesh} · {UParticleSystem}"), null));
Writer.WriteList(EngineItems);
}
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:54,代码来源:APIGettingStarted.cs
示例5: WritePage
public override void WritePage(UdnManifest Manifest, string OutputPath)
{
using (UdnWriter Writer = new UdnWriter(OutputPath))
{
Writer.WritePageHeader(Name, PageCrumbs, "Overload list");
Writer.EnterTag("[REGION:members]");
APIFunction.WriteList(Writer, Overloads, Overloads.First().FunctionType != APIFunctionType.Constructor);
Writer.LeaveTag("[/REGION]");
}
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:11,代码来源:APIFunctionGroup.cs
示例6: WriteHierarchy
public static void WriteHierarchy(UdnWriter Writer, APIHierarchyNode RootNode, string Id)
{
Writer.WriteLine("<table class=\"{0}\" cellspacing=\"0\" id=\"{1}\">", RootNode.bShowButton ? "hierarchy-table-collapsed" : "hierarchy-table", Id);
for(int Idx = 0; Idx < RootNode.Children.Count; Idx++)
{
APIHierarchyNode Node = RootNode.Children[Idx];
string ChildId = String.Format("{0}_{1}", Id, Idx + 1);
// Write the start of the row
Writer.WriteLine("<tr>");
// Write the button or spacer
Writer.EnterTag("<td class=\"hierarchy-button-cell\">");
if (Node.Children.Count == 0 || !Node.bShowButton)
{
Writer.WriteObject("HierarchySpacer");
}
else
{
Writer.EnterObject("HierarchyButton");
Writer.WriteParamLiteral("id", ChildId);
Writer.LeaveObject();
}
Writer.LeaveTag("</td>");
// Write the label
Writer.EnterTag("<td class=\"hierarchy-label-cell\">");
if (Node.LinkPath == null)
{
Writer.WriteObject("HierarchyLabel", "name", Node.Label);
}
else
{
Writer.WriteObject("HierarchyLabelLinked", "name", Node.Label, "link", "[RELATIVE:" + Node.LinkPath + "]");
}
// Write the contents row
if (Node.Children.Count > 0)
{
WriteHierarchy(Writer, Node, ChildId);
}
Writer.LeaveTag("</td>");
// Write the end of the row
Writer.WriteLine("</tr>");
}
Writer.WriteLine("</table>");
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:48,代码来源:APIHierarchy.cs
示例7: WritePage
public override void WritePage(UdnManifest Manifest, string OutputPath)
{
using (UdnWriter Writer = new UdnWriter(OutputPath))
{
Writer.WritePageHeader(Name, PageCrumbs, Description);
// Create an array of links for each letter
string[] CategoryLinks = new string[Categories.Count];
for (int Idx = 0; Idx < Categories.Count; Idx++)
{
if (Categories[Idx].Entries.Count == 0)
{
CategoryLinks[Idx] = Categories[Idx].Name;
}
else
{
CategoryLinks[Idx] = String.Format("[{0}](#idx_{0})", Categories[Idx].Name);
}
}
// Write the link section
Writer.WriteLine("[REGION:memberindexlinks]");
Writer.WriteLine(String.Join(" · ", CategoryLinks));
Writer.WriteLine("[/REGION]");
// Write each letter
for(int Idx = 0; Idx < Categories.Count; Idx++)
{
if (Categories[Idx].Entries.Count > 0)
{
Writer.WriteLine();
Writer.WriteLine("(#idx_{0})", Categories[Idx].Name);
Writer.WriteHeading(2, Categories[Idx].Name);
foreach (Entry Entry in Categories[Idx].Entries)
{
Writer.WriteLine("[REGION:memberindexitem]");
Writer.WriteLine("[{0}]({1})", Entry.Name, Entry.LinkPath);
Writer.WriteLine("[/REGION]");
}
}
}
}
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:43,代码来源:APIMemberIndex.cs
示例8: WritePage
public override void WritePage(UdnManifest Manifest, string Path)
{
using (UdnWriter Writer = new UdnWriter(Path))
{
Writer.WritePageHeader(Name, PageCrumbs, BriefDescription);
// Write the type
Writer.EnterSection("type", "Type");
WriteNestedSimpleCode(Writer, new List<string> { "typedef " + Type + " " + Name });
Writer.LeaveSection();
// Write the description
if (!Utility.IsNullOrWhitespace(FullDescription))
{
Writer.EnterSection("description", "Remarks");
Writer.WriteLine(FullDescription);
Writer.LeaveSection();
}
// Write the references
WriteReferencesSection(Writer, Entity);
}
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:23,代码来源:APITypeDef.cs
示例9: WritePage
public override void WritePage(UdnManifest Manifest, string OutputPath)
{
using (UdnWriter Writer = new UdnWriter(OutputPath))
{
Writer.WritePageHeader(Name, PageCrumbs, BriefDescription);
// Write the syntax
Writer.EnterSection("syntax", "Syntax");
WriteDefinition(Writer);
Writer.LeaveSection();
// Write the description
if (!Utility.IsNullOrWhitespace(FullDescription))
{
Writer.EnterSection("description", "Remarks");
Writer.WriteLine(FullDescription);
Writer.LeaveSection();
}
// Write the references
WriteReferencesSection(Writer, Entity);
}
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:23,代码来源:APIConstant.cs
示例10: WritePage
public override void WritePage(UdnManifest Manifest, string Path)
{
using (UdnWriter Writer = new UdnWriter(Path))
{
Writer.WritePageHeader(Name, PageCrumbs, BriefDescription);
Writer.EnterTag("[OBJECT:Typedef]");
// Write the brief description
Writer.EnterTag("[PARAM:briefdesc]");
if (!Utility.IsNullOrWhitespace(BriefDescription) && BriefDescription != FullDescription)
{
Writer.WriteLine(BriefDescription);
}
Writer.LeaveTag("[/PARAM]");
// Write the type
Writer.EnterTag("[PARAM:type]");
Writer.EnterSection("type", "Type");
WriteNestedSimpleCode(Writer, new List<string> { "typedef " + Type + " " + Name });
Writer.LeaveSection();
Writer.LeaveTag("[/PARAM]");
// Write the description
Writer.EnterTag("[PARAM:description]");
if (!Utility.IsNullOrWhitespace(FullDescription))
{
Writer.EnterSection("description", "Remarks");
Writer.WriteLine(FullDescription);
Writer.LeaveSection();
}
Writer.LeaveTag("[/PARAM]");
// Leave the object tag
Writer.LeaveTag("[/OBJECT]");
}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:37,代码来源:APITypeDef.cs
示例11: WriteDefinition
private void WriteDefinition(UdnWriter Writer)
{
List<string> Lines = new List<string>();
Lines.Add(String.Format("enum {0}", ShortName.StartsWith("@")? "" : ShortName));
Lines.Add(Utility.EscapeText("{"));
if (Values.Count > 0)
{
int NamePadding = Values.Max(x => x.Name.Length) + 4;
foreach (APIEnumValue Value in Values)
{
string ValueLine = UdnWriter.TabSpaces + Value.Name;
if (Value.Initializer != null)
{
for (int Idx = 0; Idx < NamePadding - Value.Name.Length; Idx++) ValueLine += UdnWriter.Space;
ValueLine += Value.Initializer;
}
Lines.Add(ValueLine + ",");
}
}
Lines.Add(Utility.EscapeText("}"));
WriteNestedSimpleCode(Writer, Lines);
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:24,代码来源:APIEnum.cs
示例12: WriteSyntax
public void WriteSyntax(UdnWriter Writer)
{
List<string> Lines = new List<string>();
Lines.Add(String.Format("{0} {1}", Entity.Node.Attributes["kind"].Value, Entity.Name));
Lines.Add("(");
using (XmlNodeList MemberNodeList = Entity.Node.SelectNodes("sectiondef/memberdef"))
{
foreach (XmlNode MemberNode in MemberNodeList)
{
if (MemberNode.Attributes["kind"].Value == "variable")
{
Lines.Add(UdnWriter.TabSpaces + String.Format("{0} {1};", ConvertToMarkdown(MemberNode.SelectSingleNode("type")), MemberNode.SelectSingleNode("name").InnerText));
}
else if(MemberNode.Attributes["kind"].Value == "function")
{
Lines.Add(UdnWriter.TabSpaces);
Lines.Add(UdnWriter.TabSpaces + "// " + ConvertToMarkdown(MemberNode.SelectSingleNode("briefdescription")).Replace('\r', ' ').Replace('\n', ' ').Trim());
Lines.Add(UdnWriter.TabSpaces + ConvertFunctionNodeToMarkdown(MemberNode));
}
}
}
Lines.Add(")");
WriteNestedSimpleCode(Writer, Lines);
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:24,代码来源:APIEventParameters.cs
示例13: WriteRelatedClasses
private static void WriteRelatedClasses(UdnWriter Writer, string Indent, List<KeyValuePair<XmlNode, APIRecord>> Records)
{
foreach (KeyValuePair<XmlNode, APIRecord> Record in Records)
{
if (Record.Value == null)
{
Writer.WriteLine("{0} {1} ", Indent, Record.Key.InnerText);
}
else
{
Writer.WriteLine("{0} [{1}]({2}) ", Indent, Record.Key.InnerText, Record.Value.LinkPath);
}
}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:14,代码来源:APIRecord.cs
示例14: WriteSyntax
private void WriteSyntax(UdnWriter Writer)
{
List<string> Lines = new List<string>();
if(MetadataDirective != null)
{
Lines.AddRange(MetadataDirective.ToMarkdown());
}
if (!Utility.IsNullOrWhitespace(TemplateSignature))
{
Lines.Add(TemplateSignature);
}
string Keywords = "";
if (IsVirtual)
{
Keywords += "virtual ";
}
if (IsStatic)
{
Keywords += "static ";
}
if (Parameters.Count > 0)
{
Lines.Add(Keywords + ReturnType + " " + Utility.EscapeText(Name));
Lines.Add(Utility.EscapeText("("));
for (int Idx = 0; Idx < Parameters.Count; Idx++)
{
string Separator = (Idx + 1 == Parameters.Count) ? "" : ",";
Lines.Add(UdnWriter.TabSpaces + Parameters[Idx].Definition + Separator);
}
Lines.Add(Utility.EscapeText(")"));
}
else
{
Lines.Add(Keywords + ReturnType + " " + Utility.EscapeText(Name + "()"));
}
WriteNestedSimpleCode(Writer, Lines);
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:39,代码来源:APIFunction.cs
示例15: WriteIcons
private void WriteIcons(UdnWriter Writer)
{
Writer.WriteIcon(Icons.Function[(int)Protection]);
if (IsStatic)
{
Writer.WriteIcon(Icons.StaticFunction);
}
if (IsVirtual)
{
Writer.WriteIcon(Icons.VirtualFunction);
}
if (MetadataDirective != null)
{
Writer.WriteIcon(Icons.ReflectedFunction);
MetadataDirective.WriteIcons(Writer);
}
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:17,代码来源:APIFunction.cs
示例16: WritePage
public override void WritePage(UdnManifest Manifest, string OutputPath)
{
using (UdnWriter Writer = new UdnWriter(OutputPath))
{
Writer.WritePageHeader(FullName, PageCrumbs, BriefDescription);
// Write the warnings
if (Warnings.Count > 0)
{
Writer.EnterTag("[REGION:warning]");
Writer.WriteLine("**Warnings**");
foreach (string Warning in Warnings)
{
Writer.WriteLine("* " + Warning);
}
Writer.LeaveTag("[/REGION]");
}
// Write the virtual hierarchy
if (HierarchyNode != null)
{
Writer.EnterSection("overrides", "Override Hierarchy");
Writer.EnterTag("[REGION:hierarchy]");
APIHierarchy.WriteHierarchy(Writer, HierarchyNode, "hrch");
Writer.LeaveTag("[/REGION]");
Writer.LeaveSection();
}
// Write the syntax
Writer.EnterSection("syntax", "Syntax");
WriteSyntax(Writer);
Writer.LeaveSection();
// Write the description
if (!Utility.IsNullOrWhitespace(FullDescription))
{
Writer.EnterSection("description", "Remarks");
Writer.WriteLine(FullDescription);
Writer.LeaveSection();
}
// Enter the body
Writer.EnterRegion("syntax");
// Write the return type
if(!Utility.IsNullOrWhitespace(ReturnDescription))
{
Writer.EnterSection("returns", "Returns");
Writer.WriteLine(ReturnDescription);
Writer.LeaveSection();
}
// Write the parameters
if (ParameterSummaries.Count > 0)
{
Writer.WriteListSection("params", "Parameters", "Parameter", "Description", ParameterSummaries.Select(x => x.GetListItem()));
}
// Leave the body
Writer.LeaveRegion();
// Write the marshalling struct
if (EventParameters != null)
{
Writer.EnterSection("marshalling", "Marshalling");
Writer.WriteLine("May be called as an event using [{0}]({1}) as parameter frame.", EventParameters.Name, EventParameters.LinkPath);
Writer.LeaveSection();
}
// Write the template specializations
if(TemplateSpecializations.Count > 0)
{
Writer.EnterSection("specializations", "Specializations");
foreach (APIFunction Specialization in TemplateSpecializations)
{
Writer.WriteLine("[{0}]({1}) ", Specialization.Name, Specialization.LinkPath);
}
Writer.LeaveSection();
}
//Write code snippets
WriteSnippetSection(Writer, SnippetText);
// Write the @see directives
WriteSeeAlsoSection(Writer, SeeAlso);
// Write the reference info
WriteReferencesSection(Writer, Entity);
}
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:90,代码来源:APIFunction.cs
示例17: WriteListItem
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();
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:61,代码来源:APIFunction.cs
示例18: WriteList
public static void WriteList(UdnWriter Writer, IEnumerable<APIVariable> Variables)
{
Writer.WriteObject("VariableListHead");
foreach (APIVariable Variable in Variables)
{
Variable.WriteListItem(Writer);
}
Writer.WriteObject("VariableListTail");
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:9,代码来源:APIVariable.cs
示例19: WritePage
public override void WritePage(UdnManifest Manifest, string OutputPath)
{
using (UdnWriter Writer = new UdnWriter(OutputPath))
{
Writer.WritePageHeader(Name, PageCrumbs, BriefDescription);
// Write the warnings
if (Warnings.Count > 0)
{
Writer.EnterTag("[REGION:warning]");
Writer.WriteLine("**Warnings**");
foreach (string Warning in Warnings)
{
Writer.WriteLine("* " + Warning);
}
Writer.LeaveTag("[/REGION]");
}
// Write the syntax
Writer.EnterSection("syntax", "Syntax");
WriteDefinition(Writer);
Writer.LeaveSection();
// Write the description
if (!Utility.IsNullOrWhitespace(FullDescription))
{
Writer.EnterSection("description", "Remarks");
Writer.WriteLine(FullDescription);
Writer.LeaveSection();
}
//Write code snippets
WriteSnippetSection(Writer, SnippetText);
}
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:35,代码来源:APIVariable.cs
示例20: WritePage
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();
}
}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:93,代码来源:APIAction.cs
注:本文中的APIDocTool.UdnWriter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论