changeset 480:e0641e0eb86c

Re #410: "N units per M models in parent" requirement * Move context to a sub-folder/namespace to reduce clutter * Add simple "parent unit" context
author IBBoard <dev@ibboard.co.uk>
date Wed, 23 May 2012 21:00:33 +0100
parents f48c49b53738
children 81f32062c9fa
files API/Objects/Requirement/AbstractUnitRequirement.cs API/Objects/Requirement/AddingContext.cs API/Objects/Requirement/Context/AddingContext.cs API/Objects/Requirement/Context/AddingToParentContext.cs API/Objects/Requirement/RaceRequiresAtLeastNUnitsRequirement.cs API/Objects/Requirement/RaceRequiresNoMoreThanNUnitsRequirement.cs API/Objects/Requirement/RequiresAtLeastNUnitsRequirement.cs API/Objects/Requirement/RequiresNUnitsForMObjectsRequirement.cs API/Objects/Requirement/RequiresNoMoreThanNOfUnitTypeRequirement.cs API/Objects/Requirement/UnitRequiresAtLeastNUnitsRequirement.cs API/Objects/Requirement/UnitRequiresNUnitsForMUnitsRequirement.cs API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs IBBoard.WarFoundry.API.csproj
diffstat 13 files changed, 48 insertions(+), 18 deletions(-) [+]
line diff
     1.1 --- a/API/Objects/Requirement/AbstractUnitRequirement.cs	Wed May 23 20:56:27 2012 +0100
     1.2 +++ b/API/Objects/Requirement/AbstractUnitRequirement.cs	Wed May 23 21:00:33 2012 +0100
     1.3 @@ -3,6 +3,7 @@
     1.4  // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     1.5  using System;
     1.6  using System.Collections.Generic;
     1.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
     1.8  
     1.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
    1.10  {
     2.1 --- a/API/Objects/Requirement/AddingContext.cs	Wed May 23 20:56:27 2012 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,17 +0,0 @@
     2.4 -// This file (AbstractRequirement.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2011 IBBoard
     2.5 -// 
     2.6 -// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     2.7 -using System;
     2.8 -using System.Collections.Generic;
     2.9 -
    2.10 -namespace IBBoard.WarFoundry.API.Objects.Requirement
    2.11 -{
    2.12 -	/// <summary>
    2.13 -	/// Marker interface (for now) of useful context information for the AllowsAdding method call.
    2.14 -	/// </summary>
    2.15 -	public interface AddingContext
    2.16 -	{
    2.17 -
    2.18 -	}
    2.19 -}
    2.20 -
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/API/Objects/Requirement/Context/AddingContext.cs	Wed May 23 21:00:33 2012 +0100
     3.3 @@ -0,0 +1,17 @@
     3.4 +// This file (AbstractRequirement.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2011 IBBoard
     3.5 +// 
     3.6 +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     3.7 +using System;
     3.8 +using System.Collections.Generic;
     3.9 +
    3.10 +namespace IBBoard.WarFoundry.API.Objects.Requirement.Context
    3.11 +{
    3.12 +	/// <summary>
    3.13 +	/// Marker interface (for now) of useful context information for the AllowsAdding method call.
    3.14 +	/// </summary>
    3.15 +	public interface AddingContext
    3.16 +	{
    3.17 +
    3.18 +	}
    3.19 +}
    3.20 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/API/Objects/Requirement/Context/AddingToParentContext.cs	Wed May 23 21:00:33 2012 +0100
     4.3 @@ -0,0 +1,17 @@
     4.4 +// This file (AddingToParentContext.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2012 IBBoard
     4.5 +// 
     4.6 +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     4.7 +using System;
     4.8 +namespace IBBoard.WarFoundry.API.Objects.Requirement.Context
     4.9 +{
    4.10 +	public class AddingToParentContext : AddingContext
    4.11 +	{
    4.12 +		public AddingToParentContext(Unit parentUnit)
    4.13 +		{
    4.14 +			ParentUnit = parentUnit;
    4.15 +		}
    4.16 +
    4.17 +		public Unit ParentUnit { get; set; }
    4.18 +	}
    4.19 +}
    4.20 +
     5.1 --- a/API/Objects/Requirement/RaceRequiresAtLeastNUnitsRequirement.cs	Wed May 23 20:56:27 2012 +0100
     5.2 +++ b/API/Objects/Requirement/RaceRequiresAtLeastNUnitsRequirement.cs	Wed May 23 21:00:33 2012 +0100
     5.3 @@ -3,6 +3,7 @@
     5.4  // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     5.5  using System;
     5.6  using IBBoard.Collections;
     5.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
     5.8  
     5.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
    5.10  {
     6.1 --- a/API/Objects/Requirement/RaceRequiresNoMoreThanNUnitsRequirement.cs	Wed May 23 20:56:27 2012 +0100
     6.2 +++ b/API/Objects/Requirement/RaceRequiresNoMoreThanNUnitsRequirement.cs	Wed May 23 21:00:33 2012 +0100
     6.3 @@ -3,6 +3,7 @@
     6.4  // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     6.5  using System;
     6.6  using IBBoard.Collections;
     6.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
     6.8  
     6.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
    6.10  {
     7.1 --- a/API/Objects/Requirement/RequiresAtLeastNUnitsRequirement.cs	Wed May 23 20:56:27 2012 +0100
     7.2 +++ b/API/Objects/Requirement/RequiresAtLeastNUnitsRequirement.cs	Wed May 23 21:00:33 2012 +0100
     7.3 @@ -5,6 +5,7 @@
     7.4  using System.Collections.Generic;
     7.5  using IBBoard.WarFoundry.API.Objects;
     7.6  using System.Text;
     7.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
     7.8  
     7.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
    7.10  {
     8.1 --- a/API/Objects/Requirement/RequiresNUnitsForMObjectsRequirement.cs	Wed May 23 20:56:27 2012 +0100
     8.2 +++ b/API/Objects/Requirement/RequiresNUnitsForMObjectsRequirement.cs	Wed May 23 21:00:33 2012 +0100
     8.3 @@ -4,6 +4,7 @@
     8.4  using System;
     8.5  using System.Collections.Generic;
     8.6  using System.Text;
     8.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
     8.8  
     8.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
    8.10  {
     9.1 --- a/API/Objects/Requirement/RequiresNoMoreThanNOfUnitTypeRequirement.cs	Wed May 23 20:56:27 2012 +0100
     9.2 +++ b/API/Objects/Requirement/RequiresNoMoreThanNOfUnitTypeRequirement.cs	Wed May 23 21:00:33 2012 +0100
     9.3 @@ -5,6 +5,7 @@
     9.4  using IBBoard.WarFoundry.API.Objects;
     9.5  using System.Collections.Generic;
     9.6  using System.Text;
     9.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
     9.8  
     9.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
    9.10  {
    10.1 --- a/API/Objects/Requirement/UnitRequiresAtLeastNUnitsRequirement.cs	Wed May 23 20:56:27 2012 +0100
    10.2 +++ b/API/Objects/Requirement/UnitRequiresAtLeastNUnitsRequirement.cs	Wed May 23 21:00:33 2012 +0100
    10.3 @@ -4,6 +4,7 @@
    10.4  using System;
    10.5  using System.Collections.Generic;
    10.6  using IBBoard.WarFoundry.API.Objects;
    10.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
    10.8  
    10.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
   10.10  {
    11.1 --- a/API/Objects/Requirement/UnitRequiresNUnitsForMUnitsRequirement.cs	Wed May 23 20:56:27 2012 +0100
    11.2 +++ b/API/Objects/Requirement/UnitRequiresNUnitsForMUnitsRequirement.cs	Wed May 23 21:00:33 2012 +0100
    11.3 @@ -4,6 +4,7 @@
    11.4  using System;
    11.5  using System.Collections.Generic;
    11.6  using IBBoard.WarFoundry.API.Objects;
    11.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
    11.8  
    11.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
   11.10  {
    12.1 --- a/API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs	Wed May 23 20:56:27 2012 +0100
    12.2 +++ b/API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs	Wed May 23 21:00:33 2012 +0100
    12.3 @@ -4,6 +4,7 @@
    12.4  using System;
    12.5  using System.Collections.Generic;
    12.6  using IBBoard.WarFoundry.API.Objects;
    12.7 +using IBBoard.WarFoundry.API.Objects.Requirement.Context;
    12.8  
    12.9  namespace IBBoard.WarFoundry.API.Objects.Requirement
   12.10  {
    13.1 --- a/IBBoard.WarFoundry.API.csproj	Wed May 23 20:56:27 2012 +0100
    13.2 +++ b/IBBoard.WarFoundry.API.csproj	Wed May 23 21:00:33 2012 +0100
    13.3 @@ -196,7 +196,8 @@
    13.4      <Compile Include="API\Objects\Requirement\AbstractUnitRequirement.cs" />
    13.5      <Compile Include="API\Objects\Requirement\RaceRequiresAtLeastNUnitsRequirement.cs" />
    13.6      <Compile Include="API\Objects\Requirement\RaceRequiresNoMoreThanNUnitsRequirement.cs" />
    13.7 -    <Compile Include="API\Objects\Requirement\AddingContext.cs" />
    13.8 +    <Compile Include="API\Objects\Requirement\Context\AddingContext.cs" />
    13.9 +    <Compile Include="API\Objects\Requirement\Context\AddingToParentContext.cs" />
   13.10    </ItemGroup>
   13.11    <ItemGroup>
   13.12      <Reference Include="System.Xml" />
   13.13 @@ -230,4 +231,7 @@
   13.14      </MonoDevelop>
   13.15      <VisualStudio />
   13.16    </ProjectExtensions>
   13.17 +  <ItemGroup>
   13.18 +    <Folder Include="API\Objects\Requirement\Context\" />
   13.19 +  </ItemGroup>
   13.20  </Project>
   13.21 \ No newline at end of file