forked from kyordhel/GPSRCmdGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gesture.cs
57 lines (50 loc) · 1.84 KB
/
Gesture.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.ComponentModel;
using System.Xml.Serialization;
namespace GPSRCmdGen
{
/// <summary>
/// Represents a gesture performed by a human such as pointing, waving or rising arms
/// in accordance with the RoboCup@Home Rulebook 2015
/// </summary>
public class Gesture : INameable, ITiered
{
/// <summary>
/// Initializes a new instance of the <see cref="GPSRCmdGen.Gesture"/> class.
/// </summary>
/// <remarks>Intended fo serialiazation purposes only</remarks>
public Gesture () : this("none", DifficultyDegree.Easy){ }
/// <summary>
/// Initializes a new instance of the <see cref="GPSRCmdGen.Gesture"/> class.
/// </summary>
/// <param name="name">The name of the gesture</param>
public Gesture (string name) : this(name, DifficultyDegree.Easy){ }
/// <summary>
/// Initializes a new instance of the <see cref="GPSRCmdGen.Gesture"/> class.
/// </summary>
/// <param name="name">The name of the gesture</param>
/// <param name="tier">The difficulty degree for DETECTING the gesture</param>
public Gesture (string name, DifficultyDegree tier){
this.Name = name;
this.Tier = tier;
}
/// <summary>
/// Gets or sets the name of the gesture
/// </summary>
[XmlAttribute("name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the difficulty degree (tier) for DETECTING the gesture
/// </summary>
[XmlAttribute("difficulty"), DefaultValue(DifficultyDegree.Unknown)]
public DifficultyDegree Tier{ get; set; }
/// <summary>
/// Returns a <see cref="System.String"/> that represents the current <see cref="GPSRCmdGen.Gesture"/>.
/// </summary>
/// <returns>A <see cref="System.String"/> that represents the current <see cref="GPSRCmdGen.Gesture"/>.</returns>
public override string ToString()
{
return String.Format("{0} ({1})", this.Name, this.Tier);
}
}
}