Esempio n. 1
0
        public override void WritePage(UdnManifest Manifest, string OutputPath)
        {
            using (UdnWriter Writer = new UdnWriter(OutputPath))
            {
                Writer.WritePageHeader(AnnotateAnonymousNames(Name), PageCrumbs, BriefDescription);

                // Write the syntax
                Writer.EnterSection("syntax", "Syntax");
                WriteDefinition(Writer);
                Writer.LeaveSection();

                // Write the enum values
                Writer.WriteListSection("values", "Values", "Name", "Description", Values.Select(x => x.GetListItem()));

                // Write the description
                if (!Utility.IsNullOrWhitespace(FullDescription))
                {
                    Writer.EnterSection("description", "Remarks");
                    Writer.WriteLine(FullDescription);
                    Writer.LeaveSection();
                }

                // Write the references
                WriteReferencesSection(Writer, Entity);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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();
                }
            }
        }
Esempio n. 4
0
        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]");
            }
        }
Esempio n. 5
0
        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();
                }
            }
        }
Esempio n. 6
0
        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();
            }
        }
Esempio n. 7
0
        private void WriteSourceSection(UdnWriter Writer)
        {
            if (Entity.BodyFile != null)
            {
                DoxygenSourceFile SourceFile = Entity.Module.FindSourceFile(Entity.BodyFile);
                if (SourceFile != null)
                {
                    int BodyStart = Math.Min(Math.Max(Entity.BodyStart - 1, 0), SourceFile.Lines.Count - 1);
                    int BodyEnd   = Math.Min(Math.Max(Entity.BodyEnd, BodyStart), SourceFile.Lines.Count);
                    if (BodyEnd > BodyStart)
                    {
                        Writer.EnterSection("source", "Source");
                        Writer.EnterRegion("simplecode");

                        List <string> Lines     = new List <string>();
                        int           MinPrefix = int.MaxValue;

                        for (int LineIdx = BodyStart; LineIdx < BodyEnd; LineIdx++)
                        {
                            XmlNode Node         = SourceFile.Lines[LineIdx];
                            string  MarkdownLine = (Node == null)? "" : Markdown.ParseXmlCodeLine(Node, ResolveDoxygenLink);

                            int Prefix = 0;
                            while (Prefix < MarkdownLine.Length && MarkdownLine[Prefix] == ' ')
                            {
                                Prefix++;
                            }

                            if (Prefix < MarkdownLine.Length && Prefix < MinPrefix)
                            {
                                MinPrefix = Prefix;
                            }

                            Lines.Add(MarkdownLine);
                        }

                        for (int Idx = 0; Idx < Lines.Count; Idx++)
                        {
                            int TextIdx = Math.Min(MinPrefix, Lines[Idx].Length);
                            if (TextIdx == Lines[Idx].Length)
                            {
                                Writer.Write("&nbsp;");
                            }
                            while (TextIdx < Lines[Idx].Length && Lines[Idx][TextIdx] == ' ')
                            {
                                Writer.Write("&nbsp;");
                                TextIdx++;
                            }
                            Writer.WriteLine(Lines[Idx].Substring(TextIdx) + "  ");
                        }

                        Writer.LeaveRegion();
                        Writer.LeaveSection();
                    }
                }
            }
        }
Esempio n. 8
0
 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();
     }
 }
Esempio n. 9
0
 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();
     }
 }
Esempio n. 10
0
 public static bool WriteListSection(UdnWriter Writer, string SectionId, string SectionTitle, IEnumerable <APIFunction> Functions, bool bWithType)
 {
     APIFunction[] FunctionArray = Functions.ToArray();
     if (FunctionArray.Length > 0)
     {
         Writer.EnterSection(SectionId, SectionTitle);
         WriteList(Writer, Functions, bWithType);
         Writer.LeaveSection();
         return(true);
     }
     return(false);
 }
Esempio n. 11
0
 public void WriteSnippetSection(UdnWriter Writer, List <string> SnippetLines)
 {
     if (SnippetLines != null)
     {
         Writer.EnterSection("examplecode", "Example Code");
         foreach (string SnippetLine in SnippetLines)
         {
             Writer.WriteLine("\t" + SnippetLine + "  ");
         }
         Writer.LeaveSection();
     }
 }
Esempio n. 12
0
 public static bool WriteListSection(UdnWriter Writer, string SectionId, string SectionTitle, IEnumerable <APIVariable> Variables)
 {
     APIVariable[] VariableArray = Variables.ToArray();
     if (VariableArray.Length > 0)
     {
         Writer.EnterSection(SectionId, SectionTitle);
         WriteList(Writer, Variables);
         Writer.LeaveSection();
         return(true);
     }
     return(false);
 }
Esempio n. 13
0
 protected static void WriteSeeAlsoSection(UdnWriter Writer, List <string> SeeAlso)
 {
     if (SeeAlso.Count > 0)
     {
         Writer.EnterSection("seealso", "See Also");
         foreach (string SeeAlsoLine in SeeAlso)
         {
             Writer.WriteLine(SeeAlsoLine);
             Writer.WriteLine();
         }
         Writer.LeaveSection();
     }
 }
Esempio n. 14
0
		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);
			}
		}
Esempio n. 15
0
        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);
            }
        }
Esempio n. 16
0
        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);
            }
        }
Esempio n. 17
0
        public void WriteReferencesSection(UdnWriter Writer, DoxygenEntity Entity)
        {
            List <UdnListItem> Items = new List <UdnListItem>();

            // Get the module
            for (APIPage Page = this; Page != null; Page = Page.Parent)
            {
                APIModule Module = Page as APIModule;
                if (Module != null)
                {
                    Items.Add(new UdnListItem("Module", String.Format("[{0}]({1})", Module.Name, Module.LinkPath), null));
                    break;
                }
            }

            // Get the header file
            if (Entity.File != null)
            {
                string NormalizedFileName = GetNormalizedFileName(Entity.File);
                if (NormalizedFileName != null)
                {
                    Items.Add(new UdnListItem("Header", Utility.EscapeText(NormalizedFileName), null));
                }
            }

            // Get the source file
            if (Entity.BodyFile != null && Entity.BodyFile != Entity.File)
            {
                string NormalizedFileName = GetNormalizedFileName(Entity.BodyFile);
                if (NormalizedFileName != null)
                {
                    Items.Add(new UdnListItem("Source", Utility.EscapeText(NormalizedFileName), null));
                }
            }

            // Write the section
            if (Items.Count > 0)
            {
                Writer.EnterSection("references", "References");
                Writer.WriteList(Items);
                Writer.LeaveSection();
            }
        }
Esempio n. 18
0
        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(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]");
            }
        }
Esempio n. 20
0
        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("<", "&lt;").Replace(">", "&gt;"));
                    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);
            }
        }
Esempio n. 21
0
        public void WriteReferencesSection(UdnWriter Writer, DoxygenEntity Entity)
        {
            List<UdnListItem> Items = new List<UdnListItem>();

            // Get the module
            for (APIPage Page = this; Page != null; Page = Page.Parent)
            {
                APIModule Module = Page as APIModule;
                if(Module != null)
                {
                    Items.Add(new UdnListItem("Module", String.Format("[{0}]({1})", Module.Name, Module.LinkPath), null));
                    break;
                }
            }

            // Get the header file
            if (Entity.File != null)
            {
                string NormalizedFileName = GetNormalizedFileName(Entity.File);
                if (NormalizedFileName != null)
                {
                    Items.Add(new UdnListItem("Header", Utility.EscapeText(NormalizedFileName), null));
                }
            }

            // Get the source file
            if(Entity.BodyFile != null && Entity.BodyFile != Entity.File)
            {
                string NormalizedFileName = GetNormalizedFileName(Entity.BodyFile);
                if (NormalizedFileName != null)
                {
                    Items.Add(new UdnListItem("Source", Utility.EscapeText(NormalizedFileName), null));
                }
            }

            // Write the section
            if(Items.Count > 0)
            {
                Writer.EnterSection("references", "References");
                Writer.WriteList(Items);
                Writer.LeaveSection();
            }
        }
Esempio n. 22
0
        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();
            }
        }
Esempio n. 23
0
        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]");
            }
        }
Esempio n. 24
0
 public static bool WriteListSection(UdnWriter Writer, string SectionId, string SectionTitle, IEnumerable<APIFunction> Functions, bool bWithType)
 {
     APIFunction[] FunctionArray = Functions.ToArray();
     if (FunctionArray.Length > 0)
     {
         Writer.EnterSection(SectionId, SectionTitle);
         WriteList(Writer, Functions, bWithType);
         Writer.LeaveSection();
         return true;
     }
     return false;
 }
Esempio n. 25
0
        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();
                }
            }
        }
Esempio n. 26
0
        private void WriteSourceSection(UdnWriter Writer)
        {
            if(Entity.BodyFile != null)
            {
                DoxygenSourceFile SourceFile = Entity.Module.FindSourceFile(Entity.BodyFile);
                if(SourceFile != null)
                {
                    int BodyStart = Math.Min(Math.Max(Entity.BodyStart - 1, 0), SourceFile.Lines.Count - 1);
                    int BodyEnd = Math.Min(Math.Max(Entity.BodyEnd, BodyStart), SourceFile.Lines.Count);
                    if(BodyEnd > BodyStart)
                    {
                        Writer.EnterSection("source", "Source");
                        Writer.EnterRegion("simplecode");

                        List<string> Lines = new List<string>();
                        int MinPrefix = int.MaxValue;

                        for (int LineIdx = BodyStart; LineIdx < BodyEnd; LineIdx++)
                        {
                            XmlNode Node = SourceFile.Lines[LineIdx];
                            string MarkdownLine = (Node == null)? "" : Markdown.ParseXmlCodeLine(Node, ResolveDoxygenLink);

                            int Prefix = 0;
                            while (Prefix < MarkdownLine.Length && MarkdownLine[Prefix] == ' ') Prefix++;

                            if(Prefix < MarkdownLine.Length && Prefix < MinPrefix)
                            {
                                MinPrefix = Prefix;
                            }

                            Lines.Add(MarkdownLine);
                        }

                        for (int Idx = 0; Idx < Lines.Count; Idx++)
                        {
                            int TextIdx = Math.Min(MinPrefix, Lines[Idx].Length);
                            if(TextIdx == Lines[Idx].Length)
                            {
                                Writer.Write("&nbsp;");
                            }
                            while(TextIdx < Lines[Idx].Length && Lines[Idx][TextIdx] == ' ')
                            {
                                Writer.Write("&nbsp;");
                                TextIdx++;
                            }
                            Writer.WriteLine(Lines[Idx].Substring(TextIdx) + "  ");
                        }

                        Writer.LeaveRegion();
                        Writer.LeaveSection();
                    }
                }
            }
        }
Esempio n. 27
0
		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();
				}
			}
		}
Esempio n. 28
0
		public override void WritePage(UdnManifest Manifest, string OutputPath)
		{
			using (UdnWriter Writer = new UdnWriter(OutputPath))
			{
				Writer.WritePageHeader(AnnotateAnonymousNames(Name), PageCrumbs, BriefDescription);

				// Write the syntax
				Writer.EnterSection("syntax", "Syntax");
				WriteDefinition(Writer);
				Writer.LeaveSection();

				// Write the enum values
				Writer.WriteListSection("values", "Values", "Name", "Description", Values.Select(x => x.GetListItem()));

				// Write the description
				if (!Utility.IsNullOrWhitespace(FullDescription))
				{
					Writer.EnterSection("description", "Remarks");
					Writer.WriteLine(FullDescription);
					Writer.LeaveSection();
				}

				// Write the references
				WriteReferencesSection(Writer, Entity);
			}
        }
Esempio n. 29
0
 public void WriteSnippetSection(UdnWriter Writer, List<string> SnippetLines)
 {
     if (SnippetLines != null)
     {
         Writer.EnterSection("examplecode", "Example Code");
         foreach (string SnippetLine in SnippetLines)
         {
             Writer.WriteLine(SnippetLine + "  ");
         }
         Writer.LeaveSection();
     }
 }
Esempio n. 30
0
        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]");
            }
        }
Esempio n. 31
0
		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("<", "&lt;").Replace(">", "&gt;"));
					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);
			}
        }
Esempio n. 32
0
        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();
                }
            }
        }
Esempio n. 33
0
        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);
            }
        }
Esempio n. 34
0
		public static bool WriteListSection(UdnWriter Writer, string SectionId, string SectionTitle, IEnumerable<APIVariable> Variables)
		{
			APIVariable[] VariableArray = Variables.ToArray();
			if (VariableArray.Length > 0)
			{
				Writer.EnterSection(SectionId, SectionTitle);
				WriteList(Writer, Variables);
				Writer.LeaveSection();
				return true;
			}
			return false;
		}
Esempio n. 35
0
        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();
                }
            }
        }
Esempio n. 36
0
 protected static void WriteSeeAlsoSection(UdnWriter Writer, List<string> SeeAlso)
 {
     if (SeeAlso.Count > 0)
     {
         Writer.EnterSection("seealso", "See Also");
         foreach (string SeeAlsoLine in SeeAlso)
         {
             Writer.WriteLine(SeeAlsoLine);
             Writer.WriteLine();
         }
         Writer.LeaveSection();
     }
 }
Esempio n. 37
0
		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();
				}
			}
		}
Esempio n. 38
0
        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]");
            }
        }
Esempio n. 39
0
		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(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]");
            }
        }
Esempio n. 41
0
        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]");
            }
        }
Esempio n. 42
0
        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);
            }
        }