Digital Twin - GUI
Toolkit.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 
7 namespace GUI.Datatypes
8 {
12 
16  public class Toolkit
17  {
19  public String Name;
21  private List<String> products;
23  private List<String> ww;
25  private LocationCB loc;
26 
32 
34  public Toolkit(String name, LocationCB loc)
35  {
36  Name = name;
37  this.loc = loc;
38  products = new List<string>();
39  ww = new List<string>();
40  }
41 
46 
50  public void addProduct(String productName)
51  {
52  if (!products.Contains(productName))
53  {
54  products.Add(productName);
55  }
56  }
57 
62 
65  public void addInfluencedToolkits(String toolkitName)
66  {
67  ww.Add(toolkitName);
68  }
69 
74  public List<String> getInfluencedToolkits()
75  {
76  return ww;
77  }
78 
84  public bool isAbleToProduce(String p)
85  {
86  return products.Contains(p);
87  }
88  }
89 }
List< String > getInfluencedToolkits()
Grants access to the list of toolkits that cannot be used while this one is in use.
Definition: Toolkit.cs:74
bool isAbleToProduce(String p)
Checks if Toolkit can produce a certain product.
Definition: Toolkit.cs:84
Toolkit(String name, LocationCB loc)
The Constructor.
Definition: Toolkit.cs:34
A wrapper class for toolkits.
Definition: Toolkit.cs:16
LocationCB loc
Location where this toolkit is at.
Definition: Toolkit.cs:25
A wrapper class for locations.
Definition: LocationCB.cs:19
String Name
The toolkit&#39;s name.
Definition: Toolkit.cs:19
void addProduct(String productName)
Add a product that is produced by this toolkit.
Definition: Toolkit.cs:50
void addInfluencedToolkits(String toolkitName)
Add a toolkit to the list of influenced toolkits.
Definition: Toolkit.cs:65
List< String > products
List of products this toolkit is able to produce.
Definition: Toolkit.cs:21
List< String > ww
List of toolkits that are cannot be used when this toolkit is in use.
Definition: Toolkit.cs:23