diff api/Objects/Category.cs @ 46:a5855fcd75ab

Re #11 - Document classes and methods * Document methods in UnitType and Category classes
author IBBoard <dev@ibboard.co.uk>
date Mon, 23 Mar 2009 20:57:07 +0000
parents 548cfc776f54
children 3ea0ab04352b
line wrap: on
line diff
--- a/api/Objects/Category.cs	Mon Mar 23 20:21:41 2009 +0000
+++ b/api/Objects/Category.cs	Mon Mar 23 20:57:07 2009 +0000
@@ -9,7 +9,7 @@
 namespace IBBoard.WarFoundry.API.Objects
 {
 	/// <summary>
-	/// Summary description for Category.
+	/// A Category is a definition at the <see cref=" GameSystem"/> or <see cref=" Race"/> level of a group that <see cref=" UnitType"/>s belong to. Each category has a name and a min/max limit on points or percentage of a total army cost that units in the category can total.
 	/// </summary>
 	public class Category : WarFoundryObject
 	{
@@ -35,8 +35,11 @@
 		protected override string DefaultName()
 		{
 			return "";
-		}
-
+		}
+		
+		/// <value>
+		/// Gets or sets the minimum number of points that the units of this category can cost. Note: This should be set AFTER MaximumPoints, otherwise an unintended default value may be set for the minimum
+		/// </value>
 		public int MinimumPoints
 		{
 			get { return minPts; }
@@ -46,7 +49,10 @@
 				CheckMinimumPoints();
 			}
 		}
-
+		
+		/// <value>
+		/// Gets or sets the maximum number of points that the units of this category can cost. Note: This should be set BEFORE MinimumPoints, otherwise an unintended default value may be set for the minimum
+		/// </value>
 		public int MaximumPoints
 		{
 			get { return maxPts; }
@@ -55,8 +61,11 @@
 				maxPts = (value >= 0 ? value : WarFoundryCore.INFINITY);
 				CheckMinimumPoints();
 			}
-		}
-
+		}
+		
+		/// <summary>
+		/// Makes sure that the minimum points value isn't more than the maximum points value, hence the warning on the properties
+		/// </summary>
 		private void CheckMinimumPoints()
 		{
 			if (MinimumPoints > MaximumPoints && MaximumPoints!=WarFoundryCore.INFINITY)
@@ -66,6 +75,9 @@
 			}
 		}
 		
+		/// <value>
+		/// Gets or sets the minimum percentage of the total army points value that the units of this category can cost. Note: This should be set AFTER MaximumPercentage, otherwise an unintended default value may be set for the minimum
+		/// </value>
 		public int MinimumPercentage
 		{
 			get { return minPc; }
@@ -74,8 +86,11 @@
 				minPc = (value >= 0 ? value : 0);
 				CheckMinimumPercentage();
 			}
-		}
-
+		}
+		
+		/// <value>
+		/// Gets or sets the maximum percentage of the total army points value that the units of this category can cost. Note: This should be set BEFORE MinimumPercentage, otherwise an unintended default value may be set for the minimum
+		/// </value>
 		public int MaximumPercentage
 		{
 			get { return maxPc; }
@@ -96,8 +111,11 @@
 				
 				CheckMinimumPercentage();
 			}
-		}
-
+		}
+		
+		/// <summary>
+		/// Makes sure that the minimum percentage value isn't more than the maximum points value, hence the warning on the properties
+		/// </summary>
 		private void CheckMinimumPercentage()
 		{
 			if (MinimumPercentage > MaximumPercentage)