Проверка шаблона шины для iOS
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

generateStructure.py 2.0KB

11 meses atrás
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from generation.generateContextFields import *
  2. from generation.generateCore import *
  3. from generation.generateCoreSectionGenerated import *
  4. from generation.generateCoreSectionGeneratedActions import *
  5. from generation.generateCoreSectionsDestroy import *
  6. from generation.generateCoreSectionsSetup import *
  7. from generation.generateCoreWindow import *
  8. from generation.generateFile import *
  9. from generation.generateImports import *
  10. from generation.generateModelFields import *
  11. from generation.generateServiceSectionGenerated import *
  12. from generation.generateServiceSectionGeneratedActions import *
  13. from generation.generateServiceSections import *
  14. from generation.generateWorldConstructor import *
  15. from generation.generateWorldFields import *
  16. from generation.generateWorldParameters import *
  17. from generation.hasSectionGenerated import *
  18. from generation.sectionGeneratedPipes import *
  19. def generateStructure(c):
  20. generateContextFields(c)
  21. generateImports(c)
  22. generateModelFields(c)
  23. # Генерируем ядро лишь при наличии инструкций в YML.
  24. if hasSectionGenerated(c.structure.core):
  25. generateCore(c)
  26. generateCoreSectionsDestroy(c)
  27. generateCoreSectionsSetup(c)
  28. generateCoreWindow(c)
  29. generateCoreSectionGenerated(c)
  30. generateCoreSectionGeneratedActions(c)
  31. c.coreSectionGeneratedPipes = sectionGeneratedPipes(c.structure.core, "&core.subscriptions", c)
  32. generateServiceSections(c)
  33. # Генерируем секцию сервиса лишь при наличии инструкций в YML.
  34. if hasSectionGenerated(c.structure.service):
  35. generateServiceSectionGenerated(c)
  36. generateServiceSectionGeneratedActions(c)
  37. c.serviceSectionGeneratedPipes = sectionGeneratedPipes(c.structure.service, "nil", c)
  38. generateWorldConstructor(c)
  39. generateWorldFields(c)
  40. generateWorldParameters(c)
  41. # Файл обязательно генерировать последним: зависит от остальных.
  42. generateFile(c)