DiForce.cs 627 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Aitex.Core.Util;
  6. namespace Aitex.Core.RT.Simulator
  7. {
  8. public class DiForce : Singleton<DiForce>
  9. {
  10. public Dictionary<string, bool> ForceValues { get; set; }
  11. public DiForce()
  12. {
  13. ForceValues = new Dictionary<string, bool>();
  14. }
  15. public void Set(string di, bool value)
  16. {
  17. ForceValues[di] = value;
  18. }
  19. public void Unset(string di)
  20. {
  21. if (ForceValues.ContainsKey(di))
  22. ForceValues.Remove(di);
  23. }
  24. }
  25. }