Exemplo n.º 1
0
		public override void AddToManifest(UdnManifest Manifest)
		{
			if (FunctionType != APIFunctionType.UnaryOperator && FunctionType != APIFunctionType.BinaryOperator)
			{
				base.AddToManifest(Manifest);
			}
		}
Exemplo n.º 2
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]");
            }
        }
Exemplo n.º 3
0
 public override void AddToManifest(UdnManifest Manifest)
 {
     Manifest.Add(Name, this);
     /*if (Pins != null)
     {
         foreach (APIPage Pin in Pins)
         {
             Pin.AddToManifest(Manifest);
         }
     }*/
 }
        public override void WritePage(UdnManifest Manifest, string OutputPath)
        {
            using (UdnWriter Writer = new UdnWriter(OutputPath))
            {
                Writer.WritePageHeader("Getting started with the Unreal Engine API", PageCrumbs, "Getting started with the Unreal Engine API");

                Writer.WriteHeading(2, "Orientation");

                Writer.WriteLine("Games, programs and the Unreal Editor are all *targets* built by UnrealBuildTool. Each target is compiled from C++ *modules*, each implementing a particular area of functionality. Your game is a target, and your game code is implemented in one or more modules.");
                Writer.WriteLine();
                Writer.WriteLine("Code in each module can use other modules by referencing them in their *build rules*. Build rules for each module are given by C# scripts with the .build.cs extension. *Target rules* are given by C# scripts with the .target.cs extension.");
                Writer.WriteLine();
                Writer.WriteLine(Manifest, "Modules supplied with the Unreal Engine are divided into three categories; the {Runtime|ModuleIndex:Runtime Modules}, functionality for the {Editor|ModuleIndex:Editor Modules}, and {Developer|ModuleIndex:Developer Modules} utilities.");
                Writer.WriteLine();
                Writer.WriteLine(Manifest, "Most gameplay programming just uses runtime modules, and the three most commonly encountered are {Core|Filter:Core}, {CoreUObject|Filter:CoreUObject} and {Engine|Filter:Engine}.");
                Writer.WriteLine();

                Writer.WriteHeading(2, "Core");

                Writer.WriteLine(Manifest, "The **{Core|Filter:Core}** module provides a common framework for Unreal modules to communicate; a standard set of types, a {math library|Filter:Core.Math}, a {container|Filter:Core.Containers} library, and a lot of the hardware abstraction that allows Unreal to run on so many platforms.");
                Writer.WriteLine(Manifest, "Some common topics are listed below; full documentation is available {here|Filter:Core}.");
                Writer.WriteLine();
                List<UdnListItem> CoreItems = new List<UdnListItem>();
                CoreItems.Add(new UdnListItem("Basic types:", Manifest.FormatString("bool &middot; float/double &middot; {int8}/{int16}/{int32}/{int64} &middot; {uint8}/{uint16}/{uint32}/{uint64} &middot; {ANSICHAR} &middot; {TCHAR} &middot; {FString}"), null));
                CoreItems.Add(new UdnListItem("Math:", Manifest.FormatString("{FMath} &middot; {FVector} &middot; {FRotator} &middot; {FTransform} &middot; {FMatrix} &middot; {More...|Filter:Core.Math}"), null));
                CoreItems.Add(new UdnListItem("Containers:", Manifest.FormatString("{TArray} &middot; {TList} &middot; {TMap} &middot; {More...|Filter:Core.Containers}"), null));
                CoreItems.Add(new UdnListItem("Other:", Manifest.FormatString("{FName} &middot; {FArchive} &middot; {FOutputDevice}"), null));
                Writer.WriteList(CoreItems);

                Writer.WriteHeading(2, "CoreUObject");

                Writer.WriteLine(Manifest, "The **{CoreUObject|Filter:CoreUObject}** module defines UObject, the base class for all managed objects in Unreal. Managed objects are key to integrating with the editor, for serialization, network replication, and runtime type information. UObject derived classes are garbage collected.");
                Writer.WriteLine(Manifest, "Some common topics are listed below; full documentation is available {here|Filter:CoreUObject}.");
                Writer.WriteLine();
                List<UdnListItem> CoreUObjectItems = new List<UdnListItem>();
                CoreUObjectItems.Add(new UdnListItem("Classes:", Manifest.FormatString("{UObject} &middot; {UClass} &middot; {UProperty} &middot; {UPackage}"), null));
                CoreUObjectItems.Add(new UdnListItem("Functions:", Manifest.FormatString("{ConstructObject} &middot; {FindObject} &middot; {Cast} &middot; {CastChecked}"), null));
                Writer.WriteList(CoreUObjectItems);

                Writer.WriteHeading(2, "Engine");

                Writer.WriteLine(Manifest, "The **{Engine|Filter:Engine}** module contains functionality you’d associate with a game. The game world, actors, characters, physics and special effects are all defined here.");
                Writer.WriteLine(Manifest, "Some common topics are listed below; full documentation is available {here|Filter:Engine}.");
                Writer.WriteLine();
                List<UdnListItem> EngineItems = new List<UdnListItem>();
                EngineItems.Add(new UdnListItem("Actors:", Manifest.FormatString("{AActor} &middot; {AVolume} &middot; {AGameMode} &middot; {AHUD} &middot; {More...|Hierarchy:AActor}"), null));
                EngineItems.Add(new UdnListItem("Pawns:", Manifest.FormatString("{APawn} &middot; {ACharacter} &middot; {AWheeledVehicle}"), null));
                EngineItems.Add(new UdnListItem("Controllers:", Manifest.FormatString("{AController} &middot; {AAIController} &middot; {APlayerController}"), null));
                EngineItems.Add(new UdnListItem("Components:", Manifest.FormatString("{UActorComponent} &middot; {UBrainComponent} &middot; {UInputComponent} &middot; {USkeletalMeshComponent} &middot; {UParticleSystemComponent} &middot; {More...|Hierarchy:UActorComponent}"), null));
                EngineItems.Add(new UdnListItem("Gameplay:", Manifest.FormatString("{UPlayer} &middot; {ULocalPlayer} &middot; {UWorld} &middot; {ULevel}"), null));
                EngineItems.Add(new UdnListItem("Assets:", Manifest.FormatString("{UTexture} &middot; {UMaterial} &middot; {UStaticMesh} &middot; {USkeletalMesh} &middot; {UParticleSystem}"), null));
                Writer.WriteList(EngineItems);
            }
        }
Exemplo n.º 5
0
		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]");
			}
		}
Exemplo n.º 6
0
 public override void AddToManifest(UdnManifest Manifest)
 {
     Manifest.Add(Name, this);
     foreach (APIPage SubCategory in SubCategories.Values)
     {
         SubCategory.AddToManifest(Manifest);
     }
     foreach (APIPage Action in Actions)
     {
         Action.AddToManifest(Manifest);
     }
 }
Exemplo n.º 7
0
		public override void AddToManifest(UdnManifest Manifest)
		{
			string FilterPath = Name;
			for(APIFilter Filter = Parent as APIFilter; Filter != null; Filter = Filter.Parent as APIFilter)
			{
				FilterPath = Filter.Name + "." + FilterPath;
			}
			Manifest.Add("Filter:" + FilterPath, this);

			foreach(APIFilter Filter in Filters)
			{
				Filter.AddToManifest(Manifest);
			}
			foreach(APIMember Member in Members)
			{
				Member.AddToManifest(Manifest);
			}
		}
Exemplo n.º 8
0
		public override void WritePage(UdnManifest Manifest, string OutputPath)
		{
			using (UdnWriter Writer = new UdnWriter(OutputPath))
			{
				Writer.WritePageHeader(Name, PageCrumbs, Description);

				// Create an array of links for each letter
				string[] CategoryLinks = new string[Categories.Count];
				for (int Idx = 0; Idx < Categories.Count; Idx++)
				{
					if (Categories[Idx].Entries.Count == 0)
					{
						CategoryLinks[Idx] = Categories[Idx].Name;
					}
					else
					{
						CategoryLinks[Idx] = String.Format("[{0}](#idx_{0})", Categories[Idx].Name);
					}
				}

				// Write the link section
				Writer.WriteLine("[REGION:memberindexlinks]");
				Writer.WriteLine(String.Join(" &middot; ", CategoryLinks));
				Writer.WriteLine("[/REGION]");

				// Write each letter
				for(int Idx = 0; Idx < Categories.Count; Idx++)
				{
					if (Categories[Idx].Entries.Count > 0)
					{
						Writer.WriteLine();
						Writer.WriteLine("(#idx_{0})", Categories[Idx].Name);
						Writer.WriteHeading(2, Categories[Idx].Name);
						foreach (Entry Entry in Categories[Idx].Entries)
						{
							Writer.WriteLine("[REGION:memberindexitem]");
							Writer.WriteLine("[{0}]({1})", Entry.Name, Entry.LinkPath);
							Writer.WriteLine("[/REGION]");
						}
					}
				}
			}
		}
Exemplo n.º 9
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);
            }
        }
Exemplo n.º 10
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);
			}
		}
Exemplo n.º 11
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]");
            }
        }
Exemplo n.º 12
0
		public override void AddToManifest(UdnManifest Manifest)
		{
			Manifest.Add("MemberIndex:" + Name, this);
		}
        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);
            }
        }
Exemplo n.º 14
0
 public abstract void WritePage(UdnManifest Manifest, string OutputPath);
Exemplo n.º 15
0
 public override void AddToManifest(UdnManifest Manifest)
 {
     if (FunctionType != APIFunctionType.UnaryOperator && FunctionType != APIFunctionType.BinaryOperator)
     {
         Manifest.Add(FullName, this);
     }
 }
Exemplo n.º 16
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);
			}
        }
Exemplo n.º 17
0
 public abstract void AddToManifest(UdnManifest Manifest);
Exemplo n.º 18
0
 public virtual void AddChildrenToManifest(UdnManifest Manifest)
 {
     foreach (APIMember Child in Children)
     {
         Child.AddToManifest(Manifest);
     }
 }
Exemplo n.º 19
0
 public void Write(UdnManifest Manifest, string Text)
 {
     Write(Manifest.FormatString(Text));
 }
Exemplo n.º 20
0
 public override void AddToManifest(UdnManifest Manifest)
 {
 }
Exemplo n.º 21
0
        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]");
            }
        }
Exemplo n.º 22
0
 public override void AddChildrenToManifest(UdnManifest Manifest)
 {
 }
Exemplo n.º 23
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();
                }
            }
        }
Exemplo n.º 24
0
        static bool BuildUdn(string XmlDir, string UdnDir, string SitemapDir, string MetadataPath, string StatsPath, List<string> Filters = null)
        {
            // Read the metadata
            MetadataLookup.Load(MetadataPath);

            // Read the input module index
            XmlDocument Document = Utility.ReadXmlDocument(Path.Combine(XmlDir, "modules.xml"));

            // Read the list of modules
            List<KeyValuePair<string, string>> InputModules = new List<KeyValuePair<string,string>>();
            using (XmlNodeList NodeList = Document.SelectNodes("modules/module"))
            {
                foreach (XmlNode Node in NodeList)
                {
                    string Name = Node.Attributes["name"].Value;
                    string Source = Node.Attributes["source"].Value;
                    InputModules.Add(new KeyValuePair<string, string>(Name, Source));
                }
            }

            #if TEST_INDEX_PAGE
            // Just create empty modules
            List<DoxygenModule> Modules = new List<DoxygenModule>();
            for (int Idx = 0; Idx < InputModules.Count; Idx++)
            {
                Modules.Add(new DoxygenModule(InputModules[Idx].Key, InputModules[Idx].Value));
            }
            #else
            // Filter the input module list
            if (Filters != null && Filters.Count > 0)
            {
                InputModules = new List<KeyValuePair<string, string>>(InputModules.Where(x => Filters.Exists(y => y.StartsWith(x.Key + "/", StringComparison.InvariantCultureIgnoreCase))));
            }

            // Read all the doxygen modules
            List<DoxygenModule> Modules = new List<DoxygenModule>();
            for(int Idx = 0; Idx < InputModules.Count; Idx++)
            {
                Console.WriteLine("Reading module {0}... ({1}/{2})", InputModules[Idx].Key, Idx + 1, InputModules.Count);
                Modules.Add(DoxygenModule.Read(InputModules[Idx].Key, InputModules[Idx].Value, Path.Combine(XmlDir, InputModules[Idx].Key, "xml")));
            }

            // Now filter all the entities in each module
            if(Filters != null && Filters.Count > 0)
            {
                FilterEntities(Modules, Filters);
            }
            #endif

            // Create the index page, and all the pages below it
            APIIndex Index = new APIIndex(Modules);

            // Build a list of pages to output
            List<APIPage> OutputPages = new List<APIPage>(Index.GatherPages().OrderBy(x => x.LinkPath));

            // Dump the output stats
            if (StatsPath != null)
            {
                Console.WriteLine("Writing stats to " + StatsPath + "...");
                Stats NewStats = new Stats(OutputPages.OfType<APIMember>());
                NewStats.Write(StatsPath);
            }

            // Setup the output directory
            Utility.SafeCreateDirectory(UdnDir);

            // Build the manifest
            Console.WriteLine("Writing manifest...");
            UdnManifest Manifest = new UdnManifest(Index);
            Manifest.PrintConflicts();
            Manifest.Write(Path.Combine(UdnDir, APIFolder + "\\API.manifest"));

            // Write all the pages
            using (Tracker UdnTracker = new Tracker("Writing UDN pages...", OutputPages.Count))
            {
                foreach(int Idx in UdnTracker.Indices)
                {
                    APIPage Page = OutputPages[Idx];

                    // Create the output directory
                    string MemberDirectory = Path.Combine(UdnDir, Page.LinkPath);
                    if (!Directory.Exists(MemberDirectory))
                    {
                        Directory.CreateDirectory(MemberDirectory);
                    }

                    // Write the page
                    Page.WritePage(Manifest, Path.Combine(MemberDirectory, "index.INT.udn"));
                }
            }

            // Write the sitemap contents
            Console.WriteLine("Writing sitemap contents...");
            Index.WriteSitemapContents(Path.Combine(SitemapDir, SitemapContentsFileName));

            // Write the sitemap index
            Console.WriteLine("Writing sitemap index...");
            Index.WriteSitemapIndex(Path.Combine(SitemapDir, SitemapIndexFileName));

            return true;
        }
 public override void AddToManifest(UdnManifest Manifest)
 {
     Manifest.Add(Name, this);
 }
Exemplo n.º 26
0
        public override void AddToManifest(UdnManifest Manifest)
        {
            // Check if this member has a name in the global scope
            if (FullName != null)
            {
                Manifest.Add(FullName, this);
            }

            // Add the children
            AddChildrenToManifest(Manifest);
        }
Exemplo n.º 27
0
 public override void AddToManifest(UdnManifest Manifest)
 {
     base.AddToManifest(Manifest);
     Manifest.Add("Module:" + Name, this);
 }
		public override void AddToManifest(UdnManifest Manifest)
		{
		}
Exemplo n.º 29
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();
				}
			}
		}
Exemplo n.º 30
0
		public override void AddToManifest(UdnManifest Manifest)
		{
			if (!bIsTemplateSpecialization)
			{
				base.AddToManifest(Manifest);

				if (HierarchyPage != null)
				{
					Manifest.Add("Hierarchy:" + FullName, HierarchyPage);
				}
			}
		}
Exemplo n.º 31
0
 public void WriteLine(UdnManifest Manifest, string Text)
 {
     Write(Manifest, Text);
     WriteLine();
 }
Exemplo n.º 32
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);
            }
        }
Exemplo n.º 33
0
 public override void AddToManifest(UdnManifest Manifest)
 {
     Manifest.Add("MemberIndex:" + Name, this);
 }
Exemplo n.º 34
0
		public override void AddChildrenToManifest(UdnManifest Manifest)
		{
		}
Exemplo n.º 35
0
		static bool BuildCodeUdn(string EngineDir, string XmlDir, string UdnDir, string SitemapDir, string MetadataPath, string ArchivePath, string SitemapArchivePath, List<string> Filters, BuildActions Actions)
		{
			string ApiDir = Path.Combine(UdnDir, "API");
			if((Actions & BuildActions.Clean) != 0)
			{
				Console.WriteLine("Cleaning '{0}'", ApiDir);
				Utility.SafeDeleteDirectoryContents(ApiDir, true);
				Utility.SafeDeleteDirectoryContents(SitemapDir, true);
			}
			if ((Actions & BuildActions.Build) != 0)
			{
				Directory.CreateDirectory(ApiDir);
				Directory.CreateDirectory(SitemapDir);

				// Read the metadata
				MetadataLookup.Load(MetadataPath);

				// Read the list of modules
				List<string> InputModules = new List<string>(File.ReadAllLines(Path.Combine(XmlDir, "modules.txt")));

				// Build the doxygen modules
				List<DoxygenModule> Modules = new List<DoxygenModule>();
				foreach (string InputModule in InputModules)
				{
					Modules.Add(new DoxygenModule(Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(InputModule)), Path.GetDirectoryName(InputModule)));
				}

				// Find all the entities
				if (!bIndexOnly)
				{
					Console.WriteLine("Reading Doxygen output...");

					// Read the engine module and split it into smaller modules
					DoxygenModule RootModule = DoxygenModule.Read("UE4", EngineDir, Path.Combine(XmlDir, "xml"));
					foreach (DoxygenEntity Entity in RootModule.Entities)
					{
						DoxygenModule Module = Modules.Find(x => Entity.File.StartsWith(x.BaseSrcDir));
						Entity.Module = Module;
						Module.Entities.Add(Entity);
					}

					// Now filter all the entities in each module
					if (Filters != null && Filters.Count > 0)
					{
						FilterEntities(Modules, Filters);
					}

					// Remove all the empty modules
					Modules.RemoveAll(x => x.Entities.Count == 0);
				}

				// Create the index page, and all the pages below it
				APIIndex Index = new APIIndex(Modules);

				// Build a list of pages to output
				List<APIPage> OutputPages = new List<APIPage>(Index.GatherPages().OrderBy(x => x.LinkPath));

				// Remove any pages that don't want to be written
				int NumRemoved = OutputPages.RemoveAll(x => !x.ShouldOutputPage());
				Console.WriteLine("Removed {0} pages", NumRemoved);

				// Dump the output stats
				string StatsPath = Path.Combine(SitemapDir, "Stats.txt");
				Console.WriteLine("Writing stats to '" + StatsPath + "'");
				Stats NewStats = new Stats(OutputPages.OfType<APIMember>());
				NewStats.Write(StatsPath);

				// Setup the output directory 
				Utility.SafeCreateDirectory(UdnDir);

				// Build the manifest
				Console.WriteLine("Writing manifest...");
				UdnManifest Manifest = new UdnManifest(Index);
				Manifest.PrintConflicts();
				Manifest.Write(Path.Combine(UdnDir, APIFolder + "\\API.manifest"));

				// Write all the pages
				using (Tracker UdnTracker = new Tracker("Writing UDN pages...", OutputPages.Count))
				{
					foreach (int Idx in UdnTracker.Indices)
					{
						APIPage Page = OutputPages[Idx];

						// Create the output directory
						string MemberDirectory = Path.Combine(UdnDir, Page.LinkPath);
						if (!Directory.Exists(MemberDirectory))
						{
							Directory.CreateDirectory(MemberDirectory);
						}

						// Write the page
						Page.WritePage(Manifest, Path.Combine(MemberDirectory, "index.INT.udn"));
					}
				}

				// Write the sitemap contents
				Console.WriteLine("Writing sitemap contents...");
				Index.WriteSitemapContents(Path.Combine(SitemapDir, "API.hhc"));

				// Write the sitemap index
				Console.WriteLine("Writing sitemap index...");
				Index.WriteSitemapIndex(Path.Combine(SitemapDir, "API.hhk"));
			}
			if ((Actions & BuildActions.Archive) != 0)
			{
				Console.WriteLine("Creating archive '{0}'", ArchivePath);
				Utility.CreateTgzFromDir(ArchivePath, ApiDir);

				Console.WriteLine("Creating archive '{0}'", SitemapArchivePath);
				Utility.CreateTgzFromDir(SitemapArchivePath, SitemapDir);
			}
			return true;
		}
Exemplo n.º 36
0
		public override void AddToManifest(UdnManifest Manifest)
		{
			base.AddToManifest(Manifest);
			Manifest.Add("Module:" + Name, this);
		}
Exemplo n.º 37
0
		static bool BuildBlueprintUdn(string JsonDir, string UdnDir, string SitemapDir, string ArchivePath, string SitemapArchivePath, BuildActions ExecActions)
		{
			string ApiDir = Path.Combine(UdnDir, "BlueprintAPI");
			if ((ExecActions & BuildActions.Clean) != 0)
			{
				Console.WriteLine("Cleaning '{0}'", ApiDir);
				Utility.SafeDeleteDirectoryContents(ApiDir, true);
				Utility.SafeDeleteDirectoryContents(SitemapDir, true);
			}
			if ((ExecActions & BuildActions.Build) != 0)
			{
				Directory.CreateDirectory(ApiDir);
				Directory.CreateDirectory(SitemapDir);

				// Read the input json file
				string JsonFilePath = Path.Combine(JsonDir, "BlueprintAPI.json");
				var json = (Dictionary<string, object>)fastJSON.JSON.Instance.Parse(File.ReadAllText(JsonFilePath));

				APICategory.LoadTooltips((Dictionary<string, object>)json["Categories"]);

				// TODO: This path is clearly sketchy as hell, but we'll clean it up later maybe
				var Actions = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)json["Actor"])["Palette"])["ActionSet"])["Actions"];

				APICategory RootCategory = new APICategory(null, "BlueprintAPI", true);

				foreach (var Action in Actions)
				{
					var CategoryList = Action.Key.Split('|');
					var ActionCategory = RootCategory;

					Debug.Assert(CategoryList.Length > 0);
					Debug.Assert(CategoryList[0] == "Library");

					for (int CategoryIndex = 1; CategoryIndex < CategoryList.Length - 1; ++CategoryIndex)
					{
						ActionCategory = ActionCategory.GetSubCategory(CategoryList[CategoryIndex]);
					}

					ActionCategory.AddAction(new APIAction(ActionCategory, CategoryList.Last(), (Dictionary<string, object>)Action.Value));
				}

				// Build a list of pages to output
				List<APIPage> OutputPages = new List<APIPage>(RootCategory.GatherPages().OrderBy(x => x.LinkPath));

				// Create the output directory
				Utility.SafeCreateDirectory(UdnDir);
				Utility.SafeCreateDirectory(Path.Combine(UdnDir, APIFolder));

				// Build the manifest
				Console.WriteLine("Writing manifest...");
				UdnManifest Manifest = new UdnManifest(RootCategory);
				Manifest.PrintConflicts();
				Manifest.Write(Path.Combine(UdnDir, BlueprintAPIFolder + "\\API.manifest"));

				Console.WriteLine("Categories: " + OutputPages.Count(page => page is APICategory));
				Console.WriteLine("Actions: " + OutputPages.Count(page => page is APIAction));

				// Write all the pages
				using (Tracker UdnTracker = new Tracker("Writing UDN pages...", OutputPages.Count))
				{
					foreach (int Idx in UdnTracker.Indices)
					{
						APIPage Page = OutputPages[Idx];

						// Create the output directory
						string MemberDirectory = Path.Combine(UdnDir, Page.LinkPath);
						if (!Directory.Exists(MemberDirectory))
						{
							Directory.CreateDirectory(MemberDirectory);
						}

						// Write the page
						Page.WritePage(Manifest, Path.Combine(MemberDirectory, "index.INT.udn"));
					}
				}

				// Write the sitemap contents
				Console.WriteLine("Writing sitemap contents...");
				RootCategory.WriteSitemapContents(Path.Combine(SitemapDir, "BlueprintAPI.hhc"));

				// Write the sitemap index
				Console.WriteLine("Writing sitemap index...");
				RootCategory.WriteSitemapIndex(Path.Combine(SitemapDir, "BlueprintAPI.hhk"));
			}
			if ((ExecActions & BuildActions.Archive) != 0)
			{
				Console.WriteLine("Creating archive '{0}'", ArchivePath);
				Utility.CreateTgzFromDir(ArchivePath, ApiDir);

				Console.WriteLine("Creating archive '{0}'", SitemapArchivePath);
				Utility.CreateTgzFromDir(SitemapArchivePath, SitemapDir);
			}
			return true;
		}
Exemplo n.º 38
0
		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]");
			}
		}
Exemplo n.º 39
0
 public void WriteLine(UdnManifest Manifest, string Text)
 {
     Write(Manifest, Text);
     WriteLine();
 }
Exemplo n.º 40
0
 public void Write(UdnManifest Manifest, string Text)
 {
     Write(Manifest.FormatString(Text));
 }
        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]");
            }
        }
Exemplo n.º 42
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);
			}
        }
Exemplo n.º 43
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 the source
                WriteSourceSection(Writer);

                // Write the @see directives
                WriteSeeAlsoSection(Writer, SeeAlso);

                // Write the reference info
                WriteReferencesSection(Writer, Entity);
            }
        }