annotate API/Objects/Requirement/IRequirement.cs @ 354:47acc63cf529

Re #27: Unit requirements * Bit mask the values with a bitwise AND rather than an OR
author IBBoard <dev@ibboard.co.uk>
date Fri, 22 Apr 2011 10:38:03 +0000
parents 44a6539fadf9
children dbe7ccb1e557
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
347
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 // This file (Requirement.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2011 IBBoard
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 //
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 // 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.
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 using System;
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 namespace IBBoard.WarFoundry.API.Objects.Requirement
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 {
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 /// <summary>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 /// Base interface for a Requirement that constrains the units/equipment that can be taken in an army
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 /// </summary>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 public interface IRequirement
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 {
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 /// <summary>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 /// Checks whether the supplied WarFoundryObject can be added to the supplied army.
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 /// </summary>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 /// <returns>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 /// A <code>Validation</code> enum to show the result of the validation
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 /// </returns>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 /// <param name='wfObject'>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 /// The object that we want to add. This may be involved in the check, or it may not affect the evaluation of the requirement
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 /// </param>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 /// <param name='toArmy'>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 /// The army to add the object to.
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 /// </param>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 Validation AllowsAdding(WarFoundryObject wfObject, Army toArmy);
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 /// <summary>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 /// Checks whether the supplied army is currently valid according to this requirement.
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 /// </summary>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 /// <returns>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 /// A <code>Validation</code> enum to show the result of the validation
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 /// </returns>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 /// <param name='toValidate'>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 /// The army to validate
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 /// </param>
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 Validation ValidatesArmy(Army army);
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 }
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 }
44a6539fadf9 Re #27: Unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39