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]"); } }
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>"); }
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(); } } }
public void WriteNestedSimpleCode(UdnWriter Writer, List <string> Lines) { Writer.EnterTag("[REGION:simplecode_api]"); string Prefix = ""; // Write the namespace introducers int LastScope = 0; for (int NextScope = Name.IndexOf("::"); NextScope != -1; NextScope = Name.IndexOf("::", NextScope + 2)) { string Namespace = Name.Substring(LastScope, NextScope - LastScope); Writer.WriteLine(Prefix + "namespace " + Namespace + " "); Writer.WriteLine(Prefix + Utility.EscapeText("{") + " "); Prefix += UdnWriter.TabSpaces; LastScope = NextScope + 2; } // Write the body foreach (string Line in Lines) { Writer.WriteLine(Prefix + Line.Replace('\r', ' ').Replace('\n', ' ').Trim() + " "); } // Write the closing braces while (Prefix.Length > 0) { Prefix = Prefix.Substring(0, Prefix.Length - UdnWriter.TabSpaces.Length); Writer.WriteLine(Prefix + Utility.EscapeText("}") + " "); } Writer.LeaveTag("[/REGION]"); }
public void WriteExpandable(UdnWriter Writer, string UniqueId) { // Top level modules if (Modules.Count > 0) { Writer.WriteList(Modules.OrderBy(x => x.Name).Select(x => x.GetListItem())); } // CSS region for indenting // Writer.EnterRegion("module-sections-list"); // Expandable section for each subcategory int UniqueIdSuffix = 1; foreach (APIModuleCategory Category in Categories.OrderBy(x => x.Name)) { if (!Category.IsEmpty) { string NewUniqueId = String.Format("{0}_{1}", UniqueId, UniqueIdSuffix); Writer.EnterTag(Category.Expanded? "[OBJECT:ModuleSectionExpanded]" : "[OBJECT:ModuleSection]"); Writer.WriteLine("[PARAMLITERAL:id]"); Writer.WriteEscapedLine(NewUniqueId); Writer.WriteLine("[/PARAMLITERAL]"); Writer.WriteLine("[PARAM:heading]"); Writer.WriteEscapedLine(Category.Name); Writer.WriteLine("[/PARAM]"); Writer.EnterTag("[PARAM:content]"); Category.WriteExpandable(Writer, NewUniqueId); Writer.LeaveTag("[/PARAM]"); Writer.LeaveTag("[/OBJECT]"); UniqueIdSuffix++; } } // End of CSS region // Writer.LeaveRegion(); }
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]"); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { // Write the page header Writer.WritePageHeader(Name, PageCrumbs, Description); Writer.WriteLine(); Writer.EnterTag("[REGION:hierarchy]"); WriteHierarchy(Writer, RootNode, "hrch"); Writer.LeaveTag("[/REGION]"); } }
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]"); } }
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); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, BriefDescription); Writer.EnterTag("[OBJECT:Variable]"); // Write the brief description Writer.EnterTag("[PARAM:briefdesc]"); if (!Utility.IsNullOrWhitespace(BriefDescription) && BriefDescription != FullDescription) { Writer.WriteLine(BriefDescription); } Writer.LeaveTag("[/PARAM]"); // Write the warnings Writer.EnterTag("[PARAM:warnings]"); if (Warnings.Count > 0) { Writer.EnterTag("[REGION:warning]"); Writer.WriteLine("**Warnings**"); foreach (string Warning in Warnings) { Writer.WriteLine("* " + Warning); } Writer.LeaveTag("[/REGION]"); } Writer.LeaveTag("[/PARAM]"); // Write the syntax Writer.EnterTag("[PARAM:syntax]"); Writer.EnterSection("syntax", "Syntax"); Writer.EnterTag("[REGION:simplecode_api]"); if (MetadataDirective != null) Writer.WriteLine(MetadataDirective.ToMarkdown() + " "); if (IsStatic) Writer.Write("static "); if (IsMutable) Writer.Write("mutable "); Writer.Write(Type + " " + Name); if (Bitfield != "") Writer.Write(": " + Bitfield); Writer.WriteLine(" "); Writer.LeaveTag("[/REGION]"); Writer.LeaveSection(); Writer.LeaveTag("[/PARAM]"); // Write the metadata Writer.EnterTag("[PARAM:meta]"); if (MetadataDirective != null) { MetadataDirective.WriteListSection(Writer, "metadata", "Metadata", MetadataLookup.PropertyTags); } 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]"); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, ""); Writer.EnterTag("[OBJECT:Class]"); // Write the brief description Writer.WriteLine("[PARAM:briefdesc]"); Writer.WriteLine("Parameter struct for [{0}]({1})", AttachedTo.FullName, AttachedTo.LinkPath); Writer.WriteLine("[/PARAM]"); // Write the hierarchy Writer.EnterTag("[PARAM:hierarchy]"); Writer.LeaveTag("[/PARAM]"); // Write the record definition Writer.EnterTag("[PARAM:syntax]"); Writer.EnterSection("syntax", "Syntax"); WriteSyntax(Writer); Writer.LeaveSection(); Writer.LeaveTag("[/PARAM]"); // Write the metadata section Writer.WriteLine("[PARAM:meta]"); Writer.WriteLine("[/PARAM]"); // Write all the specializations Writer.EnterTag("[PARAM:specializations]"); Writer.LeaveTag("[/PARAM]"); // Write all the typedefs Writer.EnterTag("[PARAM:typedefs]"); Writer.LeaveTag("[/PARAM]"); // Write all the constructors Writer.EnterTag("[PARAM:constructors]"); Writer.LeaveTag("[/PARAM]"); // Write all the destructors Writer.EnterTag("[PARAM:destructors]"); Writer.LeaveTag("[/PARAM]"); // Write all the enums Writer.EnterTag("[PARAM:enums]"); Writer.LeaveTag("[/PARAM]"); // Write all the inner structures Writer.EnterTag("[PARAM:classes]"); Writer.LeaveTag("[/PARAM]"); // Write all the constants Writer.EnterTag("[PARAM:constants]"); Writer.LeaveTag("[/PARAM]"); // Write all the variables Writer.EnterTag("[PARAM:variables]"); Writer.LeaveTag("[/PARAM]"); // Write the functions Writer.EnterTag("[PARAM:methods]"); Writer.LeaveTag("[/PARAM]"); // Write the operator list Writer.EnterTag("[PARAM:operators]"); Writer.LeaveTag("[/PARAM]"); // Write class description Writer.EnterTag("[PARAM:description]"); Writer.LeaveTag("[/PARAM]"); // Write the declaration file Writer.EnterTag("[PARAM:declaration]"); Writer.LeaveTag("[/PARAM]"); Writer.LeaveTag("[/OBJECT]"); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, ""); List<APIMember> FilteredMembers = Members; // Get the name of the withheld section APIModule Module = FindParent<APIModule>(); if (Module != null) { string UnlistedEntries = Program.Settings.FindValue("Module." + Module.Name + ".Unlisted"); if (UnlistedEntries != null) { HashSet<APIPage> UnlistedPages = new HashSet<APIPage>(UnlistedEntries.Split('\n').Select(x => Manifest.Find(x.Trim()))); FilteredMembers = new List<APIMember>(FilteredMembers.Where(x => !UnlistedPages.Contains(x))); } } // Find all the records, sorted by name List<APIRecord> AllRecords = new List<APIRecord>(FilteredMembers.OfType<APIRecord>().Where(x => !x.bIsTemplateSpecialization).OrderBy(x => x.Name)); // Find all the functions, sorted by name List<APIFunction> AllFunctions = new List<APIFunction>(); AllFunctions.AddRange(FilteredMembers.OfType<APIFunction>().Where(x => !x.bIsTemplateSpecialization)); AllFunctions.AddRange(FilteredMembers.OfType<APIFunctionGroup>().SelectMany(x => x.Children.OfType<APIFunction>()).Where(x => !x.bIsTemplateSpecialization)); AllFunctions.Sort((x, y) => (x.Name.CompareTo(y.Name))); // Enter the module template Writer.EnterTag("[OBJECT:Filter]"); // Write the class list Writer.EnterTag("[PARAM:filters]"); APIFilter.WriteListSection(Writer, "filters", "Filters", Filters.OrderBy(x => x.Name)); Writer.LeaveTag("[/PARAM]"); // Write the class list Writer.EnterTag("[PARAM:classes]"); Writer.WriteListSection("classes", "Classes", "Name", "Description", AllRecords.Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write all the constants Writer.EnterTag("[PARAM:constants]"); Writer.WriteListSection("constants", "Constants", "Name", "Description", FilteredMembers.OfType<APIConstant>().Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write the typedef list Writer.EnterTag("[PARAM:typedefs]"); Writer.WriteListSection("typedefs", "Typedefs", "Name", "Description", FilteredMembers.OfType<APITypeDef>().Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write the enum list Writer.EnterTag("[PARAM:enums]"); Writer.WriteListSection("enums", "Enums", "Name", "Description", FilteredMembers.OfType<APIEnum>().OrderBy(x => x.Name).Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write the function list Writer.EnterTag("[PARAM:functions]"); APIFunction.WriteListSection(Writer, "functions", "Functions", AllFunctions, true); Writer.LeaveTag("[/PARAM]"); // Write the variable list Writer.EnterTag("[PARAM:variables]"); APIVariable.WriteListSection(Writer, "variables", "Variables", FilteredMembers.OfType<APIVariable>()); Writer.LeaveTag("[/PARAM]"); // Close the module template Writer.LeaveTag("[/OBJECT]"); } }
public void WriteExpandable(UdnWriter Writer, string UniqueId) { // Top level modules if(Modules.Count > 0) { Writer.WriteList(Modules.OrderBy(x => x.Name).Select(x => x.GetListItem())); } // CSS region for indenting // Writer.EnterRegion("module-sections-list"); // Expandable section for each subcategory int UniqueIdSuffix = 1; foreach (APIModuleCategory Category in Categories.OrderBy(x => x.Name)) { if(!Category.IsEmpty) { string NewUniqueId = String.Format("{0}_{1}", UniqueId, UniqueIdSuffix); Writer.EnterTag(Category.Expanded? "[OBJECT:ModuleSectionExpanded]" : "[OBJECT:ModuleSection]"); Writer.WriteLine("[PARAMLITERAL:id]"); Writer.WriteEscapedLine(NewUniqueId); Writer.WriteLine("[/PARAMLITERAL]"); Writer.WriteLine("[PARAM:heading]"); Writer.WriteEscapedLine(Category.Name); Writer.WriteLine("[/PARAM]"); Writer.EnterTag("[PARAM:content]"); Category.WriteExpandable(Writer, NewUniqueId); Writer.LeaveTag("[/PARAM]"); Writer.LeaveTag("[/OBJECT]"); UniqueIdSuffix++; } } // End of CSS region // Writer.LeaveRegion(); }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, BriefDescription); // Write the hierarchy if (HierarchyNode != null) { Writer.EnterSection("hierarchy", "Inheritance Hierarchy"); Writer.EnterTag("[REGION:hierarchy]"); APIHierarchy.WriteHierarchy(Writer, HierarchyNode, "hrch"); Writer.LeaveTag("[/REGION]"); Writer.LeaveSection(); } // Write the record definition if (!Utility.IsNullOrWhitespace(Definition)) { Writer.EnterSection("syntax", "Syntax"); WriteDefinition(Writer); Writer.LeaveSection(); } // Write the class description if (!Utility.IsNullOrWhitespace(FullDescription)) { Writer.EnterSection("description", "Remarks"); Writer.WriteLine(FullDescription.Replace("<", "<").Replace(">", ">")); Writer.LeaveSection(); } // Write the main body section Writer.EnterRegion("syntax"); // Build a list of all the functions List<APIFunction> AllFunctions = new List<APIFunction>(); AllFunctions.AddRange(Children.OfType<APIFunction>().Where(x => x.Protection != APIProtection.Private && !x.IsDeprecated())); AllFunctions.AddRange(Children.OfType<APIFunctionGroup>().SelectMany(x => x.Children.OfType<APIFunction>()).Where(x => x.Protection != APIProtection.Private && !x.IsDeprecated())); AllFunctions.Sort((x, y) => String.Compare(x.Name, y.Name)); // Write all the specializations if (TemplateSpecializations.Count > 0) { Writer.EnterSection("specializations", "Specializations"); foreach (APIRecord Specialization in TemplateSpecializations) { Writer.WriteLine("[{0}]({1}) ", Specialization.Name, Specialization.LinkPath); } Writer.LeaveSection(); } // Write all the variables APIVariable.WriteListSection(Writer, "variables", "Variables", Children.OfType<APIVariable>().Where(x => x.Protection != APIProtection.Private && !x.IsDeprecated()).OrderBy(x => x.Name)); // Write all the constructors if (!APIFunction.WriteListSection(Writer, "constructor", "Constructors", AllFunctions.Where(x => x.FunctionType == APIFunctionType.Constructor).OrderBy(x => x.LinkPath), false) && HasAnyPrivateFunction(Name)) { Writer.EnterSection("constructor", "Constructors"); Writer.WriteLine("No constructors are accessible with public or protected access."); Writer.LeaveSection(); } // Write all the destructors if (!APIFunction.WriteListSection(Writer, "destructor", "Destructors", AllFunctions.Where(x => x.FunctionType == APIFunctionType.Destructor), false) && HasAnyPrivateFunction("~" + Name)) { Writer.EnterSection("destructors", "Destructors"); Writer.WriteLine("No destructors are accessible with public or protected access."); Writer.LeaveSection(); } // Find a list of base classes List<APIRecord> AllBaseRecords = new List<APIRecord>(); FindAllBaseRecords(AllBaseRecords); // Build a list of functions for each base record List<APIFunction>[] AllBaseFunctions = AllBaseRecords.Select(x => new List<APIFunction>()).ToArray(); foreach(APIFunction Function in AllFunctions.Where(x =>x.FunctionType == APIFunctionType.Normal && !x.IsExecFunction())) { int BaseRecordIdx = AllBaseRecords.IndexOf(Function.GetBaseImplementation().FindParent<APIRecord>()); AllBaseFunctions[Math.Max(0, BaseRecordIdx)].Add(Function); } // Write the functions for (int Idx = 0; Idx < AllBaseFunctions.Length; Idx++) { List<APIFunction> BaseFunctions = AllBaseFunctions[Idx]; if (BaseFunctions.Count > 0) { string Id = String.Format("functions_{0}", Idx); string Label = (Idx == 0) ? "Functions" : String.Format("Overridden from {0}", AllBaseRecords[Idx].Name); APIFunction.WriteListSection(Writer, Id, Label, AllBaseFunctions[Idx], true); } } // Write the operator list APIFunction.WriteListSection(Writer, "operators", "Operators", AllFunctions.Where(x => x.FunctionType == APIFunctionType.UnaryOperator || x.FunctionType == APIFunctionType.BinaryOperator), true); // Write all the inner structures Writer.WriteListSection("classes", "Classes", "Name", "Description", Children.OfType<APIRecord>().Where(x => x.Protection != APIProtection.Private).OrderBy(x => x.Name).Select(x => x.GetListItem())); // Write all the enums Writer.WriteListSection("enums", "Enums", "Name", "Description", Children.OfType<APIEnum>().OrderBy(x => x.Name).Select(x => x.GetListItem())); // Write all the typedefs Writer.WriteListSection("typedefs", "Typedefs", "Name", "Description", Children.OfType<APITypeDef>().Select(x => x.GetListItem())); // Write all the constants Writer.WriteListSection("constants", "Constants", "Name", "Description", Children.OfType<APIConstant>().Select(x => x.GetListItem())); // Leave the body Writer.LeaveRegion(); // Write the marshalling parameters if (DelegateEventParameters != null) { Writer.EnterSection("marshalling", "Marshalling"); Writer.WriteLine("Parameters are marshalled using [{0}]({1})", DelegateEventParameters.FullName, DelegateEventParameters.LinkPath); Writer.LeaveSection(); } // Write the @see directives WriteSeeAlsoSection(Writer, SeeAlso); // Write the references WriteReferencesSection(Writer, Entity); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, BriefDescription); // Write the hierarchy if (HierarchyNode != null) { Writer.EnterSection("hierarchy", "Inheritance Hierarchy"); Writer.EnterTag("[REGION:hierarchy]"); APIHierarchy.WriteHierarchy(Writer, HierarchyNode, "hrch"); Writer.LeaveTag("[/REGION]"); Writer.LeaveSection(); } // Write the record definition if (!Utility.IsNullOrWhitespace(Definition)) { Writer.EnterSection("syntax", "Syntax"); WriteDefinition(Writer); Writer.LeaveSection(); } // Write the class description if (!Utility.IsNullOrWhitespace(FullDescription)) { Writer.EnterSection("description", "Remarks"); Writer.WriteLine(FullDescription.Replace("<", "<").Replace(">", ">")); Writer.LeaveSection(); } // Write the main body section Writer.EnterRegion("syntax"); // Build a list of all the functions List <APIFunction> AllFunctions = new List <APIFunction>(); AllFunctions.AddRange(Children.OfType <APIFunction>().Where(x => x.Protection != APIProtection.Private && !x.IsDeprecated())); AllFunctions.AddRange(Children.OfType <APIFunctionGroup>().SelectMany(x => x.Children.OfType <APIFunction>()).Where(x => x.Protection != APIProtection.Private && !x.IsDeprecated())); AllFunctions.Sort((x, y) => String.Compare(x.Name, y.Name)); // Write all the specializations if (TemplateSpecializations.Count > 0) { Writer.EnterSection("specializations", "Specializations"); foreach (APIRecord Specialization in TemplateSpecializations) { Writer.WriteLine("[{0}]({1}) ", Specialization.Name, Specialization.LinkPath); } Writer.LeaveSection(); } // Write all the variables APIVariable.WriteListSection(Writer, "variables", "Variables", Children.OfType <APIVariable>().Where(x => x.Protection != APIProtection.Private && !x.IsDeprecated()).OrderBy(x => x.Name)); // Write all the constructors if (!APIFunction.WriteListSection(Writer, "constructor", "Constructors", AllFunctions.Where(x => x.FunctionType == APIFunctionType.Constructor).OrderBy(x => x.LinkPath), false) && HasAnyPrivateFunction(Name)) { Writer.EnterSection("constructor", "Constructors"); Writer.WriteLine("No constructors are accessible with public or protected access."); Writer.LeaveSection(); } // Write all the destructors if (!APIFunction.WriteListSection(Writer, "destructor", "Destructors", AllFunctions.Where(x => x.FunctionType == APIFunctionType.Destructor), false) && HasAnyPrivateFunction("~" + Name)) { Writer.EnterSection("destructors", "Destructors"); Writer.WriteLine("No destructors are accessible with public or protected access."); Writer.LeaveSection(); } // Find a list of base classes List <APIRecord> AllBaseRecords = new List <APIRecord>(); FindAllBaseRecords(AllBaseRecords); // Build a list of functions for each base record List <APIFunction>[] AllBaseFunctions = AllBaseRecords.Select(x => new List <APIFunction>()).ToArray(); foreach (APIFunction Function in AllFunctions.Where(x => x.FunctionType == APIFunctionType.Normal && !x.IsExecFunction())) { int BaseRecordIdx = AllBaseRecords.IndexOf(Function.GetBaseImplementation().FindParent <APIRecord>()); AllBaseFunctions[Math.Max(0, BaseRecordIdx)].Add(Function); } // Write the functions for (int Idx = 0; Idx < AllBaseFunctions.Length; Idx++) { List <APIFunction> BaseFunctions = AllBaseFunctions[Idx]; if (BaseFunctions.Count > 0) { string Id = String.Format("functions_{0}", Idx); string Label = (Idx == 0) ? "Functions" : String.Format("Overridden from {0}", AllBaseRecords[Idx].Name); APIFunction.WriteListSection(Writer, Id, Label, AllBaseFunctions[Idx], true); } } // Write the operator list APIFunction.WriteListSection(Writer, "operators", "Operators", AllFunctions.Where(x => x.FunctionType == APIFunctionType.UnaryOperator || x.FunctionType == APIFunctionType.BinaryOperator), true); // Write all the inner structures Writer.WriteListSection("classes", "Classes", "Name", "Description", Children.OfType <APIRecord>().Where(x => x.Protection != APIProtection.Private).OrderBy(x => x.Name).Select(x => x.GetListItem())); // Write all the enums Writer.WriteListSection("enums", "Enums", "Name", "Description", Children.OfType <APIEnum>().OrderBy(x => x.Name).Select(x => x.GetListItem())); // Write all the typedefs Writer.WriteListSection("typedefs", "Typedefs", "Name", "Description", Children.OfType <APITypeDef>().Select(x => x.GetListItem())); // Write all the constants Writer.WriteListSection("constants", "Constants", "Name", "Description", Children.OfType <APIConstant>().Select(x => x.GetListItem())); // Leave the body Writer.LeaveRegion(); // Write the marshalling parameters if (DelegateEventParameters != null) { Writer.EnterSection("marshalling", "Marshalling"); Writer.WriteLine("Parameters are marshalled using [{0}]({1})", DelegateEventParameters.FullName, DelegateEventParameters.LinkPath); Writer.LeaveSection(); } // Write the @see directives WriteSeeAlsoSection(Writer, SeeAlso); // Write the references WriteReferencesSection(Writer, Entity); } }
public void WriteIndexLinks(UdnWriter Writer, Dictionary<string, List<APIPage>> Manifest, string Text) { Writer.EnterTag("[REGION:memberindexlinks]"); Writer.WriteLine(MakeLinkString(Manifest, Text)); Writer.LeaveTag("[/REGION]"); }
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>"); }
public void WriteNestedSimpleCode(UdnWriter Writer, List<string> Lines) { Writer.EnterTag("[REGION:simplecode_api]"); string Prefix = ""; // Write the namespace introducers int LastScope = 0; for(int NextScope = Name.IndexOf("::"); NextScope != -1; NextScope = Name.IndexOf("::", NextScope + 2)) { string Namespace = Name.Substring(LastScope, NextScope - LastScope); Writer.WriteLine(Prefix + "namespace " + Namespace + " "); Writer.WriteLine(Prefix + Utility.EscapeText("{") + " "); Prefix += UdnWriter.TabSpaces; LastScope = NextScope + 2; } // Write the body foreach (string Line in Lines) { Writer.WriteLine(Prefix + Line.Replace('\r', ' ').Replace('\n', ' ').Trim() + " "); } // Write the closing braces while (Prefix.Length > 0) { Prefix = Prefix.Substring(0, Prefix.Length - UdnWriter.TabSpaces.Length); Writer.WriteLine(Prefix + Utility.EscapeText("}") + " "); } Writer.LeaveTag("[/REGION]"); }
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); } }
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); } }
private void WriteSource(UdnWriter Writer) { Writer.EnterTag("[REGION:simplecode_api]"); foreach (string SourceLine in SourceLines) { string EscapedLine = Utility.EscapeText(SourceLine); EscapedLine = EscapedLine.Replace(" ", UdnWriter.Space); Writer.WriteLine(EscapedLine + " "); } Writer.LeaveTag("[/REGION]"); }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, BriefDescription); Writer.EnterTag("[OBJECT:Class]"); // Write the brief description Writer.WriteLine("[PARAM:briefdesc]"); if (!Utility.IsNullOrWhitespace(BriefDescription)) { Writer.WriteLine(BriefDescription); } Writer.WriteLine("[/PARAM]"); // Write the hierarchy Writer.EnterTag("[PARAM:hierarchy]"); if (HierarchyNode != null) { Writer.EnterSection("hierarchy", "Inheritance Hierarchy"); Writer.EnterTag("[REGION:hierarchy]"); APIHierarchy.WriteHierarchy(Writer, HierarchyNode, "hrch"); Writer.LeaveTag("[/REGION]"); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write the record definition Writer.EnterTag("[PARAM:syntax]"); if (!Utility.IsNullOrWhitespace(Definition)) { Writer.EnterSection("syntax", "Syntax"); WriteDefinition(Writer); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write the metadata section Writer.WriteLine("[PARAM:meta]"); if (MetadataDirective != null) { MetadataDirective.WriteListSection(Writer, "metadata", "Metadata", MetadataLookup.ClassTags); } Writer.WriteLine("[/PARAM]"); // Build a list of all the functions List<APIFunction> AllFunctions = new List<APIFunction>(); AllFunctions.AddRange(Children.OfType<APIFunction>().Where(x => x.Protection != APIProtection.Private)); AllFunctions.AddRange(Children.OfType<APIFunctionGroup>().SelectMany(x => x.Children.OfType<APIFunction>()).Where(x => x.Protection != APIProtection.Private)); AllFunctions.Sort((x, y) => String.Compare(x.Name, y.Name)); // Write all the specializations Writer.EnterTag("[PARAM:specializations]"); if (TemplateSpecializations.Count > 0) { Writer.EnterSection("specializations", "Specializations"); foreach (APIRecord Specialization in TemplateSpecializations) { Writer.WriteLine("[{0}]({1}) ", Specialization.Name, Specialization.LinkPath); } Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write all the typedefs Writer.EnterTag("[PARAM:typedefs]"); Writer.WriteListSection("typedefs", "Typedefs", "Name", "Description", Children.OfType<APITypeDef>().Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write all the constructors Writer.EnterTag("[PARAM:constructors]"); if (!APIFunction.WriteListSection(Writer, "constructor", "Constructors", AllFunctions.Where(x => x.FunctionType == APIFunctionType.Constructor).OrderBy(x => x.LinkPath)) && HasAnyPrivateFunction(Name)) { Writer.EnterSection("constructor", "Constructors"); Writer.WriteLine("No constructors are accessible with public or protected access."); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write all the destructors Writer.EnterTag("[PARAM:destructors]"); if (!APIFunction.WriteListSection(Writer, "destructor", "Destructors", AllFunctions.Where(x => x.FunctionType == APIFunctionType.Destructor)) && HasAnyPrivateFunction("~" + Name)) { Writer.EnterSection("destructors", "Destructors"); Writer.WriteLine("No destructors are accessible with public or protected access."); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write all the enums Writer.EnterTag("[PARAM:enums]"); Writer.WriteListSection("enums", "Enums", "Name", "Description", Children.OfType<APIEnum>().OrderBy(x => x.Name).Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write all the inner structures Writer.EnterTag("[PARAM:classes]"); Writer.WriteListSection("classes", "Classes", "Name", "Description", Children.OfType<APIRecord>().Where(x => x.Protection != APIProtection.Private).OrderBy(x => x.Name).Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write all the constants Writer.EnterTag("[PARAM:constants]"); Writer.WriteListSection("constants", "Constants", "Name", "Description", Children.OfType<APIConstant>().Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write all the variables Writer.EnterTag("[PARAM:variables]"); Writer.WriteListSection("variables", "Variables", "Name", "Description", Children.OfType<APIVariable>().Where(x => x.Protection != APIProtection.Private).OrderBy(x => x.Name).Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write the functions Writer.EnterTag("[PARAM:methods]"); APIFunction.WriteListSection(Writer, "methods", "Methods", AllFunctions.Where(x => x.FunctionType == APIFunctionType.Normal)); Writer.LeaveTag("[/PARAM]"); // Write the operator list Writer.EnterTag("[PARAM:operators]"); APIFunction.WriteListSection(Writer, "operators", "Operators", AllFunctions.Where(x => x.FunctionType == APIFunctionType.UnaryOperator || x.FunctionType == APIFunctionType.BinaryOperator)); Writer.LeaveTag("[/PARAM]"); // Write class description Writer.EnterTag("[PARAM:description]"); if (!Utility.IsNullOrWhitespace(FullDescription) && FullDescription != BriefDescription) { Writer.EnterSection("description", "Remarks"); Writer.WriteLine(FullDescription); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write the marshalling parameters Writer.EnterTag("[PARAM:marshalling]"); if (DelegateEventParameters != null) { Writer.EnterSection("marshalling", "Marshalling"); Writer.WriteLine("Parameters are marshalled using [{0}]({1})", DelegateEventParameters.FullName, DelegateEventParameters.LinkPath); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write the declaration file Writer.EnterTag("[PARAM:declaration]"); if (!Utility.IsNullOrWhitespace(DeclarationFile)) { Writer.EnterSection("declaration", "Declaration"); Writer.WriteEscapedLine(DeclarationFile); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); Writer.LeaveTag("[/OBJECT]"); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(AnnotateAnonymousNames(Name), PageCrumbs, BriefDescription); Writer.EnterTag("[OBJECT:Enum]"); 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 metadata Writer.EnterTag("[PARAM:meta]"); if (MetadataDirective != null) { MetadataDirective.WriteListSection(Writer, "metadata", "Metadata", MetadataLookup.EnumTags); } Writer.LeaveTag("[/PARAM]"); // Write the enum values Writer.EnterTag("[PARAM:values]"); Writer.WriteListSection("values", "Values", "Name", "Description", Values.Select(x => x.GetListItem())); 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]"); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(Name, PageCrumbs, ""); List <APIMember> FilteredMembers = Members; // Get the name of the withheld section APIModule Module = FindParent <APIModule>(); if (Module != null) { string UnlistedEntries = Program.Settings.FindValue("Module." + Module.Name + ".Unlisted"); if (UnlistedEntries != null) { HashSet <APIPage> UnlistedPages = new HashSet <APIPage>(UnlistedEntries.Split('\n').Select(x => Manifest.Find(x.Trim()))); FilteredMembers = new List <APIMember>(FilteredMembers.Where(x => !UnlistedPages.Contains(x))); } } // Find all the records, sorted by name List <APIRecord> AllRecords = new List <APIRecord>(FilteredMembers.OfType <APIRecord>().Where(x => !x.bIsTemplateSpecialization).OrderBy(x => x.Name)); // Find all the functions, sorted by name List <APIFunction> AllFunctions = new List <APIFunction>(); AllFunctions.AddRange(FilteredMembers.OfType <APIFunction>().Where(x => !x.bIsTemplateSpecialization)); AllFunctions.AddRange(FilteredMembers.OfType <APIFunctionGroup>().SelectMany(x => x.Children.OfType <APIFunction>()).Where(x => !x.bIsTemplateSpecialization)); AllFunctions.Sort((x, y) => (x.Name.CompareTo(y.Name))); // Enter the module template Writer.EnterTag("[OBJECT:Filter]"); // Write the class list Writer.EnterTag("[PARAM:filters]"); APIFilter.WriteListSection(Writer, "filters", "Filters", Filters.OrderBy(x => x.Name)); Writer.LeaveTag("[/PARAM]"); // Write the class list Writer.EnterTag("[PARAM:classes]"); Writer.WriteListSection("classes", "Classes", "Name", "Description", AllRecords.Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write all the constants Writer.EnterTag("[PARAM:constants]"); Writer.WriteListSection("constants", "Constants", "Name", "Description", FilteredMembers.OfType <APIConstant>().Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write the typedef list Writer.EnterTag("[PARAM:typedefs]"); Writer.WriteListSection("typedefs", "Typedefs", "Name", "Description", FilteredMembers.OfType <APITypeDef>().Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write the enum list Writer.EnterTag("[PARAM:enums]"); Writer.WriteListSection("enums", "Enums", "Name", "Description", FilteredMembers.OfType <APIEnum>().OrderBy(x => x.Name).Select(x => x.GetListItem())); Writer.LeaveTag("[/PARAM]"); // Write the function list Writer.EnterTag("[PARAM:functions]"); APIFunction.WriteListSection(Writer, "functions", "Functions", AllFunctions, true); Writer.LeaveTag("[/PARAM]"); // Write the variable list Writer.EnterTag("[PARAM:variables]"); APIVariable.WriteListSection(Writer, "variables", "Variables", FilteredMembers.OfType <APIVariable>()); Writer.LeaveTag("[/PARAM]"); // Close the module template Writer.LeaveTag("[/OBJECT]"); } }
public override void WritePage(UdnManifest Manifest, string OutputPath) { using (UdnWriter Writer = new UdnWriter(OutputPath)) { Writer.WritePageHeader(FullName, PageCrumbs, BriefDescription); Writer.EnterTag("[OBJECT:Function]"); // Write the brief description Writer.EnterTag("[PARAM:briefdesc]"); if (!Utility.IsNullOrWhitespace(BriefDescription) && BriefDescription != FullDescription) { Writer.WriteLine(BriefDescription); } Writer.LeaveTag("[/PARAM]"); // Write the warnings Writer.EnterTag("[PARAM:warnings]"); if (Warnings.Count > 0) { Writer.EnterTag("[REGION:warning]"); Writer.WriteLine("**Warnings**"); foreach (string Warning in Warnings) { Writer.WriteLine("* " + Warning); } Writer.LeaveTag("[/REGION]"); } Writer.LeaveTag("[/PARAM]"); // Write the virtual hierarchy Writer.EnterTag("[PARAM:overrides]"); if (HierarchyNode != null) { Writer.EnterSection("overrides", "Override Hierarchy"); Writer.EnterTag("[REGION:hierarchy]"); APIHierarchy.WriteHierarchy(Writer, HierarchyNode, "hrch"); Writer.LeaveTag("[/REGION]"); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write the syntax Writer.EnterTag("[PARAM:syntax]"); Writer.EnterSection("syntax", "Syntax"); WriteSyntax(Writer); Writer.LeaveSection(); Writer.LeaveTag("[/PARAM]"); // Write the return type Writer.EnterTag("[PARAM:returns]"); if(!Utility.IsNullOrWhitespace(ReturnDescription)) { Writer.EnterSection("returns", "Returns"); Writer.WriteLine(ReturnDescription); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write the parameters Writer.EnterTag("[PARAM:params]"); if (ParameterSummaries.Count > 0) { Writer.WriteListSection("params", "Parameters", "Parameter", "Description", ParameterSummaries.Select(x => x.GetListItem())); } Writer.LeaveTag("[/PARAM]"); // Write the metadata Writer.EnterTag("[PARAM:meta]"); if (MetadataDirective != null) { MetadataDirective.WriteListSection(Writer, "metadata", "Metadata", MetadataLookup.FunctionTags); } 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]"); // Write the marshalling struct Writer.EnterTag("[PARAM:marshalling]"); 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(); } Writer.LeaveTag("[/PARAM]"); // Write the template specializations Writer.EnterTag("[PARAM:specializations]"); if(TemplateSpecializations.Count > 0) { Writer.EnterSection("specializations", "Specializations"); foreach (APIFunction Specialization in TemplateSpecializations) { Writer.WriteLine("[{0}]({1}) ", Specialization.Name, Specialization.LinkPath); } Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); // Write the source Writer.EnterTag("[PARAM:source]"); if (SourceLines != null) { Writer.EnterSection("source", "Source"); WriteSource(Writer); Writer.LeaveSection(); } Writer.LeaveTag("[/PARAM]"); Writer.LeaveTag("[/OBJECT]"); } }