Проверка шаблона шины для iOS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

il y a 1 an
il y a 1 an
il y a 1 an
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // ВНИМАНИЕ Сгенерировано автоматом из файла %MODULE%.yml
  2. // ВНИМАНИЕ Не менять руками!
  3. %IMPORTS%
  4. // MARK: - Context
  5. public protocol %MODULE%Context {
  6. %CONTEXT_FIELDS%
  7. }
  8. // MARK: - Controller
  9. extension %MODULE% {
  10. final class Controller: MPAK.Controller<%MODULE%.Model> {
  11. init() {
  12. super.init(
  13. %MODULE%.Model(),
  14. debugClassName: "%MODULE_SHORT%Ctrl",
  15. debugLog: { aelog($0) }
  16. )
  17. }
  18. }
  19. %CORE%
  20. // MARK: - Model
  21. public struct Model: %MODULE%Context {
  22. %MODEL_FIELDS%
  23. }
  24. // MARK: - Service
  25. public final class Service {
  26. let ctrl = Controller()
  27. let world: World
  28. %SERVICE_CORE%
  29. var any = [Any]()
  30. var subscriptions = [AnyCancellable]()
  31. static private(set) weak var singleton: Service?
  32. public init(_ world: World) {
  33. self.world = world
  34. Self.singleton = self
  35. %SERVICE_SECTIONS%
  36. }
  37. }
  38. // MARK: - World
  39. public struct World {
  40. %WORLD_FIELDS%
  41. public init(
  42. %WORLD_PARAMETERS%
  43. ) {
  44. %WORLD_CONSTRUCTOR%
  45. }
  46. }
  47. enum SectionGenerated {
  48. %CORE_SECTION_GENERATED%
  49. %SERVICE_SECTION_GENERATED%
  50. }
  51. }