Проверка шаблона шины для iOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Mode.py 890B

11 months ago
12345678910111213141516171819202122232425262728293031
  1. class Mode:
  2. def __init__(self):
  3. self.reset()
  4. def parseLine(self, line):
  5. if line.startswith("model:"):
  6. self.reset()
  7. self.isModel = True
  8. elif line.startswith("core:"):
  9. self.reset()
  10. self.isCore = True
  11. elif line.startswith("service:"):
  12. self.reset()
  13. self.isService = True
  14. elif line.startswith("world:"):
  15. self.reset()
  16. self.isWorld = True
  17. elif line.startswith(" actions:"):
  18. self.isAction = True
  19. self.isPipe = False
  20. elif line.startswith(" pipes:"):
  21. self.isAction = False
  22. self.isPipe = True
  23. def reset(self):
  24. self.isAction = False
  25. self.isCore = False
  26. self.isModel = False
  27. self.isPipe = False
  28. self.isService = False
  29. self.isWorld = False